From 960a9467dd28db7f4a80447c467496a34c06b1ec Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Tue, 26 Nov 2024 17:01:53 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20post-p?= =?UTF-8?q?rocessor?= 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 --- ServiceDirectory/metadata/V1/Service.php | 6 +- .../Cloud/Servicedirectory/V1/Endpoint.php | 42 - .../Servicedirectory/V1/LookupService.php | 41 - .../Cloud/Servicedirectory/V1/PBNamespace.php | 37 - .../V1/RegistrationService.php | 135 -- .../Cloud/Servicedirectory/V1/Service.php | 39 - .../V1/CreateEndpointRequest.php | 194 --- .../V1/CreateNamespaceRequest.php | 199 --- .../V1/CreateServiceRequest.php | 194 --- .../V1/DeleteEndpointRequest.php | 82 - .../V1/DeleteNamespaceRequest.php | 82 - .../V1/DeleteServiceRequest.php | 82 - .../Cloud/ServiceDirectory/V1/Endpoint.php | 359 ---- .../V1/GetEndpointRequest.php | 84 - .../V1/GetNamespaceRequest.php | 82 - .../ServiceDirectory/V1/GetServiceRequest.php | 84 - .../V1/ListEndpointsRequest.php | 359 ---- .../V1/ListEndpointsResponse.php | 106 -- .../V1/ListNamespacesRequest.php | 339 ---- .../V1/ListNamespacesResponse.php | 106 -- .../V1/ListServicesRequest.php | 347 ---- .../V1/ListServicesResponse.php | 106 -- .../Cloud/ServiceDirectory/V1/PBNamespace.php | 153 -- .../V1/ResolveServiceRequest.php | 265 --- .../V1/ResolveServiceResponse.php | 71 - .../Cloud/ServiceDirectory/V1/Service.php | 256 --- .../V1/UpdateEndpointRequest.php | 137 -- .../V1/UpdateNamespaceRequest.php | 137 -- .../V1/UpdateServiceRequest.php | 137 -- .../V1/LookupServiceClient/get_location.php | 57 - .../V1/LookupServiceClient/list_locations.php | 62 - .../LookupServiceClient/resolve_service.php | 78 - .../create_endpoint.php | 87 - .../create_namespace.php | 83 - .../create_service.php | 86 - .../delete_endpoint.php | 75 - .../delete_namespace.php | 70 - .../delete_service.php | 75 - .../get_endpoint.php | 77 - .../get_iam_policy.php | 71 - .../get_location.php | 57 - .../get_namespace.php | 71 - .../RegistrationServiceClient/get_service.php | 76 - .../list_endpoints.php | 82 - .../list_locations.php | 62 - .../list_namespaces.php | 77 - .../list_services.php | 81 - .../set_iam_policy.php | 73 - .../test_iam_permissions.php | 78 - .../update_endpoint.php | 62 - .../update_namespace.php | 62 - .../update_service.php | 62 - .../v1/src/V1/Client/LookupServiceClient.php | 301 ---- .../V1/Client/RegistrationServiceClient.php | 870 ---------- .../v1/src/V1/gapic_metadata.json | 142 -- .../lookup_service_client_config.json | 50 - .../lookup_service_descriptor_config.php | 77 - .../lookup_service_rest_client_config.php | 65 - .../registration_service_client_config.json | 135 -- ...registration_service_descriptor_config.php | 312 ---- ...egistration_service_rest_client_config.php | 302 ---- .../V1/Client/LookupServiceClientTest.php | 279 --- .../Client/RegistrationServiceClientTest.php | 1532 ----------------- 63 files changed, 3 insertions(+), 9987 deletions(-) delete mode 100644 owl-bot-staging/ServiceDirectory/v1/proto/src/GPBMetadata/Google/Cloud/Servicedirectory/V1/Endpoint.php delete mode 100644 owl-bot-staging/ServiceDirectory/v1/proto/src/GPBMetadata/Google/Cloud/Servicedirectory/V1/LookupService.php delete mode 100644 owl-bot-staging/ServiceDirectory/v1/proto/src/GPBMetadata/Google/Cloud/Servicedirectory/V1/PBNamespace.php delete mode 100644 owl-bot-staging/ServiceDirectory/v1/proto/src/GPBMetadata/Google/Cloud/Servicedirectory/V1/RegistrationService.php delete mode 100644 owl-bot-staging/ServiceDirectory/v1/proto/src/GPBMetadata/Google/Cloud/Servicedirectory/V1/Service.php delete mode 100644 owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/CreateEndpointRequest.php delete mode 100644 owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/CreateNamespaceRequest.php delete mode 100644 owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/CreateServiceRequest.php delete mode 100644 owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/DeleteEndpointRequest.php delete mode 100644 owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/DeleteNamespaceRequest.php delete mode 100644 owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/DeleteServiceRequest.php delete mode 100644 owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/Endpoint.php delete mode 100644 owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/GetEndpointRequest.php delete mode 100644 owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/GetNamespaceRequest.php delete mode 100644 owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/GetServiceRequest.php delete mode 100644 owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/ListEndpointsRequest.php delete mode 100644 owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/ListEndpointsResponse.php delete mode 100644 owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/ListNamespacesRequest.php delete mode 100644 owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/ListNamespacesResponse.php delete mode 100644 owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/ListServicesRequest.php delete mode 100644 owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/ListServicesResponse.php delete mode 100644 owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/PBNamespace.php delete mode 100644 owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/ResolveServiceRequest.php delete mode 100644 owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/ResolveServiceResponse.php delete mode 100644 owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/Service.php delete mode 100644 owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/UpdateEndpointRequest.php delete mode 100644 owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/UpdateNamespaceRequest.php delete mode 100644 owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/UpdateServiceRequest.php delete mode 100644 owl-bot-staging/ServiceDirectory/v1/samples/V1/LookupServiceClient/get_location.php delete mode 100644 owl-bot-staging/ServiceDirectory/v1/samples/V1/LookupServiceClient/list_locations.php delete mode 100644 owl-bot-staging/ServiceDirectory/v1/samples/V1/LookupServiceClient/resolve_service.php delete mode 100644 owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/create_endpoint.php delete mode 100644 owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/create_namespace.php delete mode 100644 owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/create_service.php delete mode 100644 owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/delete_endpoint.php delete mode 100644 owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/delete_namespace.php delete mode 100644 owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/delete_service.php delete mode 100644 owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/get_endpoint.php delete mode 100644 owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/get_iam_policy.php delete mode 100644 owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/get_location.php delete mode 100644 owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/get_namespace.php delete mode 100644 owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/get_service.php delete mode 100644 owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/list_endpoints.php delete mode 100644 owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/list_locations.php delete mode 100644 owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/list_namespaces.php delete mode 100644 owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/list_services.php delete mode 100644 owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/set_iam_policy.php delete mode 100644 owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/update_endpoint.php delete mode 100644 owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/update_namespace.php delete mode 100644 owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/update_service.php delete mode 100644 owl-bot-staging/ServiceDirectory/v1/src/V1/Client/LookupServiceClient.php delete mode 100644 owl-bot-staging/ServiceDirectory/v1/src/V1/Client/RegistrationServiceClient.php delete mode 100644 owl-bot-staging/ServiceDirectory/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/ServiceDirectory/v1/src/V1/resources/lookup_service_client_config.json delete mode 100644 owl-bot-staging/ServiceDirectory/v1/src/V1/resources/lookup_service_descriptor_config.php delete mode 100644 owl-bot-staging/ServiceDirectory/v1/src/V1/resources/lookup_service_rest_client_config.php delete mode 100644 owl-bot-staging/ServiceDirectory/v1/src/V1/resources/registration_service_client_config.json delete mode 100644 owl-bot-staging/ServiceDirectory/v1/src/V1/resources/registration_service_descriptor_config.php delete mode 100644 owl-bot-staging/ServiceDirectory/v1/src/V1/resources/registration_service_rest_client_config.php delete mode 100644 owl-bot-staging/ServiceDirectory/v1/tests/Unit/V1/Client/LookupServiceClientTest.php delete mode 100644 owl-bot-staging/ServiceDirectory/v1/tests/Unit/V1/Client/RegistrationServiceClientTest.php diff --git a/ServiceDirectory/metadata/V1/Service.php b/ServiceDirectory/metadata/V1/Service.php index f2fbabaaef68..16d0b2b4d517 100644 --- a/ServiceDirectory/metadata/V1/Service.php +++ b/ServiceDirectory/metadata/V1/Service.php @@ -19,7 +19,7 @@ public static function initOnce() { \GPBMetadata\Google\Cloud\Servicedirectory\V1\Endpoint::initOnce(); $pool->internalAddGeneratedFile( ' - + .google/cloud/servicedirectory/v1/service.proto google.cloud.servicedirectory.v1google/api/resource.proto/google/cloud/servicedirectory/v1/endpoint.proto" Service name ( BAT @@ -29,8 +29,8 @@ public static function initOnce() { AnnotationsEntry key (  value ( :8:A| -\'servicedirectory.googleapis.com/ServiceQprojects/{project}/locations/{location}/namespaces/{namespace}/services/{service}B -$com.google.cloud.servicedirectory.v1B ServiceProtoPZPcloud.google.com/go/servicedirectory/apiv1/servicedirectorypb;servicedirectorypb Google.Cloud.ServiceDirectory.V1 Google\\Cloud\\ServiceDirectory\\V1#Google::Cloud::ServiceDirectory::V1bproto3' +\'servicedirectory.googleapis.com/ServiceQprojects/{project}/locations/{location}/namespaces/{namespace}/services/{service}B +$com.google.cloud.servicedirectory.v1B ServiceProtoPZPcloud.google.com/go/servicedirectory/apiv1/servicedirectorypb;servicedirectorypb Google.Cloud.ServiceDirectory.V1 Google\\Cloud\\ServiceDirectory\\V1#Google::Cloud::ServiceDirectory::V1bproto3' , true); static::$is_initialized = true; diff --git a/owl-bot-staging/ServiceDirectory/v1/proto/src/GPBMetadata/Google/Cloud/Servicedirectory/V1/Endpoint.php b/owl-bot-staging/ServiceDirectory/v1/proto/src/GPBMetadata/Google/Cloud/Servicedirectory/V1/Endpoint.php deleted file mode 100644 index 0ca6bf3933c4..000000000000 --- a/owl-bot-staging/ServiceDirectory/v1/proto/src/GPBMetadata/Google/Cloud/Servicedirectory/V1/Endpoint.php +++ /dev/null @@ -1,42 +0,0 @@ -internalAddGeneratedFile( - ' - -/google/cloud/servicedirectory/v1/endpoint.proto google.cloud.servicedirectory.v1google/api/resource.proto" -Endpoint -name ( BA -address ( BA -port (BAU - annotations ( 2;.google.cloud.servicedirectory.v1.Endpoint.AnnotationsEntryBA@ -network ( B/AA) -\'servicedirectory.googleapis.com/Network -uid ( BA2 -AnnotationsEntry -key (  -value ( :8:A -(servicedirectory.googleapis.com/Endpointfprojects/{project}/locations/{location}/namespaces/{namespace}/services/{service}/endpoints/{endpoint}B -$com.google.cloud.servicedirectory.v1B EndpointProtoPZPcloud.google.com/go/servicedirectory/apiv1/servicedirectorypb;servicedirectorypb Google.Cloud.ServiceDirectory.V1 Google\\Cloud\\ServiceDirectory\\V1#Google::Cloud::ServiceDirectory::V1Aa -\'servicedirectory.googleapis.com/Network6projects/{project}/locations/global/networks/{network}bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/ServiceDirectory/v1/proto/src/GPBMetadata/Google/Cloud/Servicedirectory/V1/LookupService.php b/owl-bot-staging/ServiceDirectory/v1/proto/src/GPBMetadata/Google/Cloud/Servicedirectory/V1/LookupService.php deleted file mode 100644 index 96f5c1fda89d..000000000000 --- a/owl-bot-staging/ServiceDirectory/v1/proto/src/GPBMetadata/Google/Cloud/Servicedirectory/V1/LookupService.php +++ /dev/null @@ -1,41 +0,0 @@ -internalAddGeneratedFile( - ' - -5google/cloud/servicedirectory/v1/lookup_service.proto google.cloud.servicedirectory.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto.google/cloud/servicedirectory/v1/service.proto" -ResolveServiceRequest= -name ( B/AA) -\'servicedirectory.googleapis.com/Service - max_endpoints (BA -endpoint_filter ( BA"T -ResolveServiceResponse: -service ( 2).google.cloud.servicedirectory.v1.Service2 - LookupService -ResolveService7.google.cloud.servicedirectory.v1.ResolveServiceRequest8.google.cloud.servicedirectory.v1.ResolveServiceResponse"LF"A/v1/{name=projects/*/locations/*/namespaces/*/services/*}:resolve:*SAservicedirectory.googleapis.comA.https://www.googleapis.com/auth/cloud-platformB -$com.google.cloud.servicedirectory.v1BLookupServiceProtoPZPcloud.google.com/go/servicedirectory/apiv1/servicedirectorypb;servicedirectorypb Google.Cloud.ServiceDirectory.V1 Google\\Cloud\\ServiceDirectory\\V1#Google::Cloud::ServiceDirectory::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/ServiceDirectory/v1/proto/src/GPBMetadata/Google/Cloud/Servicedirectory/V1/PBNamespace.php b/owl-bot-staging/ServiceDirectory/v1/proto/src/GPBMetadata/Google/Cloud/Servicedirectory/V1/PBNamespace.php deleted file mode 100644 index 90e97166da94..000000000000 --- a/owl-bot-staging/ServiceDirectory/v1/proto/src/GPBMetadata/Google/Cloud/Servicedirectory/V1/PBNamespace.php +++ /dev/null @@ -1,37 +0,0 @@ -internalAddGeneratedFile( - ' - -0google/cloud/servicedirectory/v1/namespace.proto google.cloud.servicedirectory.v1google/api/resource.proto" - Namespace -name ( BAL -labels ( 27.google.cloud.servicedirectory.v1.Namespace.LabelsEntryBA -uid ( BA- - LabelsEntry -key (  -value ( :8:nAk -)servicedirectory.googleapis.com/Namespace>projects/{project}/locations/{location}/namespaces/{namespace}B -$com.google.cloud.servicedirectory.v1BNamespaceProtoPZPcloud.google.com/go/servicedirectory/apiv1/servicedirectorypb;servicedirectorypb Google.Cloud.ServiceDirectory.V1 Google\\Cloud\\ServiceDirectory\\V1#Google::Cloud::ServiceDirectory::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/ServiceDirectory/v1/proto/src/GPBMetadata/Google/Cloud/Servicedirectory/V1/RegistrationService.php b/owl-bot-staging/ServiceDirectory/v1/proto/src/GPBMetadata/Google/Cloud/Servicedirectory/V1/RegistrationService.php deleted file mode 100644 index f282ec3fcd66..000000000000 --- a/owl-bot-staging/ServiceDirectory/v1/proto/src/GPBMetadata/Google/Cloud/Servicedirectory/V1/RegistrationService.php +++ /dev/null @@ -1,135 +0,0 @@ -internalAddGeneratedFile( - ' -7 -;google/cloud/servicedirectory/v1/registration_service.proto google.cloud.servicedirectory.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto/google/cloud/servicedirectory/v1/endpoint.proto0google/cloud/servicedirectory/v1/namespace.proto.google/cloud/servicedirectory/v1/service.protogoogle/iam/v1/iam_policy.protogoogle/iam/v1/policy.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto" -CreateNamespaceRequest9 -parent ( B)AA# -!locations.googleapis.com/Location - namespace_id ( BAC - namespace ( 2+.google.cloud.servicedirectory.v1.NamespaceBA" -ListNamespacesRequest9 -parent ( B)AA# -!locations.googleapis.com/Location - page_size (BA - -page_token ( BA -filter ( BA -order_by ( BA"r -ListNamespacesResponse? - -namespaces ( 2+.google.cloud.servicedirectory.v1.Namespace -next_page_token ( "V -GetNamespaceRequest? -name ( B1AA+ -)servicedirectory.googleapis.com/Namespace" -UpdateNamespaceRequestC - namespace ( 2+.google.cloud.servicedirectory.v1.NamespaceBA4 - update_mask ( 2.google.protobuf.FieldMaskBA"Y -DeleteNamespaceRequest? -name ( B1AA+ -)servicedirectory.googleapis.com/Namespace" -CreateServiceRequestA -parent ( B1AA+ -)servicedirectory.googleapis.com/Namespace - -service_id ( BA? -service ( 2).google.cloud.servicedirectory.v1.ServiceBA" -ListServicesRequestA -parent ( B1AA+ -)servicedirectory.googleapis.com/Namespace - page_size (BA - -page_token ( BA -filter ( BA -order_by ( BA"l -ListServicesResponse; -services ( 2).google.cloud.servicedirectory.v1.Service -next_page_token ( "R -GetServiceRequest= -name ( B/AA) -\'servicedirectory.googleapis.com/Service" -UpdateServiceRequest? -service ( 2).google.cloud.servicedirectory.v1.ServiceBA4 - update_mask ( 2.google.protobuf.FieldMaskBA"U -DeleteServiceRequest= -name ( B/AA) -\'servicedirectory.googleapis.com/Service" -CreateEndpointRequest? -parent ( B/AA) -\'servicedirectory.googleapis.com/Service - endpoint_id ( BAA -endpoint ( 2*.google.cloud.servicedirectory.v1.EndpointBA" -ListEndpointsRequest? -parent ( B/AA) -\'servicedirectory.googleapis.com/Service - page_size (BA - -page_token ( BA -filter ( BA -order_by ( BA"o -ListEndpointsResponse= - endpoints ( 2*.google.cloud.servicedirectory.v1.Endpoint -next_page_token ( "T -GetEndpointRequest> -name ( B0AA* -(servicedirectory.googleapis.com/Endpoint" -UpdateEndpointRequestA -endpoint ( 2*.google.cloud.servicedirectory.v1.EndpointBA4 - update_mask ( 2.google.protobuf.FieldMaskBA"W -DeleteEndpointRequest> -name ( B0AA* -(servicedirectory.googleapis.com/Endpoint2 -RegistrationService -CreateNamespace8.google.cloud.servicedirectory.v1.CreateNamespaceRequest+.google.cloud.servicedirectory.v1.Namespace"aAparent,namespace,namespace_id;"./v1/{parent=projects/*/locations/*}/namespaces: namespace -ListNamespaces7.google.cloud.servicedirectory.v1.ListNamespacesRequest8.google.cloud.servicedirectory.v1.ListNamespacesResponse"?Aparent0./v1/{parent=projects/*/locations/*}/namespaces - GetNamespace5.google.cloud.servicedirectory.v1.GetNamespaceRequest+.google.cloud.servicedirectory.v1.Namespace"=Aname0./v1/{name=projects/*/locations/*/namespaces/*} -UpdateNamespace8.google.cloud.servicedirectory.v1.UpdateNamespaceRequest+.google.cloud.servicedirectory.v1.Namespace"cAnamespace,update_maskE28/v1/{namespace.name=projects/*/locations/*/namespaces/*}: namespace -DeleteNamespace8.google.cloud.servicedirectory.v1.DeleteNamespaceRequest.google.protobuf.Empty"=Aname0*./v1/{name=projects/*/locations/*/namespaces/*} - CreateService6.google.cloud.servicedirectory.v1.CreateServiceRequest).google.cloud.servicedirectory.v1.Service"fAparent,service,service_idD"9/v1/{parent=projects/*/locations/*/namespaces/*}/services:service - ListServices5.google.cloud.servicedirectory.v1.ListServicesRequest6.google.cloud.servicedirectory.v1.ListServicesResponse"JAparent;9/v1/{parent=projects/*/locations/*/namespaces/*}/services - -GetService3.google.cloud.servicedirectory.v1.GetServiceRequest).google.cloud.servicedirectory.v1.Service"HAname;9/v1/{name=projects/*/locations/*/namespaces/*/services/*} - UpdateService6.google.cloud.servicedirectory.v1.UpdateServiceRequest).google.cloud.servicedirectory.v1.Service"hAservice,update_maskL2A/v1/{service.name=projects/*/locations/*/namespaces/*/services/*}:service - DeleteService6.google.cloud.servicedirectory.v1.DeleteServiceRequest.google.protobuf.Empty"HAname;*9/v1/{name=projects/*/locations/*/namespaces/*/services/*} -CreateEndpoint7.google.cloud.servicedirectory.v1.CreateEndpointRequest*.google.cloud.servicedirectory.v1.Endpoint"uAparent,endpoint,endpoint_idQ"E/v1/{parent=projects/*/locations/*/namespaces/*/services/*}/endpoints:endpoint - ListEndpoints6.google.cloud.servicedirectory.v1.ListEndpointsRequest7.google.cloud.servicedirectory.v1.ListEndpointsResponse"VAparentGE/v1/{parent=projects/*/locations/*/namespaces/*/services/*}/endpoints - GetEndpoint4.google.cloud.servicedirectory.v1.GetEndpointRequest*.google.cloud.servicedirectory.v1.Endpoint"TAnameGE/v1/{name=projects/*/locations/*/namespaces/*/services/*/endpoints/*} -UpdateEndpoint7.google.cloud.servicedirectory.v1.UpdateEndpointRequest*.google.cloud.servicedirectory.v1.Endpoint"wAendpoint,update_maskZ2N/v1/{endpoint.name=projects/*/locations/*/namespaces/*/services/*/endpoints/*}:endpoint -DeleteEndpoint7.google.cloud.servicedirectory.v1.DeleteEndpointRequest.google.protobuf.Empty"TAnameG*E/v1/{name=projects/*/locations/*/namespaces/*/services/*/endpoints/*} - GetIamPolicy".google.iam.v1.GetIamPolicyRequest.google.iam.v1.Policy""?/v1/{resource=projects/*/locations/*/namespaces/*}:getIamPolicy:*ZO"J/v1/{resource=projects/*/locations/*/namespaces/*/services/*}:getIamPolicy:* - SetIamPolicy".google.iam.v1.SetIamPolicyRequest.google.iam.v1.Policy""?/v1/{resource=projects/*/locations/*/namespaces/*}:setIamPolicy:*ZO"J/v1/{resource=projects/*/locations/*/namespaces/*/services/*}:setIamPolicy:* -TestIamPermissions(.google.iam.v1.TestIamPermissionsRequest).google.iam.v1.TestIamPermissionsResponse""E/v1/{resource=projects/*/locations/*/namespaces/*}:testIamPermissions:*ZU"P/v1/{resource=projects/*/locations/*/namespaces/*/services/*}:testIamPermissions:*SAservicedirectory.googleapis.comA.https://www.googleapis.com/auth/cloud-platformB -$com.google.cloud.servicedirectory.v1BRegistrationServiceProtoPZPcloud.google.com/go/servicedirectory/apiv1/servicedirectorypb;servicedirectorypb Google.Cloud.ServiceDirectory.V1 Google\\Cloud\\ServiceDirectory\\V1#Google::Cloud::ServiceDirectory::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/ServiceDirectory/v1/proto/src/GPBMetadata/Google/Cloud/Servicedirectory/V1/Service.php b/owl-bot-staging/ServiceDirectory/v1/proto/src/GPBMetadata/Google/Cloud/Servicedirectory/V1/Service.php deleted file mode 100644 index 16d0b2b4d517..000000000000 --- a/owl-bot-staging/ServiceDirectory/v1/proto/src/GPBMetadata/Google/Cloud/Servicedirectory/V1/Service.php +++ /dev/null @@ -1,39 +0,0 @@ -internalAddGeneratedFile( - ' - -.google/cloud/servicedirectory/v1/service.proto google.cloud.servicedirectory.v1google/api/resource.proto/google/cloud/servicedirectory/v1/endpoint.proto" -Service -name ( BAT - annotations ( 2:.google.cloud.servicedirectory.v1.Service.AnnotationsEntryBAB - endpoints ( 2*.google.cloud.servicedirectory.v1.EndpointBA -uid ( BA2 -AnnotationsEntry -key (  -value ( :8:A| -\'servicedirectory.googleapis.com/ServiceQprojects/{project}/locations/{location}/namespaces/{namespace}/services/{service}B -$com.google.cloud.servicedirectory.v1B ServiceProtoPZPcloud.google.com/go/servicedirectory/apiv1/servicedirectorypb;servicedirectorypb Google.Cloud.ServiceDirectory.V1 Google\\Cloud\\ServiceDirectory\\V1#Google::Cloud::ServiceDirectory::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/CreateEndpointRequest.php b/owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/CreateEndpointRequest.php deleted file mode 100644 index ca922f442270..000000000000 --- a/owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/CreateEndpointRequest.php +++ /dev/null @@ -1,194 +0,0 @@ -google.cloud.servicedirectory.v1.CreateEndpointRequest - */ -class CreateEndpointRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the service that this endpoint provides. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The Resource ID must be 1-63 characters long, and comply with - * RFC1035. - * Specifically, the name must be 1-63 characters long and match the regular - * expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?` which means the first - * character must be a lowercase letter, and all following characters must - * be a dash, lowercase letter, or digit, except the last character, which - * cannot be a dash. - * - * Generated from protobuf field string endpoint_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $endpoint_id = ''; - /** - * Required. A endpoint with initial fields set. - * - * Generated from protobuf field .google.cloud.servicedirectory.v1.Endpoint endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $endpoint = null; - - /** - * @param string $parent Required. The resource name of the service that this endpoint provides. Please see - * {@see RegistrationServiceClient::serviceName()} for help formatting this field. - * @param \Google\Cloud\ServiceDirectory\V1\Endpoint $endpoint Required. A endpoint with initial fields set. - * @param string $endpointId Required. The Resource ID must be 1-63 characters long, and comply with - * RFC1035. - * Specifically, the name must be 1-63 characters long and match the regular - * expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?` which means the first - * character must be a lowercase letter, and all following characters must - * be a dash, lowercase letter, or digit, except the last character, which - * cannot be a dash. - * - * @return \Google\Cloud\ServiceDirectory\V1\CreateEndpointRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\ServiceDirectory\V1\Endpoint $endpoint, string $endpointId): self - { - return (new self()) - ->setParent($parent) - ->setEndpoint($endpoint) - ->setEndpointId($endpointId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the service that this endpoint provides. - * @type string $endpoint_id - * Required. The Resource ID must be 1-63 characters long, and comply with - * RFC1035. - * Specifically, the name must be 1-63 characters long and match the regular - * expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?` which means the first - * character must be a lowercase letter, and all following characters must - * be a dash, lowercase letter, or digit, except the last character, which - * cannot be a dash. - * @type \Google\Cloud\ServiceDirectory\V1\Endpoint $endpoint - * Required. A endpoint with initial fields set. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Servicedirectory\V1\RegistrationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the service that this endpoint provides. - * - * 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 service that this endpoint provides. - * - * 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 Resource ID must be 1-63 characters long, and comply with - * RFC1035. - * Specifically, the name must be 1-63 characters long and match the regular - * expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?` which means the first - * character must be a lowercase letter, and all following characters must - * be a dash, lowercase letter, or digit, except the last character, which - * cannot be a dash. - * - * Generated from protobuf field string endpoint_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getEndpointId() - { - return $this->endpoint_id; - } - - /** - * Required. The Resource ID must be 1-63 characters long, and comply with - * RFC1035. - * Specifically, the name must be 1-63 characters long and match the regular - * expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?` which means the first - * character must be a lowercase letter, and all following characters must - * be a dash, lowercase letter, or digit, except the last character, which - * cannot be a dash. - * - * Generated from protobuf field string endpoint_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setEndpointId($var) - { - GPBUtil::checkString($var, True); - $this->endpoint_id = $var; - - return $this; - } - - /** - * Required. A endpoint with initial fields set. - * - * Generated from protobuf field .google.cloud.servicedirectory.v1.Endpoint endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\ServiceDirectory\V1\Endpoint|null - */ - public function getEndpoint() - { - return $this->endpoint; - } - - public function hasEndpoint() - { - return isset($this->endpoint); - } - - public function clearEndpoint() - { - unset($this->endpoint); - } - - /** - * Required. A endpoint with initial fields set. - * - * Generated from protobuf field .google.cloud.servicedirectory.v1.Endpoint endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\ServiceDirectory\V1\Endpoint $var - * @return $this - */ - public function setEndpoint($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ServiceDirectory\V1\Endpoint::class); - $this->endpoint = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/CreateNamespaceRequest.php b/owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/CreateNamespaceRequest.php deleted file mode 100644 index 3cc325452b4c..000000000000 --- a/owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/CreateNamespaceRequest.php +++ /dev/null @@ -1,199 +0,0 @@ -google.cloud.servicedirectory.v1.CreateNamespaceRequest - */ -class CreateNamespaceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the project and location the namespace - * will be created in. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The Resource ID must be 1-63 characters long, and comply with - * RFC1035. - * Specifically, the name must be 1-63 characters long and match the regular - * expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?` which means the first - * character must be a lowercase letter, and all following characters must - * be a dash, lowercase letter, or digit, except the last character, which - * cannot be a dash. - * - * Generated from protobuf field string namespace_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $namespace_id = ''; - /** - * Required. A namespace with initial fields set. - * - * Generated from protobuf field .google.cloud.servicedirectory.v1.Namespace namespace = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $namespace = null; - - /** - * @param string $parent Required. The resource name of the project and location the namespace - * will be created in. Please see - * {@see RegistrationServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\ServiceDirectory\V1\PBNamespace $namespace Required. A namespace with initial fields set. - * @param string $namespaceId Required. The Resource ID must be 1-63 characters long, and comply with - * RFC1035. - * Specifically, the name must be 1-63 characters long and match the regular - * expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?` which means the first - * character must be a lowercase letter, and all following characters must - * be a dash, lowercase letter, or digit, except the last character, which - * cannot be a dash. - * - * @return \Google\Cloud\ServiceDirectory\V1\CreateNamespaceRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\ServiceDirectory\V1\PBNamespace $namespace, string $namespaceId): self - { - return (new self()) - ->setParent($parent) - ->setNamespace($namespace) - ->setNamespaceId($namespaceId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the project and location the namespace - * will be created in. - * @type string $namespace_id - * Required. The Resource ID must be 1-63 characters long, and comply with - * RFC1035. - * Specifically, the name must be 1-63 characters long and match the regular - * expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?` which means the first - * character must be a lowercase letter, and all following characters must - * be a dash, lowercase letter, or digit, except the last character, which - * cannot be a dash. - * @type \Google\Cloud\ServiceDirectory\V1\PBNamespace $namespace - * Required. A namespace with initial fields set. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Servicedirectory\V1\RegistrationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the project and location the namespace - * will be created in. - * - * 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 project and location the namespace - * will be created in. - * - * 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 Resource ID must be 1-63 characters long, and comply with - * RFC1035. - * Specifically, the name must be 1-63 characters long and match the regular - * expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?` which means the first - * character must be a lowercase letter, and all following characters must - * be a dash, lowercase letter, or digit, except the last character, which - * cannot be a dash. - * - * Generated from protobuf field string namespace_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getNamespaceId() - { - return $this->namespace_id; - } - - /** - * Required. The Resource ID must be 1-63 characters long, and comply with - * RFC1035. - * Specifically, the name must be 1-63 characters long and match the regular - * expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?` which means the first - * character must be a lowercase letter, and all following characters must - * be a dash, lowercase letter, or digit, except the last character, which - * cannot be a dash. - * - * Generated from protobuf field string namespace_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setNamespaceId($var) - { - GPBUtil::checkString($var, True); - $this->namespace_id = $var; - - return $this; - } - - /** - * Required. A namespace with initial fields set. - * - * Generated from protobuf field .google.cloud.servicedirectory.v1.Namespace namespace = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\ServiceDirectory\V1\PBNamespace|null - */ - public function getNamespace() - { - return $this->namespace; - } - - public function hasNamespace() - { - return isset($this->namespace); - } - - public function clearNamespace() - { - unset($this->namespace); - } - - /** - * Required. A namespace with initial fields set. - * - * Generated from protobuf field .google.cloud.servicedirectory.v1.Namespace namespace = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\ServiceDirectory\V1\PBNamespace $var - * @return $this - */ - public function setNamespace($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ServiceDirectory\V1\PBNamespace::class); - $this->namespace = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/CreateServiceRequest.php b/owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/CreateServiceRequest.php deleted file mode 100644 index 2dadd01b1aec..000000000000 --- a/owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/CreateServiceRequest.php +++ /dev/null @@ -1,194 +0,0 @@ -google.cloud.servicedirectory.v1.CreateServiceRequest - */ -class CreateServiceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the namespace this service will belong to. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The Resource ID must be 1-63 characters long, and comply with - * RFC1035. - * Specifically, the name must be 1-63 characters long and match the regular - * expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?` which means the first - * character must be a lowercase letter, and all following characters must - * be a dash, lowercase letter, or digit, except the last character, which - * cannot be a dash. - * - * Generated from protobuf field string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $service_id = ''; - /** - * Required. A service with initial fields set. - * - * Generated from protobuf field .google.cloud.servicedirectory.v1.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $service = null; - - /** - * @param string $parent Required. The resource name of the namespace this service will belong to. Please see - * {@see RegistrationServiceClient::namespaceName()} for help formatting this field. - * @param \Google\Cloud\ServiceDirectory\V1\Service $service Required. A service with initial fields set. - * @param string $serviceId Required. The Resource ID must be 1-63 characters long, and comply with - * RFC1035. - * Specifically, the name must be 1-63 characters long and match the regular - * expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?` which means the first - * character must be a lowercase letter, and all following characters must - * be a dash, lowercase letter, or digit, except the last character, which - * cannot be a dash. - * - * @return \Google\Cloud\ServiceDirectory\V1\CreateServiceRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\ServiceDirectory\V1\Service $service, string $serviceId): self - { - return (new self()) - ->setParent($parent) - ->setService($service) - ->setServiceId($serviceId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the namespace this service will belong to. - * @type string $service_id - * Required. The Resource ID must be 1-63 characters long, and comply with - * RFC1035. - * Specifically, the name must be 1-63 characters long and match the regular - * expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?` which means the first - * character must be a lowercase letter, and all following characters must - * be a dash, lowercase letter, or digit, except the last character, which - * cannot be a dash. - * @type \Google\Cloud\ServiceDirectory\V1\Service $service - * Required. A service with initial fields set. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Servicedirectory\V1\RegistrationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the namespace this service will belong to. - * - * 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 namespace this service will belong to. - * - * 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 Resource ID must be 1-63 characters long, and comply with - * RFC1035. - * Specifically, the name must be 1-63 characters long and match the regular - * expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?` which means the first - * character must be a lowercase letter, and all following characters must - * be a dash, lowercase letter, or digit, except the last character, which - * cannot be a dash. - * - * Generated from protobuf field string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getServiceId() - { - return $this->service_id; - } - - /** - * Required. The Resource ID must be 1-63 characters long, and comply with - * RFC1035. - * Specifically, the name must be 1-63 characters long and match the regular - * expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?` which means the first - * character must be a lowercase letter, and all following characters must - * be a dash, lowercase letter, or digit, except the last character, which - * cannot be a dash. - * - * Generated from protobuf field string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setServiceId($var) - { - GPBUtil::checkString($var, True); - $this->service_id = $var; - - return $this; - } - - /** - * Required. A service with initial fields set. - * - * Generated from protobuf field .google.cloud.servicedirectory.v1.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\ServiceDirectory\V1\Service|null - */ - public function getService() - { - return $this->service; - } - - public function hasService() - { - return isset($this->service); - } - - public function clearService() - { - unset($this->service); - } - - /** - * Required. A service with initial fields set. - * - * Generated from protobuf field .google.cloud.servicedirectory.v1.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\ServiceDirectory\V1\Service $var - * @return $this - */ - public function setService($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ServiceDirectory\V1\Service::class); - $this->service = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/DeleteEndpointRequest.php b/owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/DeleteEndpointRequest.php deleted file mode 100644 index b2c6e030a327..000000000000 --- a/owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/DeleteEndpointRequest.php +++ /dev/null @@ -1,82 +0,0 @@ -google.cloud.servicedirectory.v1.DeleteEndpointRequest - */ -class DeleteEndpointRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the endpoint to delete. - * - * 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 endpoint to delete. Please see - * {@see RegistrationServiceClient::endpointName()} for help formatting this field. - * - * @return \Google\Cloud\ServiceDirectory\V1\DeleteEndpointRequest - * - * @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 endpoint to delete. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Servicedirectory\V1\RegistrationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the endpoint 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. The name of the endpoint 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/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/DeleteNamespaceRequest.php b/owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/DeleteNamespaceRequest.php deleted file mode 100644 index 30a5b39f2b0e..000000000000 --- a/owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/DeleteNamespaceRequest.php +++ /dev/null @@ -1,82 +0,0 @@ -google.cloud.servicedirectory.v1.DeleteNamespaceRequest - */ -class DeleteNamespaceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the namespace to delete. - * - * 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 namespace to delete. Please see - * {@see RegistrationServiceClient::namespaceName()} for help formatting this field. - * - * @return \Google\Cloud\ServiceDirectory\V1\DeleteNamespaceRequest - * - * @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 namespace to delete. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Servicedirectory\V1\RegistrationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the namespace 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. The name of the namespace 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/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/DeleteServiceRequest.php b/owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/DeleteServiceRequest.php deleted file mode 100644 index 06c9a5130158..000000000000 --- a/owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/DeleteServiceRequest.php +++ /dev/null @@ -1,82 +0,0 @@ -google.cloud.servicedirectory.v1.DeleteServiceRequest - */ -class DeleteServiceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the service to delete. - * - * 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 service to delete. Please see - * {@see RegistrationServiceClient::serviceName()} for help formatting this field. - * - * @return \Google\Cloud\ServiceDirectory\V1\DeleteServiceRequest - * - * @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 service to delete. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Servicedirectory\V1\RegistrationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the service 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. The name of the service 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/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/Endpoint.php b/owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/Endpoint.php deleted file mode 100644 index ae05e9afd6d1..000000000000 --- a/owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/Endpoint.php +++ /dev/null @@ -1,359 +0,0 @@ -google.cloud.servicedirectory.v1.Endpoint - */ -class Endpoint extends \Google\Protobuf\Internal\Message -{ - /** - * Immutable. The resource name for the endpoint in the format - * `projects/*/locations/*/namespaces/*/services/*/endpoints/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $name = ''; - /** - * Optional. An IPv4 or IPv6 address. Service Directory rejects bad addresses - * like: - * * `8.8.8` - * * `8.8.8.8:53` - * * `test:bad:address` - * * `[::1]` - * * `[::1]:8080` - * Limited to 45 characters. - * - * Generated from protobuf field string address = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $address = ''; - /** - * Optional. Service Directory rejects values outside of `[0, 65535]`. - * - * Generated from protobuf field int32 port = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $port = 0; - /** - * Optional. Annotations for the endpoint. This data can be consumed by - * service clients. - * Restrictions: - * * The entire annotations dictionary may contain up to 512 characters, - * spread accoss all key-value pairs. Annotations that go beyond this - * limit are rejected - * * Valid annotation keys have two segments: an optional prefix and name, - * separated by a slash (/). The name segment is required and must be 63 - * characters or less, beginning and ending with an alphanumeric character - * ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and - * alphanumerics between. The prefix is optional. If specified, the prefix - * must be a DNS subdomain: a series of DNS labels separated by dots (.), - * not longer than 253 characters in total, followed by a slash (/) - * Annotations that fails to meet these requirements are rejected. - * Note: This field is equivalent to the `metadata` field in the v1beta1 API. - * They have the same syntax and read/write to the same location in Service - * Directory. - * - * Generated from protobuf field map annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $annotations; - /** - * Immutable. The Google Compute Engine network (VPC) of the endpoint in the - * format `projects//locations/global/networks/*`. - * The project must be specified by project number (project id is rejected). - * Incorrectly formatted networks are rejected, we also check to make sure - * that you have the servicedirectory.networks.attach permission on the - * project specified. - * - * Generated from protobuf field string network = 8 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { - */ - protected $network = ''; - /** - * Output only. The globally unique identifier of the endpoint in the UUID4 - * format. - * - * Generated from protobuf field string uid = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Immutable. The resource name for the endpoint in the format - * `projects/*/locations/*/namespaces/*/services/*/endpoints/*`. - * @type string $address - * Optional. An IPv4 or IPv6 address. Service Directory rejects bad addresses - * like: - * * `8.8.8` - * * `8.8.8.8:53` - * * `test:bad:address` - * * `[::1]` - * * `[::1]:8080` - * Limited to 45 characters. - * @type int $port - * Optional. Service Directory rejects values outside of `[0, 65535]`. - * @type array|\Google\Protobuf\Internal\MapField $annotations - * Optional. Annotations for the endpoint. This data can be consumed by - * service clients. - * Restrictions: - * * The entire annotations dictionary may contain up to 512 characters, - * spread accoss all key-value pairs. Annotations that go beyond this - * limit are rejected - * * Valid annotation keys have two segments: an optional prefix and name, - * separated by a slash (/). The name segment is required and must be 63 - * characters or less, beginning and ending with an alphanumeric character - * ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and - * alphanumerics between. The prefix is optional. If specified, the prefix - * must be a DNS subdomain: a series of DNS labels separated by dots (.), - * not longer than 253 characters in total, followed by a slash (/) - * Annotations that fails to meet these requirements are rejected. - * Note: This field is equivalent to the `metadata` field in the v1beta1 API. - * They have the same syntax and read/write to the same location in Service - * Directory. - * @type string $network - * Immutable. The Google Compute Engine network (VPC) of the endpoint in the - * format `projects//locations/global/networks/*`. - * The project must be specified by project number (project id is rejected). - * Incorrectly formatted networks are rejected, we also check to make sure - * that you have the servicedirectory.networks.attach permission on the - * project specified. - * @type string $uid - * Output only. The globally unique identifier of the endpoint in the UUID4 - * format. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Servicedirectory\V1\Endpoint::initOnce(); - parent::__construct($data); - } - - /** - * Immutable. The resource name for the endpoint in the format - * `projects/*/locations/*/namespaces/*/services/*/endpoints/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Immutable. The resource name for the endpoint in the format - * `projects/*/locations/*/namespaces/*/services/*/endpoints/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. An IPv4 or IPv6 address. Service Directory rejects bad addresses - * like: - * * `8.8.8` - * * `8.8.8.8:53` - * * `test:bad:address` - * * `[::1]` - * * `[::1]:8080` - * Limited to 45 characters. - * - * Generated from protobuf field string address = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getAddress() - { - return $this->address; - } - - /** - * Optional. An IPv4 or IPv6 address. Service Directory rejects bad addresses - * like: - * * `8.8.8` - * * `8.8.8.8:53` - * * `test:bad:address` - * * `[::1]` - * * `[::1]:8080` - * Limited to 45 characters. - * - * Generated from protobuf field string address = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setAddress($var) - { - GPBUtil::checkString($var, True); - $this->address = $var; - - return $this; - } - - /** - * Optional. Service Directory rejects values outside of `[0, 65535]`. - * - * Generated from protobuf field int32 port = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPort() - { - return $this->port; - } - - /** - * Optional. Service Directory rejects values outside of `[0, 65535]`. - * - * Generated from protobuf field int32 port = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPort($var) - { - GPBUtil::checkInt32($var); - $this->port = $var; - - return $this; - } - - /** - * Optional. Annotations for the endpoint. This data can be consumed by - * service clients. - * Restrictions: - * * The entire annotations dictionary may contain up to 512 characters, - * spread accoss all key-value pairs. Annotations that go beyond this - * limit are rejected - * * Valid annotation keys have two segments: an optional prefix and name, - * separated by a slash (/). The name segment is required and must be 63 - * characters or less, beginning and ending with an alphanumeric character - * ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and - * alphanumerics between. The prefix is optional. If specified, the prefix - * must be a DNS subdomain: a series of DNS labels separated by dots (.), - * not longer than 253 characters in total, followed by a slash (/) - * Annotations that fails to meet these requirements are rejected. - * Note: This field is equivalent to the `metadata` field in the v1beta1 API. - * They have the same syntax and read/write to the same location in Service - * Directory. - * - * Generated from protobuf field map annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getAnnotations() - { - return $this->annotations; - } - - /** - * Optional. Annotations for the endpoint. This data can be consumed by - * service clients. - * Restrictions: - * * The entire annotations dictionary may contain up to 512 characters, - * spread accoss all key-value pairs. Annotations that go beyond this - * limit are rejected - * * Valid annotation keys have two segments: an optional prefix and name, - * separated by a slash (/). The name segment is required and must be 63 - * characters or less, beginning and ending with an alphanumeric character - * ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and - * alphanumerics between. The prefix is optional. If specified, the prefix - * must be a DNS subdomain: a series of DNS labels separated by dots (.), - * not longer than 253 characters in total, followed by a slash (/) - * Annotations that fails to meet these requirements are rejected. - * Note: This field is equivalent to the `metadata` field in the v1beta1 API. - * They have the same syntax and read/write to the same location in Service - * Directory. - * - * Generated from protobuf field map annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setAnnotations($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->annotations = $arr; - - return $this; - } - - /** - * Immutable. The Google Compute Engine network (VPC) of the endpoint in the - * format `projects//locations/global/networks/*`. - * The project must be specified by project number (project id is rejected). - * Incorrectly formatted networks are rejected, we also check to make sure - * that you have the servicedirectory.networks.attach permission on the - * project specified. - * - * Generated from protobuf field string network = 8 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { - * @return string - */ - public function getNetwork() - { - return $this->network; - } - - /** - * Immutable. The Google Compute Engine network (VPC) of the endpoint in the - * format `projects//locations/global/networks/*`. - * The project must be specified by project number (project id is rejected). - * Incorrectly formatted networks are rejected, we also check to make sure - * that you have the servicedirectory.networks.attach permission on the - * project specified. - * - * Generated from protobuf field string network = 8 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setNetwork($var) - { - GPBUtil::checkString($var, True); - $this->network = $var; - - return $this; - } - - /** - * Output only. The globally unique identifier of the endpoint in the UUID4 - * format. - * - * Generated from protobuf field string uid = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. The globally unique identifier of the endpoint in the UUID4 - * format. - * - * 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; - } - -} - diff --git a/owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/GetEndpointRequest.php b/owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/GetEndpointRequest.php deleted file mode 100644 index 5be9f51563f6..000000000000 --- a/owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/GetEndpointRequest.php +++ /dev/null @@ -1,84 +0,0 @@ -google.cloud.servicedirectory.v1.GetEndpointRequest - */ -class GetEndpointRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the endpoint to get. - * - * 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 endpoint to get. Please see - * {@see RegistrationServiceClient::endpointName()} for help formatting this field. - * - * @return \Google\Cloud\ServiceDirectory\V1\GetEndpointRequest - * - * @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 endpoint to get. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Servicedirectory\V1\RegistrationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the endpoint 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. The name of the endpoint 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/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/GetNamespaceRequest.php b/owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/GetNamespaceRequest.php deleted file mode 100644 index d5cd65750439..000000000000 --- a/owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/GetNamespaceRequest.php +++ /dev/null @@ -1,82 +0,0 @@ -google.cloud.servicedirectory.v1.GetNamespaceRequest - */ -class GetNamespaceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the namespace to retrieve. - * - * 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 namespace to retrieve. Please see - * {@see RegistrationServiceClient::namespaceName()} for help formatting this field. - * - * @return \Google\Cloud\ServiceDirectory\V1\GetNamespaceRequest - * - * @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 namespace to retrieve. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Servicedirectory\V1\RegistrationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the namespace to retrieve. - * - * 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 namespace to retrieve. - * - * 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/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/GetServiceRequest.php b/owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/GetServiceRequest.php deleted file mode 100644 index 2762f2375416..000000000000 --- a/owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/GetServiceRequest.php +++ /dev/null @@ -1,84 +0,0 @@ -google.cloud.servicedirectory.v1.GetServiceRequest - */ -class GetServiceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the service to get. - * - * 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 service to get. Please see - * {@see RegistrationServiceClient::serviceName()} for help formatting this field. - * - * @return \Google\Cloud\ServiceDirectory\V1\GetServiceRequest - * - * @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 service to get. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Servicedirectory\V1\RegistrationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the service 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. The name of the service 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/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/ListEndpointsRequest.php b/owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/ListEndpointsRequest.php deleted file mode 100644 index 00c7d5ca1bc7..000000000000 --- a/owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/ListEndpointsRequest.php +++ /dev/null @@ -1,359 +0,0 @@ -google.cloud.servicedirectory.v1.ListEndpointsRequest - */ -class ListEndpointsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the service whose endpoints you'd like to - * list. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. The next_page_token value returned from a previous List request, - * if any. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. The filter to list results by. - * General `filter` string syntax: - * ` ()` - * * `` can be `name`, `address`, `port`, or `annotations.` for - * map field - * * `` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:` - * means `HAS`, and is roughly the same as `=` - * * `` must be the same data type as field - * * `` can be `AND`, `OR`, `NOT` - * Examples of valid filters: - * * `annotations.owner` returns endpoints that have a annotation with the - * key `owner`, this is the same as `annotations:owner` - * * `annotations.protocol=gRPC` returns endpoints that have key/value - * `protocol=gRPC` - * * `address=192.108.1.105` returns endpoints that have this address - * * `port>8080` returns endpoints that have port number larger than 8080 - * * - * `name>projects/my-project/locations/us-east1/namespaces/my-namespace/services/my-service/endpoints/endpoint-c` - * returns endpoints that have name that is alphabetically later than the - * string, so "endpoint-e" is returned but "endpoint-a" is not - * * `annotations.owner!=sd AND annotations.foo=bar` returns endpoints that - * have `owner` in annotation key but value is not `sd` AND have - * key/value `foo=bar` - * * `doesnotexist.foo=bar` returns an empty list. Note that endpoint - * doesn't have a field called "doesnotexist". Since the filter does not - * match any endpoints, it returns no results - * For more information about filtering, see - * [API Filtering](https://aip.dev/160). - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. The order to list results by. - * General `order_by` string syntax: ` () (,)` - * * `` allows values: `name`, `address`, `port` - * * `` ascending or descending order by ``. If this is - * left blank, `asc` is used - * Note that an empty `order_by` string results in default order, which is - * order by `name` in ascending order. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The resource name of the service whose endpoints you'd like to - * list. Please see - * {@see RegistrationServiceClient::serviceName()} for help formatting this field. - * - * @return \Google\Cloud\ServiceDirectory\V1\ListEndpointsRequest - * - * @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 service whose endpoints you'd like to - * list. - * @type int $page_size - * Optional. The maximum number of items to return. - * @type string $page_token - * Optional. The next_page_token value returned from a previous List request, - * if any. - * @type string $filter - * Optional. The filter to list results by. - * General `filter` string syntax: - * ` ()` - * * `` can be `name`, `address`, `port`, or `annotations.` for - * map field - * * `` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:` - * means `HAS`, and is roughly the same as `=` - * * `` must be the same data type as field - * * `` can be `AND`, `OR`, `NOT` - * Examples of valid filters: - * * `annotations.owner` returns endpoints that have a annotation with the - * key `owner`, this is the same as `annotations:owner` - * * `annotations.protocol=gRPC` returns endpoints that have key/value - * `protocol=gRPC` - * * `address=192.108.1.105` returns endpoints that have this address - * * `port>8080` returns endpoints that have port number larger than 8080 - * * - * `name>projects/my-project/locations/us-east1/namespaces/my-namespace/services/my-service/endpoints/endpoint-c` - * returns endpoints that have name that is alphabetically later than the - * string, so "endpoint-e" is returned but "endpoint-a" is not - * * `annotations.owner!=sd AND annotations.foo=bar` returns endpoints that - * have `owner` in annotation key but value is not `sd` AND have - * key/value `foo=bar` - * * `doesnotexist.foo=bar` returns an empty list. Note that endpoint - * doesn't have a field called "doesnotexist". Since the filter does not - * match any endpoints, it returns no results - * For more information about filtering, see - * [API Filtering](https://aip.dev/160). - * @type string $order_by - * Optional. The order to list results by. - * General `order_by` string syntax: ` () (,)` - * * `` allows values: `name`, `address`, `port` - * * `` ascending or descending order by ``. If this is - * left blank, `asc` is used - * Note that an empty `order_by` string results in default order, which is - * order by `name` in ascending order. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Servicedirectory\V1\RegistrationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the service whose endpoints you'd like to - * list. - * - * 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 service whose endpoints you'd like to - * list. - * - * 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 items to return. - * - * 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 items to return. - * - * 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; - } - - /** - * Optional. The next_page_token value returned from a previous List request, - * if any. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. The next_page_token value returned from a previous List request, - * if any. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. The filter to list results by. - * General `filter` string syntax: - * ` ()` - * * `` can be `name`, `address`, `port`, or `annotations.` for - * map field - * * `` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:` - * means `HAS`, and is roughly the same as `=` - * * `` must be the same data type as field - * * `` can be `AND`, `OR`, `NOT` - * Examples of valid filters: - * * `annotations.owner` returns endpoints that have a annotation with the - * key `owner`, this is the same as `annotations:owner` - * * `annotations.protocol=gRPC` returns endpoints that have key/value - * `protocol=gRPC` - * * `address=192.108.1.105` returns endpoints that have this address - * * `port>8080` returns endpoints that have port number larger than 8080 - * * - * `name>projects/my-project/locations/us-east1/namespaces/my-namespace/services/my-service/endpoints/endpoint-c` - * returns endpoints that have name that is alphabetically later than the - * string, so "endpoint-e" is returned but "endpoint-a" is not - * * `annotations.owner!=sd AND annotations.foo=bar` returns endpoints that - * have `owner` in annotation key but value is not `sd` AND have - * key/value `foo=bar` - * * `doesnotexist.foo=bar` returns an empty list. Note that endpoint - * doesn't have a field called "doesnotexist". Since the filter does not - * match any endpoints, it returns no results - * For more information about filtering, see - * [API Filtering](https://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 list results by. - * General `filter` string syntax: - * ` ()` - * * `` can be `name`, `address`, `port`, or `annotations.` for - * map field - * * `` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:` - * means `HAS`, and is roughly the same as `=` - * * `` must be the same data type as field - * * `` can be `AND`, `OR`, `NOT` - * Examples of valid filters: - * * `annotations.owner` returns endpoints that have a annotation with the - * key `owner`, this is the same as `annotations:owner` - * * `annotations.protocol=gRPC` returns endpoints that have key/value - * `protocol=gRPC` - * * `address=192.108.1.105` returns endpoints that have this address - * * `port>8080` returns endpoints that have port number larger than 8080 - * * - * `name>projects/my-project/locations/us-east1/namespaces/my-namespace/services/my-service/endpoints/endpoint-c` - * returns endpoints that have name that is alphabetically later than the - * string, so "endpoint-e" is returned but "endpoint-a" is not - * * `annotations.owner!=sd AND annotations.foo=bar` returns endpoints that - * have `owner` in annotation key but value is not `sd` AND have - * key/value `foo=bar` - * * `doesnotexist.foo=bar` returns an empty list. Note that endpoint - * doesn't have a field called "doesnotexist". Since the filter does not - * match any endpoints, it returns no results - * For more information about filtering, see - * [API Filtering](https://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. The order to list results by. - * General `order_by` string syntax: ` () (,)` - * * `` allows values: `name`, `address`, `port` - * * `` ascending or descending order by ``. If this is - * left blank, `asc` is used - * Note that an empty `order_by` string results in default order, which is - * order by `name` in ascending order. - * - * 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 to list results by. - * General `order_by` string syntax: ` () (,)` - * * `` allows values: `name`, `address`, `port` - * * `` ascending or descending order by ``. If this is - * left blank, `asc` is used - * Note that an empty `order_by` string results in default order, which is - * order by `name` in ascending 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/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/ListEndpointsResponse.php b/owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/ListEndpointsResponse.php deleted file mode 100644 index 152be5d2d97a..000000000000 --- a/owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/ListEndpointsResponse.php +++ /dev/null @@ -1,106 +0,0 @@ -google.cloud.servicedirectory.v1.ListEndpointsResponse - */ -class ListEndpointsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of endpoints. - * - * Generated from protobuf field repeated .google.cloud.servicedirectory.v1.Endpoint endpoints = 1; - */ - private $endpoints; - /** - * 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\ServiceDirectory\V1\Endpoint>|\Google\Protobuf\Internal\RepeatedField $endpoints - * The list of endpoints. - * @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\Servicedirectory\V1\RegistrationService::initOnce(); - parent::__construct($data); - } - - /** - * The list of endpoints. - * - * Generated from protobuf field repeated .google.cloud.servicedirectory.v1.Endpoint endpoints = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEndpoints() - { - return $this->endpoints; - } - - /** - * The list of endpoints. - * - * Generated from protobuf field repeated .google.cloud.servicedirectory.v1.Endpoint endpoints = 1; - * @param array<\Google\Cloud\ServiceDirectory\V1\Endpoint>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEndpoints($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ServiceDirectory\V1\Endpoint::class); - $this->endpoints = $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/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/ListNamespacesRequest.php b/owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/ListNamespacesRequest.php deleted file mode 100644 index 6ac230b09ec4..000000000000 --- a/owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/ListNamespacesRequest.php +++ /dev/null @@ -1,339 +0,0 @@ -google.cloud.servicedirectory.v1.ListNamespacesRequest - */ -class ListNamespacesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the project and location whose namespaces - * you'd like to list. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. The next_page_token value returned from a previous List request, - * if any. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. The filter to list results by. - * General `filter` string syntax: - * ` ()` - * * `` can be `name` or `labels.` for map field - * * `` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:` - * means `HAS`, and is roughly the same as `=` - * * `` must be the same data type as field - * * `` can be `AND`, `OR`, `NOT` - * Examples of valid filters: - * * `labels.owner` returns namespaces that have a label with the key - * `owner`, this is the same as `labels:owner` - * * `labels.owner=sd` returns namespaces that have key/value - * `owner=sd` - * * `name>projects/my-project/locations/us-east1/namespaces/namespace-c` - * returns namespaces that have name that is alphabetically later than the - * string, so "namespace-e" is returned but "namespace-a" is not - * * `labels.owner!=sd AND labels.foo=bar` returns namespaces that have - * `owner` in label key but value is not `sd` AND have key/value `foo=bar` - * * `doesnotexist.foo=bar` returns an empty list. Note that namespace - * doesn't have a field called "doesnotexist". Since the filter does not - * match any namespaces, it returns no results - * For more information about filtering, see - * [API Filtering](https://aip.dev/160). - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. The order to list results by. - * General `order_by` string syntax: ` () (,)` - * * `` allows value: `name` - * * `` ascending or descending order by ``. If this is - * left blank, `asc` is used - * Note that an empty `order_by` string results in default order, which is - * order by `name` in ascending order. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The resource name of the project and location whose namespaces - * you'd like to list. Please see - * {@see RegistrationServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\ServiceDirectory\V1\ListNamespacesRequest - * - * @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 project and location whose namespaces - * you'd like to list. - * @type int $page_size - * Optional. The maximum number of items to return. - * @type string $page_token - * Optional. The next_page_token value returned from a previous List request, - * if any. - * @type string $filter - * Optional. The filter to list results by. - * General `filter` string syntax: - * ` ()` - * * `` can be `name` or `labels.` for map field - * * `` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:` - * means `HAS`, and is roughly the same as `=` - * * `` must be the same data type as field - * * `` can be `AND`, `OR`, `NOT` - * Examples of valid filters: - * * `labels.owner` returns namespaces that have a label with the key - * `owner`, this is the same as `labels:owner` - * * `labels.owner=sd` returns namespaces that have key/value - * `owner=sd` - * * `name>projects/my-project/locations/us-east1/namespaces/namespace-c` - * returns namespaces that have name that is alphabetically later than the - * string, so "namespace-e" is returned but "namespace-a" is not - * * `labels.owner!=sd AND labels.foo=bar` returns namespaces that have - * `owner` in label key but value is not `sd` AND have key/value `foo=bar` - * * `doesnotexist.foo=bar` returns an empty list. Note that namespace - * doesn't have a field called "doesnotexist". Since the filter does not - * match any namespaces, it returns no results - * For more information about filtering, see - * [API Filtering](https://aip.dev/160). - * @type string $order_by - * Optional. The order to list results by. - * General `order_by` string syntax: ` () (,)` - * * `` allows value: `name` - * * `` ascending or descending order by ``. If this is - * left blank, `asc` is used - * Note that an empty `order_by` string results in default order, which is - * order by `name` in ascending order. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Servicedirectory\V1\RegistrationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the project and location whose namespaces - * you'd like to list. - * - * 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 project and location whose namespaces - * you'd like to list. - * - * 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 items to return. - * - * 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 items to return. - * - * 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; - } - - /** - * Optional. The next_page_token value returned from a previous List request, - * if any. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. The next_page_token value returned from a previous List request, - * if any. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. The filter to list results by. - * General `filter` string syntax: - * ` ()` - * * `` can be `name` or `labels.` for map field - * * `` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:` - * means `HAS`, and is roughly the same as `=` - * * `` must be the same data type as field - * * `` can be `AND`, `OR`, `NOT` - * Examples of valid filters: - * * `labels.owner` returns namespaces that have a label with the key - * `owner`, this is the same as `labels:owner` - * * `labels.owner=sd` returns namespaces that have key/value - * `owner=sd` - * * `name>projects/my-project/locations/us-east1/namespaces/namespace-c` - * returns namespaces that have name that is alphabetically later than the - * string, so "namespace-e" is returned but "namespace-a" is not - * * `labels.owner!=sd AND labels.foo=bar` returns namespaces that have - * `owner` in label key but value is not `sd` AND have key/value `foo=bar` - * * `doesnotexist.foo=bar` returns an empty list. Note that namespace - * doesn't have a field called "doesnotexist". Since the filter does not - * match any namespaces, it returns no results - * For more information about filtering, see - * [API Filtering](https://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 list results by. - * General `filter` string syntax: - * ` ()` - * * `` can be `name` or `labels.` for map field - * * `` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:` - * means `HAS`, and is roughly the same as `=` - * * `` must be the same data type as field - * * `` can be `AND`, `OR`, `NOT` - * Examples of valid filters: - * * `labels.owner` returns namespaces that have a label with the key - * `owner`, this is the same as `labels:owner` - * * `labels.owner=sd` returns namespaces that have key/value - * `owner=sd` - * * `name>projects/my-project/locations/us-east1/namespaces/namespace-c` - * returns namespaces that have name that is alphabetically later than the - * string, so "namespace-e" is returned but "namespace-a" is not - * * `labels.owner!=sd AND labels.foo=bar` returns namespaces that have - * `owner` in label key but value is not `sd` AND have key/value `foo=bar` - * * `doesnotexist.foo=bar` returns an empty list. Note that namespace - * doesn't have a field called "doesnotexist". Since the filter does not - * match any namespaces, it returns no results - * For more information about filtering, see - * [API Filtering](https://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. The order to list results by. - * General `order_by` string syntax: ` () (,)` - * * `` allows value: `name` - * * `` ascending or descending order by ``. If this is - * left blank, `asc` is used - * Note that an empty `order_by` string results in default order, which is - * order by `name` in ascending order. - * - * 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 to list results by. - * General `order_by` string syntax: ` () (,)` - * * `` allows value: `name` - * * `` ascending or descending order by ``. If this is - * left blank, `asc` is used - * Note that an empty `order_by` string results in default order, which is - * order by `name` in ascending 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/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/ListNamespacesResponse.php b/owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/ListNamespacesResponse.php deleted file mode 100644 index 46926f934639..000000000000 --- a/owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/ListNamespacesResponse.php +++ /dev/null @@ -1,106 +0,0 @@ -google.cloud.servicedirectory.v1.ListNamespacesResponse - */ -class ListNamespacesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of namespaces. - * - * Generated from protobuf field repeated .google.cloud.servicedirectory.v1.Namespace namespaces = 1; - */ - private $namespaces; - /** - * 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\ServiceDirectory\V1\PBNamespace>|\Google\Protobuf\Internal\RepeatedField $namespaces - * The list of namespaces. - * @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\Servicedirectory\V1\RegistrationService::initOnce(); - parent::__construct($data); - } - - /** - * The list of namespaces. - * - * Generated from protobuf field repeated .google.cloud.servicedirectory.v1.Namespace namespaces = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNamespaces() - { - return $this->namespaces; - } - - /** - * The list of namespaces. - * - * Generated from protobuf field repeated .google.cloud.servicedirectory.v1.Namespace namespaces = 1; - * @param array<\Google\Cloud\ServiceDirectory\V1\PBNamespace>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNamespaces($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ServiceDirectory\V1\PBNamespace::class); - $this->namespaces = $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/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/ListServicesRequest.php b/owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/ListServicesRequest.php deleted file mode 100644 index 03bf23b11914..000000000000 --- a/owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/ListServicesRequest.php +++ /dev/null @@ -1,347 +0,0 @@ -google.cloud.servicedirectory.v1.ListServicesRequest - */ -class ListServicesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the namespace whose services you'd - * like to list. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. The next_page_token value returned from a previous List request, - * if any. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. The filter to list results by. - * General `filter` string syntax: - * ` ()` - * * `` can be `name` or `annotations.` for map field - * * `` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:` - * means `HAS`, and is roughly the same as `=` - * * `` must be the same data type as field - * * `` can be `AND`, `OR`, `NOT` - * Examples of valid filters: - * * `annotations.owner` returns services that have a annotation with the - * key `owner`, this is the same as `annotations:owner` - * * `annotations.protocol=gRPC` returns services that have key/value - * `protocol=gRPC` - * * - * `name>projects/my-project/locations/us-east1/namespaces/my-namespace/services/service-c` - * returns services that have name that is alphabetically later than the - * string, so "service-e" is returned but "service-a" is not - * * `annotations.owner!=sd AND annotations.foo=bar` returns services that - * have `owner` in annotation key but value is not `sd` AND have - * key/value `foo=bar` - * * `doesnotexist.foo=bar` returns an empty list. Note that service - * doesn't have a field called "doesnotexist". Since the filter does not - * match any services, it returns no results - * For more information about filtering, see - * [API Filtering](https://aip.dev/160). - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. The order to list results by. - * General `order_by` string syntax: ` () (,)` - * * `` allows value: `name` - * * `` ascending or descending order by ``. If this is - * left blank, `asc` is used - * Note that an empty `order_by` string results in default order, which is - * order by `name` in ascending order. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The resource name of the namespace whose services you'd - * like to list. Please see - * {@see RegistrationServiceClient::namespaceName()} for help formatting this field. - * - * @return \Google\Cloud\ServiceDirectory\V1\ListServicesRequest - * - * @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 namespace whose services you'd - * like to list. - * @type int $page_size - * Optional. The maximum number of items to return. - * @type string $page_token - * Optional. The next_page_token value returned from a previous List request, - * if any. - * @type string $filter - * Optional. The filter to list results by. - * General `filter` string syntax: - * ` ()` - * * `` can be `name` or `annotations.` for map field - * * `` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:` - * means `HAS`, and is roughly the same as `=` - * * `` must be the same data type as field - * * `` can be `AND`, `OR`, `NOT` - * Examples of valid filters: - * * `annotations.owner` returns services that have a annotation with the - * key `owner`, this is the same as `annotations:owner` - * * `annotations.protocol=gRPC` returns services that have key/value - * `protocol=gRPC` - * * - * `name>projects/my-project/locations/us-east1/namespaces/my-namespace/services/service-c` - * returns services that have name that is alphabetically later than the - * string, so "service-e" is returned but "service-a" is not - * * `annotations.owner!=sd AND annotations.foo=bar` returns services that - * have `owner` in annotation key but value is not `sd` AND have - * key/value `foo=bar` - * * `doesnotexist.foo=bar` returns an empty list. Note that service - * doesn't have a field called "doesnotexist". Since the filter does not - * match any services, it returns no results - * For more information about filtering, see - * [API Filtering](https://aip.dev/160). - * @type string $order_by - * Optional. The order to list results by. - * General `order_by` string syntax: ` () (,)` - * * `` allows value: `name` - * * `` ascending or descending order by ``. If this is - * left blank, `asc` is used - * Note that an empty `order_by` string results in default order, which is - * order by `name` in ascending order. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Servicedirectory\V1\RegistrationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the namespace whose services you'd - * like to list. - * - * 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 namespace whose services you'd - * like to list. - * - * 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 items to return. - * - * 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 items to return. - * - * 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; - } - - /** - * Optional. The next_page_token value returned from a previous List request, - * if any. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. The next_page_token value returned from a previous List request, - * if any. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. The filter to list results by. - * General `filter` string syntax: - * ` ()` - * * `` can be `name` or `annotations.` for map field - * * `` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:` - * means `HAS`, and is roughly the same as `=` - * * `` must be the same data type as field - * * `` can be `AND`, `OR`, `NOT` - * Examples of valid filters: - * * `annotations.owner` returns services that have a annotation with the - * key `owner`, this is the same as `annotations:owner` - * * `annotations.protocol=gRPC` returns services that have key/value - * `protocol=gRPC` - * * - * `name>projects/my-project/locations/us-east1/namespaces/my-namespace/services/service-c` - * returns services that have name that is alphabetically later than the - * string, so "service-e" is returned but "service-a" is not - * * `annotations.owner!=sd AND annotations.foo=bar` returns services that - * have `owner` in annotation key but value is not `sd` AND have - * key/value `foo=bar` - * * `doesnotexist.foo=bar` returns an empty list. Note that service - * doesn't have a field called "doesnotexist". Since the filter does not - * match any services, it returns no results - * For more information about filtering, see - * [API Filtering](https://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 list results by. - * General `filter` string syntax: - * ` ()` - * * `` can be `name` or `annotations.` for map field - * * `` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:` - * means `HAS`, and is roughly the same as `=` - * * `` must be the same data type as field - * * `` can be `AND`, `OR`, `NOT` - * Examples of valid filters: - * * `annotations.owner` returns services that have a annotation with the - * key `owner`, this is the same as `annotations:owner` - * * `annotations.protocol=gRPC` returns services that have key/value - * `protocol=gRPC` - * * - * `name>projects/my-project/locations/us-east1/namespaces/my-namespace/services/service-c` - * returns services that have name that is alphabetically later than the - * string, so "service-e" is returned but "service-a" is not - * * `annotations.owner!=sd AND annotations.foo=bar` returns services that - * have `owner` in annotation key but value is not `sd` AND have - * key/value `foo=bar` - * * `doesnotexist.foo=bar` returns an empty list. Note that service - * doesn't have a field called "doesnotexist". Since the filter does not - * match any services, it returns no results - * For more information about filtering, see - * [API Filtering](https://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. The order to list results by. - * General `order_by` string syntax: ` () (,)` - * * `` allows value: `name` - * * `` ascending or descending order by ``. If this is - * left blank, `asc` is used - * Note that an empty `order_by` string results in default order, which is - * order by `name` in ascending order. - * - * 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 to list results by. - * General `order_by` string syntax: ` () (,)` - * * `` allows value: `name` - * * `` ascending or descending order by ``. If this is - * left blank, `asc` is used - * Note that an empty `order_by` string results in default order, which is - * order by `name` in ascending 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/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/ListServicesResponse.php b/owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/ListServicesResponse.php deleted file mode 100644 index b0956b8c2b2b..000000000000 --- a/owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/ListServicesResponse.php +++ /dev/null @@ -1,106 +0,0 @@ -google.cloud.servicedirectory.v1.ListServicesResponse - */ -class ListServicesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of services. - * - * Generated from protobuf field repeated .google.cloud.servicedirectory.v1.Service services = 1; - */ - private $services; - /** - * 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\ServiceDirectory\V1\Service>|\Google\Protobuf\Internal\RepeatedField $services - * The list of services. - * @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\Servicedirectory\V1\RegistrationService::initOnce(); - parent::__construct($data); - } - - /** - * The list of services. - * - * Generated from protobuf field repeated .google.cloud.servicedirectory.v1.Service services = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getServices() - { - return $this->services; - } - - /** - * The list of services. - * - * Generated from protobuf field repeated .google.cloud.servicedirectory.v1.Service services = 1; - * @param array<\Google\Cloud\ServiceDirectory\V1\Service>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setServices($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ServiceDirectory\V1\Service::class); - $this->services = $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/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/PBNamespace.php b/owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/PBNamespace.php deleted file mode 100644 index d2fa30c5d03d..000000000000 --- a/owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/PBNamespace.php +++ /dev/null @@ -1,153 +0,0 @@ -google.cloud.servicedirectory.v1.Namespace - */ -class PBNamespace extends \Google\Protobuf\Internal\Message -{ - /** - * Immutable. The resource name for the namespace in the format - * `projects/*/locations/*/namespaces/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $name = ''; - /** - * Optional. Resource labels associated with this namespace. - * No more than 64 user labels can be associated with a given resource. Label - * keys and values can be no longer than 63 characters. - * - * Generated from protobuf field map labels = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Output only. The globally unique identifier of the namespace in the UUID4 - * format. - * - * 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 - * Immutable. The resource name for the namespace in the format - * `projects/*/locations/*/namespaces/*`. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. Resource labels associated with this namespace. - * No more than 64 user labels can be associated with a given resource. Label - * keys and values can be no longer than 63 characters. - * @type string $uid - * Output only. The globally unique identifier of the namespace in the UUID4 - * format. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Servicedirectory\V1\PBNamespace::initOnce(); - parent::__construct($data); - } - - /** - * Immutable. The resource name for the namespace in the format - * `projects/*/locations/*/namespaces/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Immutable. The resource name for the namespace in the format - * `projects/*/locations/*/namespaces/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. Resource labels associated with this namespace. - * No more than 64 user labels can be associated with a given resource. Label - * keys and values can be no longer than 63 characters. - * - * Generated from protobuf field map labels = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. Resource labels associated with this namespace. - * No more than 64 user labels can be associated with a given resource. Label - * keys and values can be no longer than 63 characters. - * - * Generated from protobuf field map labels = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @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 globally unique identifier of the namespace in the UUID4 - * format. - * - * Generated from protobuf field string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. The globally unique identifier of the namespace in the UUID4 - * format. - * - * 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/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/ResolveServiceRequest.php b/owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/ResolveServiceRequest.php deleted file mode 100644 index 8ce1366ea901..000000000000 --- a/owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/ResolveServiceRequest.php +++ /dev/null @@ -1,265 +0,0 @@ -google.cloud.servicedirectory.v1.ResolveServiceRequest - */ -class ResolveServiceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the service to resolve. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. The maximum number of endpoints to return. Defaults to 25. - * Maximum is 100. If a value less than one is specified, the Default is used. - * If a value greater than the Maximum is specified, the Maximum is used. - * - * Generated from protobuf field int32 max_endpoints = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $max_endpoints = 0; - /** - * Optional. The filter applied to the endpoints of the resolved service. - * General `filter` string syntax: - * ` ()` - * * `` can be `name`, `address`, `port`, or `annotations.` for - * map field - * * `` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:` - * means `HAS`, and is roughly the same as `=` - * * `` must be the same data type as field - * * `` can be `AND`, `OR`, `NOT` - * Examples of valid filters: - * * `annotations.owner` returns endpoints that have a annotation with the - * key `owner`, this is the same as `annotations:owner` - * * `annotations.protocol=gRPC` returns endpoints that have key/value - * `protocol=gRPC` - * * `address=192.108.1.105` returns endpoints that have this address - * * `port>8080` returns endpoints that have port number larger than 8080 - * * - * `name>projects/my-project/locations/us-east1/namespaces/my-namespace/services/my-service/endpoints/endpoint-c` - * returns endpoints that have name that is alphabetically later than the - * string, so "endpoint-e" is returned but "endpoint-a" is not - * * - * `name=projects/my-project/locations/us-central1/namespaces/my-namespace/services/my-service/endpoints/ep-1` - * returns the endpoint that has an endpoint_id equal to `ep-1` - * * `annotations.owner!=sd AND annotations.foo=bar` returns endpoints that - * have `owner` in annotation key but value is not `sd` AND have - * key/value `foo=bar` - * * `doesnotexist.foo=bar` returns an empty list. Note that endpoint - * doesn't have a field called "doesnotexist". Since the filter does not - * match any endpoint, it returns no results - * For more information about filtering, see - * [API Filtering](https://aip.dev/160). - * - * Generated from protobuf field string endpoint_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $endpoint_filter = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the service to resolve. - * @type int $max_endpoints - * Optional. The maximum number of endpoints to return. Defaults to 25. - * Maximum is 100. If a value less than one is specified, the Default is used. - * If a value greater than the Maximum is specified, the Maximum is used. - * @type string $endpoint_filter - * Optional. The filter applied to the endpoints of the resolved service. - * General `filter` string syntax: - * ` ()` - * * `` can be `name`, `address`, `port`, or `annotations.` for - * map field - * * `` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:` - * means `HAS`, and is roughly the same as `=` - * * `` must be the same data type as field - * * `` can be `AND`, `OR`, `NOT` - * Examples of valid filters: - * * `annotations.owner` returns endpoints that have a annotation with the - * key `owner`, this is the same as `annotations:owner` - * * `annotations.protocol=gRPC` returns endpoints that have key/value - * `protocol=gRPC` - * * `address=192.108.1.105` returns endpoints that have this address - * * `port>8080` returns endpoints that have port number larger than 8080 - * * - * `name>projects/my-project/locations/us-east1/namespaces/my-namespace/services/my-service/endpoints/endpoint-c` - * returns endpoints that have name that is alphabetically later than the - * string, so "endpoint-e" is returned but "endpoint-a" is not - * * - * `name=projects/my-project/locations/us-central1/namespaces/my-namespace/services/my-service/endpoints/ep-1` - * returns the endpoint that has an endpoint_id equal to `ep-1` - * * `annotations.owner!=sd AND annotations.foo=bar` returns endpoints that - * have `owner` in annotation key but value is not `sd` AND have - * key/value `foo=bar` - * * `doesnotexist.foo=bar` returns an empty list. Note that endpoint - * doesn't have a field called "doesnotexist". Since the filter does not - * match any endpoint, it returns no results - * For more information about filtering, see - * [API Filtering](https://aip.dev/160). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Servicedirectory\V1\LookupService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the service to resolve. - * - * 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 service to resolve. - * - * 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 maximum number of endpoints to return. Defaults to 25. - * Maximum is 100. If a value less than one is specified, the Default is used. - * If a value greater than the Maximum is specified, the Maximum is used. - * - * Generated from protobuf field int32 max_endpoints = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getMaxEndpoints() - { - return $this->max_endpoints; - } - - /** - * Optional. The maximum number of endpoints to return. Defaults to 25. - * Maximum is 100. If a value less than one is specified, the Default is used. - * If a value greater than the Maximum is specified, the Maximum is used. - * - * Generated from protobuf field int32 max_endpoints = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setMaxEndpoints($var) - { - GPBUtil::checkInt32($var); - $this->max_endpoints = $var; - - return $this; - } - - /** - * Optional. The filter applied to the endpoints of the resolved service. - * General `filter` string syntax: - * ` ()` - * * `` can be `name`, `address`, `port`, or `annotations.` for - * map field - * * `` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:` - * means `HAS`, and is roughly the same as `=` - * * `` must be the same data type as field - * * `` can be `AND`, `OR`, `NOT` - * Examples of valid filters: - * * `annotations.owner` returns endpoints that have a annotation with the - * key `owner`, this is the same as `annotations:owner` - * * `annotations.protocol=gRPC` returns endpoints that have key/value - * `protocol=gRPC` - * * `address=192.108.1.105` returns endpoints that have this address - * * `port>8080` returns endpoints that have port number larger than 8080 - * * - * `name>projects/my-project/locations/us-east1/namespaces/my-namespace/services/my-service/endpoints/endpoint-c` - * returns endpoints that have name that is alphabetically later than the - * string, so "endpoint-e" is returned but "endpoint-a" is not - * * - * `name=projects/my-project/locations/us-central1/namespaces/my-namespace/services/my-service/endpoints/ep-1` - * returns the endpoint that has an endpoint_id equal to `ep-1` - * * `annotations.owner!=sd AND annotations.foo=bar` returns endpoints that - * have `owner` in annotation key but value is not `sd` AND have - * key/value `foo=bar` - * * `doesnotexist.foo=bar` returns an empty list. Note that endpoint - * doesn't have a field called "doesnotexist". Since the filter does not - * match any endpoint, it returns no results - * For more information about filtering, see - * [API Filtering](https://aip.dev/160). - * - * Generated from protobuf field string endpoint_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEndpointFilter() - { - return $this->endpoint_filter; - } - - /** - * Optional. The filter applied to the endpoints of the resolved service. - * General `filter` string syntax: - * ` ()` - * * `` can be `name`, `address`, `port`, or `annotations.` for - * map field - * * `` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:` - * means `HAS`, and is roughly the same as `=` - * * `` must be the same data type as field - * * `` can be `AND`, `OR`, `NOT` - * Examples of valid filters: - * * `annotations.owner` returns endpoints that have a annotation with the - * key `owner`, this is the same as `annotations:owner` - * * `annotations.protocol=gRPC` returns endpoints that have key/value - * `protocol=gRPC` - * * `address=192.108.1.105` returns endpoints that have this address - * * `port>8080` returns endpoints that have port number larger than 8080 - * * - * `name>projects/my-project/locations/us-east1/namespaces/my-namespace/services/my-service/endpoints/endpoint-c` - * returns endpoints that have name that is alphabetically later than the - * string, so "endpoint-e" is returned but "endpoint-a" is not - * * - * `name=projects/my-project/locations/us-central1/namespaces/my-namespace/services/my-service/endpoints/ep-1` - * returns the endpoint that has an endpoint_id equal to `ep-1` - * * `annotations.owner!=sd AND annotations.foo=bar` returns endpoints that - * have `owner` in annotation key but value is not `sd` AND have - * key/value `foo=bar` - * * `doesnotexist.foo=bar` returns an empty list. Note that endpoint - * doesn't have a field called "doesnotexist". Since the filter does not - * match any endpoint, it returns no results - * For more information about filtering, see - * [API Filtering](https://aip.dev/160). - * - * Generated from protobuf field string endpoint_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setEndpointFilter($var) - { - GPBUtil::checkString($var, True); - $this->endpoint_filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/ResolveServiceResponse.php b/owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/ResolveServiceResponse.php deleted file mode 100644 index 63fa97718ca3..000000000000 --- a/owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/ResolveServiceResponse.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.servicedirectory.v1.ResolveServiceResponse - */ -class ResolveServiceResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field .google.cloud.servicedirectory.v1.Service service = 1; - */ - protected $service = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\ServiceDirectory\V1\Service $service - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Servicedirectory\V1\LookupService::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field .google.cloud.servicedirectory.v1.Service service = 1; - * @return \Google\Cloud\ServiceDirectory\V1\Service|null - */ - public function getService() - { - return $this->service; - } - - public function hasService() - { - return isset($this->service); - } - - public function clearService() - { - unset($this->service); - } - - /** - * Generated from protobuf field .google.cloud.servicedirectory.v1.Service service = 1; - * @param \Google\Cloud\ServiceDirectory\V1\Service $var - * @return $this - */ - public function setService($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ServiceDirectory\V1\Service::class); - $this->service = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/Service.php b/owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/Service.php deleted file mode 100644 index 33f8d1b6b894..000000000000 --- a/owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/Service.php +++ /dev/null @@ -1,256 +0,0 @@ -google.cloud.servicedirectory.v1.Service - */ -class Service extends \Google\Protobuf\Internal\Message -{ - /** - * Immutable. The resource name for the service in the format - * `projects/*/locations/*/namespaces/*/services/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $name = ''; - /** - * Optional. Annotations for the service. This data can be consumed by service - * clients. - * Restrictions: - * * The entire annotations dictionary may contain up to 2000 characters, - * spread accoss all key-value pairs. Annotations that go beyond this - * limit are rejected - * * Valid annotation keys have two segments: an optional prefix and name, - * separated by a slash (/). The name segment is required and must be 63 - * characters or less, beginning and ending with an alphanumeric character - * ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and - * alphanumerics between. The prefix is optional. If specified, the prefix - * must be a DNS subdomain: a series of DNS labels separated by dots (.), - * not longer than 253 characters in total, followed by a slash (/). - * Annotations that fails to meet these requirements are rejected - * Note: This field is equivalent to the `metadata` field in the v1beta1 API. - * They have the same syntax and read/write to the same location in Service - * Directory. - * - * Generated from protobuf field map annotations = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $annotations; - /** - * Output only. Endpoints associated with this service. Returned on - * [LookupService.ResolveService][google.cloud.servicedirectory.v1.LookupService.ResolveService]. - * Control plane clients should use - * [RegistrationService.ListEndpoints][google.cloud.servicedirectory.v1.RegistrationService.ListEndpoints]. - * - * Generated from protobuf field repeated .google.cloud.servicedirectory.v1.Endpoint endpoints = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $endpoints; - /** - * Output only. The globally unique identifier of the service in the UUID4 - * format. - * - * Generated from protobuf field string uid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Immutable. The resource name for the service in the format - * `projects/*/locations/*/namespaces/*/services/*`. - * @type array|\Google\Protobuf\Internal\MapField $annotations - * Optional. Annotations for the service. This data can be consumed by service - * clients. - * Restrictions: - * * The entire annotations dictionary may contain up to 2000 characters, - * spread accoss all key-value pairs. Annotations that go beyond this - * limit are rejected - * * Valid annotation keys have two segments: an optional prefix and name, - * separated by a slash (/). The name segment is required and must be 63 - * characters or less, beginning and ending with an alphanumeric character - * ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and - * alphanumerics between. The prefix is optional. If specified, the prefix - * must be a DNS subdomain: a series of DNS labels separated by dots (.), - * not longer than 253 characters in total, followed by a slash (/). - * Annotations that fails to meet these requirements are rejected - * Note: This field is equivalent to the `metadata` field in the v1beta1 API. - * They have the same syntax and read/write to the same location in Service - * Directory. - * @type array<\Google\Cloud\ServiceDirectory\V1\Endpoint>|\Google\Protobuf\Internal\RepeatedField $endpoints - * Output only. Endpoints associated with this service. Returned on - * [LookupService.ResolveService][google.cloud.servicedirectory.v1.LookupService.ResolveService]. - * Control plane clients should use - * [RegistrationService.ListEndpoints][google.cloud.servicedirectory.v1.RegistrationService.ListEndpoints]. - * @type string $uid - * Output only. The globally unique identifier of the service in the UUID4 - * format. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Servicedirectory\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Immutable. The resource name for the service in the format - * `projects/*/locations/*/namespaces/*/services/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Immutable. The resource name for the service in the format - * `projects/*/locations/*/namespaces/*/services/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. Annotations for the service. This data can be consumed by service - * clients. - * Restrictions: - * * The entire annotations dictionary may contain up to 2000 characters, - * spread accoss all key-value pairs. Annotations that go beyond this - * limit are rejected - * * Valid annotation keys have two segments: an optional prefix and name, - * separated by a slash (/). The name segment is required and must be 63 - * characters or less, beginning and ending with an alphanumeric character - * ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and - * alphanumerics between. The prefix is optional. If specified, the prefix - * must be a DNS subdomain: a series of DNS labels separated by dots (.), - * not longer than 253 characters in total, followed by a slash (/). - * Annotations that fails to meet these requirements are rejected - * Note: This field is equivalent to the `metadata` field in the v1beta1 API. - * They have the same syntax and read/write to the same location in Service - * Directory. - * - * Generated from protobuf field map annotations = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getAnnotations() - { - return $this->annotations; - } - - /** - * Optional. Annotations for the service. This data can be consumed by service - * clients. - * Restrictions: - * * The entire annotations dictionary may contain up to 2000 characters, - * spread accoss all key-value pairs. Annotations that go beyond this - * limit are rejected - * * Valid annotation keys have two segments: an optional prefix and name, - * separated by a slash (/). The name segment is required and must be 63 - * characters or less, beginning and ending with an alphanumeric character - * ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and - * alphanumerics between. The prefix is optional. If specified, the prefix - * must be a DNS subdomain: a series of DNS labels separated by dots (.), - * not longer than 253 characters in total, followed by a slash (/). - * Annotations that fails to meet these requirements are rejected - * Note: This field is equivalent to the `metadata` field in the v1beta1 API. - * They have the same syntax and read/write to the same location in Service - * Directory. - * - * Generated from protobuf field map annotations = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setAnnotations($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->annotations = $arr; - - return $this; - } - - /** - * Output only. Endpoints associated with this service. Returned on - * [LookupService.ResolveService][google.cloud.servicedirectory.v1.LookupService.ResolveService]. - * Control plane clients should use - * [RegistrationService.ListEndpoints][google.cloud.servicedirectory.v1.RegistrationService.ListEndpoints]. - * - * Generated from protobuf field repeated .google.cloud.servicedirectory.v1.Endpoint endpoints = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEndpoints() - { - return $this->endpoints; - } - - /** - * Output only. Endpoints associated with this service. Returned on - * [LookupService.ResolveService][google.cloud.servicedirectory.v1.LookupService.ResolveService]. - * Control plane clients should use - * [RegistrationService.ListEndpoints][google.cloud.servicedirectory.v1.RegistrationService.ListEndpoints]. - * - * Generated from protobuf field repeated .google.cloud.servicedirectory.v1.Endpoint endpoints = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\ServiceDirectory\V1\Endpoint>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEndpoints($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ServiceDirectory\V1\Endpoint::class); - $this->endpoints = $arr; - - return $this; - } - - /** - * Output only. The globally unique identifier of the service in the UUID4 - * format. - * - * Generated from protobuf field string uid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. The globally unique identifier of the service in the UUID4 - * format. - * - * Generated from protobuf field string uid = 7 [(.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/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/UpdateEndpointRequest.php b/owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/UpdateEndpointRequest.php deleted file mode 100644 index 6c294424f3f8..000000000000 --- a/owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/UpdateEndpointRequest.php +++ /dev/null @@ -1,137 +0,0 @@ -google.cloud.servicedirectory.v1.UpdateEndpointRequest - */ -class UpdateEndpointRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The updated endpoint. - * - * Generated from protobuf field .google.cloud.servicedirectory.v1.Endpoint endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $endpoint = null; - /** - * Required. List of fields to be updated in this request. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\ServiceDirectory\V1\Endpoint $endpoint Required. The updated endpoint. - * @param \Google\Protobuf\FieldMask $updateMask Required. List of fields to be updated in this request. - * - * @return \Google\Cloud\ServiceDirectory\V1\UpdateEndpointRequest - * - * @experimental - */ - public static function build(\Google\Cloud\ServiceDirectory\V1\Endpoint $endpoint, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setEndpoint($endpoint) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\ServiceDirectory\V1\Endpoint $endpoint - * Required. The updated endpoint. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. List of fields to be updated in this request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Servicedirectory\V1\RegistrationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The updated endpoint. - * - * Generated from protobuf field .google.cloud.servicedirectory.v1.Endpoint endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\ServiceDirectory\V1\Endpoint|null - */ - public function getEndpoint() - { - return $this->endpoint; - } - - public function hasEndpoint() - { - return isset($this->endpoint); - } - - public function clearEndpoint() - { - unset($this->endpoint); - } - - /** - * Required. The updated endpoint. - * - * Generated from protobuf field .google.cloud.servicedirectory.v1.Endpoint endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\ServiceDirectory\V1\Endpoint $var - * @return $this - */ - public function setEndpoint($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ServiceDirectory\V1\Endpoint::class); - $this->endpoint = $var; - - return $this; - } - - /** - * Required. List of fields to be updated in this request. - * - * 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. List of fields to be updated in this request. - * - * 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/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/UpdateNamespaceRequest.php b/owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/UpdateNamespaceRequest.php deleted file mode 100644 index 499e2528df7d..000000000000 --- a/owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/UpdateNamespaceRequest.php +++ /dev/null @@ -1,137 +0,0 @@ -google.cloud.servicedirectory.v1.UpdateNamespaceRequest - */ -class UpdateNamespaceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The updated namespace. - * - * Generated from protobuf field .google.cloud.servicedirectory.v1.Namespace namespace = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $namespace = null; - /** - * Required. List of fields to be updated in this request. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\ServiceDirectory\V1\PBNamespace $namespace Required. The updated namespace. - * @param \Google\Protobuf\FieldMask $updateMask Required. List of fields to be updated in this request. - * - * @return \Google\Cloud\ServiceDirectory\V1\UpdateNamespaceRequest - * - * @experimental - */ - public static function build(\Google\Cloud\ServiceDirectory\V1\PBNamespace $namespace, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setNamespace($namespace) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\ServiceDirectory\V1\PBNamespace $namespace - * Required. The updated namespace. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. List of fields to be updated in this request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Servicedirectory\V1\RegistrationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The updated namespace. - * - * Generated from protobuf field .google.cloud.servicedirectory.v1.Namespace namespace = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\ServiceDirectory\V1\PBNamespace|null - */ - public function getNamespace() - { - return $this->namespace; - } - - public function hasNamespace() - { - return isset($this->namespace); - } - - public function clearNamespace() - { - unset($this->namespace); - } - - /** - * Required. The updated namespace. - * - * Generated from protobuf field .google.cloud.servicedirectory.v1.Namespace namespace = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\ServiceDirectory\V1\PBNamespace $var - * @return $this - */ - public function setNamespace($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ServiceDirectory\V1\PBNamespace::class); - $this->namespace = $var; - - return $this; - } - - /** - * Required. List of fields to be updated in this request. - * - * 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. List of fields to be updated in this request. - * - * 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/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/UpdateServiceRequest.php b/owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/UpdateServiceRequest.php deleted file mode 100644 index b71bc24db981..000000000000 --- a/owl-bot-staging/ServiceDirectory/v1/proto/src/Google/Cloud/ServiceDirectory/V1/UpdateServiceRequest.php +++ /dev/null @@ -1,137 +0,0 @@ -google.cloud.servicedirectory.v1.UpdateServiceRequest - */ -class UpdateServiceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The updated service. - * - * Generated from protobuf field .google.cloud.servicedirectory.v1.Service service = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $service = null; - /** - * Required. List of fields to be updated in this request. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\ServiceDirectory\V1\Service $service Required. The updated service. - * @param \Google\Protobuf\FieldMask $updateMask Required. List of fields to be updated in this request. - * - * @return \Google\Cloud\ServiceDirectory\V1\UpdateServiceRequest - * - * @experimental - */ - public static function build(\Google\Cloud\ServiceDirectory\V1\Service $service, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setService($service) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\ServiceDirectory\V1\Service $service - * Required. The updated service. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. List of fields to be updated in this request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Servicedirectory\V1\RegistrationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The updated service. - * - * Generated from protobuf field .google.cloud.servicedirectory.v1.Service service = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\ServiceDirectory\V1\Service|null - */ - public function getService() - { - return $this->service; - } - - public function hasService() - { - return isset($this->service); - } - - public function clearService() - { - unset($this->service); - } - - /** - * Required. The updated service. - * - * Generated from protobuf field .google.cloud.servicedirectory.v1.Service service = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\ServiceDirectory\V1\Service $var - * @return $this - */ - public function setService($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ServiceDirectory\V1\Service::class); - $this->service = $var; - - return $this; - } - - /** - * Required. List of fields to be updated in this request. - * - * 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. List of fields to be updated in this request. - * - * 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/ServiceDirectory/v1/samples/V1/LookupServiceClient/get_location.php b/owl-bot-staging/ServiceDirectory/v1/samples/V1/LookupServiceClient/get_location.php deleted file mode 100644 index 003ca17cac10..000000000000 --- a/owl-bot-staging/ServiceDirectory/v1/samples/V1/LookupServiceClient/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 servicedirectory_v1_generated_LookupService_GetLocation_sync] diff --git a/owl-bot-staging/ServiceDirectory/v1/samples/V1/LookupServiceClient/list_locations.php b/owl-bot-staging/ServiceDirectory/v1/samples/V1/LookupServiceClient/list_locations.php deleted file mode 100644 index a2ae2f99656d..000000000000 --- a/owl-bot-staging/ServiceDirectory/v1/samples/V1/LookupServiceClient/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 servicedirectory_v1_generated_LookupService_ListLocations_sync] diff --git a/owl-bot-staging/ServiceDirectory/v1/samples/V1/LookupServiceClient/resolve_service.php b/owl-bot-staging/ServiceDirectory/v1/samples/V1/LookupServiceClient/resolve_service.php deleted file mode 100644 index ed5cf035070d..000000000000 --- a/owl-bot-staging/ServiceDirectory/v1/samples/V1/LookupServiceClient/resolve_service.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var ResolveServiceResponse $response */ - $response = $lookupServiceClient->resolveService($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 = LookupServiceClient::serviceName( - '[PROJECT]', - '[LOCATION]', - '[NAMESPACE]', - '[SERVICE]' - ); - - resolve_service_sample($formattedName); -} -// [END servicedirectory_v1_generated_LookupService_ResolveService_sync] diff --git a/owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/create_endpoint.php b/owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/create_endpoint.php deleted file mode 100644 index 3d4baf87c4a9..000000000000 --- a/owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/create_endpoint.php +++ /dev/null @@ -1,87 +0,0 @@ -RFC1035. - * Specifically, the name must be 1-63 characters long and match the regular - * expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?` which means the first - * character must be a lowercase letter, and all following characters must - * be a dash, lowercase letter, or digit, except the last character, which - * cannot be a dash. - */ -function create_endpoint_sample(string $formattedParent, string $endpointId): void -{ - // Create a client. - $registrationServiceClient = new RegistrationServiceClient(); - - // Prepare the request message. - $endpoint = new Endpoint(); - $request = (new CreateEndpointRequest()) - ->setParent($formattedParent) - ->setEndpointId($endpointId) - ->setEndpoint($endpoint); - - // Call the API and handle any network failures. - try { - /** @var Endpoint $response */ - $response = $registrationServiceClient->createEndpoint($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 = RegistrationServiceClient::serviceName( - '[PROJECT]', - '[LOCATION]', - '[NAMESPACE]', - '[SERVICE]' - ); - $endpointId = '[ENDPOINT_ID]'; - - create_endpoint_sample($formattedParent, $endpointId); -} -// [END servicedirectory_v1_generated_RegistrationService_CreateEndpoint_sync] diff --git a/owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/create_namespace.php b/owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/create_namespace.php deleted file mode 100644 index 74058606407d..000000000000 --- a/owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/create_namespace.php +++ /dev/null @@ -1,83 +0,0 @@ -RFC1035. - * Specifically, the name must be 1-63 characters long and match the regular - * expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?` which means the first - * character must be a lowercase letter, and all following characters must - * be a dash, lowercase letter, or digit, except the last character, which - * cannot be a dash. - */ -function create_namespace_sample(string $formattedParent, string $namespaceId): void -{ - // Create a client. - $registrationServiceClient = new RegistrationServiceClient(); - - // Prepare the request message. - $namespace = new PBNamespace(); - $request = (new CreateNamespaceRequest()) - ->setParent($formattedParent) - ->setNamespaceId($namespaceId) - ->setNamespace($namespace); - - // Call the API and handle any network failures. - try { - /** @var PBNamespace $response */ - $response = $registrationServiceClient->createNamespace($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 = RegistrationServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $namespaceId = '[NAMESPACE_ID]'; - - create_namespace_sample($formattedParent, $namespaceId); -} -// [END servicedirectory_v1_generated_RegistrationService_CreateNamespace_sync] diff --git a/owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/create_service.php b/owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/create_service.php deleted file mode 100644 index 299ef267947a..000000000000 --- a/owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/create_service.php +++ /dev/null @@ -1,86 +0,0 @@ -RFC1035. - * Specifically, the name must be 1-63 characters long and match the regular - * expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?` which means the first - * character must be a lowercase letter, and all following characters must - * be a dash, lowercase letter, or digit, except the last character, which - * cannot be a dash. - */ -function create_service_sample(string $formattedParent, string $serviceId): void -{ - // Create a client. - $registrationServiceClient = new RegistrationServiceClient(); - - // Prepare the request message. - $service = new Service(); - $request = (new CreateServiceRequest()) - ->setParent($formattedParent) - ->setServiceId($serviceId) - ->setService($service); - - // Call the API and handle any network failures. - try { - /** @var Service $response */ - $response = $registrationServiceClient->createService($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 = RegistrationServiceClient::namespaceName( - '[PROJECT]', - '[LOCATION]', - '[NAMESPACE]' - ); - $serviceId = '[SERVICE_ID]'; - - create_service_sample($formattedParent, $serviceId); -} -// [END servicedirectory_v1_generated_RegistrationService_CreateService_sync] diff --git a/owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/delete_endpoint.php b/owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/delete_endpoint.php deleted file mode 100644 index b7a2a7acc511..000000000000 --- a/owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/delete_endpoint.php +++ /dev/null @@ -1,75 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $registrationServiceClient->deleteEndpoint($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 = RegistrationServiceClient::endpointName( - '[PROJECT]', - '[LOCATION]', - '[NAMESPACE]', - '[SERVICE]', - '[ENDPOINT]' - ); - - delete_endpoint_sample($formattedName); -} -// [END servicedirectory_v1_generated_RegistrationService_DeleteEndpoint_sync] diff --git a/owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/delete_namespace.php b/owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/delete_namespace.php deleted file mode 100644 index 57658e232376..000000000000 --- a/owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/delete_namespace.php +++ /dev/null @@ -1,70 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $registrationServiceClient->deleteNamespace($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 = RegistrationServiceClient::namespaceName('[PROJECT]', '[LOCATION]', '[NAMESPACE]'); - - delete_namespace_sample($formattedName); -} -// [END servicedirectory_v1_generated_RegistrationService_DeleteNamespace_sync] diff --git a/owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/delete_service.php b/owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/delete_service.php deleted file mode 100644 index d80ffb567408..000000000000 --- a/owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/delete_service.php +++ /dev/null @@ -1,75 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $registrationServiceClient->deleteService($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 = RegistrationServiceClient::serviceName( - '[PROJECT]', - '[LOCATION]', - '[NAMESPACE]', - '[SERVICE]' - ); - - delete_service_sample($formattedName); -} -// [END servicedirectory_v1_generated_RegistrationService_DeleteService_sync] diff --git a/owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/get_endpoint.php b/owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/get_endpoint.php deleted file mode 100644 index d67df6666626..000000000000 --- a/owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/get_endpoint.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Endpoint $response */ - $response = $registrationServiceClient->getEndpoint($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 = RegistrationServiceClient::endpointName( - '[PROJECT]', - '[LOCATION]', - '[NAMESPACE]', - '[SERVICE]', - '[ENDPOINT]' - ); - - get_endpoint_sample($formattedName); -} -// [END servicedirectory_v1_generated_RegistrationService_GetEndpoint_sync] diff --git a/owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/get_iam_policy.php b/owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/get_iam_policy.php deleted file mode 100644 index 9a5d3fabe4f2..000000000000 --- a/owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/get_iam_policy.php +++ /dev/null @@ -1,71 +0,0 @@ -setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $registrationServiceClient->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 servicedirectory_v1_generated_RegistrationService_GetIamPolicy_sync] diff --git a/owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/get_location.php b/owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/get_location.php deleted file mode 100644 index c2fad10a75ca..000000000000 --- a/owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/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 servicedirectory_v1_generated_RegistrationService_GetLocation_sync] diff --git a/owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/get_namespace.php b/owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/get_namespace.php deleted file mode 100644 index 128235fd5545..000000000000 --- a/owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/get_namespace.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var PBNamespace $response */ - $response = $registrationServiceClient->getNamespace($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 = RegistrationServiceClient::namespaceName('[PROJECT]', '[LOCATION]', '[NAMESPACE]'); - - get_namespace_sample($formattedName); -} -// [END servicedirectory_v1_generated_RegistrationService_GetNamespace_sync] diff --git a/owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/get_service.php b/owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/get_service.php deleted file mode 100644 index c794338e27d3..000000000000 --- a/owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/get_service.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Service $response */ - $response = $registrationServiceClient->getService($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 = RegistrationServiceClient::serviceName( - '[PROJECT]', - '[LOCATION]', - '[NAMESPACE]', - '[SERVICE]' - ); - - get_service_sample($formattedName); -} -// [END servicedirectory_v1_generated_RegistrationService_GetService_sync] diff --git a/owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/list_endpoints.php b/owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/list_endpoints.php deleted file mode 100644 index 9e8f05c18939..000000000000 --- a/owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/list_endpoints.php +++ /dev/null @@ -1,82 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $registrationServiceClient->listEndpoints($request); - - /** @var Endpoint $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 = RegistrationServiceClient::serviceName( - '[PROJECT]', - '[LOCATION]', - '[NAMESPACE]', - '[SERVICE]' - ); - - list_endpoints_sample($formattedParent); -} -// [END servicedirectory_v1_generated_RegistrationService_ListEndpoints_sync] diff --git a/owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/list_locations.php b/owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/list_locations.php deleted file mode 100644 index e616fa49b20c..000000000000 --- a/owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/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 servicedirectory_v1_generated_RegistrationService_ListLocations_sync] diff --git a/owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/list_namespaces.php b/owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/list_namespaces.php deleted file mode 100644 index 984d22d6cccc..000000000000 --- a/owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/list_namespaces.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $registrationServiceClient->listNamespaces($request); - - /** @var PBNamespace $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 = RegistrationServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_namespaces_sample($formattedParent); -} -// [END servicedirectory_v1_generated_RegistrationService_ListNamespaces_sync] diff --git a/owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/list_services.php b/owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/list_services.php deleted file mode 100644 index e9d43a9344c3..000000000000 --- a/owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/list_services.php +++ /dev/null @@ -1,81 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $registrationServiceClient->listServices($request); - - /** @var Service $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 = RegistrationServiceClient::namespaceName( - '[PROJECT]', - '[LOCATION]', - '[NAMESPACE]' - ); - - list_services_sample($formattedParent); -} -// [END servicedirectory_v1_generated_RegistrationService_ListServices_sync] diff --git a/owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/set_iam_policy.php b/owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/set_iam_policy.php deleted file mode 100644 index 391391317d3a..000000000000 --- a/owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/set_iam_policy.php +++ /dev/null @@ -1,73 +0,0 @@ -setResource($resource) - ->setPolicy($policy); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $registrationServiceClient->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 servicedirectory_v1_generated_RegistrationService_SetIamPolicy_sync] diff --git a/owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/test_iam_permissions.php b/owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/test_iam_permissions.php deleted file mode 100644 index 114c3c605a5c..000000000000 --- a/owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/test_iam_permissions.php +++ /dev/null @@ -1,78 +0,0 @@ -setResource($resource) - ->setPermissions($permissions); - - // Call the API and handle any network failures. - try { - /** @var TestIamPermissionsResponse $response */ - $response = $registrationServiceClient->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 servicedirectory_v1_generated_RegistrationService_TestIamPermissions_sync] diff --git a/owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/update_endpoint.php b/owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/update_endpoint.php deleted file mode 100644 index d206a652d9e2..000000000000 --- a/owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/update_endpoint.php +++ /dev/null @@ -1,62 +0,0 @@ -setEndpoint($endpoint) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var Endpoint $response */ - $response = $registrationServiceClient->updateEndpoint($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END servicedirectory_v1_generated_RegistrationService_UpdateEndpoint_sync] diff --git a/owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/update_namespace.php b/owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/update_namespace.php deleted file mode 100644 index db53da05eda5..000000000000 --- a/owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/update_namespace.php +++ /dev/null @@ -1,62 +0,0 @@ -setNamespace($namespace) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var PBNamespace $response */ - $response = $registrationServiceClient->updateNamespace($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END servicedirectory_v1_generated_RegistrationService_UpdateNamespace_sync] diff --git a/owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/update_service.php b/owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/update_service.php deleted file mode 100644 index 43fcf0173859..000000000000 --- a/owl-bot-staging/ServiceDirectory/v1/samples/V1/RegistrationServiceClient/update_service.php +++ /dev/null @@ -1,62 +0,0 @@ -setService($service) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var Service $response */ - $response = $registrationServiceClient->updateService($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END servicedirectory_v1_generated_RegistrationService_UpdateService_sync] diff --git a/owl-bot-staging/ServiceDirectory/v1/src/V1/Client/LookupServiceClient.php b/owl-bot-staging/ServiceDirectory/v1/src/V1/Client/LookupServiceClient.php deleted file mode 100644 index f5c4676b5c91..000000000000 --- a/owl-bot-staging/ServiceDirectory/v1/src/V1/Client/LookupServiceClient.php +++ /dev/null @@ -1,301 +0,0 @@ - resolveServiceAsync(ResolveServiceRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - */ -final class LookupServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.servicedirectory.v1.LookupService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'servicedirectory.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'servicedirectory.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private 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/lookup_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/lookup_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/lookup_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/lookup_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a service - * resource. - * - * @param string $project - * @param string $location - * @param string $namespace - * @param string $service - * - * @return string The formatted service resource. - */ - public static function serviceName(string $project, string $location, string $namespace, string $service): string - { - return self::getPathTemplate('service')->render([ - 'project' => $project, - 'location' => $location, - 'namespace' => $namespace, - 'service' => $service, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - service: projects/{project}/locations/{location}/namespaces/{namespace}/services/{service} - * - * 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 'servicedirectory.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); - } - - /** - * Returns a [service][google.cloud.servicedirectory.v1.Service] and its - * associated endpoints. - * Resolving a service is not considered an active developer method. - * - * The async variant is {@see LookupServiceClient::resolveServiceAsync()} . - * - * @example samples/V1/LookupServiceClient/resolve_service.php - * - * @param ResolveServiceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ResolveServiceResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function resolveService(ResolveServiceRequest $request, array $callOptions = []): ResolveServiceResponse - { - return $this->startApiCall('ResolveService', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see LookupServiceClient::getLocationAsync()} . - * - * @example samples/V1/LookupServiceClient/get_location.php - * - * @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 LookupServiceClient::listLocationsAsync()} . - * - * @example samples/V1/LookupServiceClient/list_locations.php - * - * @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/ServiceDirectory/v1/src/V1/Client/RegistrationServiceClient.php b/owl-bot-staging/ServiceDirectory/v1/src/V1/Client/RegistrationServiceClient.php deleted file mode 100644 index f1cb3b5f5d5d..000000000000 --- a/owl-bot-staging/ServiceDirectory/v1/src/V1/Client/RegistrationServiceClient.php +++ /dev/null @@ -1,870 +0,0 @@ - createEndpointAsync(CreateEndpointRequest $request, array $optionalArgs = []) - * @method PromiseInterface createNamespaceAsync(CreateNamespaceRequest $request, array $optionalArgs = []) - * @method PromiseInterface createServiceAsync(CreateServiceRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteEndpointAsync(DeleteEndpointRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteNamespaceAsync(DeleteNamespaceRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteServiceAsync(DeleteServiceRequest $request, array $optionalArgs = []) - * @method PromiseInterface getEndpointAsync(GetEndpointRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface getNamespaceAsync(GetNamespaceRequest $request, array $optionalArgs = []) - * @method PromiseInterface getServiceAsync(GetServiceRequest $request, array $optionalArgs = []) - * @method PromiseInterface listEndpointsAsync(ListEndpointsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listNamespacesAsync(ListNamespacesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listServicesAsync(ListServicesRequest $request, array $optionalArgs = []) - * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateEndpointAsync(UpdateEndpointRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateNamespaceAsync(UpdateNamespaceRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateServiceAsync(UpdateServiceRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - */ -final class RegistrationServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.servicedirectory.v1.RegistrationService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'servicedirectory.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'servicedirectory.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private 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/registration_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/registration_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/registration_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/registration_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a endpoint - * resource. - * - * @param string $project - * @param string $location - * @param string $namespace - * @param string $service - * @param string $endpoint - * - * @return string The formatted endpoint resource. - */ - public static function endpointName(string $project, string $location, string $namespace, string $service, string $endpoint): string - { - return self::getPathTemplate('endpoint')->render([ - 'project' => $project, - 'location' => $location, - 'namespace' => $namespace, - 'service' => $service, - 'endpoint' => $endpoint, - ]); - } - - /** - * 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 namespace - * resource. - * - * @param string $project - * @param string $location - * @param string $namespace - * - * @return string The formatted namespace resource. - */ - public static function namespaceName(string $project, string $location, string $namespace): string - { - return self::getPathTemplate('namespace')->render([ - 'project' => $project, - 'location' => $location, - 'namespace' => $namespace, - ]); - } - - /** - * 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 service - * resource. - * - * @param string $project - * @param string $location - * @param string $namespace - * @param string $service - * - * @return string The formatted service resource. - */ - public static function serviceName(string $project, string $location, string $namespace, string $service): string - { - return self::getPathTemplate('service')->render([ - 'project' => $project, - 'location' => $location, - 'namespace' => $namespace, - 'service' => $service, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - endpoint: projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}/endpoints/{endpoint} - * - location: projects/{project}/locations/{location} - * - namespace: projects/{project}/locations/{location}/namespaces/{namespace} - * - network: projects/{project}/locations/global/networks/{network} - * - service: projects/{project}/locations/{location}/namespaces/{namespace}/services/{service} - * - * 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 'servicedirectory.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 an endpoint, and returns the new endpoint. - * - * The async variant is {@see RegistrationServiceClient::createEndpointAsync()} . - * - * @example samples/V1/RegistrationServiceClient/create_endpoint.php - * - * @param CreateEndpointRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Endpoint - * - * @throws ApiException Thrown if the API call fails. - */ - public function createEndpoint(CreateEndpointRequest $request, array $callOptions = []): Endpoint - { - return $this->startApiCall('CreateEndpoint', $request, $callOptions)->wait(); - } - - /** - * Creates a namespace, and returns the new namespace. - * - * The async variant is {@see RegistrationServiceClient::createNamespaceAsync()} . - * - * @example samples/V1/RegistrationServiceClient/create_namespace.php - * - * @param CreateNamespaceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PBNamespace - * - * @throws ApiException Thrown if the API call fails. - */ - public function createNamespace(CreateNamespaceRequest $request, array $callOptions = []): PBNamespace - { - return $this->startApiCall('CreateNamespace', $request, $callOptions)->wait(); - } - - /** - * Creates a service, and returns the new service. - * - * The async variant is {@see RegistrationServiceClient::createServiceAsync()} . - * - * @example samples/V1/RegistrationServiceClient/create_service.php - * - * @param CreateServiceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Service - * - * @throws ApiException Thrown if the API call fails. - */ - public function createService(CreateServiceRequest $request, array $callOptions = []): Service - { - return $this->startApiCall('CreateService', $request, $callOptions)->wait(); - } - - /** - * Deletes an endpoint. - * - * The async variant is {@see RegistrationServiceClient::deleteEndpointAsync()} . - * - * @example samples/V1/RegistrationServiceClient/delete_endpoint.php - * - * @param DeleteEndpointRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 deleteEndpoint(DeleteEndpointRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteEndpoint', $request, $callOptions)->wait(); - } - - /** - * Deletes a namespace. This also deletes all services and endpoints in - * the namespace. - * - * The async variant is {@see RegistrationServiceClient::deleteNamespaceAsync()} . - * - * @example samples/V1/RegistrationServiceClient/delete_namespace.php - * - * @param DeleteNamespaceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 deleteNamespace(DeleteNamespaceRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteNamespace', $request, $callOptions)->wait(); - } - - /** - * Deletes a service. This also deletes all endpoints associated with - * the service. - * - * The async variant is {@see RegistrationServiceClient::deleteServiceAsync()} . - * - * @example samples/V1/RegistrationServiceClient/delete_service.php - * - * @param DeleteServiceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 deleteService(DeleteServiceRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteService', $request, $callOptions)->wait(); - } - - /** - * Gets an endpoint. - * - * The async variant is {@see RegistrationServiceClient::getEndpointAsync()} . - * - * @example samples/V1/RegistrationServiceClient/get_endpoint.php - * - * @param GetEndpointRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Endpoint - * - * @throws ApiException Thrown if the API call fails. - */ - public function getEndpoint(GetEndpointRequest $request, array $callOptions = []): Endpoint - { - return $this->startApiCall('GetEndpoint', $request, $callOptions)->wait(); - } - - /** - * Gets the IAM Policy for a resource (namespace or service only). - * - * The async variant is {@see RegistrationServiceClient::getIamPolicyAsync()} . - * - * @example samples/V1/RegistrationServiceClient/get_iam_policy.php - * - * @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(); - } - - /** - * Gets a namespace. - * - * The async variant is {@see RegistrationServiceClient::getNamespaceAsync()} . - * - * @example samples/V1/RegistrationServiceClient/get_namespace.php - * - * @param GetNamespaceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PBNamespace - * - * @throws ApiException Thrown if the API call fails. - */ - public function getNamespace(GetNamespaceRequest $request, array $callOptions = []): PBNamespace - { - return $this->startApiCall('GetNamespace', $request, $callOptions)->wait(); - } - - /** - * Gets a service. - * - * The async variant is {@see RegistrationServiceClient::getServiceAsync()} . - * - * @example samples/V1/RegistrationServiceClient/get_service.php - * - * @param GetServiceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Service - * - * @throws ApiException Thrown if the API call fails. - */ - public function getService(GetServiceRequest $request, array $callOptions = []): Service - { - return $this->startApiCall('GetService', $request, $callOptions)->wait(); - } - - /** - * Lists all endpoints. - * - * The async variant is {@see RegistrationServiceClient::listEndpointsAsync()} . - * - * @example samples/V1/RegistrationServiceClient/list_endpoints.php - * - * @param ListEndpointsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listEndpoints(ListEndpointsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListEndpoints', $request, $callOptions); - } - - /** - * Lists all namespaces. - * - * The async variant is {@see RegistrationServiceClient::listNamespacesAsync()} . - * - * @example samples/V1/RegistrationServiceClient/list_namespaces.php - * - * @param ListNamespacesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listNamespaces(ListNamespacesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListNamespaces', $request, $callOptions); - } - - /** - * Lists all services belonging to a namespace. - * - * The async variant is {@see RegistrationServiceClient::listServicesAsync()} . - * - * @example samples/V1/RegistrationServiceClient/list_services.php - * - * @param ListServicesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listServices(ListServicesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListServices', $request, $callOptions); - } - - /** - * Sets the IAM Policy for a resource (namespace or service only). - * - * The async variant is {@see RegistrationServiceClient::setIamPolicyAsync()} . - * - * @example samples/V1/RegistrationServiceClient/set_iam_policy.php - * - * @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(); - } - - /** - * Tests IAM permissions for a resource (namespace or service only). - * - * The async variant is {@see RegistrationServiceClient::testIamPermissionsAsync()} - * . - * - * @example samples/V1/RegistrationServiceClient/test_iam_permissions.php - * - * @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(); - } - - /** - * Updates an endpoint. - * - * The async variant is {@see RegistrationServiceClient::updateEndpointAsync()} . - * - * @example samples/V1/RegistrationServiceClient/update_endpoint.php - * - * @param UpdateEndpointRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Endpoint - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateEndpoint(UpdateEndpointRequest $request, array $callOptions = []): Endpoint - { - return $this->startApiCall('UpdateEndpoint', $request, $callOptions)->wait(); - } - - /** - * Updates a namespace. - * - * The async variant is {@see RegistrationServiceClient::updateNamespaceAsync()} . - * - * @example samples/V1/RegistrationServiceClient/update_namespace.php - * - * @param UpdateNamespaceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PBNamespace - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateNamespace(UpdateNamespaceRequest $request, array $callOptions = []): PBNamespace - { - return $this->startApiCall('UpdateNamespace', $request, $callOptions)->wait(); - } - - /** - * Updates a service. - * - * The async variant is {@see RegistrationServiceClient::updateServiceAsync()} . - * - * @example samples/V1/RegistrationServiceClient/update_service.php - * - * @param UpdateServiceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Service - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateService(UpdateServiceRequest $request, array $callOptions = []): Service - { - return $this->startApiCall('UpdateService', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see RegistrationServiceClient::getLocationAsync()} . - * - * @example samples/V1/RegistrationServiceClient/get_location.php - * - * @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 RegistrationServiceClient::listLocationsAsync()} . - * - * @example samples/V1/RegistrationServiceClient/list_locations.php - * - * @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/ServiceDirectory/v1/src/V1/gapic_metadata.json b/owl-bot-staging/ServiceDirectory/v1/src/V1/gapic_metadata.json deleted file mode 100644 index eebaffeaf393..000000000000 --- a/owl-bot-staging/ServiceDirectory/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,142 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.servicedirectory.v1", - "libraryPackage": "Google\\Cloud\\ServiceDirectory\\V1", - "services": { - "LookupService": { - "clients": { - "grpc": { - "libraryClient": "LookupServiceGapicClient", - "rpcs": { - "ResolveService": { - "methods": [ - "resolveService" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - }, - "RegistrationService": { - "clients": { - "grpc": { - "libraryClient": "RegistrationServiceGapicClient", - "rpcs": { - "CreateEndpoint": { - "methods": [ - "createEndpoint" - ] - }, - "CreateNamespace": { - "methods": [ - "createNamespace" - ] - }, - "CreateService": { - "methods": [ - "createService" - ] - }, - "DeleteEndpoint": { - "methods": [ - "deleteEndpoint" - ] - }, - "DeleteNamespace": { - "methods": [ - "deleteNamespace" - ] - }, - "DeleteService": { - "methods": [ - "deleteService" - ] - }, - "GetEndpoint": { - "methods": [ - "getEndpoint" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "GetNamespace": { - "methods": [ - "getNamespace" - ] - }, - "GetService": { - "methods": [ - "getService" - ] - }, - "ListEndpoints": { - "methods": [ - "listEndpoints" - ] - }, - "ListNamespaces": { - "methods": [ - "listNamespaces" - ] - }, - "ListServices": { - "methods": [ - "listServices" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - }, - "UpdateEndpoint": { - "methods": [ - "updateEndpoint" - ] - }, - "UpdateNamespace": { - "methods": [ - "updateNamespace" - ] - }, - "UpdateService": { - "methods": [ - "updateService" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/ServiceDirectory/v1/src/V1/resources/lookup_service_client_config.json b/owl-bot-staging/ServiceDirectory/v1/src/V1/resources/lookup_service_client_config.json deleted file mode 100644 index 7cc084019062..000000000000 --- a/owl-bot-staging/ServiceDirectory/v1/src/V1/resources/lookup_service_client_config.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "interfaces": { - "google.cloud.servicedirectory.v1.LookupService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_2_codes": [ - "UNAVAILABLE", - "UNKNOWN" - ] - }, - "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": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 15000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 15000, - "total_timeout_millis": 15000 - } - }, - "methods": { - "ResolveService": { - "timeout_millis": 15000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "GetLocation": { - "timeout_millis": 15000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "ListLocations": { - "timeout_millis": 15000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - } - } - } - } -} diff --git a/owl-bot-staging/ServiceDirectory/v1/src/V1/resources/lookup_service_descriptor_config.php b/owl-bot-staging/ServiceDirectory/v1/src/V1/resources/lookup_service_descriptor_config.php deleted file mode 100644 index d7e0fd0f1019..000000000000 --- a/owl-bot-staging/ServiceDirectory/v1/src/V1/resources/lookup_service_descriptor_config.php +++ /dev/null @@ -1,77 +0,0 @@ - [ - 'google.cloud.servicedirectory.v1.LookupService' => [ - 'ResolveService' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\ServiceDirectory\V1\ResolveServiceResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - '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' => [ - 'service' => 'projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}', - ], - ], - ], -]; diff --git a/owl-bot-staging/ServiceDirectory/v1/src/V1/resources/lookup_service_rest_client_config.php b/owl-bot-staging/ServiceDirectory/v1/src/V1/resources/lookup_service_rest_client_config.php deleted file mode 100644 index e9a229e89a76..000000000000 --- a/owl-bot-staging/ServiceDirectory/v1/src/V1/resources/lookup_service_rest_client_config.php +++ /dev/null @@ -1,65 +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.servicedirectory.v1.LookupService' => [ - 'ResolveService' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/namespaces/*/services/*}:resolve', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/ServiceDirectory/v1/src/V1/resources/registration_service_client_config.json b/owl-bot-staging/ServiceDirectory/v1/src/V1/resources/registration_service_client_config.json deleted file mode 100644 index 2c5cb3b21d31..000000000000 --- a/owl-bot-staging/ServiceDirectory/v1/src/V1/resources/registration_service_client_config.json +++ /dev/null @@ -1,135 +0,0 @@ -{ - "interfaces": { - "google.cloud.servicedirectory.v1.RegistrationService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE", - "UNKNOWN" - ] - }, - "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_1_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 15000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 15000, - "total_timeout_millis": 15000 - } - }, - "methods": { - "CreateEndpoint": { - "timeout_millis": 15000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "CreateNamespace": { - "timeout_millis": 15000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "CreateService": { - "timeout_millis": 15000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteEndpoint": { - "timeout_millis": 15000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteNamespace": { - "timeout_millis": 15000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteService": { - "timeout_millis": 15000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetEndpoint": { - "timeout_millis": 15000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetIamPolicy": { - "timeout_millis": 15000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetNamespace": { - "timeout_millis": 15000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetService": { - "timeout_millis": 15000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListEndpoints": { - "timeout_millis": 15000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListNamespaces": { - "timeout_millis": 15000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListServices": { - "timeout_millis": 15000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "SetIamPolicy": { - "timeout_millis": 15000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "TestIamPermissions": { - "timeout_millis": 15000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateEndpoint": { - "timeout_millis": 15000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateNamespace": { - "timeout_millis": 15000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateService": { - "timeout_millis": 15000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetLocation": { - "timeout_millis": 15000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListLocations": { - "timeout_millis": 15000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/ServiceDirectory/v1/src/V1/resources/registration_service_descriptor_config.php b/owl-bot-staging/ServiceDirectory/v1/src/V1/resources/registration_service_descriptor_config.php deleted file mode 100644 index bbf3b9e95fef..000000000000 --- a/owl-bot-staging/ServiceDirectory/v1/src/V1/resources/registration_service_descriptor_config.php +++ /dev/null @@ -1,312 +0,0 @@ - [ - 'google.cloud.servicedirectory.v1.RegistrationService' => [ - 'CreateEndpoint' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\ServiceDirectory\V1\Endpoint', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateNamespace' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\ServiceDirectory\V1\PBNamespace', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateService' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\ServiceDirectory\V1\Service', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteEndpoint' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteNamespace' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteService' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetEndpoint' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\ServiceDirectory\V1\Endpoint', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - ], - 'GetNamespace' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\ServiceDirectory\V1\PBNamespace', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetService' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\ServiceDirectory\V1\Service', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListEndpoints' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getEndpoints', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\ServiceDirectory\V1\ListEndpointsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListNamespaces' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getNamespaces', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\ServiceDirectory\V1\ListNamespacesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListServices' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getServices', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\ServiceDirectory\V1\ListServicesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - ], - 'UpdateEndpoint' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\ServiceDirectory\V1\Endpoint', - 'headerParams' => [ - [ - 'keyName' => 'endpoint.name', - 'fieldAccessors' => [ - 'getEndpoint', - 'getName', - ], - ], - ], - ], - 'UpdateNamespace' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\ServiceDirectory\V1\PBNamespace', - 'headerParams' => [ - [ - 'keyName' => 'namespace.name', - 'fieldAccessors' => [ - 'getNamespace', - 'getName', - ], - ], - ], - ], - 'UpdateService' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\ServiceDirectory\V1\Service', - 'headerParams' => [ - [ - 'keyName' => 'service.name', - 'fieldAccessors' => [ - 'getService', - 'getName', - ], - ], - ], - ], - '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' => [ - 'endpoint' => 'projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}/endpoints/{endpoint}', - 'location' => 'projects/{project}/locations/{location}', - 'namespace' => 'projects/{project}/locations/{location}/namespaces/{namespace}', - 'network' => 'projects/{project}/locations/global/networks/{network}', - 'service' => 'projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}', - ], - ], - ], -]; diff --git a/owl-bot-staging/ServiceDirectory/v1/src/V1/resources/registration_service_rest_client_config.php b/owl-bot-staging/ServiceDirectory/v1/src/V1/resources/registration_service_rest_client_config.php deleted file mode 100644 index 775af6255c9e..000000000000 --- a/owl-bot-staging/ServiceDirectory/v1/src/V1/resources/registration_service_rest_client_config.php +++ /dev/null @@ -1,302 +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.servicedirectory.v1.RegistrationService' => [ - 'CreateEndpoint' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/namespaces/*/services/*}/endpoints', - 'body' => 'endpoint', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'endpoint_id', - ], - ], - 'CreateNamespace' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/namespaces', - 'body' => 'namespace', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'namespace_id', - ], - ], - 'CreateService' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/namespaces/*}/services', - 'body' => 'service', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'service_id', - ], - ], - 'DeleteEndpoint' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/namespaces/*/services/*/endpoints/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteNamespace' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/namespaces/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteService' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/namespaces/*/services/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetEndpoint' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/namespaces/*/services/*/endpoints/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/namespaces/*}:getIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/namespaces/*/services/*}:getIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'GetNamespace' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/namespaces/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetService' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/namespaces/*/services/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListEndpoints' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/namespaces/*/services/*}/endpoints', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListNamespaces' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/namespaces', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListServices' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/namespaces/*}/services', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/namespaces/*}:setIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/namespaces/*/services/*}:setIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/namespaces/*}:testIamPermissions', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/namespaces/*/services/*}:testIamPermissions', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'UpdateEndpoint' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{endpoint.name=projects/*/locations/*/namespaces/*/services/*/endpoints/*}', - 'body' => 'endpoint', - 'placeholders' => [ - 'endpoint.name' => [ - 'getters' => [ - 'getEndpoint', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateNamespace' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{namespace.name=projects/*/locations/*/namespaces/*}', - 'body' => 'namespace', - 'placeholders' => [ - 'namespace.name' => [ - 'getters' => [ - 'getNamespace', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateService' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{service.name=projects/*/locations/*/namespaces/*/services/*}', - 'body' => 'service', - 'placeholders' => [ - 'service.name' => [ - 'getters' => [ - 'getService', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/ServiceDirectory/v1/tests/Unit/V1/Client/LookupServiceClientTest.php b/owl-bot-staging/ServiceDirectory/v1/tests/Unit/V1/Client/LookupServiceClientTest.php deleted file mode 100644 index 28c2f99efbfe..000000000000 --- a/owl-bot-staging/ServiceDirectory/v1/tests/Unit/V1/Client/LookupServiceClientTest.php +++ /dev/null @@ -1,279 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return LookupServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new LookupServiceClient($options); - } - - /** @test */ - public function resolveServiceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ResolveServiceResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[NAMESPACE]', '[SERVICE]'); - $request = (new ResolveServiceRequest()) - ->setName($formattedName); - $response = $gapicClient->resolveService($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.servicedirectory.v1.LookupService/ResolveService', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function resolveServiceExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->serviceName('[PROJECT]', '[LOCATION]', '[NAMESPACE]', '[SERVICE]'); - $request = (new ResolveServiceRequest()) - ->setName($formattedName); - try { - $gapicClient->resolveService($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 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 resolveServiceAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ResolveServiceResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[NAMESPACE]', '[SERVICE]'); - $request = (new ResolveServiceRequest()) - ->setName($formattedName); - $response = $gapicClient->resolveServiceAsync($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.servicedirectory.v1.LookupService/ResolveService', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/ServiceDirectory/v1/tests/Unit/V1/Client/RegistrationServiceClientTest.php b/owl-bot-staging/ServiceDirectory/v1/tests/Unit/V1/Client/RegistrationServiceClientTest.php deleted file mode 100644 index 9866aa8145dc..000000000000 --- a/owl-bot-staging/ServiceDirectory/v1/tests/Unit/V1/Client/RegistrationServiceClientTest.php +++ /dev/null @@ -1,1532 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return RegistrationServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new RegistrationServiceClient($options); - } - - /** @test */ - public function createEndpointTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $address = 'address-1147692044'; - $port = 3446913; - $network = 'network1843485230'; - $uid = 'uid115792'; - $expectedResponse = new Endpoint(); - $expectedResponse->setName($name); - $expectedResponse->setAddress($address); - $expectedResponse->setPort($port); - $expectedResponse->setNetwork($network); - $expectedResponse->setUid($uid); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[NAMESPACE]', '[SERVICE]'); - $endpointId = 'endpointId-1135808507'; - $endpoint = new Endpoint(); - $request = (new CreateEndpointRequest()) - ->setParent($formattedParent) - ->setEndpointId($endpointId) - ->setEndpoint($endpoint); - $response = $gapicClient->createEndpoint($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.servicedirectory.v1.RegistrationService/CreateEndpoint', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getEndpointId(); - $this->assertProtobufEquals($endpointId, $actualValue); - $actualValue = $actualRequestObject->getEndpoint(); - $this->assertProtobufEquals($endpoint, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createEndpointExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->serviceName('[PROJECT]', '[LOCATION]', '[NAMESPACE]', '[SERVICE]'); - $endpointId = 'endpointId-1135808507'; - $endpoint = new Endpoint(); - $request = (new CreateEndpointRequest()) - ->setParent($formattedParent) - ->setEndpointId($endpointId) - ->setEndpoint($endpoint); - try { - $gapicClient->createEndpoint($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 createNamespaceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $uid = 'uid115792'; - $expectedResponse = new PBNamespace(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $namespaceId = 'namespaceId-1253352833'; - $namespace = new PBNamespace(); - $request = (new CreateNamespaceRequest()) - ->setParent($formattedParent) - ->setNamespaceId($namespaceId) - ->setNamespace($namespace); - $response = $gapicClient->createNamespace($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.servicedirectory.v1.RegistrationService/CreateNamespace', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getNamespaceId(); - $this->assertProtobufEquals($namespaceId, $actualValue); - $actualValue = $actualRequestObject->getNamespace(); - $this->assertProtobufEquals($namespace, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createNamespaceExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $namespaceId = 'namespaceId-1253352833'; - $namespace = new PBNamespace(); - $request = (new CreateNamespaceRequest()) - ->setParent($formattedParent) - ->setNamespaceId($namespaceId) - ->setNamespace($namespace); - try { - $gapicClient->createNamespace($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 createServiceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $uid = 'uid115792'; - $expectedResponse = new Service(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->namespaceName('[PROJECT]', '[LOCATION]', '[NAMESPACE]'); - $serviceId = 'serviceId-1724763419'; - $service = new Service(); - $request = (new CreateServiceRequest()) - ->setParent($formattedParent) - ->setServiceId($serviceId) - ->setService($service); - $response = $gapicClient->createService($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.servicedirectory.v1.RegistrationService/CreateService', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getServiceId(); - $this->assertProtobufEquals($serviceId, $actualValue); - $actualValue = $actualRequestObject->getService(); - $this->assertProtobufEquals($service, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createServiceExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->namespaceName('[PROJECT]', '[LOCATION]', '[NAMESPACE]'); - $serviceId = 'serviceId-1724763419'; - $service = new Service(); - $request = (new CreateServiceRequest()) - ->setParent($formattedParent) - ->setServiceId($serviceId) - ->setService($service); - try { - $gapicClient->createService($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 deleteEndpointTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->endpointName('[PROJECT]', '[LOCATION]', '[NAMESPACE]', '[SERVICE]', '[ENDPOINT]'); - $request = (new DeleteEndpointRequest()) - ->setName($formattedName); - $gapicClient->deleteEndpoint($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.servicedirectory.v1.RegistrationService/DeleteEndpoint', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteEndpointExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->endpointName('[PROJECT]', '[LOCATION]', '[NAMESPACE]', '[SERVICE]', '[ENDPOINT]'); - $request = (new DeleteEndpointRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteEndpoint($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 deleteNamespaceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->namespaceName('[PROJECT]', '[LOCATION]', '[NAMESPACE]'); - $request = (new DeleteNamespaceRequest()) - ->setName($formattedName); - $gapicClient->deleteNamespace($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.servicedirectory.v1.RegistrationService/DeleteNamespace', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteNamespaceExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->namespaceName('[PROJECT]', '[LOCATION]', '[NAMESPACE]'); - $request = (new DeleteNamespaceRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteNamespace($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 deleteServiceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[NAMESPACE]', '[SERVICE]'); - $request = (new DeleteServiceRequest()) - ->setName($formattedName); - $gapicClient->deleteService($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.servicedirectory.v1.RegistrationService/DeleteService', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteServiceExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->serviceName('[PROJECT]', '[LOCATION]', '[NAMESPACE]', '[SERVICE]'); - $request = (new DeleteServiceRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteService($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 getEndpointTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $address = 'address-1147692044'; - $port = 3446913; - $network = 'network1843485230'; - $uid = 'uid115792'; - $expectedResponse = new Endpoint(); - $expectedResponse->setName($name2); - $expectedResponse->setAddress($address); - $expectedResponse->setPort($port); - $expectedResponse->setNetwork($network); - $expectedResponse->setUid($uid); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->endpointName('[PROJECT]', '[LOCATION]', '[NAMESPACE]', '[SERVICE]', '[ENDPOINT]'); - $request = (new GetEndpointRequest()) - ->setName($formattedName); - $response = $gapicClient->getEndpoint($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.servicedirectory.v1.RegistrationService/GetEndpoint', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEndpointExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->endpointName('[PROJECT]', '[LOCATION]', '[NAMESPACE]', '[SERVICE]', '[ENDPOINT]'); - $request = (new GetEndpointRequest()) - ->setName($formattedName); - try { - $gapicClient->getEndpoint($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.cloud.servicedirectory.v1.RegistrationService/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 getNamespaceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $expectedResponse = new PBNamespace(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->namespaceName('[PROJECT]', '[LOCATION]', '[NAMESPACE]'); - $request = (new GetNamespaceRequest()) - ->setName($formattedName); - $response = $gapicClient->getNamespace($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.servicedirectory.v1.RegistrationService/GetNamespace', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getNamespaceExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->namespaceName('[PROJECT]', '[LOCATION]', '[NAMESPACE]'); - $request = (new GetNamespaceRequest()) - ->setName($formattedName); - try { - $gapicClient->getNamespace($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 getServiceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $expectedResponse = new Service(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[NAMESPACE]', '[SERVICE]'); - $request = (new GetServiceRequest()) - ->setName($formattedName); - $response = $gapicClient->getService($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.servicedirectory.v1.RegistrationService/GetService', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getServiceExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->serviceName('[PROJECT]', '[LOCATION]', '[NAMESPACE]', '[SERVICE]'); - $request = (new GetServiceRequest()) - ->setName($formattedName); - try { - $gapicClient->getService($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 listEndpointsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $endpointsElement = new Endpoint(); - $endpoints = [ - $endpointsElement, - ]; - $expectedResponse = new ListEndpointsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setEndpoints($endpoints); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[NAMESPACE]', '[SERVICE]'); - $request = (new ListEndpointsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listEndpoints($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getEndpoints()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.servicedirectory.v1.RegistrationService/ListEndpoints', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEndpointsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->serviceName('[PROJECT]', '[LOCATION]', '[NAMESPACE]', '[SERVICE]'); - $request = (new ListEndpointsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listEndpoints($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 listNamespacesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $namespacesElement = new PBNamespace(); - $namespaces = [ - $namespacesElement, - ]; - $expectedResponse = new ListNamespacesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setNamespaces($namespaces); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListNamespacesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listNamespaces($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getNamespaces()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.servicedirectory.v1.RegistrationService/ListNamespaces', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listNamespacesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListNamespacesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listNamespaces($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 listServicesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $servicesElement = new Service(); - $services = [ - $servicesElement, - ]; - $expectedResponse = new ListServicesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setServices($services); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->namespaceName('[PROJECT]', '[LOCATION]', '[NAMESPACE]'); - $request = (new ListServicesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listServices($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getServices()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.servicedirectory.v1.RegistrationService/ListServices', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listServicesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->namespaceName('[PROJECT]', '[LOCATION]', '[NAMESPACE]'); - $request = (new ListServicesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listServices($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.cloud.servicedirectory.v1.RegistrationService/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.cloud.servicedirectory.v1.RegistrationService/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 updateEndpointTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $address = 'address-1147692044'; - $port = 3446913; - $network = 'network1843485230'; - $uid = 'uid115792'; - $expectedResponse = new Endpoint(); - $expectedResponse->setName($name); - $expectedResponse->setAddress($address); - $expectedResponse->setPort($port); - $expectedResponse->setNetwork($network); - $expectedResponse->setUid($uid); - $transport->addResponse($expectedResponse); - // Mock request - $endpoint = new Endpoint(); - $updateMask = new FieldMask(); - $request = (new UpdateEndpointRequest()) - ->setEndpoint($endpoint) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateEndpoint($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.servicedirectory.v1.RegistrationService/UpdateEndpoint', $actualFuncCall); - $actualValue = $actualRequestObject->getEndpoint(); - $this->assertProtobufEquals($endpoint, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateEndpointExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $endpoint = new Endpoint(); - $updateMask = new FieldMask(); - $request = (new UpdateEndpointRequest()) - ->setEndpoint($endpoint) - ->setUpdateMask($updateMask); - try { - $gapicClient->updateEndpoint($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 updateNamespaceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $uid = 'uid115792'; - $expectedResponse = new PBNamespace(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $transport->addResponse($expectedResponse); - // Mock request - $namespace = new PBNamespace(); - $updateMask = new FieldMask(); - $request = (new UpdateNamespaceRequest()) - ->setNamespace($namespace) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateNamespace($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.servicedirectory.v1.RegistrationService/UpdateNamespace', $actualFuncCall); - $actualValue = $actualRequestObject->getNamespace(); - $this->assertProtobufEquals($namespace, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateNamespaceExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $namespace = new PBNamespace(); - $updateMask = new FieldMask(); - $request = (new UpdateNamespaceRequest()) - ->setNamespace($namespace) - ->setUpdateMask($updateMask); - try { - $gapicClient->updateNamespace($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 updateServiceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $uid = 'uid115792'; - $expectedResponse = new Service(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $transport->addResponse($expectedResponse); - // Mock request - $service = new Service(); - $updateMask = new FieldMask(); - $request = (new UpdateServiceRequest()) - ->setService($service) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateService($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.servicedirectory.v1.RegistrationService/UpdateService', $actualFuncCall); - $actualValue = $actualRequestObject->getService(); - $this->assertProtobufEquals($service, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateServiceExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $service = new Service(); - $updateMask = new FieldMask(); - $request = (new UpdateServiceRequest()) - ->setService($service) - ->setUpdateMask($updateMask); - try { - $gapicClient->updateService($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 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 createEndpointAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $address = 'address-1147692044'; - $port = 3446913; - $network = 'network1843485230'; - $uid = 'uid115792'; - $expectedResponse = new Endpoint(); - $expectedResponse->setName($name); - $expectedResponse->setAddress($address); - $expectedResponse->setPort($port); - $expectedResponse->setNetwork($network); - $expectedResponse->setUid($uid); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[NAMESPACE]', '[SERVICE]'); - $endpointId = 'endpointId-1135808507'; - $endpoint = new Endpoint(); - $request = (new CreateEndpointRequest()) - ->setParent($formattedParent) - ->setEndpointId($endpointId) - ->setEndpoint($endpoint); - $response = $gapicClient->createEndpointAsync($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.servicedirectory.v1.RegistrationService/CreateEndpoint', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getEndpointId(); - $this->assertProtobufEquals($endpointId, $actualValue); - $actualValue = $actualRequestObject->getEndpoint(); - $this->assertProtobufEquals($endpoint, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -}