From 3db6992a0c70939759ffac589e1e8ad1cfb0c6bc Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Wed, 4 Feb 2026 04:09:17 +0000 Subject: [PATCH 1/2] feat: Add GKE Hub teams scope and RBAC GAPIC docs: A comment for message `Feature` is changed docs: A comment for field `labels` in message `.google.cloud.gkehub.v1.Feature` is changed docs: A comment for field `spec` in message `.google.cloud.gkehub.v1.Feature` is changed docs: A comment for field `membership_specs` in message `.google.cloud.gkehub.v1.Feature` is changed docs: A comment for field `state` in message `.google.cloud.gkehub.v1.Feature` is changed docs: A comment for field `membership_states` in message `.google.cloud.gkehub.v1.Feature` is changed docs: A comment for message `FeatureResourceState` is changed docs: A comment for enum value `ENABLING` in enum `State` is changed docs: A comment for enum value `ACTIVE` in enum `State` is changed docs: A comment for enum value `DISABLING` in enum `State` is changed docs: A comment for message `CommonFeatureState` is changed docs: A comment for field `state` in message `.google.cloud.gkehub.v1.CommonFeatureState` is changed docs: A comment for field `request_id` in message `.google.cloud.gkehub.v1.CreateFeatureRequest` is changed docs: A comment for field `request_id` in message `.google.cloud.gkehub.v1.UpdateFeatureRequest` is changed docs: A comment for field `cancel_requested` in message `.google.cloud.gkehub.v1.OperationMetadata` is changed PiperOrigin-RevId: 865111649 Source-Link: https://github.com/googleapis/googleapis/commit/7a5706618f42f482acf583febcc7b977b66c25b2 Source-Link: https://github.com/googleapis/googleapis-gen/commit/12b9e72da8c40c8b4d2f03d75f5d1cc15dae5025 Copy-Tag: eyJwIjoiR2tlSHViLy5Pd2xCb3QueWFtbCIsImgiOiIxMmI5ZTcyZGE4YzQwYzhiNGQyZjAzZDc1ZjVkMWNjMTVkYWU1MDI1In0= --- .../V1/Configmanagement/Configmanagement.php | Bin 0 -> 6742 bytes .../Google/Cloud/Gkehub/V1/Feature.php | Bin 0 -> 4013 bytes .../Google/Cloud/Gkehub/V1/Fleet.php | Bin 0 -> 6811 bytes .../Google/Cloud/Gkehub/V1/Membership.php | Bin 0 -> 3380 bytes .../Multiclusteringress.php | 29 + .../Rbacrolebindingactuation.php | 31 + .../Google/Cloud/Gkehub/V1/Service.php | 363 ++ .../GkeHub/ConfigManagement/V1/ConfigSync.php | 323 ++ .../V1/ConfigSyncDeploymentState.php | 271 + .../ConfigManagement/V1/ConfigSyncError.php | 67 + .../ConfigManagement/V1/ConfigSyncState.php | 309 ++ .../V1/ConfigSyncState/CRDState.php | 78 + .../V1/ConfigSyncState/State.php | 76 + .../ConfigManagement/V1/ConfigSyncVersion.php | 271 + .../ConfigManagement/V1/DeploymentState.php | 75 + .../ConfigManagement/V1/ErrorResource.php | 179 + .../V1/GatekeeperDeploymentState.php | 101 + .../GkeHub/ConfigManagement/V1/GitConfig.php | 321 ++ .../ConfigManagement/V1/GroupVersionKind.php | 135 + .../V1/HierarchyControllerConfig.php | 135 + .../V1/HierarchyControllerDeploymentState.php | 101 + .../V1/HierarchyControllerState.php | 121 + .../V1/HierarchyControllerVersion.php | 101 + .../ConfigManagement/V1/InstallError.php | 67 + .../ConfigManagement/V1/MembershipSpec.php | 292 + .../V1/MembershipSpec/Management.php | 64 + .../ConfigManagement/V1/MembershipState.php | 299 ++ .../GkeHub/ConfigManagement/V1/OciConfig.php | 215 + .../ConfigManagement/V1/OperatorState.php | 135 + .../ConfigManagement/V1/PolicyController.php | 277 + .../V1/PolicyControllerState.php | 121 + .../V1/PolicyControllerVersion.php | 71 + .../GkeHub/ConfigManagement/V1/SyncError.php | 135 + .../GkeHub/ConfigManagement/V1/SyncState.php | 304 ++ .../V1/SyncState/SyncCode.php | 99 + .../MultiClusterIngress/V1/FeatureSpec.php | 72 + .../V1/FeatureSpec.php | 76 + .../V1/FeatureState.php | 34 + .../src/Google/Cloud/GkeHub/V1/Authority.php | 235 + .../GkeHub/V1/BinaryAuthorizationConfig.php | 102 + .../EvaluationMode.php | 64 + .../PolicyBinding.php | 78 + .../Cloud/GkeHub/V1/CommonFeatureSpec.php | 75 + .../Cloud/GkeHub/V1/CommonFeatureState.php | 119 + .../GkeHub/V1/CompliancePostureConfig.php | 102 + .../ComplianceStandard.php | 68 + .../V1/CompliancePostureConfig/Mode.php | 62 + .../Cloud/GkeHub/V1/ConnectAgentResource.php | 112 + .../Cloud/GkeHub/V1/CreateFeatureRequest.php | 241 + .../Cloud/GkeHub/V1/CreateFleetRequest.php | 132 + .../V1/CreateMembershipBindingRequest.php | 173 + ...CreateMembershipRBACRoleBindingRequest.php | 200 + .../GkeHub/V1/CreateMembershipRequest.php | 274 + .../GkeHub/V1/CreateScopeNamespaceRequest.php | 200 + .../V1/CreateScopeRBACRoleBindingRequest.php | 200 + .../Cloud/GkeHub/V1/CreateScopeRequest.php | 173 + .../Cloud/GkeHub/V1/DefaultClusterConfig.php | 174 + .../Cloud/GkeHub/V1/DeleteFeatureRequest.php | 201 + .../Cloud/GkeHub/V1/DeleteFleetRequest.php | 86 + .../V1/DeleteMembershipBindingRequest.php | 86 + ...DeleteMembershipRBACRoleBindingRequest.php | 86 + .../GkeHub/V1/DeleteMembershipRequest.php | 202 + .../GkeHub/V1/DeleteScopeNamespaceRequest.php | 86 + .../V1/DeleteScopeRBACRoleBindingRequest.php | 86 + .../Cloud/GkeHub/V1/DeleteScopeRequest.php | 86 + .../src/Google/Cloud/GkeHub/V1/Feature.php | 687 +++ .../Cloud/GkeHub/V1/FeatureResourceState.php | 69 + .../GkeHub/V1/FeatureResourceState/State.php | 88 + .../Google/Cloud/GkeHub/V1/FeatureState.php | 147 + .../Cloud/GkeHub/V1/FeatureState/Code.php | 77 + .../src/Google/Cloud/GkeHub/V1/Fleet.php | 425 ++ .../Cloud/GkeHub/V1/FleetLifecycleState.php | 67 + .../GkeHub/V1/FleetLifecycleState/Code.php | 78 + .../V1/GenerateConnectManifestRequest.php | 321 ++ .../V1/GenerateConnectManifestResponse.php | 72 + ...teMembershipRBACRoleBindingYAMLRequest.php | 174 + ...eMembershipRBACRoleBindingYAMLResponse.php | 67 + .../Cloud/GkeHub/V1/GetFeatureRequest.php | 131 + .../Cloud/GkeHub/V1/GetFleetRequest.php | 86 + .../GkeHub/V1/GetMembershipBindingRequest.php | 86 + .../GetMembershipRBACRoleBindingRequest.php | 86 + .../Cloud/GkeHub/V1/GetMembershipRequest.php | 86 + .../GkeHub/V1/GetScopeNamespaceRequest.php | 86 + .../V1/GetScopeRBACRoleBindingRequest.php | 86 + .../Cloud/GkeHub/V1/GetScopeRequest.php | 86 + .../src/Google/Cloud/GkeHub/V1/GkeCluster.php | 117 + .../Cloud/GkeHub/V1/KubernetesMetadata.php | 276 + .../Cloud/GkeHub/V1/KubernetesResource.php | 245 + .../GkeHub/V1/ListBoundMembershipsRequest.php | 220 + .../V1/ListBoundMembershipsResponse.php | 143 + .../Cloud/GkeHub/V1/ListFeaturesRequest.php | 319 ++ .../Cloud/GkeHub/V1/ListFeaturesResponse.php | 109 + .../Cloud/GkeHub/V1/ListFleetsRequest.php | 174 + .../Cloud/GkeHub/V1/ListFleetsResponse.php | 109 + .../V1/ListMembershipBindingsRequest.php | 208 + .../V1/ListMembershipBindingsResponse.php | 143 + .../ListMembershipRBACRoleBindingsRequest.php | 170 + ...ListMembershipRBACRoleBindingsResponse.php | 143 + .../GkeHub/V1/ListMembershipsRequest.php | 287 + .../GkeHub/V1/ListMembershipsResponse.php | 143 + .../GkeHub/V1/ListPermittedScopesRequest.php | 170 + .../GkeHub/V1/ListPermittedScopesResponse.php | 109 + .../GkeHub/V1/ListScopeNamespacesRequest.php | 170 + .../GkeHub/V1/ListScopeNamespacesResponse.php | 109 + .../V1/ListScopeRBACRoleBindingsRequest.php | 170 + .../V1/ListScopeRBACRoleBindingsResponse.php | 109 + .../Cloud/GkeHub/V1/ListScopesRequest.php | 170 + .../Cloud/GkeHub/V1/ListScopesResponse.php | 109 + .../src/Google/Cloud/GkeHub/V1/Membership.php | 641 +++ .../Cloud/GkeHub/V1/MembershipBinding.php | 374 ++ .../V1/MembershipBindingLifecycleState.php | 67 + .../MembershipBindingLifecycleState/Code.php | 78 + .../Cloud/GkeHub/V1/MembershipEndpoint.php | 228 + .../Cloud/GkeHub/V1/MembershipFeatureSpec.php | 76 + .../GkeHub/V1/MembershipFeatureState.php | 120 + .../Cloud/GkeHub/V1/MembershipState.php | 67 + .../Cloud/GkeHub/V1/MembershipState/Code.php | 85 + .../Cloud/GkeHub/V1/MonitoringConfig.php | 244 + .../GkeHub/V1/NamespaceLifecycleState.php | 67 + .../V1/NamespaceLifecycleState/Code.php | 78 + .../Cloud/GkeHub/V1/OperationMetadata.php | 311 ++ .../Google/Cloud/GkeHub/V1/PBNamespace.php | 407 ++ .../Cloud/GkeHub/V1/RBACRoleBinding.php | 453 ++ .../Cloud/GkeHub/V1/RBACRoleBinding/Role.php | 108 + .../RBACRoleBinding/Role/PredefinedRoles.php | 79 + .../V1/RBACRoleBindingLifecycleState.php | 68 + .../V1/RBACRoleBindingLifecycleState/Code.php | 78 + .../Cloud/GkeHub/V1/ResourceManifest.php | 114 + .../Cloud/GkeHub/V1/ResourceOptions.php | 205 + .../src/Google/Cloud/GkeHub/V1/Scope.php | 373 ++ .../Cloud/GkeHub/V1/ScopeFeatureSpec.php | 33 + .../Cloud/GkeHub/V1/ScopeFeatureState.php | 77 + .../Cloud/GkeHub/V1/ScopeLifecycleState.php | 67 + .../GkeHub/V1/ScopeLifecycleState/Code.php | 78 + .../Cloud/GkeHub/V1/SecurityPostureConfig.php | 102 + .../GkeHub/V1/SecurityPostureConfig/Mode.php | 71 + .../VulnerabilityMode.php | 72 + .../src/Google/Cloud/GkeHub/V1/TypeMeta.php | 102 + .../Cloud/GkeHub/V1/UpdateFeatureRequest.php | 286 + .../Cloud/GkeHub/V1/UpdateFleetRequest.php | 147 + .../V1/UpdateMembershipBindingRequest.php | 136 + ...UpdateMembershipRBACRoleBindingRequest.php | 141 + .../GkeHub/V1/UpdateMembershipRequest.php | 287 + .../GkeHub/V1/UpdateScopeNamespaceRequest.php | 146 + .../V1/UpdateScopeRBACRoleBindingRequest.php | 141 + .../Cloud/GkeHub/V1/UpdateScopeRequest.php | 141 + .../V1/GkeHubClient/create_feature.php | 69 + .../samples/V1/GkeHubClient/create_fleet.php | 86 + .../V1/GkeHubClient/create_membership.php | 101 + .../create_membership_binding.php | 92 + .../create_membership_rbac_role_binding.php | 102 + .../samples/V1/GkeHubClient/create_scope.php | 90 + .../GkeHubClient/create_scope_namespace.php | 104 + .../create_scope_rbac_role_binding.php | 102 + .../V1/GkeHubClient/delete_feature.php | 66 + .../samples/V1/GkeHubClient/delete_fleet.php | 81 + .../V1/GkeHubClient/delete_membership.php | 85 + .../delete_membership_binding.php | 86 + .../delete_membership_rbac_role_binding.php | 86 + .../samples/V1/GkeHubClient/delete_scope.php | 81 + .../GkeHubClient/delete_scope_namespace.php | 81 + .../delete_scope_rbac_role_binding.php | 86 + .../generate_connect_manifest.php | 75 + ...rate_membership_rbac_role_binding_yaml.php | 92 + .../samples/V1/GkeHubClient/get_feature.php | 57 + .../v1/samples/V1/GkeHubClient/get_fleet.php | 72 + .../V1/GkeHubClient/get_membership.php | 72 + .../GkeHubClient/get_membership_binding.php | 77 + .../get_membership_rbac_role_binding.php | 77 + .../v1/samples/V1/GkeHubClient/get_scope.php | 72 + .../V1/GkeHubClient/get_scope_namespace.php | 72 + .../get_scope_rbac_role_binding.php | 77 + .../GkeHubClient/list_bound_memberships.php | 78 + .../samples/V1/GkeHubClient/list_features.php | 62 + .../samples/V1/GkeHubClient/list_fleets.php | 78 + .../GkeHubClient/list_membership_bindings.php | 77 + .../list_membership_rbac_role_bindings.php | 77 + .../V1/GkeHubClient/list_memberships.php | 78 + .../V1/GkeHubClient/list_permitted_scopes.php | 77 + .../V1/GkeHubClient/list_scope_namespaces.php | 77 + .../list_scope_rbac_role_bindings.php | 77 + .../samples/V1/GkeHubClient/list_scopes.php | 77 + .../V1/GkeHubClient/update_feature.php | 69 + .../samples/V1/GkeHubClient/update_fleet.php | 74 + .../V1/GkeHubClient/update_membership.php | 89 + .../update_membership_binding.php | 74 + .../update_membership_rbac_role_binding.php | 77 + .../samples/V1/GkeHubClient/update_scope.php | 74 + .../GkeHubClient/update_scope_namespace.php | 88 + .../update_scope_rbac_role_binding.php | 77 + .../GkeHub/v1/src/V1/Client/GkeHubClient.php | 1785 +++++++ .../GkeHub/v1/src/V1/gapic_metadata.json | 238 + .../V1/resources/gke_hub_client_config.json | 254 + .../resources/gke_hub_descriptor_config.php | 824 +++ .../resources/gke_hub_rest_client_config.php | 709 +++ .../tests/Unit/V1/Client/GkeHubClientTest.php | 4695 +++++++++++++++++ 196 files changed, 34352 insertions(+) create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/GPBMetadata/Google/Cloud/Gkehub/V1/Configmanagement/Configmanagement.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/GPBMetadata/Google/Cloud/Gkehub/V1/Feature.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/GPBMetadata/Google/Cloud/Gkehub/V1/Fleet.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/GPBMetadata/Google/Cloud/Gkehub/V1/Membership.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/GPBMetadata/Google/Cloud/Gkehub/V1/Multiclusteringress/Multiclusteringress.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/GPBMetadata/Google/Cloud/Gkehub/V1/Rbacrolebindingactuation/Rbacrolebindingactuation.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/GPBMetadata/Google/Cloud/Gkehub/V1/Service.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSync.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncDeploymentState.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncError.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncState.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncState/CRDState.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncState/State.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncVersion.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/DeploymentState.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ErrorResource.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/GatekeeperDeploymentState.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/GitConfig.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/GroupVersionKind.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/HierarchyControllerConfig.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/HierarchyControllerDeploymentState.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/HierarchyControllerState.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/HierarchyControllerVersion.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/InstallError.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/MembershipSpec.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/MembershipSpec/Management.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/MembershipState.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/OciConfig.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/OperatorState.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/PolicyController.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/PolicyControllerState.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/PolicyControllerVersion.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/SyncError.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/SyncState.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/SyncState/SyncCode.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/MultiClusterIngress/V1/FeatureSpec.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/RbacRoleBindingActuation/V1/FeatureSpec.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/RbacRoleBindingActuation/V1/FeatureState.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/Authority.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/BinaryAuthorizationConfig.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/BinaryAuthorizationConfig/EvaluationMode.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/BinaryAuthorizationConfig/PolicyBinding.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CommonFeatureSpec.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CommonFeatureState.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CompliancePostureConfig.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CompliancePostureConfig/ComplianceStandard.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CompliancePostureConfig/Mode.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ConnectAgentResource.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateFeatureRequest.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateFleetRequest.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateMembershipBindingRequest.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateMembershipRBACRoleBindingRequest.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateMembershipRequest.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateScopeNamespaceRequest.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateScopeRBACRoleBindingRequest.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateScopeRequest.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DefaultClusterConfig.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteFeatureRequest.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteFleetRequest.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteMembershipBindingRequest.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteMembershipRBACRoleBindingRequest.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteMembershipRequest.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteScopeNamespaceRequest.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteScopeRBACRoleBindingRequest.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteScopeRequest.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/Feature.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/FeatureResourceState.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/FeatureResourceState/State.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/FeatureState.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/FeatureState/Code.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/Fleet.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/FleetLifecycleState.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/FleetLifecycleState/Code.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GenerateConnectManifestRequest.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GenerateConnectManifestResponse.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GenerateMembershipRBACRoleBindingYAMLRequest.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GenerateMembershipRBACRoleBindingYAMLResponse.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetFeatureRequest.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetFleetRequest.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetMembershipBindingRequest.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetMembershipRBACRoleBindingRequest.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetMembershipRequest.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetScopeNamespaceRequest.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetScopeRBACRoleBindingRequest.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetScopeRequest.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GkeCluster.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/KubernetesMetadata.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/KubernetesResource.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListBoundMembershipsRequest.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListBoundMembershipsResponse.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListFeaturesRequest.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListFeaturesResponse.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListFleetsRequest.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListFleetsResponse.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListMembershipBindingsRequest.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListMembershipBindingsResponse.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListMembershipRBACRoleBindingsRequest.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListMembershipRBACRoleBindingsResponse.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListMembershipsRequest.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListMembershipsResponse.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListPermittedScopesRequest.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListPermittedScopesResponse.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListScopeNamespacesRequest.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListScopeNamespacesResponse.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListScopeRBACRoleBindingsRequest.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListScopeRBACRoleBindingsResponse.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListScopesRequest.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListScopesResponse.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/Membership.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipBinding.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipBindingLifecycleState.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipBindingLifecycleState/Code.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipEndpoint.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipFeatureSpec.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipFeatureState.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipState.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipState/Code.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MonitoringConfig.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/NamespaceLifecycleState.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/NamespaceLifecycleState/Code.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/OperationMetadata.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/PBNamespace.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/RBACRoleBinding.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/RBACRoleBinding/Role.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/RBACRoleBinding/Role/PredefinedRoles.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/RBACRoleBindingLifecycleState.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/RBACRoleBindingLifecycleState/Code.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ResourceManifest.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ResourceOptions.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/Scope.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ScopeFeatureSpec.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ScopeFeatureState.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ScopeLifecycleState.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ScopeLifecycleState/Code.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/SecurityPostureConfig.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/SecurityPostureConfig/Mode.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/SecurityPostureConfig/VulnerabilityMode.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/TypeMeta.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateFeatureRequest.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateFleetRequest.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateMembershipBindingRequest.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateMembershipRBACRoleBindingRequest.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateMembershipRequest.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateScopeNamespaceRequest.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateScopeRBACRoleBindingRequest.php create mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateScopeRequest.php create mode 100644 owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/create_feature.php create mode 100644 owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/create_fleet.php create mode 100644 owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/create_membership.php create mode 100644 owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/create_membership_binding.php create mode 100644 owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/create_membership_rbac_role_binding.php create mode 100644 owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/create_scope.php create mode 100644 owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/create_scope_namespace.php create mode 100644 owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/create_scope_rbac_role_binding.php create mode 100644 owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/delete_feature.php create mode 100644 owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/delete_fleet.php create mode 100644 owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/delete_membership.php create mode 100644 owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/delete_membership_binding.php create mode 100644 owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/delete_membership_rbac_role_binding.php create mode 100644 owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/delete_scope.php create mode 100644 owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/delete_scope_namespace.php create mode 100644 owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/delete_scope_rbac_role_binding.php create mode 100644 owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/generate_connect_manifest.php create mode 100644 owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/generate_membership_rbac_role_binding_yaml.php create mode 100644 owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/get_feature.php create mode 100644 owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/get_fleet.php create mode 100644 owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/get_membership.php create mode 100644 owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/get_membership_binding.php create mode 100644 owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/get_membership_rbac_role_binding.php create mode 100644 owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/get_scope.php create mode 100644 owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/get_scope_namespace.php create mode 100644 owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/get_scope_rbac_role_binding.php create mode 100644 owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_bound_memberships.php create mode 100644 owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_features.php create mode 100644 owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_fleets.php create mode 100644 owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_membership_bindings.php create mode 100644 owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_membership_rbac_role_bindings.php create mode 100644 owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_memberships.php create mode 100644 owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_permitted_scopes.php create mode 100644 owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_scope_namespaces.php create mode 100644 owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_scope_rbac_role_bindings.php create mode 100644 owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_scopes.php create mode 100644 owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/update_feature.php create mode 100644 owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/update_fleet.php create mode 100644 owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/update_membership.php create mode 100644 owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/update_membership_binding.php create mode 100644 owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/update_membership_rbac_role_binding.php create mode 100644 owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/update_scope.php create mode 100644 owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/update_scope_namespace.php create mode 100644 owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/update_scope_rbac_role_binding.php create mode 100644 owl-bot-staging/GkeHub/v1/src/V1/Client/GkeHubClient.php create mode 100644 owl-bot-staging/GkeHub/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/GkeHub/v1/src/V1/resources/gke_hub_client_config.json create mode 100644 owl-bot-staging/GkeHub/v1/src/V1/resources/gke_hub_descriptor_config.php create mode 100644 owl-bot-staging/GkeHub/v1/src/V1/resources/gke_hub_rest_client_config.php create mode 100644 owl-bot-staging/GkeHub/v1/tests/Unit/V1/Client/GkeHubClientTest.php diff --git a/owl-bot-staging/GkeHub/v1/proto/src/GPBMetadata/Google/Cloud/Gkehub/V1/Configmanagement/Configmanagement.php b/owl-bot-staging/GkeHub/v1/proto/src/GPBMetadata/Google/Cloud/Gkehub/V1/Configmanagement/Configmanagement.php new file mode 100644 index 0000000000000000000000000000000000000000..871dfa00a5ed9d3dd228d2e8c5eb8c738291b342 GIT binary patch literal 6742 zcmb_h-EQN?6^<lS;_UZvN4g5DKIq<8;ir?cg}os=A3V4 zKKj@hIPgHO5sSE*PkM6qO7;gtc3j)Hb=#D?qw{m(%DO#t43oHdS>A8Tjb>Y}?$_J* z@l($pxjHGzecSGvWLG!sQE#_@K?bAl?&aRDZd>O@f2dhnpA3oR-)P7)QvjAWB%Y(` zM6Ml|kBG1JG+*n~7;2|NQ9Ct;+Bw_nR3fNP0CZFHJURLTehV`GIis#==(6W)KK^^p z@KnPxd_yyh-{6>^%IBKt5d^u}_k3jOzF}K3{h(>-Wap90F=^lT92+@$Dv$jpL{fS@|Szczmu?fM221BdIQ5b!3ibO9az@Qk%x?{G>UQwIkA(L zj$w5ebW}Zu=(#z3ktzHmvYz+1*6|sHSHgVMo=miG-EH?Bp!$AWAh8rNTJur|3 zS07BVvBYeYV%ss^7+-9fGldUhn?eitEoDk-!}<-9M0ETz zHeQq->2tUO&dh$=Q6C}3}BLMbIaJ4EyTBc zo$&lokhYbV0Fx(a8}1&J8l_tGsM=_&r;U^2YNh_XUfo}NN6NvS(7V!UyLnV<*DGrY zX#>_nZ}8`7>2PgM`NJGQXl_1+WZ&>}Jdg^pNvj#YAZY_ucu`W%ZFi{oxfEmO4lEH% z>zbs;xJwG<2eBx^9oq78z=WnOmifl>t(!@J#tz0@9O_tV5b*2A4Rt$ZGFGhBb9v&C&-f zX48@cAi}w4xGX89rMr-29ly{FAI<9?3&W(e1}TAgnWG6IEm26KV<}PnD~IG3$BhHu zcRUr#^Xn@%8)@l2Y~4N>#2W@!$DoM!<5Xwp zbT~vTxnGZLUt_eSl)olGnPPgMIHr9?#UL*zRY(pjoyB*y5Wnz6VO~I*y!MI3vLlVF z8Nif}V0((^XFT^xnTf|~31j@a-L&%01mvcC&WGEcJS%OEm-RX(<#HxI=2&-bgGK6U6??PXQ<{6zB|w^)!9-x%@IXRz$rw$HrM-5yJF*+P72IKgAHk*~D& z`Ls}AtcU?H&5+*<@X>e?QSp&2#8=8uSDBy608)X^Td;w@)suFqU5yB)by&d-wOViB z%fmy|Pzh-T(v!zIRC$?pwRKc)ppa_R){;^dK)k2V^U9YASm4~C#+qj19&A;bjpy~6 zdh)VSQKR;#ccIr|+XxtbRc*DJE%aa$-VHY&R~!4>m7VZ1;(>6>iu-c{p#x1mUM8qd zjG<$@xSJD_Cku;os_~ht1?+(Wk?#R$oHG?Xv~hoKyG-PyX(e@Oh1Thrg~|o7E9A~5 ztkST=k~QuiB+nMCYrUc2(E_4=LAnFmzTm<~`F0-p3tWvZycx)S@R%we90W;q znAhzd5lQ;VxaW7B$K->-uwNB~kjg;?S!5OD?Wzzj+J8(yib69$%uXz8Rhs+J+zGHq zU$LZ_fu(U8nv>G7FiuqxWNE(R>FTtFedkfMMRM)}Zj6>s8@OFPXtwIFu+t(D0h#udSk=+|fe0dWC(z{VP>j375~GN@;KWtz7@M@Lig*3X3vp}_|2(AT+9OA#@fU{G zQ$B&UXd70xg+A>k+zbgx?jVwSf!}hMl)oonBf62}b?(!sH2WlW$VLIjmFIgAXf@Q} z7lhzBU!+PXk74sR%OMt6Fe(2^z}Bru5`hQ(z)bjBJYilk>17P*%)r1cp d250*};nxkJ+X;`|o=mx!U_JTu!5er3@ITr4c#Qx6 literal 0 HcmV?d00001 diff --git a/owl-bot-staging/GkeHub/v1/proto/src/GPBMetadata/Google/Cloud/Gkehub/V1/Feature.php b/owl-bot-staging/GkeHub/v1/proto/src/GPBMetadata/Google/Cloud/Gkehub/V1/Feature.php new file mode 100644 index 0000000000000000000000000000000000000000..d9a3c50086134c8c3b01bd3d029d221460f6dd8c GIT binary patch literal 4013 zcmbVP%Wm676pbX?iLV^TW}H+pP?S{-L}_EPR#GIO;}m*X5fa;iq_{w%)}W}7%$Onx zK8&WRf2fPDx+>637hSYJ(RIF}cV*-Z&9#$Vl-Se0zOyRQ?YUnZyOxo$a%GVy9ck_2s$ zAa8S{BFX7iEOVd_N2;j~$%vTVrG@zoic%l=2By~VU5vYK4jtmU-I%qHSJ3LInqwKH zr<;9LplY6v#blY?q>cGijjN`kW2JlQ$d1RdYTJIQ2enn|_s6BQkBwFsC!dzWUHIb@ z*qW!qgxg$7Vtpv_K9tUPHtz&z)z)PUC~I2Yl$%czh_y(D<>*3yuO{F}m(wW6tOYEG z2`o-RuH>YRfbX+_j}0DdW7!K6!Ughw0$dFyi?9w0bTZ{qVyduQ&iq%(2)nRks6Ar1 zxwM!mWQ$)(oG=<$Dd3P^FzK4wzLsI(J7$~Ya=r15yw5%?GsAm<`$Vh50jWee-6etO6M}iIO$VZ zWPC-^NoYKrPRW>Jx*6D3}k`fUK)oHVG23!d#X^3nMK%F03|%M04;QRst#> zzUz$Z>-o5%k;`EWObnfNs`d<$yMbK13pTeQJ6+dV$efWkyiJ7buz0Q-KEVdTu2IsD zQ=0@f;>t#t!9AJAWsBQMHcyzQ%9^Pe!mY_B>lI#}vwHSs^+@yUq48mgUcrq>^k-E( znpIIqQo%@~Ui<)SoP3gwS@y@X?1{ZU!yekM{P?c)3O)@^06x2L_`4Eb<>bH=LBXzg zO*GGy-v(b7vSDfLFvPX+^CG;);o5*-#xC-Ir(h%CnHgI`DI5=Unywa$NkNGNODvoD zGgxFF!Yx>DcS@bw$;-obvsP*BH)_?jE5Zs~s~wigFB*sSwUhv`RH}3u$F;RI7Ugoa z(GIpURPbf9TIx{21z`gtUTYmUD##bEF6RGD!Af8YSNaGRG^@`~gVkbU*rzd41p&fM z$o7LfBHku=UkLK-fZ+$hd&W{8Cq83CYb!_9sOw9RK6;K$XW{C1rPd*JEG;adDf70WkeKb2(%K=}q-ANxR8^Fq*< zVSdro`~lV>9mC-o75sRe`Cq07Sjb5eh39qjmX&+`o-9R$X=J8GV|bpP^g}{ z)JfF;I5wgm&`&urIS)Q2Inlh7e@nq84zE}{&UeaT4>#$%t(p417@Vi zI0*4=%4eh9+YLW{P2a9_arPvU>SyGc-;<7a{s}j_!6TKvQgN$`&(wG6I~=4a45cW1 nPf?C{dQ0ru@!;l$U!TAs#a#iUM$j$;!fO|y|mTBPKrphHELfEKUq#qT!;V8Sbb!d5RC+VexpoIMy(B3JeZFmyfV*$_f@69cdRk@_?;X`1sJiN?vZj7Yc)u%- zWzEKfa&hh0)fGoIbdeIYbp>zT6gehc`;KXlv)&bbUOM#n!!CYg;U4k7U!{CUSRUB=vXeE-CYzd?6{VGhw)7TromG`LQ)k| z?LSblHj?n6e5@K)xqN!6Q;;~)J?!ahX{taRJ(VcXk&n#i9hn$!eWZFqtBgj0j2;l{ z*$PfY&v*m=QH1=<%?4fOYYNP?3f!~`$J?759<6MuMaw%Ax3tac-W0PtqQ|1+GtL*} zpQj^g^rk%LUTr>T)@#`}(3`MQYj!Kr4tW#MDx{@Kw^_|5&>BF! z)vNDy_L|*#Hkp4ez=Z{Hl!xyf?C-Sddljj<)9gJNL~OAMm&0pjHoO8C!*l-j--TRw zBE-z!6R;6$2(~!EzA_U4p-|3m7V=cui0)zX&|iRi?H5l z?=-7V22!(CYqlEQY$E@s1YC)+e-K!J*wi?_^$xH1C@lvYU`c9oqBS&-+w}E$ruz3QXVxAb}pvxz>A2GPCGlUkZ?-xFiUyn-(TtAgYc>1I8XNDn48m zo5B=20S0}wQI34dk&hYUh(iVeSs)ot$1C_4@yi@0EWE@PlZ-pOZd%@(sP;8p;Y4 zr(a7IpUsU-k+LlG5k4AX%RW?15=u^Aro}l(GCMail`^nuTB@$7rmW?^5a8O}0mFuh zc0&=UyrdC?L0)Yf`ezE#Jb}Ib!6oP(@Z2BUJz(bz3z>(MM-e%Eg{9s24>p?ozb1d5 zb`N+l5ZgUqOf80%|5NV%`HRZ_*Vi{o_Z(Qh4)QiDh$95PY(X4B`f45G-zm7T8$<{{ zHE;VBA?*&VO5)4P!LujpC3|Lb{W)&w%XIZ-`*XCwSfUsBv7fAI8JsD75Es4{#1-XR zKMS%gcZAr~zks&r6lZLy{f?xl-wM#b5uKwJHbkF%>r`@@r;Y+!^2Vmp3Y>Ffi?rqQ ze-q&P!uDb5p>`;T#1;}SfqA7)BmG5yP4eX)V;~Z+&)N>Xspts5D0$snc9+7sniIpn zh9QkkaudV#WDf864}VTvZt&&o>ZQYJ{`|$kk26wFq0uFE6Gr1^6Eg*h~Td literal 0 HcmV?d00001 diff --git a/owl-bot-staging/GkeHub/v1/proto/src/GPBMetadata/Google/Cloud/Gkehub/V1/Membership.php b/owl-bot-staging/GkeHub/v1/proto/src/GPBMetadata/Google/Cloud/Gkehub/V1/Membership.php new file mode 100644 index 0000000000000000000000000000000000000000..1aee257e39f22ad382672e9352ad019d2398bc9a GIT binary patch literal 3380 zcmb7HT~pge6pb+^a7~D_q14c(6;5U#nM59FA5syTf^7(s5SWB8(~f5}vb450$dalL zCp5!DpZnhFZ|Ga!I@5p9KaoD?SM=_#R&oe5)GwB_dynotd-mMbgNH#sfScMj^=N3t z)X_S}THL2v5c;ui`>xhWx?LJ-wm%4%OG91LntR&Qy#uY)+&Ngp(8y0hn;Kfr_j@j_ z+peED_1+QfC!P9mr9Pm84h^F|3v_`A;8_D21(r>k_Bcy`Qu zPvZf5o=ul;YZ8;sy%qRa^}41K+UGS#Huir2UVZ)c&sbU_7? zIXO`mQq!f>^x?|Fdoe&rc3PMq* zXDgpYB>`^XH0tt&qa5l|6*YOWD6E{mmfO%|PIU^S1hECO4zuVJv1$9BN5%G*MZm>? z=U^)F*pCV2uw?~XB;UZ4mBf8NWbtuzT3{_ILQcs~-%u0fDm{X010Nj*W4#{FtIK-T z83D0;9>i`I&=B(l(!xC`k7$6Dp?E}(rK-pkC=D$)p{OV1!Wg?>FnaGc9MIBjAw`Qj zBGS>q>$zCTcetQ0k*cWvCcQeTyS|Nf>U;Q1U7n0MI6fX^K76t{0psy;Kx@B@0m*^Y zE+7w}j7gZbn?$%|BH!|A?Yz>_@*8rdr0)q_KT5E3c&L%c9HebRl=&Z<@o^TS8jBR^ z`)JA>#MZeGnleh6+h;H%c{K-?XZ5I4<@%izud4lqY~*REKynl2a_&q!8`$}G;6je5y$3Mp$w0j9gb%#n)1cK#>Q7E~01=?6j}sVkoEFe;}#IbRT0 z`?&yDPYsaI;i^h=hzAAkXqjOaxYrF=I=K2P$eAOSU+^qOj_yaMipgBCz!CXKkHy(2 z_i*VHwFgj9DJZ^31t#BL4l)Nbsc_B6_5)mEzQHDITL8II$pT!-h;f;BlxJQNbxA>+ z0~SSS0(thu+S|gYN|ad19k?-~dfc{VL_;hwDrDnsk&59|JPhe6xPF_Tb%)({mAK3zz$Rf;-u!PA$U_*nkt~tX%n>#)=sNgxkRR6vhl37aj^4ryHX%iP{Nz$_mwd|&}=st85e&L7Jv`>ojy=X!`Uwt2-!0{77 zwyL1BrY?RTo7^Mez!&p4%vner@s0w)0f0%0{EoB#j- literal 0 HcmV?d00001 diff --git a/owl-bot-staging/GkeHub/v1/proto/src/GPBMetadata/Google/Cloud/Gkehub/V1/Multiclusteringress/Multiclusteringress.php b/owl-bot-staging/GkeHub/v1/proto/src/GPBMetadata/Google/Cloud/Gkehub/V1/Multiclusteringress/Multiclusteringress.php new file mode 100644 index 000000000000..e48863d0ce20 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/GPBMetadata/Google/Cloud/Gkehub/V1/Multiclusteringress/Multiclusteringress.php @@ -0,0 +1,29 @@ +internalAddGeneratedFile( + ' +à +Dgoogle/cloud/gkehub/v1/multiclusteringress/multiclusteringress.proto*google.cloud.gkehub.multiclusteringress.v1"( + FeatureSpec +config_membership ( B¹ +.com.google.cloud.gkehub.multiclusteringress.v1BMultiClusterIngressProtoPZ`cloud.google.com/go/gkehub/multiclusteringress/apiv1/multiclusteringresspb;multiclusteringresspbª*Google.Cloud.GkeHub.MultiClusterIngress.V1Ê*Google\\Cloud\\GkeHub\\MultiClusterIngress\\V1ê.Google::Cloud::GkeHub::MultiClusterIngress::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/GPBMetadata/Google/Cloud/Gkehub/V1/Rbacrolebindingactuation/Rbacrolebindingactuation.php b/owl-bot-staging/GkeHub/v1/proto/src/GPBMetadata/Google/Cloud/Gkehub/V1/Rbacrolebindingactuation/Rbacrolebindingactuation.php new file mode 100644 index 000000000000..2e6387fb9408 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/GPBMetadata/Google/Cloud/Gkehub/V1/Rbacrolebindingactuation/Rbacrolebindingactuation.php @@ -0,0 +1,31 @@ +internalAddGeneratedFile( + ' +ª +Ngoogle/cloud/gkehub/v1/rbacrolebindingactuation/rbacrolebindingactuation.proto/google.cloud.gkehub.rbacrolebindingactuation.v1"+ + FeatureSpec +allowed_custom_roles ( " + FeatureStateBá +3com.google.cloud.gkehub.rbacrolebindingactuation.v1BRBACRoleBindingActuationProtoPZocloud.google.com/go/gkehub/rbacrolebindingactuation/apiv1/rbacrolebindingactuationpb;rbacrolebindingactuationpbª/Google.Cloud.GkeHub.RbacRoleBindingActuation.V1Ê/Google\\Cloud\\GkeHub\\RbacRoleBindingActuation\\V1ê3Google::Cloud::GkeHub::RbacRoleBindingActuation::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/GPBMetadata/Google/Cloud/Gkehub/V1/Service.php b/owl-bot-staging/GkeHub/v1/proto/src/GPBMetadata/Google/Cloud/Gkehub/V1/Service.php new file mode 100644 index 000000000000..4ea182879931 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/GPBMetadata/Google/Cloud/Gkehub/V1/Service.php @@ -0,0 +1,363 @@ +internalAddGeneratedFile( + ' +‚ +$google/cloud/gkehub/v1/service.protogoogle.cloud.gkehub.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto$google/cloud/gkehub/v1/feature.proto"google/cloud/gkehub/v1/fleet.proto\'google/cloud/gkehub/v1/membership.proto#google/longrunning/operations.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"Q +GetScopeNamespaceRequest5 +name ( B\'àAúA! +gkehub.googleapis.com/Namespace"¸ +CreateScopeNamespaceRequest7 +parent ( B\'àAúA!gkehub.googleapis.com/Namespace +scope_namespace_id ( BàA? +scope_namespace ( 2!.google.cloud.gkehub.v1.NamespaceBàA"” +UpdateScopeNamespaceRequest? +scope_namespace ( 2!.google.cloud.gkehub.v1.NamespaceBàA4 + update_mask ( 2.google.protobuf.FieldMaskBàA"T +DeleteScopeNamespaceRequest5 +name ( B\'àAúA! +gkehub.googleapis.com/Namespace"† +ListScopeNamespacesRequest7 +parent ( B\'àAúA!gkehub.googleapis.com/Namespace + page_size (BàA + +page_token ( BàA"s +ListScopeNamespacesResponse; +scope_namespaces ( 2!.google.cloud.gkehub.v1.Namespace +next_page_token ( "] +GetScopeRBACRoleBindingRequest; +name ( B-àAúA\' +%gkehub.googleapis.com/RBACRoleBinding"Ê +!CreateScopeRBACRoleBindingRequest= +parent ( B-àAúA\'%gkehub.googleapis.com/RBACRoleBinding +rbacrolebinding_id ( BàAE +rbacrolebinding ( 2\'.google.cloud.gkehub.v1.RBACRoleBindingBàA"  +!UpdateScopeRBACRoleBindingRequestE +rbacrolebinding ( 2\'.google.cloud.gkehub.v1.RBACRoleBindingBàA4 + update_mask ( 2.google.protobuf.FieldMaskBàA"` +!DeleteScopeRBACRoleBindingRequest; +name ( B-àAúA\' +%gkehub.googleapis.com/RBACRoleBinding"’ + ListScopeRBACRoleBindingsRequest= +parent ( B-àAúA\'%gkehub.googleapis.com/RBACRoleBinding + page_size (BàA + +page_token ( BàA" +!ListScopeRBACRoleBindingsResponseA +rbacrolebindings ( 2\'.google.cloud.gkehub.v1.RBACRoleBinding +next_page_token ( "D +GetScopeRequest1 +name ( B#àAúA +gkehub.googleapis.com/Scope"“ +CreateScopeRequest3 +parent ( B#àAúAgkehub.googleapis.com/Scope +scope_id ( BàA1 +scope ( 2.google.cloud.gkehub.v1.ScopeBàA"} +UpdateScopeRequest1 +scope ( 2.google.cloud.gkehub.v1.ScopeBàA4 + update_mask ( 2.google.protobuf.FieldMaskBàA"G +DeleteScopeRequest1 +name ( B#àAúA +gkehub.googleapis.com/Scope"y +ListScopesRequest3 +parent ( B#àAúAgkehub.googleapis.com/Scope + page_size (BàA + +page_token ( BàA"\\ +ListScopesResponse- +scopes ( 2.google.cloud.gkehub.v1.Scope +next_page_token ( "‚ +ListPermittedScopesRequest3 +parent ( B#àAúAgkehub.googleapis.com/Scope + page_size (BàA + +page_token ( BàA"e +ListPermittedScopesResponse- +scopes ( 2.google.cloud.gkehub.v1.Scope +next_page_token ( "\\ +GetMembershipBindingRequest= +name ( B/àAúA) +\'gkehub.googleapis.com/MembershipBinding"Ñ +CreateMembershipBindingRequest? +parent ( B/àAúA)\'gkehub.googleapis.com/MembershipBindingJ +membership_binding ( 2).google.cloud.gkehub.v1.MembershipBindingBàA" +membership_binding_id ( BàA"¢ +UpdateMembershipBindingRequestJ +membership_binding ( 2).google.cloud.gkehub.v1.MembershipBindingBàA4 + update_mask ( 2.google.protobuf.FieldMaskBàA"_ +DeleteMembershipBindingRequest= +name ( B/àAúA) +\'gkehub.googleapis.com/MembershipBinding"¦ +ListMembershipBindingsRequest? +parent ( B/àAúA)\'gkehub.googleapis.com/MembershipBinding + page_size (BàA + +page_token ( BàA +filter ( BàA"– +ListMembershipBindingsResponseF +membership_bindings ( 2).google.cloud.gkehub.v1.MembershipBinding +next_page_token (  + unreachable ( "¯ +ListMembershipsRequest8 +parent ( B(àAúA" gkehub.googleapis.com/Membership + page_size (BàA + +page_token ( BàA +filter ( BàA +order_by ( BàA"b +#GetMembershipRBACRoleBindingRequest; +name ( B-àAúA\' +%gkehub.googleapis.com/RBACRoleBinding"Ï +&CreateMembershipRBACRoleBindingRequest= +parent ( B-àAúA\'%gkehub.googleapis.com/RBACRoleBinding +rbacrolebinding_id ( BàAE +rbacrolebinding ( 2\'.google.cloud.gkehub.v1.RBACRoleBindingBàA"¥ +&UpdateMembershipRBACRoleBindingRequestE +rbacrolebinding ( 2\'.google.cloud.gkehub.v1.RBACRoleBindingBàA4 + update_mask ( 2.google.protobuf.FieldMaskBàA"e +&DeleteMembershipRBACRoleBindingRequest; +name ( B-àAúA\' +%gkehub.googleapis.com/RBACRoleBinding"— +%ListMembershipRBACRoleBindingsRequest= +parent ( B-àAúA\'%gkehub.googleapis.com/RBACRoleBinding + page_size (BàA + +page_token ( BàA"™ +&ListMembershipRBACRoleBindingsResponseA +rbacrolebindings ( 2\'.google.cloud.gkehub.v1.RBACRoleBinding +next_page_token (  + unreachable ( "Ð +,GenerateMembershipRBACRoleBindingYAMLRequest8 +parent ( B(àAúA" + gkehub.googleapis.com/Membership +rbacrolebinding_id ( BàAE +rbacrolebinding ( 2\'.google.cloud.gkehub.v1.RBACRoleBindingBàA"K +-GenerateMembershipRBACRoleBindingYAMLResponse +role_bindings_yaml ( "~ +ListMembershipsResponse5 + resources ( 2".google.cloud.gkehub.v1.Membership +next_page_token (  + unreachable ( "N +GetMembershipRequest6 +name ( B(àAúA" + gkehub.googleapis.com/Membership"œ +ListBoundMembershipsRequest7 + +scope_name ( B#àAúA +gkehub.googleapis.com/Scope +filter ( BàA + page_size (BàA + +page_token ( BàA"… +ListBoundMembershipsResponse7 + memberships ( 2".google.cloud.gkehub.v1.Membership + unreachable (  +next_page_token ( "à +CreateMembershipRequest8 +parent ( B(àAúA" gkehub.googleapis.com/Membership + membership_id ( BàA9 +resource ( 2".google.cloud.gkehub.v1.MembershipBàA + +request_id ( BàA"~ +DeleteMembershipRequest6 +name ( B(àAúA" + gkehub.googleapis.com/Membership + +request_id ( BàA +force (BàA"Û +UpdateMembershipRequest6 +name ( B(àAúA" + gkehub.googleapis.com/Membership4 + update_mask ( 2.google.protobuf.FieldMaskBàA9 +resource ( 2".google.cloud.gkehub.v1.MembershipBàA + +request_id ( BàA"ò +GenerateConnectManifestRequest6 +name ( B(àAúA" + gkehub.googleapis.com/Membership + namespace ( BàA +proxy ( BàA +version ( BàA + +is_upgrade (BàA +registry ( BàA& +image_pull_secret_content ( BàA"a +GenerateConnectManifestResponse> +manifest ( 2,.google.cloud.gkehub.v1.ConnectAgentResource"X +ConnectAgentResource. +type ( 2 .google.cloud.gkehub.v1.TypeMeta +manifest ( "- +TypeMeta +kind (  + api_version ( "· +ListFeaturesRequest2 +parent ( B"úAgkehub.googleapis.com/Feature + page_size ( + +page_token (  +filter (  +order_by ( # +return_partial_success (BàA"c +ListFeaturesResponse2 + resources ( 2.google.cloud.gkehub.v1.Feature +next_page_token ( "j +GetFeatureRequest0 +name ( B"úA +gkehub.googleapis.com/Feature# +return_partial_success (BàA"¥ +CreateFeatureRequest2 +parent ( B"úAgkehub.googleapis.com/Feature + +feature_id ( 1 +resource ( 2.google.cloud.gkehub.v1.Feature + +request_id ( "p +DeleteFeatureRequest0 +name ( B"úA +gkehub.googleapis.com/Feature +force ( + +request_id ( BàA"À +UpdateFeatureRequest0 +name ( B"úA +gkehub.googleapis.com/Feature/ + update_mask ( 2.google.protobuf.FieldMask1 +resource ( 2.google.cloud.gkehub.v1.Feature + +request_id ( "‚ +CreateFleetRequest9 +parent ( B)àAúA# +!locations.googleapis.com/Location1 +fleet ( 2.google.cloud.gkehub.v1.FleetBàA"D +GetFleetRequest1 +name ( B#àAúA +gkehub.googleapis.com/Fleet"} +UpdateFleetRequest1 +fleet ( 2.google.cloud.gkehub.v1.FleetBàA4 + update_mask ( 2.google.protobuf.FieldMaskBàA"G +DeleteFleetRequest1 +name ( B#àAúA +gkehub.googleapis.com/Fleet" +ListFleetsRequest9 +parent ( B)àAúA# +!locations.googleapis.com/Location + +page_token ( BàA + page_size (BàA"\\ +ListFleetsResponse- +fleets ( 2.google.cloud.gkehub.v1.Fleet +next_page_token ( "ù +OperationMetadata4 + create_time ( 2.google.protobuf.TimestampBàA1 +end_time ( 2.google.protobuf.TimestampBàA +target ( BàA +verb ( BàA + status_detail ( BàA +cancel_requested (BàA + api_version ( BàA2–M +GkeHub´ +ListMemberships..google.cloud.gkehub.v1.ListMembershipsRequest/.google.cloud.gkehub.v1.ListMembershipsResponse"@ÚAparent‚Óä“1//v1/{parent=projects/*/locations/*}/membershipsØ +ListBoundMemberships3.google.cloud.gkehub.v1.ListBoundMembershipsRequest4.google.cloud.gkehub.v1.ListBoundMembershipsResponse"UÚA +scope_name‚Óä“B@/v1/{scope_name=projects/*/locations/*/scopes/*}:listMemberships¨ + ListFeatures+.google.cloud.gkehub.v1.ListFeaturesRequest,.google.cloud.gkehub.v1.ListFeaturesResponse"=ÚAparent‚Óä“.,/v1/{parent=projects/*/locations/*}/features¡ + GetMembership,.google.cloud.gkehub.v1.GetMembershipRequest".google.cloud.gkehub.v1.Membership">ÚAname‚Óä“1//v1/{name=projects/*/locations/*/memberships/*}• + +GetFeature).google.cloud.gkehub.v1.GetFeatureRequest.google.cloud.gkehub.v1.Feature";ÚAname‚Óä“.,/v1/{name=projects/*/locations/*/features/*}è +CreateMembership/.google.cloud.gkehub.v1.CreateMembershipRequest.google.longrunning.Operation"ƒÊA + +MembershipOperationMetadataÚAparent,resource,membership_id‚Óä“;"//v1/{parent=projects/*/locations/*}/memberships:resourceØ + CreateFeature,.google.cloud.gkehub.v1.CreateFeatureRequest.google.longrunning.Operation"zÊA +FeatureOperationMetadataÚAparent,resource,feature_id‚Óä“8",/v1/{parent=projects/*/locations/*}/features:resourceÏ +DeleteMembership/.google.cloud.gkehub.v1.DeleteMembershipRequest.google.longrunning.Operation"kÊA* +google.protobuf.EmptyOperationMetadataÚAname‚Óä“1*//v1/{name=projects/*/locations/*/memberships/*}Æ + DeleteFeature,.google.cloud.gkehub.v1.DeleteFeatureRequest.google.longrunning.Operation"hÊA* +google.protobuf.EmptyOperationMetadataÚAname‚Óä“.*,/v1/{name=projects/*/locations/*/features/*}ã +UpdateMembership/.google.cloud.gkehub.v1.UpdateMembershipRequest.google.longrunning.Operation"ÊA + +MembershipOperationMetadataÚAname,resource,update_mask‚Óä“;2//v1/{name=projects/*/locations/*/memberships/*}:resource× + UpdateFeature,.google.cloud.gkehub.v1.UpdateFeatureRequest.google.longrunning.Operation"yÊA +FeatureOperationMetadataÚAname,resource,update_mask‚Óä“82,/v1/{name=projects/*/locations/*/features/*}:resourceÛ +GenerateConnectManifest6.google.cloud.gkehub.v1.GenerateConnectManifestRequest7.google.cloud.gkehub.v1.GenerateConnectManifestResponse"O‚Óä“IG/v1/{name=projects/*/locations/*/memberships/*}:generateConnectManifest¿ + CreateFleet*.google.cloud.gkehub.v1.CreateFleetRequest.google.longrunning.Operation"eÊA +FleetOperationMetadataÚA parent,fleet‚Óä“3"*/v1/{parent=projects/*/locations/*}/fleets:fleet +GetFleet\'.google.cloud.gkehub.v1.GetFleetRequest.google.cloud.gkehub.v1.Fleet"9ÚAname‚Óä“,*/v1/{name=projects/*/locations/*/fleets/*}Ê + UpdateFleet*.google.cloud.gkehub.v1.UpdateFleetRequest.google.longrunning.Operation"pÊA +FleetOperationMetadataÚAfleet,update_mask‚Óä“920/v1/{fleet.name=projects/*/locations/*/fleets/*}:fleetÀ + DeleteFleet*.google.cloud.gkehub.v1.DeleteFleetRequest.google.longrunning.Operation"fÊA* +google.protobuf.EmptyOperationMetadataÚAname‚Óä“,**/v1/{name=projects/*/locations/*/fleets/*}Ó + +ListFleets).google.cloud.gkehub.v1.ListFleetsRequest*.google.cloud.gkehub.v1.ListFleetsResponse"nÚAparent‚Óä“_*/v1/{parent=projects/*/locations/*}/fleetsZ1//v1/{parent=organizations/*/locations/*}/fleets° +GetScopeNamespace0.google.cloud.gkehub.v1.GetScopeNamespaceRequest!.google.cloud.gkehub.v1.Namespace"FÚAname‚Óä“97/v1/{name=projects/*/locations/*/scopes/*/namespaces/*}Š +CreateScopeNamespace3.google.cloud.gkehub.v1.CreateScopeNamespaceRequest.google.longrunning.Operation"ÊA + NamespaceOperationMetadataÚA)parent,scope_namespace,scope_namespace_id‚Óä“J"7/v1/{parent=projects/*/locations/*/scopes/*}/namespaces:scope_namespaceŒ +UpdateScopeNamespace3.google.cloud.gkehub.v1.UpdateScopeNamespaceRequest.google.longrunning.Operation"ŸÊA + NamespaceOperationMetadataÚAscope_namespace,update_mask‚Óä“Z2G/v1/{scope_namespace.name=projects/*/locations/*/scopes/*/namespaces/*}:scope_namespaceß +DeleteScopeNamespace3.google.cloud.gkehub.v1.DeleteScopeNamespaceRequest.google.longrunning.Operation"sÊA* +google.protobuf.EmptyOperationMetadataÚAname‚Óä“9*7/v1/{name=projects/*/locations/*/scopes/*/namespaces/*}È +ListScopeNamespaces2.google.cloud.gkehub.v1.ListScopeNamespacesRequest3.google.cloud.gkehub.v1.ListScopeNamespacesResponse"HÚAparent‚Óä“97/v1/{parent=projects/*/locations/*/scopes/*}/namespacesÈ +GetScopeRBACRoleBinding6.google.cloud.gkehub.v1.GetScopeRBACRoleBindingRequest\'.google.cloud.gkehub.v1.RBACRoleBinding"LÚAname‚Óä“?=/v1/{name=projects/*/locations/*/scopes/*/rbacrolebindings/*}¢ +CreateScopeRBACRoleBinding9.google.cloud.gkehub.v1.CreateScopeRBACRoleBindingRequest.google.longrunning.Operation"©ÊA$ +RBACRoleBindingOperationMetadataÚA)parent,rbacrolebinding,rbacrolebinding_id‚Óä“P"=/v1/{parent=projects/*/locations/*/scopes/*}/rbacrolebindings:rbacrolebinding¤ +UpdateScopeRBACRoleBinding9.google.cloud.gkehub.v1.UpdateScopeRBACRoleBindingRequest.google.longrunning.Operation"«ÊA$ +RBACRoleBindingOperationMetadataÚArbacrolebinding,update_mask‚Óä“`2M/v1/{rbacrolebinding.name=projects/*/locations/*/scopes/*/rbacrolebindings/*}:rbacrolebindingñ +DeleteScopeRBACRoleBinding9.google.cloud.gkehub.v1.DeleteScopeRBACRoleBindingRequest.google.longrunning.Operation"yÊA* +google.protobuf.EmptyOperationMetadataÚAname‚Óä“?*=/v1/{name=projects/*/locations/*/scopes/*/rbacrolebindings/*}à +ListScopeRBACRoleBindings8.google.cloud.gkehub.v1.ListScopeRBACRoleBindingsRequest9.google.cloud.gkehub.v1.ListScopeRBACRoleBindingsResponse"NÚAparent‚Óä“?=/v1/{parent=projects/*/locations/*/scopes/*}/rbacrolebindings +GetScope\'.google.cloud.gkehub.v1.GetScopeRequest.google.cloud.gkehub.v1.Scope"9ÚAname‚Óä“,*/v1/{name=projects/*/locations/*/scopes/*}È + CreateScope*.google.cloud.gkehub.v1.CreateScopeRequest.google.longrunning.Operation"nÊA +ScopeOperationMetadataÚAparent,scope,scope_id‚Óä“3"*/v1/{parent=projects/*/locations/*}/scopes:scopeÊ + UpdateScope*.google.cloud.gkehub.v1.UpdateScopeRequest.google.longrunning.Operation"pÊA +ScopeOperationMetadataÚAscope,update_mask‚Óä“920/v1/{scope.name=projects/*/locations/*/scopes/*}:scopeÀ + DeleteScope*.google.cloud.gkehub.v1.DeleteScopeRequest.google.longrunning.Operation"fÊA* +google.protobuf.EmptyOperationMetadataÚAname‚Óä“,**/v1/{name=projects/*/locations/*/scopes/*}  + +ListScopes).google.cloud.gkehub.v1.ListScopesRequest*.google.cloud.gkehub.v1.ListScopesResponse";ÚAparent‚Óä“,*/v1/{parent=projects/*/locations/*}/scopesÉ +ListPermittedScopes2.google.cloud.gkehub.v1.ListPermittedScopesRequest3.google.cloud.gkehub.v1.ListPermittedScopesResponse"IÚAparent‚Óä“:8/v1/{parent=projects/*/locations/*}/scopes:listPermittedÁ +GetMembershipBinding3.google.cloud.gkehub.v1.GetMembershipBindingRequest).google.cloud.gkehub.v1.MembershipBinding"IÚAname‚Óä“<:/v1/{name=projects/*/locations/*/memberships/*/bindings/*}¤ +CreateMembershipBinding6.google.cloud.gkehub.v1.CreateMembershipBindingRequest.google.longrunning.Operation"±ÊA& +MembershipBindingOperationMetadataÚA/parent,membership_binding,membership_binding_id‚Óä“P":/v1/{parent=projects/*/locations/*/memberships/*}/bindings:membership_binding¦ +UpdateMembershipBinding6.google.cloud.gkehub.v1.UpdateMembershipBindingRequest.google.longrunning.Operation"³ÊA& +MembershipBindingOperationMetadataÚAmembership_binding,update_mask‚Óä“c2M/v1/{membership_binding.name=projects/*/locations/*/memberships/*/bindings/*}:membership_bindingè +DeleteMembershipBinding6.google.cloud.gkehub.v1.DeleteMembershipBindingRequest.google.longrunning.Operation"vÊA* +google.protobuf.EmptyOperationMetadataÚAname‚Óä“<*:/v1/{name=projects/*/locations/*/memberships/*/bindings/*}Ô +ListMembershipBindings5.google.cloud.gkehub.v1.ListMembershipBindingsRequest6.google.cloud.gkehub.v1.ListMembershipBindingsResponse"KÚAparent‚Óä“<:/v1/{parent=projects/*/locations/*/memberships/*}/bindings× +GetMembershipRBACRoleBinding;.google.cloud.gkehub.v1.GetMembershipRBACRoleBindingRequest\'.google.cloud.gkehub.v1.RBACRoleBinding"QÚAname‚Óä“DB/v1/{name=projects/*/locations/*/memberships/*/rbacrolebindings/*}± +CreateMembershipRBACRoleBinding>.google.cloud.gkehub.v1.CreateMembershipRBACRoleBindingRequest.google.longrunning.Operation"®ÊA$ +RBACRoleBindingOperationMetadataÚA)parent,rbacrolebinding,rbacrolebinding_id‚Óä“U"B/v1/{parent=projects/*/locations/*/memberships/*}/rbacrolebindings:rbacrolebinding³ +UpdateMembershipRBACRoleBinding>.google.cloud.gkehub.v1.UpdateMembershipRBACRoleBindingRequest.google.longrunning.Operation"°ÊA$ +RBACRoleBindingOperationMetadataÚArbacrolebinding,update_mask‚Óä“e2R/v1/{rbacrolebinding.name=projects/*/locations/*/memberships/*/rbacrolebindings/*}:rbacrolebinding€ +DeleteMembershipRBACRoleBinding>.google.cloud.gkehub.v1.DeleteMembershipRBACRoleBindingRequest.google.longrunning.Operation"~ÊA* +google.protobuf.EmptyOperationMetadataÚAname‚Óä“D*B/v1/{name=projects/*/locations/*/memberships/*/rbacrolebindings/*}ô +ListMembershipRBACRoleBindings=.google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsRequest>.google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsResponse"SÚAparent‚Óä“DB/v1/{parent=projects/*/locations/*/memberships/*}/rbacrolebindings¸ +%GenerateMembershipRBACRoleBindingYAMLD.google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLRequestE.google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLResponse"‚Óä“{"h/v1/{parent=projects/*/locations/*/memberships/*}/rbacrolebindings:generateMembershipRBACRoleBindingYAML:rbacrolebindingIÊAgkehub.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformB® +com.google.cloud.gkehub.v1B ServiceProtoPZ2cloud.google.com/go/gkehub/apiv1/gkehubpb;gkehubpbªGoogle.Cloud.GkeHub.V1ÊGoogle\\Cloud\\GkeHub\\V1êGoogle::Cloud::GkeHub::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSync.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSync.php new file mode 100644 index 000000000000..eba4ae705143 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSync.php @@ -0,0 +1,323 @@ +google.cloud.gkehub.configmanagement.v1.ConfigSync + */ +class ConfigSync extends \Google\Protobuf\Internal\Message +{ + /** + * Git repo configuration for the cluster. + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.GitConfig git = 7; + */ + protected $git = null; + /** + * Specifies whether the Config Sync Repo is + * in "hierarchical" or "unstructured" mode. + * + * Generated from protobuf field string source_format = 8; + */ + protected $source_format = ''; + /** + * Enables the installation of ConfigSync. + * If set to true, ConfigSync resources will be created and the other + * ConfigSync fields will be applied if exist. + * If set to false, all other ConfigSync fields will be ignored, ConfigSync + * resources will be deleted. + * If omitted, ConfigSync resources will be managed depends on the presence + * of the git or oci field. + * + * Generated from protobuf field optional bool enabled = 10; + */ + protected $enabled = null; + /** + * Set to true to enable the Config Sync admission webhook to prevent drifts. + * If set to `false`, disables the Config Sync admission webhook and does not + * prevent drifts. + * + * Generated from protobuf field bool prevent_drift = 11; + */ + protected $prevent_drift = false; + /** + * OCI repo configuration for the cluster + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.OciConfig oci = 12; + */ + protected $oci = null; + /** + * The Email of the Google Cloud Service Account (GSA) used for exporting + * Config Sync metrics to Cloud Monitoring when Workload Identity is enabled. + * The GSA should have the Monitoring Metric Writer + * (roles/monitoring.metricWriter) IAM role. + * The Kubernetes ServiceAccount `default` in the namespace + * `config-management-monitoring` should be bound to the GSA. + * + * Generated from protobuf field string metrics_gcp_service_account_email = 15; + */ + protected $metrics_gcp_service_account_email = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\GkeHub\ConfigManagement\V1\GitConfig $git + * Git repo configuration for the cluster. + * @type string $source_format + * Specifies whether the Config Sync Repo is + * in "hierarchical" or "unstructured" mode. + * @type bool $enabled + * Enables the installation of ConfigSync. + * If set to true, ConfigSync resources will be created and the other + * ConfigSync fields will be applied if exist. + * If set to false, all other ConfigSync fields will be ignored, ConfigSync + * resources will be deleted. + * If omitted, ConfigSync resources will be managed depends on the presence + * of the git or oci field. + * @type bool $prevent_drift + * Set to true to enable the Config Sync admission webhook to prevent drifts. + * If set to `false`, disables the Config Sync admission webhook and does not + * prevent drifts. + * @type \Google\Cloud\GkeHub\ConfigManagement\V1\OciConfig $oci + * OCI repo configuration for the cluster + * @type string $metrics_gcp_service_account_email + * The Email of the Google Cloud Service Account (GSA) used for exporting + * Config Sync metrics to Cloud Monitoring when Workload Identity is enabled. + * The GSA should have the Monitoring Metric Writer + * (roles/monitoring.metricWriter) IAM role. + * The Kubernetes ServiceAccount `default` in the namespace + * `config-management-monitoring` should be bound to the GSA. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); + parent::__construct($data); + } + + /** + * Git repo configuration for the cluster. + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.GitConfig git = 7; + * @return \Google\Cloud\GkeHub\ConfigManagement\V1\GitConfig|null + */ + public function getGit() + { + return $this->git; + } + + public function hasGit() + { + return isset($this->git); + } + + public function clearGit() + { + unset($this->git); + } + + /** + * Git repo configuration for the cluster. + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.GitConfig git = 7; + * @param \Google\Cloud\GkeHub\ConfigManagement\V1\GitConfig $var + * @return $this + */ + public function setGit($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\ConfigManagement\V1\GitConfig::class); + $this->git = $var; + + return $this; + } + + /** + * Specifies whether the Config Sync Repo is + * in "hierarchical" or "unstructured" mode. + * + * Generated from protobuf field string source_format = 8; + * @return string + */ + public function getSourceFormat() + { + return $this->source_format; + } + + /** + * Specifies whether the Config Sync Repo is + * in "hierarchical" or "unstructured" mode. + * + * Generated from protobuf field string source_format = 8; + * @param string $var + * @return $this + */ + public function setSourceFormat($var) + { + GPBUtil::checkString($var, True); + $this->source_format = $var; + + return $this; + } + + /** + * Enables the installation of ConfigSync. + * If set to true, ConfigSync resources will be created and the other + * ConfigSync fields will be applied if exist. + * If set to false, all other ConfigSync fields will be ignored, ConfigSync + * resources will be deleted. + * If omitted, ConfigSync resources will be managed depends on the presence + * of the git or oci field. + * + * Generated from protobuf field optional bool enabled = 10; + * @return bool + */ + public function getEnabled() + { + return isset($this->enabled) ? $this->enabled : false; + } + + public function hasEnabled() + { + return isset($this->enabled); + } + + public function clearEnabled() + { + unset($this->enabled); + } + + /** + * Enables the installation of ConfigSync. + * If set to true, ConfigSync resources will be created and the other + * ConfigSync fields will be applied if exist. + * If set to false, all other ConfigSync fields will be ignored, ConfigSync + * resources will be deleted. + * If omitted, ConfigSync resources will be managed depends on the presence + * of the git or oci field. + * + * Generated from protobuf field optional bool enabled = 10; + * @param bool $var + * @return $this + */ + public function setEnabled($var) + { + GPBUtil::checkBool($var); + $this->enabled = $var; + + return $this; + } + + /** + * Set to true to enable the Config Sync admission webhook to prevent drifts. + * If set to `false`, disables the Config Sync admission webhook and does not + * prevent drifts. + * + * Generated from protobuf field bool prevent_drift = 11; + * @return bool + */ + public function getPreventDrift() + { + return $this->prevent_drift; + } + + /** + * Set to true to enable the Config Sync admission webhook to prevent drifts. + * If set to `false`, disables the Config Sync admission webhook and does not + * prevent drifts. + * + * Generated from protobuf field bool prevent_drift = 11; + * @param bool $var + * @return $this + */ + public function setPreventDrift($var) + { + GPBUtil::checkBool($var); + $this->prevent_drift = $var; + + return $this; + } + + /** + * OCI repo configuration for the cluster + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.OciConfig oci = 12; + * @return \Google\Cloud\GkeHub\ConfigManagement\V1\OciConfig|null + */ + public function getOci() + { + return $this->oci; + } + + public function hasOci() + { + return isset($this->oci); + } + + public function clearOci() + { + unset($this->oci); + } + + /** + * OCI repo configuration for the cluster + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.OciConfig oci = 12; + * @param \Google\Cloud\GkeHub\ConfigManagement\V1\OciConfig $var + * @return $this + */ + public function setOci($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\ConfigManagement\V1\OciConfig::class); + $this->oci = $var; + + return $this; + } + + /** + * The Email of the Google Cloud Service Account (GSA) used for exporting + * Config Sync metrics to Cloud Monitoring when Workload Identity is enabled. + * The GSA should have the Monitoring Metric Writer + * (roles/monitoring.metricWriter) IAM role. + * The Kubernetes ServiceAccount `default` in the namespace + * `config-management-monitoring` should be bound to the GSA. + * + * Generated from protobuf field string metrics_gcp_service_account_email = 15; + * @return string + */ + public function getMetricsGcpServiceAccountEmail() + { + return $this->metrics_gcp_service_account_email; + } + + /** + * The Email of the Google Cloud Service Account (GSA) used for exporting + * Config Sync metrics to Cloud Monitoring when Workload Identity is enabled. + * The GSA should have the Monitoring Metric Writer + * (roles/monitoring.metricWriter) IAM role. + * The Kubernetes ServiceAccount `default` in the namespace + * `config-management-monitoring` should be bound to the GSA. + * + * Generated from protobuf field string metrics_gcp_service_account_email = 15; + * @param string $var + * @return $this + */ + public function setMetricsGcpServiceAccountEmail($var) + { + GPBUtil::checkString($var, True); + $this->metrics_gcp_service_account_email = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncDeploymentState.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncDeploymentState.php new file mode 100644 index 000000000000..828c82a203d3 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncDeploymentState.php @@ -0,0 +1,271 @@ +google.cloud.gkehub.configmanagement.v1.ConfigSyncDeploymentState + */ +class ConfigSyncDeploymentState extends \Google\Protobuf\Internal\Message +{ + /** + * Deployment state of the importer pod + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState importer = 1; + */ + protected $importer = 0; + /** + * Deployment state of the syncer pod + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState syncer = 2; + */ + protected $syncer = 0; + /** + * Deployment state of the git-sync pod + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState git_sync = 3; + */ + protected $git_sync = 0; + /** + * Deployment state of the monitor pod + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState monitor = 4; + */ + protected $monitor = 0; + /** + * Deployment state of reconciler-manager pod + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState reconciler_manager = 5; + */ + protected $reconciler_manager = 0; + /** + * Deployment state of root-reconciler + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState root_reconciler = 6; + */ + protected $root_reconciler = 0; + /** + * Deployment state of admission-webhook + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState admission_webhook = 7; + */ + protected $admission_webhook = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $importer + * Deployment state of the importer pod + * @type int $syncer + * Deployment state of the syncer pod + * @type int $git_sync + * Deployment state of the git-sync pod + * @type int $monitor + * Deployment state of the monitor pod + * @type int $reconciler_manager + * Deployment state of reconciler-manager pod + * @type int $root_reconciler + * Deployment state of root-reconciler + * @type int $admission_webhook + * Deployment state of admission-webhook + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); + parent::__construct($data); + } + + /** + * Deployment state of the importer pod + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState importer = 1; + * @return int + */ + public function getImporter() + { + return $this->importer; + } + + /** + * Deployment state of the importer pod + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState importer = 1; + * @param int $var + * @return $this + */ + public function setImporter($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\ConfigManagement\V1\DeploymentState::class); + $this->importer = $var; + + return $this; + } + + /** + * Deployment state of the syncer pod + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState syncer = 2; + * @return int + */ + public function getSyncer() + { + return $this->syncer; + } + + /** + * Deployment state of the syncer pod + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState syncer = 2; + * @param int $var + * @return $this + */ + public function setSyncer($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\ConfigManagement\V1\DeploymentState::class); + $this->syncer = $var; + + return $this; + } + + /** + * Deployment state of the git-sync pod + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState git_sync = 3; + * @return int + */ + public function getGitSync() + { + return $this->git_sync; + } + + /** + * Deployment state of the git-sync pod + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState git_sync = 3; + * @param int $var + * @return $this + */ + public function setGitSync($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\ConfigManagement\V1\DeploymentState::class); + $this->git_sync = $var; + + return $this; + } + + /** + * Deployment state of the monitor pod + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState monitor = 4; + * @return int + */ + public function getMonitor() + { + return $this->monitor; + } + + /** + * Deployment state of the monitor pod + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState monitor = 4; + * @param int $var + * @return $this + */ + public function setMonitor($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\ConfigManagement\V1\DeploymentState::class); + $this->monitor = $var; + + return $this; + } + + /** + * Deployment state of reconciler-manager pod + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState reconciler_manager = 5; + * @return int + */ + public function getReconcilerManager() + { + return $this->reconciler_manager; + } + + /** + * Deployment state of reconciler-manager pod + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState reconciler_manager = 5; + * @param int $var + * @return $this + */ + public function setReconcilerManager($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\ConfigManagement\V1\DeploymentState::class); + $this->reconciler_manager = $var; + + return $this; + } + + /** + * Deployment state of root-reconciler + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState root_reconciler = 6; + * @return int + */ + public function getRootReconciler() + { + return $this->root_reconciler; + } + + /** + * Deployment state of root-reconciler + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState root_reconciler = 6; + * @param int $var + * @return $this + */ + public function setRootReconciler($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\ConfigManagement\V1\DeploymentState::class); + $this->root_reconciler = $var; + + return $this; + } + + /** + * Deployment state of admission-webhook + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState admission_webhook = 7; + * @return int + */ + public function getAdmissionWebhook() + { + return $this->admission_webhook; + } + + /** + * Deployment state of admission-webhook + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState admission_webhook = 7; + * @param int $var + * @return $this + */ + public function setAdmissionWebhook($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\ConfigManagement\V1\DeploymentState::class); + $this->admission_webhook = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncError.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncError.php new file mode 100644 index 000000000000..2aefa6086d1e --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncError.php @@ -0,0 +1,67 @@ +google.cloud.gkehub.configmanagement.v1.ConfigSyncError + */ +class ConfigSyncError extends \Google\Protobuf\Internal\Message +{ + /** + * A string representing the user facing error message + * + * Generated from protobuf field string error_message = 1; + */ + protected $error_message = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $error_message + * A string representing the user facing error message + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); + parent::__construct($data); + } + + /** + * A string representing the user facing error message + * + * Generated from protobuf field string error_message = 1; + * @return string + */ + public function getErrorMessage() + { + return $this->error_message; + } + + /** + * A string representing the user facing error message + * + * Generated from protobuf field string error_message = 1; + * @param string $var + * @return $this + */ + public function setErrorMessage($var) + { + GPBUtil::checkString($var, True); + $this->error_message = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncState.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncState.php new file mode 100644 index 000000000000..d2fb6690daf1 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncState.php @@ -0,0 +1,309 @@ +google.cloud.gkehub.configmanagement.v1.ConfigSyncState + */ +class ConfigSyncState extends \Google\Protobuf\Internal\Message +{ + /** + * The version of ConfigSync deployed + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSyncVersion version = 1; + */ + protected $version = null; + /** + * Information about the deployment of ConfigSync, including the version + * of the various Pods deployed + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSyncDeploymentState deployment_state = 2; + */ + protected $deployment_state = null; + /** + * The state of ConfigSync's process to sync configs to a cluster + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.SyncState sync_state = 3; + */ + protected $sync_state = null; + /** + * Errors pertaining to the installation of Config Sync. + * + * Generated from protobuf field repeated .google.cloud.gkehub.configmanagement.v1.ConfigSyncError errors = 4; + */ + private $errors; + /** + * The state of the RootSync CRD + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSyncState.CRDState rootsync_crd = 5; + */ + protected $rootsync_crd = 0; + /** + * The state of the Reposync CRD + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSyncState.CRDState reposync_crd = 6; + */ + protected $reposync_crd = 0; + /** + * The state of CS + * This field summarizes the other fields in this message. + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSyncState.State state = 7; + */ + protected $state = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSyncVersion $version + * The version of ConfigSync deployed + * @type \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSyncDeploymentState $deployment_state + * Information about the deployment of ConfigSync, including the version + * of the various Pods deployed + * @type \Google\Cloud\GkeHub\ConfigManagement\V1\SyncState $sync_state + * The state of ConfigSync's process to sync configs to a cluster + * @type array<\Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSyncError>|\Google\Protobuf\Internal\RepeatedField $errors + * Errors pertaining to the installation of Config Sync. + * @type int $rootsync_crd + * The state of the RootSync CRD + * @type int $reposync_crd + * The state of the Reposync CRD + * @type int $state + * The state of CS + * This field summarizes the other fields in this message. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); + parent::__construct($data); + } + + /** + * The version of ConfigSync deployed + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSyncVersion version = 1; + * @return \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSyncVersion|null + */ + public function getVersion() + { + return $this->version; + } + + public function hasVersion() + { + return isset($this->version); + } + + public function clearVersion() + { + unset($this->version); + } + + /** + * The version of ConfigSync deployed + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSyncVersion version = 1; + * @param \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSyncVersion $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSyncVersion::class); + $this->version = $var; + + return $this; + } + + /** + * Information about the deployment of ConfigSync, including the version + * of the various Pods deployed + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSyncDeploymentState deployment_state = 2; + * @return \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSyncDeploymentState|null + */ + public function getDeploymentState() + { + return $this->deployment_state; + } + + public function hasDeploymentState() + { + return isset($this->deployment_state); + } + + public function clearDeploymentState() + { + unset($this->deployment_state); + } + + /** + * Information about the deployment of ConfigSync, including the version + * of the various Pods deployed + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSyncDeploymentState deployment_state = 2; + * @param \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSyncDeploymentState $var + * @return $this + */ + public function setDeploymentState($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSyncDeploymentState::class); + $this->deployment_state = $var; + + return $this; + } + + /** + * The state of ConfigSync's process to sync configs to a cluster + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.SyncState sync_state = 3; + * @return \Google\Cloud\GkeHub\ConfigManagement\V1\SyncState|null + */ + public function getSyncState() + { + return $this->sync_state; + } + + public function hasSyncState() + { + return isset($this->sync_state); + } + + public function clearSyncState() + { + unset($this->sync_state); + } + + /** + * The state of ConfigSync's process to sync configs to a cluster + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.SyncState sync_state = 3; + * @param \Google\Cloud\GkeHub\ConfigManagement\V1\SyncState $var + * @return $this + */ + public function setSyncState($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\ConfigManagement\V1\SyncState::class); + $this->sync_state = $var; + + return $this; + } + + /** + * Errors pertaining to the installation of Config Sync. + * + * Generated from protobuf field repeated .google.cloud.gkehub.configmanagement.v1.ConfigSyncError errors = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getErrors() + { + return $this->errors; + } + + /** + * Errors pertaining to the installation of Config Sync. + * + * Generated from protobuf field repeated .google.cloud.gkehub.configmanagement.v1.ConfigSyncError errors = 4; + * @param array<\Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSyncError>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setErrors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSyncError::class); + $this->errors = $arr; + + return $this; + } + + /** + * The state of the RootSync CRD + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSyncState.CRDState rootsync_crd = 5; + * @return int + */ + public function getRootsyncCrd() + { + return $this->rootsync_crd; + } + + /** + * The state of the RootSync CRD + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSyncState.CRDState rootsync_crd = 5; + * @param int $var + * @return $this + */ + public function setRootsyncCrd($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSyncState\CRDState::class); + $this->rootsync_crd = $var; + + return $this; + } + + /** + * The state of the Reposync CRD + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSyncState.CRDState reposync_crd = 6; + * @return int + */ + public function getReposyncCrd() + { + return $this->reposync_crd; + } + + /** + * The state of the Reposync CRD + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSyncState.CRDState reposync_crd = 6; + * @param int $var + * @return $this + */ + public function setReposyncCrd($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSyncState\CRDState::class); + $this->reposync_crd = $var; + + return $this; + } + + /** + * The state of CS + * This field summarizes the other fields in this message. + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSyncState.State state = 7; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The state of CS + * This field summarizes the other fields in this message. + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSyncState.State state = 7; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSyncState\State::class); + $this->state = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncState/CRDState.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncState/CRDState.php new file mode 100644 index 000000000000..2876176a286e --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncState/CRDState.php @@ -0,0 +1,78 @@ +google.cloud.gkehub.configmanagement.v1.ConfigSyncState.CRDState + */ +class CRDState +{ + /** + * CRD's state cannot be determined + * + * Generated from protobuf enum CRD_STATE_UNSPECIFIED = 0; + */ + const CRD_STATE_UNSPECIFIED = 0; + /** + * CRD is not installed + * + * Generated from protobuf enum NOT_INSTALLED = 1; + */ + const NOT_INSTALLED = 1; + /** + * CRD is installed + * + * Generated from protobuf enum INSTALLED = 2; + */ + const INSTALLED = 2; + /** + * CRD is terminating (i.e., it has been deleted and is cleaning up) + * + * Generated from protobuf enum TERMINATING = 3; + */ + const TERMINATING = 3; + /** + * CRD is installing + * + * Generated from protobuf enum INSTALLING = 4; + */ + const INSTALLING = 4; + + private static $valueToName = [ + self::CRD_STATE_UNSPECIFIED => 'CRD_STATE_UNSPECIFIED', + self::NOT_INSTALLED => 'NOT_INSTALLED', + self::INSTALLED => 'INSTALLED', + self::TERMINATING => 'TERMINATING', + self::INSTALLING => 'INSTALLING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CRDState::class, \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSyncState_CRDState::class); + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncState/State.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncState/State.php new file mode 100644 index 000000000000..090be33ad0df --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncState/State.php @@ -0,0 +1,76 @@ +google.cloud.gkehub.configmanagement.v1.ConfigSyncState.State + */ +class State +{ + /** + * CS's state cannot be determined. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * CS is not installed. + * + * Generated from protobuf enum CONFIG_SYNC_NOT_INSTALLED = 1; + */ + const CONFIG_SYNC_NOT_INSTALLED = 1; + /** + * The expected CS version is installed successfully. + * + * Generated from protobuf enum CONFIG_SYNC_INSTALLED = 2; + */ + const CONFIG_SYNC_INSTALLED = 2; + /** + * CS encounters errors. + * + * Generated from protobuf enum CONFIG_SYNC_ERROR = 3; + */ + const CONFIG_SYNC_ERROR = 3; + /** + * CS is installing or terminating. + * + * Generated from protobuf enum CONFIG_SYNC_PENDING = 4; + */ + const CONFIG_SYNC_PENDING = 4; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CONFIG_SYNC_NOT_INSTALLED => 'CONFIG_SYNC_NOT_INSTALLED', + self::CONFIG_SYNC_INSTALLED => 'CONFIG_SYNC_INSTALLED', + self::CONFIG_SYNC_ERROR => 'CONFIG_SYNC_ERROR', + self::CONFIG_SYNC_PENDING => 'CONFIG_SYNC_PENDING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSyncState_State::class); + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncVersion.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncVersion.php new file mode 100644 index 000000000000..b89d0a14f997 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncVersion.php @@ -0,0 +1,271 @@ +google.cloud.gkehub.configmanagement.v1.ConfigSyncVersion + */ +class ConfigSyncVersion extends \Google\Protobuf\Internal\Message +{ + /** + * Version of the deployed importer pod + * + * Generated from protobuf field string importer = 1; + */ + protected $importer = ''; + /** + * Version of the deployed syncer pod + * + * Generated from protobuf field string syncer = 2; + */ + protected $syncer = ''; + /** + * Version of the deployed git-sync pod + * + * Generated from protobuf field string git_sync = 3; + */ + protected $git_sync = ''; + /** + * Version of the deployed monitor pod + * + * Generated from protobuf field string monitor = 4; + */ + protected $monitor = ''; + /** + * Version of the deployed reconciler-manager pod + * + * Generated from protobuf field string reconciler_manager = 5; + */ + protected $reconciler_manager = ''; + /** + * Version of the deployed reconciler container in root-reconciler pod + * + * Generated from protobuf field string root_reconciler = 6; + */ + protected $root_reconciler = ''; + /** + * Version of the deployed admission_webhook pod + * + * Generated from protobuf field string admission_webhook = 7; + */ + protected $admission_webhook = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $importer + * Version of the deployed importer pod + * @type string $syncer + * Version of the deployed syncer pod + * @type string $git_sync + * Version of the deployed git-sync pod + * @type string $monitor + * Version of the deployed monitor pod + * @type string $reconciler_manager + * Version of the deployed reconciler-manager pod + * @type string $root_reconciler + * Version of the deployed reconciler container in root-reconciler pod + * @type string $admission_webhook + * Version of the deployed admission_webhook pod + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); + parent::__construct($data); + } + + /** + * Version of the deployed importer pod + * + * Generated from protobuf field string importer = 1; + * @return string + */ + public function getImporter() + { + return $this->importer; + } + + /** + * Version of the deployed importer pod + * + * Generated from protobuf field string importer = 1; + * @param string $var + * @return $this + */ + public function setImporter($var) + { + GPBUtil::checkString($var, True); + $this->importer = $var; + + return $this; + } + + /** + * Version of the deployed syncer pod + * + * Generated from protobuf field string syncer = 2; + * @return string + */ + public function getSyncer() + { + return $this->syncer; + } + + /** + * Version of the deployed syncer pod + * + * Generated from protobuf field string syncer = 2; + * @param string $var + * @return $this + */ + public function setSyncer($var) + { + GPBUtil::checkString($var, True); + $this->syncer = $var; + + return $this; + } + + /** + * Version of the deployed git-sync pod + * + * Generated from protobuf field string git_sync = 3; + * @return string + */ + public function getGitSync() + { + return $this->git_sync; + } + + /** + * Version of the deployed git-sync pod + * + * Generated from protobuf field string git_sync = 3; + * @param string $var + * @return $this + */ + public function setGitSync($var) + { + GPBUtil::checkString($var, True); + $this->git_sync = $var; + + return $this; + } + + /** + * Version of the deployed monitor pod + * + * Generated from protobuf field string monitor = 4; + * @return string + */ + public function getMonitor() + { + return $this->monitor; + } + + /** + * Version of the deployed monitor pod + * + * Generated from protobuf field string monitor = 4; + * @param string $var + * @return $this + */ + public function setMonitor($var) + { + GPBUtil::checkString($var, True); + $this->monitor = $var; + + return $this; + } + + /** + * Version of the deployed reconciler-manager pod + * + * Generated from protobuf field string reconciler_manager = 5; + * @return string + */ + public function getReconcilerManager() + { + return $this->reconciler_manager; + } + + /** + * Version of the deployed reconciler-manager pod + * + * Generated from protobuf field string reconciler_manager = 5; + * @param string $var + * @return $this + */ + public function setReconcilerManager($var) + { + GPBUtil::checkString($var, True); + $this->reconciler_manager = $var; + + return $this; + } + + /** + * Version of the deployed reconciler container in root-reconciler pod + * + * Generated from protobuf field string root_reconciler = 6; + * @return string + */ + public function getRootReconciler() + { + return $this->root_reconciler; + } + + /** + * Version of the deployed reconciler container in root-reconciler pod + * + * Generated from protobuf field string root_reconciler = 6; + * @param string $var + * @return $this + */ + public function setRootReconciler($var) + { + GPBUtil::checkString($var, True); + $this->root_reconciler = $var; + + return $this; + } + + /** + * Version of the deployed admission_webhook pod + * + * Generated from protobuf field string admission_webhook = 7; + * @return string + */ + public function getAdmissionWebhook() + { + return $this->admission_webhook; + } + + /** + * Version of the deployed admission_webhook pod + * + * Generated from protobuf field string admission_webhook = 7; + * @param string $var + * @return $this + */ + public function setAdmissionWebhook($var) + { + GPBUtil::checkString($var, True); + $this->admission_webhook = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/DeploymentState.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/DeploymentState.php new file mode 100644 index 000000000000..802546aeafdd --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/DeploymentState.php @@ -0,0 +1,75 @@ +google.cloud.gkehub.configmanagement.v1.DeploymentState + */ +class DeploymentState +{ + /** + * Deployment's state cannot be determined + * + * Generated from protobuf enum DEPLOYMENT_STATE_UNSPECIFIED = 0; + */ + const DEPLOYMENT_STATE_UNSPECIFIED = 0; + /** + * Deployment is not installed + * + * Generated from protobuf enum NOT_INSTALLED = 1; + */ + const NOT_INSTALLED = 1; + /** + * Deployment is installed + * + * Generated from protobuf enum INSTALLED = 2; + */ + const INSTALLED = 2; + /** + * Deployment was attempted to be installed, but has errors + * + * Generated from protobuf enum ERROR = 3; + */ + const ERROR = 3; + /** + * Deployment is installing or terminating + * + * Generated from protobuf enum PENDING = 4; + */ + const PENDING = 4; + + private static $valueToName = [ + self::DEPLOYMENT_STATE_UNSPECIFIED => 'DEPLOYMENT_STATE_UNSPECIFIED', + self::NOT_INSTALLED => 'NOT_INSTALLED', + self::INSTALLED => 'INSTALLED', + self::ERROR => 'ERROR', + self::PENDING => 'PENDING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ErrorResource.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ErrorResource.php new file mode 100644 index 000000000000..2eccf955ae58 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ErrorResource.php @@ -0,0 +1,179 @@ +google.cloud.gkehub.configmanagement.v1.ErrorResource + */ +class ErrorResource extends \Google\Protobuf\Internal\Message +{ + /** + * Path in the git repo of the erroneous config + * + * Generated from protobuf field string source_path = 1; + */ + protected $source_path = ''; + /** + * Metadata name of the resource that is causing an error + * + * Generated from protobuf field string resource_name = 2; + */ + protected $resource_name = ''; + /** + * Namespace of the resource that is causing an error + * + * Generated from protobuf field string resource_namespace = 3; + */ + protected $resource_namespace = ''; + /** + * Group/version/kind of the resource that is causing an error + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.GroupVersionKind resource_gvk = 4; + */ + protected $resource_gvk = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $source_path + * Path in the git repo of the erroneous config + * @type string $resource_name + * Metadata name of the resource that is causing an error + * @type string $resource_namespace + * Namespace of the resource that is causing an error + * @type \Google\Cloud\GkeHub\ConfigManagement\V1\GroupVersionKind $resource_gvk + * Group/version/kind of the resource that is causing an error + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); + parent::__construct($data); + } + + /** + * Path in the git repo of the erroneous config + * + * Generated from protobuf field string source_path = 1; + * @return string + */ + public function getSourcePath() + { + return $this->source_path; + } + + /** + * Path in the git repo of the erroneous config + * + * Generated from protobuf field string source_path = 1; + * @param string $var + * @return $this + */ + public function setSourcePath($var) + { + GPBUtil::checkString($var, True); + $this->source_path = $var; + + return $this; + } + + /** + * Metadata name of the resource that is causing an error + * + * Generated from protobuf field string resource_name = 2; + * @return string + */ + public function getResourceName() + { + return $this->resource_name; + } + + /** + * Metadata name of the resource that is causing an error + * + * Generated from protobuf field string resource_name = 2; + * @param string $var + * @return $this + */ + public function setResourceName($var) + { + GPBUtil::checkString($var, True); + $this->resource_name = $var; + + return $this; + } + + /** + * Namespace of the resource that is causing an error + * + * Generated from protobuf field string resource_namespace = 3; + * @return string + */ + public function getResourceNamespace() + { + return $this->resource_namespace; + } + + /** + * Namespace of the resource that is causing an error + * + * Generated from protobuf field string resource_namespace = 3; + * @param string $var + * @return $this + */ + public function setResourceNamespace($var) + { + GPBUtil::checkString($var, True); + $this->resource_namespace = $var; + + return $this; + } + + /** + * Group/version/kind of the resource that is causing an error + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.GroupVersionKind resource_gvk = 4; + * @return \Google\Cloud\GkeHub\ConfigManagement\V1\GroupVersionKind|null + */ + public function getResourceGvk() + { + return $this->resource_gvk; + } + + public function hasResourceGvk() + { + return isset($this->resource_gvk); + } + + public function clearResourceGvk() + { + unset($this->resource_gvk); + } + + /** + * Group/version/kind of the resource that is causing an error + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.GroupVersionKind resource_gvk = 4; + * @param \Google\Cloud\GkeHub\ConfigManagement\V1\GroupVersionKind $var + * @return $this + */ + public function setResourceGvk($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\ConfigManagement\V1\GroupVersionKind::class); + $this->resource_gvk = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/GatekeeperDeploymentState.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/GatekeeperDeploymentState.php new file mode 100644 index 000000000000..711ded4041be --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/GatekeeperDeploymentState.php @@ -0,0 +1,101 @@ +google.cloud.gkehub.configmanagement.v1.GatekeeperDeploymentState + */ +class GatekeeperDeploymentState extends \Google\Protobuf\Internal\Message +{ + /** + * Status of gatekeeper-controller-manager pod. + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState gatekeeper_controller_manager_state = 1; + */ + protected $gatekeeper_controller_manager_state = 0; + /** + * Status of gatekeeper-audit deployment. + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState gatekeeper_audit = 2; + */ + protected $gatekeeper_audit = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $gatekeeper_controller_manager_state + * Status of gatekeeper-controller-manager pod. + * @type int $gatekeeper_audit + * Status of gatekeeper-audit deployment. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); + parent::__construct($data); + } + + /** + * Status of gatekeeper-controller-manager pod. + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState gatekeeper_controller_manager_state = 1; + * @return int + */ + public function getGatekeeperControllerManagerState() + { + return $this->gatekeeper_controller_manager_state; + } + + /** + * Status of gatekeeper-controller-manager pod. + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState gatekeeper_controller_manager_state = 1; + * @param int $var + * @return $this + */ + public function setGatekeeperControllerManagerState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\ConfigManagement\V1\DeploymentState::class); + $this->gatekeeper_controller_manager_state = $var; + + return $this; + } + + /** + * Status of gatekeeper-audit deployment. + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState gatekeeper_audit = 2; + * @return int + */ + public function getGatekeeperAudit() + { + return $this->gatekeeper_audit; + } + + /** + * Status of gatekeeper-audit deployment. + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState gatekeeper_audit = 2; + * @param int $var + * @return $this + */ + public function setGatekeeperAudit($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\ConfigManagement\V1\DeploymentState::class); + $this->gatekeeper_audit = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/GitConfig.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/GitConfig.php new file mode 100644 index 000000000000..e31ce65e990b --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/GitConfig.php @@ -0,0 +1,321 @@ +google.cloud.gkehub.configmanagement.v1.GitConfig + */ +class GitConfig extends \Google\Protobuf\Internal\Message +{ + /** + * The URL of the Git repository to use as the source of truth. + * + * Generated from protobuf field string sync_repo = 1; + */ + protected $sync_repo = ''; + /** + * The branch of the repository to sync from. Default: master. + * + * Generated from protobuf field string sync_branch = 2; + */ + protected $sync_branch = ''; + /** + * The path within the Git repository that represents the top level of the + * repo to sync. Default: the root directory of the repository. + * + * Generated from protobuf field string policy_dir = 3; + */ + protected $policy_dir = ''; + /** + * Period in seconds between consecutive syncs. Default: 15. + * + * Generated from protobuf field int64 sync_wait_secs = 4; + */ + protected $sync_wait_secs = 0; + /** + * Git revision (tag or hash) to check out. Default HEAD. + * + * Generated from protobuf field string sync_rev = 5; + */ + protected $sync_rev = ''; + /** + * Type of secret configured for access to the Git repo. Must be one of ssh, + * cookiefile, gcenode, token, gcpserviceaccount or none. The + * validation of this is case-sensitive. Required. + * + * Generated from protobuf field string secret_type = 6; + */ + protected $secret_type = ''; + /** + * URL for the HTTPS proxy to be used when communicating with the Git repo. + * + * Generated from protobuf field string https_proxy = 7; + */ + protected $https_proxy = ''; + /** + * The Google Cloud Service Account Email used for auth when secret_type is + * gcpServiceAccount. + * + * Generated from protobuf field string gcp_service_account_email = 8; + */ + protected $gcp_service_account_email = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $sync_repo + * The URL of the Git repository to use as the source of truth. + * @type string $sync_branch + * The branch of the repository to sync from. Default: master. + * @type string $policy_dir + * The path within the Git repository that represents the top level of the + * repo to sync. Default: the root directory of the repository. + * @type int|string $sync_wait_secs + * Period in seconds between consecutive syncs. Default: 15. + * @type string $sync_rev + * Git revision (tag or hash) to check out. Default HEAD. + * @type string $secret_type + * Type of secret configured for access to the Git repo. Must be one of ssh, + * cookiefile, gcenode, token, gcpserviceaccount or none. The + * validation of this is case-sensitive. Required. + * @type string $https_proxy + * URL for the HTTPS proxy to be used when communicating with the Git repo. + * @type string $gcp_service_account_email + * The Google Cloud Service Account Email used for auth when secret_type is + * gcpServiceAccount. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); + parent::__construct($data); + } + + /** + * The URL of the Git repository to use as the source of truth. + * + * Generated from protobuf field string sync_repo = 1; + * @return string + */ + public function getSyncRepo() + { + return $this->sync_repo; + } + + /** + * The URL of the Git repository to use as the source of truth. + * + * Generated from protobuf field string sync_repo = 1; + * @param string $var + * @return $this + */ + public function setSyncRepo($var) + { + GPBUtil::checkString($var, True); + $this->sync_repo = $var; + + return $this; + } + + /** + * The branch of the repository to sync from. Default: master. + * + * Generated from protobuf field string sync_branch = 2; + * @return string + */ + public function getSyncBranch() + { + return $this->sync_branch; + } + + /** + * The branch of the repository to sync from. Default: master. + * + * Generated from protobuf field string sync_branch = 2; + * @param string $var + * @return $this + */ + public function setSyncBranch($var) + { + GPBUtil::checkString($var, True); + $this->sync_branch = $var; + + return $this; + } + + /** + * The path within the Git repository that represents the top level of the + * repo to sync. Default: the root directory of the repository. + * + * Generated from protobuf field string policy_dir = 3; + * @return string + */ + public function getPolicyDir() + { + return $this->policy_dir; + } + + /** + * The path within the Git repository that represents the top level of the + * repo to sync. Default: the root directory of the repository. + * + * Generated from protobuf field string policy_dir = 3; + * @param string $var + * @return $this + */ + public function setPolicyDir($var) + { + GPBUtil::checkString($var, True); + $this->policy_dir = $var; + + return $this; + } + + /** + * Period in seconds between consecutive syncs. Default: 15. + * + * Generated from protobuf field int64 sync_wait_secs = 4; + * @return int|string + */ + public function getSyncWaitSecs() + { + return $this->sync_wait_secs; + } + + /** + * Period in seconds between consecutive syncs. Default: 15. + * + * Generated from protobuf field int64 sync_wait_secs = 4; + * @param int|string $var + * @return $this + */ + public function setSyncWaitSecs($var) + { + GPBUtil::checkInt64($var); + $this->sync_wait_secs = $var; + + return $this; + } + + /** + * Git revision (tag or hash) to check out. Default HEAD. + * + * Generated from protobuf field string sync_rev = 5; + * @return string + */ + public function getSyncRev() + { + return $this->sync_rev; + } + + /** + * Git revision (tag or hash) to check out. Default HEAD. + * + * Generated from protobuf field string sync_rev = 5; + * @param string $var + * @return $this + */ + public function setSyncRev($var) + { + GPBUtil::checkString($var, True); + $this->sync_rev = $var; + + return $this; + } + + /** + * Type of secret configured for access to the Git repo. Must be one of ssh, + * cookiefile, gcenode, token, gcpserviceaccount or none. The + * validation of this is case-sensitive. Required. + * + * Generated from protobuf field string secret_type = 6; + * @return string + */ + public function getSecretType() + { + return $this->secret_type; + } + + /** + * Type of secret configured for access to the Git repo. Must be one of ssh, + * cookiefile, gcenode, token, gcpserviceaccount or none. The + * validation of this is case-sensitive. Required. + * + * Generated from protobuf field string secret_type = 6; + * @param string $var + * @return $this + */ + public function setSecretType($var) + { + GPBUtil::checkString($var, True); + $this->secret_type = $var; + + return $this; + } + + /** + * URL for the HTTPS proxy to be used when communicating with the Git repo. + * + * Generated from protobuf field string https_proxy = 7; + * @return string + */ + public function getHttpsProxy() + { + return $this->https_proxy; + } + + /** + * URL for the HTTPS proxy to be used when communicating with the Git repo. + * + * Generated from protobuf field string https_proxy = 7; + * @param string $var + * @return $this + */ + public function setHttpsProxy($var) + { + GPBUtil::checkString($var, True); + $this->https_proxy = $var; + + return $this; + } + + /** + * The Google Cloud Service Account Email used for auth when secret_type is + * gcpServiceAccount. + * + * Generated from protobuf field string gcp_service_account_email = 8; + * @return string + */ + public function getGcpServiceAccountEmail() + { + return $this->gcp_service_account_email; + } + + /** + * The Google Cloud Service Account Email used for auth when secret_type is + * gcpServiceAccount. + * + * Generated from protobuf field string gcp_service_account_email = 8; + * @param string $var + * @return $this + */ + public function setGcpServiceAccountEmail($var) + { + GPBUtil::checkString($var, True); + $this->gcp_service_account_email = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/GroupVersionKind.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/GroupVersionKind.php new file mode 100644 index 000000000000..bea54d39e71d --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/GroupVersionKind.php @@ -0,0 +1,135 @@ +google.cloud.gkehub.configmanagement.v1.GroupVersionKind + */ +class GroupVersionKind extends \Google\Protobuf\Internal\Message +{ + /** + * Kubernetes Group + * + * Generated from protobuf field string group = 1; + */ + protected $group = ''; + /** + * Kubernetes Version + * + * Generated from protobuf field string version = 2; + */ + protected $version = ''; + /** + * Kubernetes Kind + * + * Generated from protobuf field string kind = 3; + */ + protected $kind = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $group + * Kubernetes Group + * @type string $version + * Kubernetes Version + * @type string $kind + * Kubernetes Kind + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); + parent::__construct($data); + } + + /** + * Kubernetes Group + * + * Generated from protobuf field string group = 1; + * @return string + */ + public function getGroup() + { + return $this->group; + } + + /** + * Kubernetes Group + * + * Generated from protobuf field string group = 1; + * @param string $var + * @return $this + */ + public function setGroup($var) + { + GPBUtil::checkString($var, True); + $this->group = $var; + + return $this; + } + + /** + * Kubernetes Version + * + * Generated from protobuf field string version = 2; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Kubernetes Version + * + * Generated from protobuf field string version = 2; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + + /** + * Kubernetes Kind + * + * Generated from protobuf field string kind = 3; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * Kubernetes Kind + * + * Generated from protobuf field string kind = 3; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/HierarchyControllerConfig.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/HierarchyControllerConfig.php new file mode 100644 index 000000000000..0f5c352c5b10 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/HierarchyControllerConfig.php @@ -0,0 +1,135 @@ +google.cloud.gkehub.configmanagement.v1.HierarchyControllerConfig + */ +class HierarchyControllerConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Whether Hierarchy Controller is enabled in this cluster. + * + * Generated from protobuf field bool enabled = 1; + */ + protected $enabled = false; + /** + * Whether pod tree labels are enabled in this cluster. + * + * Generated from protobuf field bool enable_pod_tree_labels = 2; + */ + protected $enable_pod_tree_labels = false; + /** + * Whether hierarchical resource quota is enabled in this cluster. + * + * Generated from protobuf field bool enable_hierarchical_resource_quota = 3; + */ + protected $enable_hierarchical_resource_quota = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $enabled + * Whether Hierarchy Controller is enabled in this cluster. + * @type bool $enable_pod_tree_labels + * Whether pod tree labels are enabled in this cluster. + * @type bool $enable_hierarchical_resource_quota + * Whether hierarchical resource quota is enabled in this cluster. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); + parent::__construct($data); + } + + /** + * Whether Hierarchy Controller is enabled in this cluster. + * + * Generated from protobuf field bool enabled = 1; + * @return bool + */ + public function getEnabled() + { + return $this->enabled; + } + + /** + * Whether Hierarchy Controller is enabled in this cluster. + * + * Generated from protobuf field bool enabled = 1; + * @param bool $var + * @return $this + */ + public function setEnabled($var) + { + GPBUtil::checkBool($var); + $this->enabled = $var; + + return $this; + } + + /** + * Whether pod tree labels are enabled in this cluster. + * + * Generated from protobuf field bool enable_pod_tree_labels = 2; + * @return bool + */ + public function getEnablePodTreeLabels() + { + return $this->enable_pod_tree_labels; + } + + /** + * Whether pod tree labels are enabled in this cluster. + * + * Generated from protobuf field bool enable_pod_tree_labels = 2; + * @param bool $var + * @return $this + */ + public function setEnablePodTreeLabels($var) + { + GPBUtil::checkBool($var); + $this->enable_pod_tree_labels = $var; + + return $this; + } + + /** + * Whether hierarchical resource quota is enabled in this cluster. + * + * Generated from protobuf field bool enable_hierarchical_resource_quota = 3; + * @return bool + */ + public function getEnableHierarchicalResourceQuota() + { + return $this->enable_hierarchical_resource_quota; + } + + /** + * Whether hierarchical resource quota is enabled in this cluster. + * + * Generated from protobuf field bool enable_hierarchical_resource_quota = 3; + * @param bool $var + * @return $this + */ + public function setEnableHierarchicalResourceQuota($var) + { + GPBUtil::checkBool($var); + $this->enable_hierarchical_resource_quota = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/HierarchyControllerDeploymentState.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/HierarchyControllerDeploymentState.php new file mode 100644 index 000000000000..d348a6ff5617 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/HierarchyControllerDeploymentState.php @@ -0,0 +1,101 @@ +google.cloud.gkehub.configmanagement.v1.HierarchyControllerDeploymentState + */ +class HierarchyControllerDeploymentState extends \Google\Protobuf\Internal\Message +{ + /** + * The deployment state for open source HNC (e.g. v0.7.0-hc.0) + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState hnc = 1; + */ + protected $hnc = 0; + /** + * The deployment state for Hierarchy Controller extension (e.g. v0.7.0-hc.1) + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState extension = 2; + */ + protected $extension = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $hnc + * The deployment state for open source HNC (e.g. v0.7.0-hc.0) + * @type int $extension + * The deployment state for Hierarchy Controller extension (e.g. v0.7.0-hc.1) + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); + parent::__construct($data); + } + + /** + * The deployment state for open source HNC (e.g. v0.7.0-hc.0) + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState hnc = 1; + * @return int + */ + public function getHnc() + { + return $this->hnc; + } + + /** + * The deployment state for open source HNC (e.g. v0.7.0-hc.0) + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState hnc = 1; + * @param int $var + * @return $this + */ + public function setHnc($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\ConfigManagement\V1\DeploymentState::class); + $this->hnc = $var; + + return $this; + } + + /** + * The deployment state for Hierarchy Controller extension (e.g. v0.7.0-hc.1) + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState extension = 2; + * @return int + */ + public function getExtension() + { + return $this->extension; + } + + /** + * The deployment state for Hierarchy Controller extension (e.g. v0.7.0-hc.1) + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState extension = 2; + * @param int $var + * @return $this + */ + public function setExtension($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\ConfigManagement\V1\DeploymentState::class); + $this->extension = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/HierarchyControllerState.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/HierarchyControllerState.php new file mode 100644 index 000000000000..0fa804532730 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/HierarchyControllerState.php @@ -0,0 +1,121 @@ +google.cloud.gkehub.configmanagement.v1.HierarchyControllerState + */ +class HierarchyControllerState extends \Google\Protobuf\Internal\Message +{ + /** + * The version for Hierarchy Controller + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.HierarchyControllerVersion version = 1; + */ + protected $version = null; + /** + * The deployment state for Hierarchy Controller + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.HierarchyControllerDeploymentState state = 2; + */ + protected $state = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\GkeHub\ConfigManagement\V1\HierarchyControllerVersion $version + * The version for Hierarchy Controller + * @type \Google\Cloud\GkeHub\ConfigManagement\V1\HierarchyControllerDeploymentState $state + * The deployment state for Hierarchy Controller + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); + parent::__construct($data); + } + + /** + * The version for Hierarchy Controller + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.HierarchyControllerVersion version = 1; + * @return \Google\Cloud\GkeHub\ConfigManagement\V1\HierarchyControllerVersion|null + */ + public function getVersion() + { + return $this->version; + } + + public function hasVersion() + { + return isset($this->version); + } + + public function clearVersion() + { + unset($this->version); + } + + /** + * The version for Hierarchy Controller + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.HierarchyControllerVersion version = 1; + * @param \Google\Cloud\GkeHub\ConfigManagement\V1\HierarchyControllerVersion $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\ConfigManagement\V1\HierarchyControllerVersion::class); + $this->version = $var; + + return $this; + } + + /** + * The deployment state for Hierarchy Controller + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.HierarchyControllerDeploymentState state = 2; + * @return \Google\Cloud\GkeHub\ConfigManagement\V1\HierarchyControllerDeploymentState|null + */ + public function getState() + { + return $this->state; + } + + public function hasState() + { + return isset($this->state); + } + + public function clearState() + { + unset($this->state); + } + + /** + * The deployment state for Hierarchy Controller + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.HierarchyControllerDeploymentState state = 2; + * @param \Google\Cloud\GkeHub\ConfigManagement\V1\HierarchyControllerDeploymentState $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\ConfigManagement\V1\HierarchyControllerDeploymentState::class); + $this->state = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/HierarchyControllerVersion.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/HierarchyControllerVersion.php new file mode 100644 index 000000000000..7a29821ab300 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/HierarchyControllerVersion.php @@ -0,0 +1,101 @@ +google.cloud.gkehub.configmanagement.v1.HierarchyControllerVersion + */ +class HierarchyControllerVersion extends \Google\Protobuf\Internal\Message +{ + /** + * Version for open source HNC + * + * Generated from protobuf field string hnc = 1; + */ + protected $hnc = ''; + /** + * Version for Hierarchy Controller extension + * + * Generated from protobuf field string extension = 2; + */ + protected $extension = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $hnc + * Version for open source HNC + * @type string $extension + * Version for Hierarchy Controller extension + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); + parent::__construct($data); + } + + /** + * Version for open source HNC + * + * Generated from protobuf field string hnc = 1; + * @return string + */ + public function getHnc() + { + return $this->hnc; + } + + /** + * Version for open source HNC + * + * Generated from protobuf field string hnc = 1; + * @param string $var + * @return $this + */ + public function setHnc($var) + { + GPBUtil::checkString($var, True); + $this->hnc = $var; + + return $this; + } + + /** + * Version for Hierarchy Controller extension + * + * Generated from protobuf field string extension = 2; + * @return string + */ + public function getExtension() + { + return $this->extension; + } + + /** + * Version for Hierarchy Controller extension + * + * Generated from protobuf field string extension = 2; + * @param string $var + * @return $this + */ + public function setExtension($var) + { + GPBUtil::checkString($var, True); + $this->extension = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/InstallError.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/InstallError.php new file mode 100644 index 000000000000..5616df50e468 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/InstallError.php @@ -0,0 +1,67 @@ +google.cloud.gkehub.configmanagement.v1.InstallError + */ +class InstallError extends \Google\Protobuf\Internal\Message +{ + /** + * A string representing the user facing error message + * + * Generated from protobuf field string error_message = 1; + */ + protected $error_message = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $error_message + * A string representing the user facing error message + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); + parent::__construct($data); + } + + /** + * A string representing the user facing error message + * + * Generated from protobuf field string error_message = 1; + * @return string + */ + public function getErrorMessage() + { + return $this->error_message; + } + + /** + * A string representing the user facing error message + * + * Generated from protobuf field string error_message = 1; + * @param string $var + * @return $this + */ + public function setErrorMessage($var) + { + GPBUtil::checkString($var, True); + $this->error_message = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/MembershipSpec.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/MembershipSpec.php new file mode 100644 index 000000000000..e785153b26a9 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/MembershipSpec.php @@ -0,0 +1,292 @@ +google.cloud.gkehub.configmanagement.v1.MembershipSpec + */ +class MembershipSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Config Sync configuration for the cluster. + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSync config_sync = 1; + */ + protected $config_sync = null; + /** + * Policy Controller configuration for the cluster. + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.PolicyController policy_controller = 2; + */ + protected $policy_controller = null; + /** + * Hierarchy Controller configuration for the cluster. + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.HierarchyControllerConfig hierarchy_controller = 4; + */ + protected $hierarchy_controller = null; + /** + * Version of ACM installed. + * + * Generated from protobuf field string version = 10; + */ + protected $version = ''; + /** + * The user-specified cluster name used by Config Sync cluster-name-selector + * annotation or ClusterSelector, for applying configs to only a subset + * of clusters. + * Omit this field if the cluster's fleet membership name is used by Config + * Sync cluster-name-selector annotation or ClusterSelector. + * Set this field if a name different from the cluster's fleet membership name + * is used by Config Sync cluster-name-selector annotation or ClusterSelector. + * + * Generated from protobuf field string cluster = 11; + */ + protected $cluster = ''; + /** + * Enables automatic Feature management. + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.MembershipSpec.Management management = 12; + */ + protected $management = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSync $config_sync + * Config Sync configuration for the cluster. + * @type \Google\Cloud\GkeHub\ConfigManagement\V1\PolicyController $policy_controller + * Policy Controller configuration for the cluster. + * @type \Google\Cloud\GkeHub\ConfigManagement\V1\HierarchyControllerConfig $hierarchy_controller + * Hierarchy Controller configuration for the cluster. + * @type string $version + * Version of ACM installed. + * @type string $cluster + * The user-specified cluster name used by Config Sync cluster-name-selector + * annotation or ClusterSelector, for applying configs to only a subset + * of clusters. + * Omit this field if the cluster's fleet membership name is used by Config + * Sync cluster-name-selector annotation or ClusterSelector. + * Set this field if a name different from the cluster's fleet membership name + * is used by Config Sync cluster-name-selector annotation or ClusterSelector. + * @type int $management + * Enables automatic Feature management. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); + parent::__construct($data); + } + + /** + * Config Sync configuration for the cluster. + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSync config_sync = 1; + * @return \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSync|null + */ + public function getConfigSync() + { + return $this->config_sync; + } + + public function hasConfigSync() + { + return isset($this->config_sync); + } + + public function clearConfigSync() + { + unset($this->config_sync); + } + + /** + * Config Sync configuration for the cluster. + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSync config_sync = 1; + * @param \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSync $var + * @return $this + */ + public function setConfigSync($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSync::class); + $this->config_sync = $var; + + return $this; + } + + /** + * Policy Controller configuration for the cluster. + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.PolicyController policy_controller = 2; + * @return \Google\Cloud\GkeHub\ConfigManagement\V1\PolicyController|null + */ + public function getPolicyController() + { + return $this->policy_controller; + } + + public function hasPolicyController() + { + return isset($this->policy_controller); + } + + public function clearPolicyController() + { + unset($this->policy_controller); + } + + /** + * Policy Controller configuration for the cluster. + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.PolicyController policy_controller = 2; + * @param \Google\Cloud\GkeHub\ConfigManagement\V1\PolicyController $var + * @return $this + */ + public function setPolicyController($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\ConfigManagement\V1\PolicyController::class); + $this->policy_controller = $var; + + return $this; + } + + /** + * Hierarchy Controller configuration for the cluster. + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.HierarchyControllerConfig hierarchy_controller = 4; + * @return \Google\Cloud\GkeHub\ConfigManagement\V1\HierarchyControllerConfig|null + */ + public function getHierarchyController() + { + return $this->hierarchy_controller; + } + + public function hasHierarchyController() + { + return isset($this->hierarchy_controller); + } + + public function clearHierarchyController() + { + unset($this->hierarchy_controller); + } + + /** + * Hierarchy Controller configuration for the cluster. + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.HierarchyControllerConfig hierarchy_controller = 4; + * @param \Google\Cloud\GkeHub\ConfigManagement\V1\HierarchyControllerConfig $var + * @return $this + */ + public function setHierarchyController($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\ConfigManagement\V1\HierarchyControllerConfig::class); + $this->hierarchy_controller = $var; + + return $this; + } + + /** + * Version of ACM installed. + * + * Generated from protobuf field string version = 10; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Version of ACM installed. + * + * Generated from protobuf field string version = 10; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + + /** + * The user-specified cluster name used by Config Sync cluster-name-selector + * annotation or ClusterSelector, for applying configs to only a subset + * of clusters. + * Omit this field if the cluster's fleet membership name is used by Config + * Sync cluster-name-selector annotation or ClusterSelector. + * Set this field if a name different from the cluster's fleet membership name + * is used by Config Sync cluster-name-selector annotation or ClusterSelector. + * + * Generated from protobuf field string cluster = 11; + * @return string + */ + public function getCluster() + { + return $this->cluster; + } + + /** + * The user-specified cluster name used by Config Sync cluster-name-selector + * annotation or ClusterSelector, for applying configs to only a subset + * of clusters. + * Omit this field if the cluster's fleet membership name is used by Config + * Sync cluster-name-selector annotation or ClusterSelector. + * Set this field if a name different from the cluster's fleet membership name + * is used by Config Sync cluster-name-selector annotation or ClusterSelector. + * + * Generated from protobuf field string cluster = 11; + * @param string $var + * @return $this + */ + public function setCluster($var) + { + GPBUtil::checkString($var, True); + $this->cluster = $var; + + return $this; + } + + /** + * Enables automatic Feature management. + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.MembershipSpec.Management management = 12; + * @return int + */ + public function getManagement() + { + return $this->management; + } + + /** + * Enables automatic Feature management. + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.MembershipSpec.Management management = 12; + * @param int $var + * @return $this + */ + public function setManagement($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\ConfigManagement\V1\MembershipSpec\Management::class); + $this->management = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/MembershipSpec/Management.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/MembershipSpec/Management.php new file mode 100644 index 000000000000..a7e4823ee480 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/MembershipSpec/Management.php @@ -0,0 +1,64 @@ +google.cloud.gkehub.configmanagement.v1.MembershipSpec.Management + */ +class Management +{ + /** + * Unspecified + * + * Generated from protobuf enum MANAGEMENT_UNSPECIFIED = 0; + */ + const MANAGEMENT_UNSPECIFIED = 0; + /** + * Google will manage the Feature for the cluster. + * + * Generated from protobuf enum MANAGEMENT_AUTOMATIC = 1; + */ + const MANAGEMENT_AUTOMATIC = 1; + /** + * User will manually manage the Feature for the cluster. + * + * Generated from protobuf enum MANAGEMENT_MANUAL = 2; + */ + const MANAGEMENT_MANUAL = 2; + + private static $valueToName = [ + self::MANAGEMENT_UNSPECIFIED => 'MANAGEMENT_UNSPECIFIED', + self::MANAGEMENT_AUTOMATIC => 'MANAGEMENT_AUTOMATIC', + self::MANAGEMENT_MANUAL => 'MANAGEMENT_MANUAL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Management::class, \Google\Cloud\GkeHub\ConfigManagement\V1\MembershipSpec_Management::class); + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/MembershipState.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/MembershipState.php new file mode 100644 index 000000000000..f9539fae394b --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/MembershipState.php @@ -0,0 +1,299 @@ +google.cloud.gkehub.configmanagement.v1.MembershipState + */ +class MembershipState extends \Google\Protobuf\Internal\Message +{ + /** + * This field is set to the `cluster_name` field of the Membership Spec if it + * is not empty. Otherwise, it is set to the cluster's fleet membership name. + * + * Generated from protobuf field string cluster_name = 1; + */ + protected $cluster_name = ''; + /** + * Membership configuration in the cluster. This represents the actual state + * in the cluster, while the MembershipSpec in the FeatureSpec represents + * the intended state + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.MembershipSpec membership_spec = 2; + */ + protected $membership_spec = null; + /** + * Current install status of ACM's Operator + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.OperatorState operator_state = 3; + */ + protected $operator_state = null; + /** + * Current sync status + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSyncState config_sync_state = 4; + */ + protected $config_sync_state = null; + /** + * PolicyController status + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.PolicyControllerState policy_controller_state = 5; + */ + protected $policy_controller_state = null; + /** + * Hierarchy Controller status + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.HierarchyControllerState hierarchy_controller_state = 7; + */ + protected $hierarchy_controller_state = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $cluster_name + * This field is set to the `cluster_name` field of the Membership Spec if it + * is not empty. Otherwise, it is set to the cluster's fleet membership name. + * @type \Google\Cloud\GkeHub\ConfigManagement\V1\MembershipSpec $membership_spec + * Membership configuration in the cluster. This represents the actual state + * in the cluster, while the MembershipSpec in the FeatureSpec represents + * the intended state + * @type \Google\Cloud\GkeHub\ConfigManagement\V1\OperatorState $operator_state + * Current install status of ACM's Operator + * @type \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSyncState $config_sync_state + * Current sync status + * @type \Google\Cloud\GkeHub\ConfigManagement\V1\PolicyControllerState $policy_controller_state + * PolicyController status + * @type \Google\Cloud\GkeHub\ConfigManagement\V1\HierarchyControllerState $hierarchy_controller_state + * Hierarchy Controller status + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); + parent::__construct($data); + } + + /** + * This field is set to the `cluster_name` field of the Membership Spec if it + * is not empty. Otherwise, it is set to the cluster's fleet membership name. + * + * Generated from protobuf field string cluster_name = 1; + * @return string + */ + public function getClusterName() + { + return $this->cluster_name; + } + + /** + * This field is set to the `cluster_name` field of the Membership Spec if it + * is not empty. Otherwise, it is set to the cluster's fleet membership name. + * + * Generated from protobuf field string cluster_name = 1; + * @param string $var + * @return $this + */ + public function setClusterName($var) + { + GPBUtil::checkString($var, True); + $this->cluster_name = $var; + + return $this; + } + + /** + * Membership configuration in the cluster. This represents the actual state + * in the cluster, while the MembershipSpec in the FeatureSpec represents + * the intended state + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.MembershipSpec membership_spec = 2; + * @return \Google\Cloud\GkeHub\ConfigManagement\V1\MembershipSpec|null + */ + public function getMembershipSpec() + { + return $this->membership_spec; + } + + public function hasMembershipSpec() + { + return isset($this->membership_spec); + } + + public function clearMembershipSpec() + { + unset($this->membership_spec); + } + + /** + * Membership configuration in the cluster. This represents the actual state + * in the cluster, while the MembershipSpec in the FeatureSpec represents + * the intended state + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.MembershipSpec membership_spec = 2; + * @param \Google\Cloud\GkeHub\ConfigManagement\V1\MembershipSpec $var + * @return $this + */ + public function setMembershipSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\ConfigManagement\V1\MembershipSpec::class); + $this->membership_spec = $var; + + return $this; + } + + /** + * Current install status of ACM's Operator + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.OperatorState operator_state = 3; + * @return \Google\Cloud\GkeHub\ConfigManagement\V1\OperatorState|null + */ + public function getOperatorState() + { + return $this->operator_state; + } + + public function hasOperatorState() + { + return isset($this->operator_state); + } + + public function clearOperatorState() + { + unset($this->operator_state); + } + + /** + * Current install status of ACM's Operator + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.OperatorState operator_state = 3; + * @param \Google\Cloud\GkeHub\ConfigManagement\V1\OperatorState $var + * @return $this + */ + public function setOperatorState($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\ConfigManagement\V1\OperatorState::class); + $this->operator_state = $var; + + return $this; + } + + /** + * Current sync status + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSyncState config_sync_state = 4; + * @return \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSyncState|null + */ + public function getConfigSyncState() + { + return $this->config_sync_state; + } + + public function hasConfigSyncState() + { + return isset($this->config_sync_state); + } + + public function clearConfigSyncState() + { + unset($this->config_sync_state); + } + + /** + * Current sync status + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSyncState config_sync_state = 4; + * @param \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSyncState $var + * @return $this + */ + public function setConfigSyncState($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSyncState::class); + $this->config_sync_state = $var; + + return $this; + } + + /** + * PolicyController status + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.PolicyControllerState policy_controller_state = 5; + * @return \Google\Cloud\GkeHub\ConfigManagement\V1\PolicyControllerState|null + */ + public function getPolicyControllerState() + { + return $this->policy_controller_state; + } + + public function hasPolicyControllerState() + { + return isset($this->policy_controller_state); + } + + public function clearPolicyControllerState() + { + unset($this->policy_controller_state); + } + + /** + * PolicyController status + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.PolicyControllerState policy_controller_state = 5; + * @param \Google\Cloud\GkeHub\ConfigManagement\V1\PolicyControllerState $var + * @return $this + */ + public function setPolicyControllerState($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\ConfigManagement\V1\PolicyControllerState::class); + $this->policy_controller_state = $var; + + return $this; + } + + /** + * Hierarchy Controller status + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.HierarchyControllerState hierarchy_controller_state = 7; + * @return \Google\Cloud\GkeHub\ConfigManagement\V1\HierarchyControllerState|null + */ + public function getHierarchyControllerState() + { + return $this->hierarchy_controller_state; + } + + public function hasHierarchyControllerState() + { + return isset($this->hierarchy_controller_state); + } + + public function clearHierarchyControllerState() + { + unset($this->hierarchy_controller_state); + } + + /** + * Hierarchy Controller status + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.HierarchyControllerState hierarchy_controller_state = 7; + * @param \Google\Cloud\GkeHub\ConfigManagement\V1\HierarchyControllerState $var + * @return $this + */ + public function setHierarchyControllerState($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\ConfigManagement\V1\HierarchyControllerState::class); + $this->hierarchy_controller_state = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/OciConfig.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/OciConfig.php new file mode 100644 index 000000000000..b2b91e6ea01b --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/OciConfig.php @@ -0,0 +1,215 @@ +google.cloud.gkehub.configmanagement.v1.OciConfig + */ +class OciConfig extends \Google\Protobuf\Internal\Message +{ + /** + * The OCI image repository URL for the package to sync from. + * e.g. `LOCATION-docker.pkg.dev/PROJECT_ID/REPOSITORY_NAME/PACKAGE_NAME`. + * + * Generated from protobuf field string sync_repo = 1; + */ + protected $sync_repo = ''; + /** + * The absolute path of the directory that contains + * the local resources. Default: the root directory of the image. + * + * Generated from protobuf field string policy_dir = 2; + */ + protected $policy_dir = ''; + /** + * Period in seconds between consecutive syncs. Default: 15. + * + * Generated from protobuf field int64 sync_wait_secs = 3; + */ + protected $sync_wait_secs = 0; + /** + * Type of secret configured for access to the Git repo. + * + * Generated from protobuf field string secret_type = 4; + */ + protected $secret_type = ''; + /** + * The Google Cloud Service Account Email used for auth when secret_type is + * gcpServiceAccount. + * + * Generated from protobuf field string gcp_service_account_email = 5; + */ + protected $gcp_service_account_email = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $sync_repo + * The OCI image repository URL for the package to sync from. + * e.g. `LOCATION-docker.pkg.dev/PROJECT_ID/REPOSITORY_NAME/PACKAGE_NAME`. + * @type string $policy_dir + * The absolute path of the directory that contains + * the local resources. Default: the root directory of the image. + * @type int|string $sync_wait_secs + * Period in seconds between consecutive syncs. Default: 15. + * @type string $secret_type + * Type of secret configured for access to the Git repo. + * @type string $gcp_service_account_email + * The Google Cloud Service Account Email used for auth when secret_type is + * gcpServiceAccount. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); + parent::__construct($data); + } + + /** + * The OCI image repository URL for the package to sync from. + * e.g. `LOCATION-docker.pkg.dev/PROJECT_ID/REPOSITORY_NAME/PACKAGE_NAME`. + * + * Generated from protobuf field string sync_repo = 1; + * @return string + */ + public function getSyncRepo() + { + return $this->sync_repo; + } + + /** + * The OCI image repository URL for the package to sync from. + * e.g. `LOCATION-docker.pkg.dev/PROJECT_ID/REPOSITORY_NAME/PACKAGE_NAME`. + * + * Generated from protobuf field string sync_repo = 1; + * @param string $var + * @return $this + */ + public function setSyncRepo($var) + { + GPBUtil::checkString($var, True); + $this->sync_repo = $var; + + return $this; + } + + /** + * The absolute path of the directory that contains + * the local resources. Default: the root directory of the image. + * + * Generated from protobuf field string policy_dir = 2; + * @return string + */ + public function getPolicyDir() + { + return $this->policy_dir; + } + + /** + * The absolute path of the directory that contains + * the local resources. Default: the root directory of the image. + * + * Generated from protobuf field string policy_dir = 2; + * @param string $var + * @return $this + */ + public function setPolicyDir($var) + { + GPBUtil::checkString($var, True); + $this->policy_dir = $var; + + return $this; + } + + /** + * Period in seconds between consecutive syncs. Default: 15. + * + * Generated from protobuf field int64 sync_wait_secs = 3; + * @return int|string + */ + public function getSyncWaitSecs() + { + return $this->sync_wait_secs; + } + + /** + * Period in seconds between consecutive syncs. Default: 15. + * + * Generated from protobuf field int64 sync_wait_secs = 3; + * @param int|string $var + * @return $this + */ + public function setSyncWaitSecs($var) + { + GPBUtil::checkInt64($var); + $this->sync_wait_secs = $var; + + return $this; + } + + /** + * Type of secret configured for access to the Git repo. + * + * Generated from protobuf field string secret_type = 4; + * @return string + */ + public function getSecretType() + { + return $this->secret_type; + } + + /** + * Type of secret configured for access to the Git repo. + * + * Generated from protobuf field string secret_type = 4; + * @param string $var + * @return $this + */ + public function setSecretType($var) + { + GPBUtil::checkString($var, True); + $this->secret_type = $var; + + return $this; + } + + /** + * The Google Cloud Service Account Email used for auth when secret_type is + * gcpServiceAccount. + * + * Generated from protobuf field string gcp_service_account_email = 5; + * @return string + */ + public function getGcpServiceAccountEmail() + { + return $this->gcp_service_account_email; + } + + /** + * The Google Cloud Service Account Email used for auth when secret_type is + * gcpServiceAccount. + * + * Generated from protobuf field string gcp_service_account_email = 5; + * @param string $var + * @return $this + */ + public function setGcpServiceAccountEmail($var) + { + GPBUtil::checkString($var, True); + $this->gcp_service_account_email = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/OperatorState.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/OperatorState.php new file mode 100644 index 000000000000..8b91ffdf0006 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/OperatorState.php @@ -0,0 +1,135 @@ +google.cloud.gkehub.configmanagement.v1.OperatorState + */ +class OperatorState extends \Google\Protobuf\Internal\Message +{ + /** + * The semenatic version number of the operator + * + * Generated from protobuf field string version = 1; + */ + protected $version = ''; + /** + * The state of the Operator's deployment + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState deployment_state = 2; + */ + protected $deployment_state = 0; + /** + * Install errors. + * + * Generated from protobuf field repeated .google.cloud.gkehub.configmanagement.v1.InstallError errors = 3; + */ + private $errors; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $version + * The semenatic version number of the operator + * @type int $deployment_state + * The state of the Operator's deployment + * @type array<\Google\Cloud\GkeHub\ConfigManagement\V1\InstallError>|\Google\Protobuf\Internal\RepeatedField $errors + * Install errors. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); + parent::__construct($data); + } + + /** + * The semenatic version number of the operator + * + * Generated from protobuf field string version = 1; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * The semenatic version number of the operator + * + * Generated from protobuf field string version = 1; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + + /** + * The state of the Operator's deployment + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState deployment_state = 2; + * @return int + */ + public function getDeploymentState() + { + return $this->deployment_state; + } + + /** + * The state of the Operator's deployment + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState deployment_state = 2; + * @param int $var + * @return $this + */ + public function setDeploymentState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\ConfigManagement\V1\DeploymentState::class); + $this->deployment_state = $var; + + return $this; + } + + /** + * Install errors. + * + * Generated from protobuf field repeated .google.cloud.gkehub.configmanagement.v1.InstallError errors = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getErrors() + { + return $this->errors; + } + + /** + * Install errors. + * + * Generated from protobuf field repeated .google.cloud.gkehub.configmanagement.v1.InstallError errors = 3; + * @param array<\Google\Cloud\GkeHub\ConfigManagement\V1\InstallError>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setErrors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\ConfigManagement\V1\InstallError::class); + $this->errors = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/PolicyController.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/PolicyController.php new file mode 100644 index 000000000000..eafd7df91446 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/PolicyController.php @@ -0,0 +1,277 @@ +google.cloud.gkehub.configmanagement.v1.PolicyController + */ +class PolicyController extends \Google\Protobuf\Internal\Message +{ + /** + * Enables the installation of Policy Controller. + * If false, the rest of PolicyController fields take no + * effect. + * + * Generated from protobuf field bool enabled = 1; + */ + protected $enabled = false; + /** + * Installs the default template library along with Policy Controller. + * + * Generated from protobuf field optional bool template_library_installed = 2; + */ + protected $template_library_installed = null; + /** + * Sets the interval for Policy Controller Audit Scans (in seconds). + * When set to 0, this disables audit functionality altogether. + * + * Generated from protobuf field optional int64 audit_interval_seconds = 3; + */ + protected $audit_interval_seconds = null; + /** + * The set of namespaces that are excluded from Policy Controller checks. + * Namespaces do not need to currently exist on the cluster. + * + * Generated from protobuf field repeated string exemptable_namespaces = 4; + */ + private $exemptable_namespaces; + /** + * Enables the ability to use Constraint Templates that reference to objects + * other than the object currently being evaluated. + * + * Generated from protobuf field bool referential_rules_enabled = 5; + */ + protected $referential_rules_enabled = false; + /** + * Logs all denies and dry run failures. + * + * Generated from protobuf field bool log_denies_enabled = 6; + */ + protected $log_denies_enabled = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $enabled + * Enables the installation of Policy Controller. + * If false, the rest of PolicyController fields take no + * effect. + * @type bool $template_library_installed + * Installs the default template library along with Policy Controller. + * @type int|string $audit_interval_seconds + * Sets the interval for Policy Controller Audit Scans (in seconds). + * When set to 0, this disables audit functionality altogether. + * @type array|\Google\Protobuf\Internal\RepeatedField $exemptable_namespaces + * The set of namespaces that are excluded from Policy Controller checks. + * Namespaces do not need to currently exist on the cluster. + * @type bool $referential_rules_enabled + * Enables the ability to use Constraint Templates that reference to objects + * other than the object currently being evaluated. + * @type bool $log_denies_enabled + * Logs all denies and dry run failures. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); + parent::__construct($data); + } + + /** + * Enables the installation of Policy Controller. + * If false, the rest of PolicyController fields take no + * effect. + * + * Generated from protobuf field bool enabled = 1; + * @return bool + */ + public function getEnabled() + { + return $this->enabled; + } + + /** + * Enables the installation of Policy Controller. + * If false, the rest of PolicyController fields take no + * effect. + * + * Generated from protobuf field bool enabled = 1; + * @param bool $var + * @return $this + */ + public function setEnabled($var) + { + GPBUtil::checkBool($var); + $this->enabled = $var; + + return $this; + } + + /** + * Installs the default template library along with Policy Controller. + * + * Generated from protobuf field optional bool template_library_installed = 2; + * @return bool + */ + public function getTemplateLibraryInstalled() + { + return isset($this->template_library_installed) ? $this->template_library_installed : false; + } + + public function hasTemplateLibraryInstalled() + { + return isset($this->template_library_installed); + } + + public function clearTemplateLibraryInstalled() + { + unset($this->template_library_installed); + } + + /** + * Installs the default template library along with Policy Controller. + * + * Generated from protobuf field optional bool template_library_installed = 2; + * @param bool $var + * @return $this + */ + public function setTemplateLibraryInstalled($var) + { + GPBUtil::checkBool($var); + $this->template_library_installed = $var; + + return $this; + } + + /** + * Sets the interval for Policy Controller Audit Scans (in seconds). + * When set to 0, this disables audit functionality altogether. + * + * Generated from protobuf field optional int64 audit_interval_seconds = 3; + * @return int|string + */ + public function getAuditIntervalSeconds() + { + return isset($this->audit_interval_seconds) ? $this->audit_interval_seconds : 0; + } + + public function hasAuditIntervalSeconds() + { + return isset($this->audit_interval_seconds); + } + + public function clearAuditIntervalSeconds() + { + unset($this->audit_interval_seconds); + } + + /** + * Sets the interval for Policy Controller Audit Scans (in seconds). + * When set to 0, this disables audit functionality altogether. + * + * Generated from protobuf field optional int64 audit_interval_seconds = 3; + * @param int|string $var + * @return $this + */ + public function setAuditIntervalSeconds($var) + { + GPBUtil::checkInt64($var); + $this->audit_interval_seconds = $var; + + return $this; + } + + /** + * The set of namespaces that are excluded from Policy Controller checks. + * Namespaces do not need to currently exist on the cluster. + * + * Generated from protobuf field repeated string exemptable_namespaces = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExemptableNamespaces() + { + return $this->exemptable_namespaces; + } + + /** + * The set of namespaces that are excluded from Policy Controller checks. + * Namespaces do not need to currently exist on the cluster. + * + * Generated from protobuf field repeated string exemptable_namespaces = 4; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExemptableNamespaces($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->exemptable_namespaces = $arr; + + return $this; + } + + /** + * Enables the ability to use Constraint Templates that reference to objects + * other than the object currently being evaluated. + * + * Generated from protobuf field bool referential_rules_enabled = 5; + * @return bool + */ + public function getReferentialRulesEnabled() + { + return $this->referential_rules_enabled; + } + + /** + * Enables the ability to use Constraint Templates that reference to objects + * other than the object currently being evaluated. + * + * Generated from protobuf field bool referential_rules_enabled = 5; + * @param bool $var + * @return $this + */ + public function setReferentialRulesEnabled($var) + { + GPBUtil::checkBool($var); + $this->referential_rules_enabled = $var; + + return $this; + } + + /** + * Logs all denies and dry run failures. + * + * Generated from protobuf field bool log_denies_enabled = 6; + * @return bool + */ + public function getLogDeniesEnabled() + { + return $this->log_denies_enabled; + } + + /** + * Logs all denies and dry run failures. + * + * Generated from protobuf field bool log_denies_enabled = 6; + * @param bool $var + * @return $this + */ + public function setLogDeniesEnabled($var) + { + GPBUtil::checkBool($var); + $this->log_denies_enabled = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/PolicyControllerState.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/PolicyControllerState.php new file mode 100644 index 000000000000..e0ba94d19999 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/PolicyControllerState.php @@ -0,0 +1,121 @@ +google.cloud.gkehub.configmanagement.v1.PolicyControllerState + */ +class PolicyControllerState extends \Google\Protobuf\Internal\Message +{ + /** + * The version of Gatekeeper Policy Controller deployed. + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.PolicyControllerVersion version = 1; + */ + protected $version = null; + /** + * The state about the policy controller installation. + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.GatekeeperDeploymentState deployment_state = 2; + */ + protected $deployment_state = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\GkeHub\ConfigManagement\V1\PolicyControllerVersion $version + * The version of Gatekeeper Policy Controller deployed. + * @type \Google\Cloud\GkeHub\ConfigManagement\V1\GatekeeperDeploymentState $deployment_state + * The state about the policy controller installation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); + parent::__construct($data); + } + + /** + * The version of Gatekeeper Policy Controller deployed. + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.PolicyControllerVersion version = 1; + * @return \Google\Cloud\GkeHub\ConfigManagement\V1\PolicyControllerVersion|null + */ + public function getVersion() + { + return $this->version; + } + + public function hasVersion() + { + return isset($this->version); + } + + public function clearVersion() + { + unset($this->version); + } + + /** + * The version of Gatekeeper Policy Controller deployed. + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.PolicyControllerVersion version = 1; + * @param \Google\Cloud\GkeHub\ConfigManagement\V1\PolicyControllerVersion $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\ConfigManagement\V1\PolicyControllerVersion::class); + $this->version = $var; + + return $this; + } + + /** + * The state about the policy controller installation. + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.GatekeeperDeploymentState deployment_state = 2; + * @return \Google\Cloud\GkeHub\ConfigManagement\V1\GatekeeperDeploymentState|null + */ + public function getDeploymentState() + { + return $this->deployment_state; + } + + public function hasDeploymentState() + { + return isset($this->deployment_state); + } + + public function clearDeploymentState() + { + unset($this->deployment_state); + } + + /** + * The state about the policy controller installation. + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.GatekeeperDeploymentState deployment_state = 2; + * @param \Google\Cloud\GkeHub\ConfigManagement\V1\GatekeeperDeploymentState $var + * @return $this + */ + public function setDeploymentState($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\ConfigManagement\V1\GatekeeperDeploymentState::class); + $this->deployment_state = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/PolicyControllerVersion.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/PolicyControllerVersion.php new file mode 100644 index 000000000000..fb70a7bffb04 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/PolicyControllerVersion.php @@ -0,0 +1,71 @@ +google.cloud.gkehub.configmanagement.v1.PolicyControllerVersion + */ +class PolicyControllerVersion extends \Google\Protobuf\Internal\Message +{ + /** + * The gatekeeper image tag that is composed of ACM version, git tag, build + * number. + * + * Generated from protobuf field string version = 1; + */ + protected $version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $version + * The gatekeeper image tag that is composed of ACM version, git tag, build + * number. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); + parent::__construct($data); + } + + /** + * The gatekeeper image tag that is composed of ACM version, git tag, build + * number. + * + * Generated from protobuf field string version = 1; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * The gatekeeper image tag that is composed of ACM version, git tag, build + * number. + * + * Generated from protobuf field string version = 1; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/SyncError.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/SyncError.php new file mode 100644 index 000000000000..f9a32a75047d --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/SyncError.php @@ -0,0 +1,135 @@ +google.cloud.gkehub.configmanagement.v1.SyncError + */ +class SyncError extends \Google\Protobuf\Internal\Message +{ + /** + * An ACM defined error code + * + * Generated from protobuf field string code = 1; + */ + protected $code = ''; + /** + * A description of the error + * + * Generated from protobuf field string error_message = 2; + */ + protected $error_message = ''; + /** + * A list of config(s) associated with the error, if any + * + * Generated from protobuf field repeated .google.cloud.gkehub.configmanagement.v1.ErrorResource error_resources = 3; + */ + private $error_resources; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $code + * An ACM defined error code + * @type string $error_message + * A description of the error + * @type array<\Google\Cloud\GkeHub\ConfigManagement\V1\ErrorResource>|\Google\Protobuf\Internal\RepeatedField $error_resources + * A list of config(s) associated with the error, if any + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); + parent::__construct($data); + } + + /** + * An ACM defined error code + * + * Generated from protobuf field string code = 1; + * @return string + */ + public function getCode() + { + return $this->code; + } + + /** + * An ACM defined error code + * + * Generated from protobuf field string code = 1; + * @param string $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkString($var, True); + $this->code = $var; + + return $this; + } + + /** + * A description of the error + * + * Generated from protobuf field string error_message = 2; + * @return string + */ + public function getErrorMessage() + { + return $this->error_message; + } + + /** + * A description of the error + * + * Generated from protobuf field string error_message = 2; + * @param string $var + * @return $this + */ + public function setErrorMessage($var) + { + GPBUtil::checkString($var, True); + $this->error_message = $var; + + return $this; + } + + /** + * A list of config(s) associated with the error, if any + * + * Generated from protobuf field repeated .google.cloud.gkehub.configmanagement.v1.ErrorResource error_resources = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getErrorResources() + { + return $this->error_resources; + } + + /** + * A list of config(s) associated with the error, if any + * + * Generated from protobuf field repeated .google.cloud.gkehub.configmanagement.v1.ErrorResource error_resources = 3; + * @param array<\Google\Cloud\GkeHub\ConfigManagement\V1\ErrorResource>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setErrorResources($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\ConfigManagement\V1\ErrorResource::class); + $this->error_resources = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/SyncState.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/SyncState.php new file mode 100644 index 000000000000..66d52b10ce17 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/SyncState.php @@ -0,0 +1,304 @@ +google.cloud.gkehub.configmanagement.v1.SyncState + */ +class SyncState extends \Google\Protobuf\Internal\Message +{ + /** + * Token indicating the state of the repo. + * + * Generated from protobuf field string source_token = 1; + */ + protected $source_token = ''; + /** + * Token indicating the state of the importer. + * + * Generated from protobuf field string import_token = 2; + */ + protected $import_token = ''; + /** + * Token indicating the state of the syncer. + * + * Generated from protobuf field string sync_token = 3; + */ + protected $sync_token = ''; + /** + * Deprecated: use last_sync_time instead. + * Timestamp of when ACM last successfully synced the repo + * The time format is specified in https://golang.org/pkg/time/#Time.String + * + * Generated from protobuf field string last_sync = 4 [deprecated = true]; + * @deprecated + */ + protected $last_sync = ''; + /** + * Timestamp type of when ACM last successfully synced the repo + * + * Generated from protobuf field .google.protobuf.Timestamp last_sync_time = 7; + */ + protected $last_sync_time = null; + /** + * Sync status code + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.SyncState.SyncCode code = 5; + */ + protected $code = 0; + /** + * A list of errors resulting from problematic configs. + * This list will be truncated after 100 errors, although it is + * unlikely for that many errors to simultaneously exist. + * + * Generated from protobuf field repeated .google.cloud.gkehub.configmanagement.v1.SyncError errors = 6; + */ + private $errors; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $source_token + * Token indicating the state of the repo. + * @type string $import_token + * Token indicating the state of the importer. + * @type string $sync_token + * Token indicating the state of the syncer. + * @type string $last_sync + * Deprecated: use last_sync_time instead. + * Timestamp of when ACM last successfully synced the repo + * The time format is specified in https://golang.org/pkg/time/#Time.String + * @type \Google\Protobuf\Timestamp $last_sync_time + * Timestamp type of when ACM last successfully synced the repo + * @type int $code + * Sync status code + * @type array<\Google\Cloud\GkeHub\ConfigManagement\V1\SyncError>|\Google\Protobuf\Internal\RepeatedField $errors + * A list of errors resulting from problematic configs. + * This list will be truncated after 100 errors, although it is + * unlikely for that many errors to simultaneously exist. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); + parent::__construct($data); + } + + /** + * Token indicating the state of the repo. + * + * Generated from protobuf field string source_token = 1; + * @return string + */ + public function getSourceToken() + { + return $this->source_token; + } + + /** + * Token indicating the state of the repo. + * + * Generated from protobuf field string source_token = 1; + * @param string $var + * @return $this + */ + public function setSourceToken($var) + { + GPBUtil::checkString($var, True); + $this->source_token = $var; + + return $this; + } + + /** + * Token indicating the state of the importer. + * + * Generated from protobuf field string import_token = 2; + * @return string + */ + public function getImportToken() + { + return $this->import_token; + } + + /** + * Token indicating the state of the importer. + * + * Generated from protobuf field string import_token = 2; + * @param string $var + * @return $this + */ + public function setImportToken($var) + { + GPBUtil::checkString($var, True); + $this->import_token = $var; + + return $this; + } + + /** + * Token indicating the state of the syncer. + * + * Generated from protobuf field string sync_token = 3; + * @return string + */ + public function getSyncToken() + { + return $this->sync_token; + } + + /** + * Token indicating the state of the syncer. + * + * Generated from protobuf field string sync_token = 3; + * @param string $var + * @return $this + */ + public function setSyncToken($var) + { + GPBUtil::checkString($var, True); + $this->sync_token = $var; + + return $this; + } + + /** + * Deprecated: use last_sync_time instead. + * Timestamp of when ACM last successfully synced the repo + * The time format is specified in https://golang.org/pkg/time/#Time.String + * + * Generated from protobuf field string last_sync = 4 [deprecated = true]; + * @return string + * @deprecated + */ + public function getLastSync() + { + if ($this->last_sync !== '') { + @trigger_error('last_sync is deprecated.', E_USER_DEPRECATED); + } + return $this->last_sync; + } + + /** + * Deprecated: use last_sync_time instead. + * Timestamp of when ACM last successfully synced the repo + * The time format is specified in https://golang.org/pkg/time/#Time.String + * + * Generated from protobuf field string last_sync = 4 [deprecated = true]; + * @param string $var + * @return $this + * @deprecated + */ + public function setLastSync($var) + { + @trigger_error('last_sync is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkString($var, True); + $this->last_sync = $var; + + return $this; + } + + /** + * Timestamp type of when ACM last successfully synced the repo + * + * Generated from protobuf field .google.protobuf.Timestamp last_sync_time = 7; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastSyncTime() + { + return $this->last_sync_time; + } + + public function hasLastSyncTime() + { + return isset($this->last_sync_time); + } + + public function clearLastSyncTime() + { + unset($this->last_sync_time); + } + + /** + * Timestamp type of when ACM last successfully synced the repo + * + * Generated from protobuf field .google.protobuf.Timestamp last_sync_time = 7; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastSyncTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_sync_time = $var; + + return $this; + } + + /** + * Sync status code + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.SyncState.SyncCode code = 5; + * @return int + */ + public function getCode() + { + return $this->code; + } + + /** + * Sync status code + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.SyncState.SyncCode code = 5; + * @param int $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\ConfigManagement\V1\SyncState\SyncCode::class); + $this->code = $var; + + return $this; + } + + /** + * A list of errors resulting from problematic configs. + * This list will be truncated after 100 errors, although it is + * unlikely for that many errors to simultaneously exist. + * + * Generated from protobuf field repeated .google.cloud.gkehub.configmanagement.v1.SyncError errors = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getErrors() + { + return $this->errors; + } + + /** + * A list of errors resulting from problematic configs. + * This list will be truncated after 100 errors, although it is + * unlikely for that many errors to simultaneously exist. + * + * Generated from protobuf field repeated .google.cloud.gkehub.configmanagement.v1.SyncError errors = 6; + * @param array<\Google\Cloud\GkeHub\ConfigManagement\V1\SyncError>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setErrors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\ConfigManagement\V1\SyncError::class); + $this->errors = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/SyncState/SyncCode.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/SyncState/SyncCode.php new file mode 100644 index 000000000000..79c8f38a8fd7 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/SyncState/SyncCode.php @@ -0,0 +1,99 @@ +google.cloud.gkehub.configmanagement.v1.SyncState.SyncCode + */ +class SyncCode +{ + /** + * Config Sync cannot determine a sync code + * + * Generated from protobuf enum SYNC_CODE_UNSPECIFIED = 0; + */ + const SYNC_CODE_UNSPECIFIED = 0; + /** + * Config Sync successfully synced the git Repo with the cluster + * + * Generated from protobuf enum SYNCED = 1; + */ + const SYNCED = 1; + /** + * Config Sync is in the progress of syncing a new change + * + * Generated from protobuf enum PENDING = 2; + */ + const PENDING = 2; + /** + * Indicates an error configuring Config Sync, and user action is required + * + * Generated from protobuf enum ERROR = 3; + */ + const ERROR = 3; + /** + * Config Sync has been installed but not configured + * + * Generated from protobuf enum NOT_CONFIGURED = 4; + */ + const NOT_CONFIGURED = 4; + /** + * Config Sync has not been installed + * + * Generated from protobuf enum NOT_INSTALLED = 5; + */ + const NOT_INSTALLED = 5; + /** + * Error authorizing with the cluster + * + * Generated from protobuf enum UNAUTHORIZED = 6; + */ + const UNAUTHORIZED = 6; + /** + * Cluster could not be reached + * + * Generated from protobuf enum UNREACHABLE = 7; + */ + const UNREACHABLE = 7; + + private static $valueToName = [ + self::SYNC_CODE_UNSPECIFIED => 'SYNC_CODE_UNSPECIFIED', + self::SYNCED => 'SYNCED', + self::PENDING => 'PENDING', + self::ERROR => 'ERROR', + self::NOT_CONFIGURED => 'NOT_CONFIGURED', + self::NOT_INSTALLED => 'NOT_INSTALLED', + self::UNAUTHORIZED => 'UNAUTHORIZED', + self::UNREACHABLE => 'UNREACHABLE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SyncCode::class, \Google\Cloud\GkeHub\ConfigManagement\V1\SyncState_SyncCode::class); + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/MultiClusterIngress/V1/FeatureSpec.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/MultiClusterIngress/V1/FeatureSpec.php new file mode 100644 index 000000000000..1031f8479b15 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/MultiClusterIngress/V1/FeatureSpec.php @@ -0,0 +1,72 @@ +google.cloud.gkehub.multiclusteringress.v1.FeatureSpec + */ +class FeatureSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Fully-qualified Membership name which hosts the MultiClusterIngress CRD. + * Example: `projects/foo-proj/locations/global/memberships/bar` + * + * Generated from protobuf field string config_membership = 1; + */ + protected $config_membership = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $config_membership + * Fully-qualified Membership name which hosts the MultiClusterIngress CRD. + * Example: `projects/foo-proj/locations/global/memberships/bar` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Multiclusteringress\Multiclusteringress::initOnce(); + parent::__construct($data); + } + + /** + * Fully-qualified Membership name which hosts the MultiClusterIngress CRD. + * Example: `projects/foo-proj/locations/global/memberships/bar` + * + * Generated from protobuf field string config_membership = 1; + * @return string + */ + public function getConfigMembership() + { + return $this->config_membership; + } + + /** + * Fully-qualified Membership name which hosts the MultiClusterIngress CRD. + * Example: `projects/foo-proj/locations/global/memberships/bar` + * + * Generated from protobuf field string config_membership = 1; + * @param string $var + * @return $this + */ + public function setConfigMembership($var) + { + GPBUtil::checkString($var, True); + $this->config_membership = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/RbacRoleBindingActuation/V1/FeatureSpec.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/RbacRoleBindingActuation/V1/FeatureSpec.php new file mode 100644 index 000000000000..009a3914d922 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/RbacRoleBindingActuation/V1/FeatureSpec.php @@ -0,0 +1,76 @@ +google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureSpec + */ +class FeatureSpec extends \Google\Protobuf\Internal\Message +{ + /** + * The list of allowed custom roles (ClusterRoles). If a ClusterRole is not + * part of this list, it cannot be used in a Scope RBACRoleBinding. If a + * ClusterRole in this list is in use, it cannot be removed from the list. + * + * Generated from protobuf field repeated string allowed_custom_roles = 2; + */ + private $allowed_custom_roles; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $allowed_custom_roles + * The list of allowed custom roles (ClusterRoles). If a ClusterRole is not + * part of this list, it cannot be used in a Scope RBACRoleBinding. If a + * ClusterRole in this list is in use, it cannot be removed from the list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Rbacrolebindingactuation\Rbacrolebindingactuation::initOnce(); + parent::__construct($data); + } + + /** + * The list of allowed custom roles (ClusterRoles). If a ClusterRole is not + * part of this list, it cannot be used in a Scope RBACRoleBinding. If a + * ClusterRole in this list is in use, it cannot be removed from the list. + * + * Generated from protobuf field repeated string allowed_custom_roles = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAllowedCustomRoles() + { + return $this->allowed_custom_roles; + } + + /** + * The list of allowed custom roles (ClusterRoles). If a ClusterRole is not + * part of this list, it cannot be used in a Scope RBACRoleBinding. If a + * ClusterRole in this list is in use, it cannot be removed from the list. + * + * Generated from protobuf field repeated string allowed_custom_roles = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAllowedCustomRoles($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->allowed_custom_roles = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/RbacRoleBindingActuation/V1/FeatureState.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/RbacRoleBindingActuation/V1/FeatureState.php new file mode 100644 index 000000000000..fc27f23f8ee3 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/RbacRoleBindingActuation/V1/FeatureState.php @@ -0,0 +1,34 @@ +google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureState + */ +class FeatureState extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Rbacrolebindingactuation\Rbacrolebindingactuation::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/Authority.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/Authority.php new file mode 100644 index 000000000000..7a7413afa5cd --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/Authority.php @@ -0,0 +1,235 @@ +google.cloud.gkehub.v1.Authority + */ +class Authority extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. A JSON Web Token (JWT) issuer URI. `issuer` must start with + * `https://` and be a valid URL with length <2000 characters. + * If set, then Google will allow valid OIDC tokens from this issuer to + * authenticate within the workload_identity_pool. OIDC discovery will be + * performed on this URI to validate tokens from the issuer. + * Clearing `issuer` disables Workload Identity. `issuer` cannot be directly + * modified; it must be cleared (and Workload Identity disabled) before using + * a new issuer (and re-enabling Workload Identity). + * + * Generated from protobuf field string issuer = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $issuer = ''; + /** + * Output only. The name of the workload identity pool in which `issuer` will + * be recognized. + * There is a single Workload Identity Pool per Hub that is shared + * between all Memberships that belong to that Hub. For a Hub hosted in + * {PROJECT_ID}, the workload pool format is `{PROJECT_ID}.hub.id.goog`, + * although this is subject to change in newer versions of this API. + * + * Generated from protobuf field string workload_identity_pool = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $workload_identity_pool = ''; + /** + * Output only. An identity provider that reflects the `issuer` in the + * workload identity pool. + * + * Generated from protobuf field string identity_provider = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $identity_provider = ''; + /** + * Optional. OIDC verification keys for this Membership in JWKS format (RFC + * 7517). + * When this field is set, OIDC discovery will NOT be performed on `issuer`, + * and instead OIDC tokens will be validated using this field. + * + * Generated from protobuf field bytes oidc_jwks = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $oidc_jwks = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $issuer + * Optional. A JSON Web Token (JWT) issuer URI. `issuer` must start with + * `https://` and be a valid URL with length <2000 characters. + * If set, then Google will allow valid OIDC tokens from this issuer to + * authenticate within the workload_identity_pool. OIDC discovery will be + * performed on this URI to validate tokens from the issuer. + * Clearing `issuer` disables Workload Identity. `issuer` cannot be directly + * modified; it must be cleared (and Workload Identity disabled) before using + * a new issuer (and re-enabling Workload Identity). + * @type string $workload_identity_pool + * Output only. The name of the workload identity pool in which `issuer` will + * be recognized. + * There is a single Workload Identity Pool per Hub that is shared + * between all Memberships that belong to that Hub. For a Hub hosted in + * {PROJECT_ID}, the workload pool format is `{PROJECT_ID}.hub.id.goog`, + * although this is subject to change in newer versions of this API. + * @type string $identity_provider + * Output only. An identity provider that reflects the `issuer` in the + * workload identity pool. + * @type string $oidc_jwks + * Optional. OIDC verification keys for this Membership in JWKS format (RFC + * 7517). + * When this field is set, OIDC discovery will NOT be performed on `issuer`, + * and instead OIDC tokens will be validated using this field. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Membership::initOnce(); + parent::__construct($data); + } + + /** + * Optional. A JSON Web Token (JWT) issuer URI. `issuer` must start with + * `https://` and be a valid URL with length <2000 characters. + * If set, then Google will allow valid OIDC tokens from this issuer to + * authenticate within the workload_identity_pool. OIDC discovery will be + * performed on this URI to validate tokens from the issuer. + * Clearing `issuer` disables Workload Identity. `issuer` cannot be directly + * modified; it must be cleared (and Workload Identity disabled) before using + * a new issuer (and re-enabling Workload Identity). + * + * Generated from protobuf field string issuer = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getIssuer() + { + return $this->issuer; + } + + /** + * Optional. A JSON Web Token (JWT) issuer URI. `issuer` must start with + * `https://` and be a valid URL with length <2000 characters. + * If set, then Google will allow valid OIDC tokens from this issuer to + * authenticate within the workload_identity_pool. OIDC discovery will be + * performed on this URI to validate tokens from the issuer. + * Clearing `issuer` disables Workload Identity. `issuer` cannot be directly + * modified; it must be cleared (and Workload Identity disabled) before using + * a new issuer (and re-enabling Workload Identity). + * + * Generated from protobuf field string issuer = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setIssuer($var) + { + GPBUtil::checkString($var, True); + $this->issuer = $var; + + return $this; + } + + /** + * Output only. The name of the workload identity pool in which `issuer` will + * be recognized. + * There is a single Workload Identity Pool per Hub that is shared + * between all Memberships that belong to that Hub. For a Hub hosted in + * {PROJECT_ID}, the workload pool format is `{PROJECT_ID}.hub.id.goog`, + * although this is subject to change in newer versions of this API. + * + * Generated from protobuf field string workload_identity_pool = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getWorkloadIdentityPool() + { + return $this->workload_identity_pool; + } + + /** + * Output only. The name of the workload identity pool in which `issuer` will + * be recognized. + * There is a single Workload Identity Pool per Hub that is shared + * between all Memberships that belong to that Hub. For a Hub hosted in + * {PROJECT_ID}, the workload pool format is `{PROJECT_ID}.hub.id.goog`, + * although this is subject to change in newer versions of this API. + * + * Generated from protobuf field string workload_identity_pool = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setWorkloadIdentityPool($var) + { + GPBUtil::checkString($var, True); + $this->workload_identity_pool = $var; + + return $this; + } + + /** + * Output only. An identity provider that reflects the `issuer` in the + * workload identity pool. + * + * Generated from protobuf field string identity_provider = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getIdentityProvider() + { + return $this->identity_provider; + } + + /** + * Output only. An identity provider that reflects the `issuer` in the + * workload identity pool. + * + * Generated from protobuf field string identity_provider = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setIdentityProvider($var) + { + GPBUtil::checkString($var, True); + $this->identity_provider = $var; + + return $this; + } + + /** + * Optional. OIDC verification keys for this Membership in JWKS format (RFC + * 7517). + * When this field is set, OIDC discovery will NOT be performed on `issuer`, + * and instead OIDC tokens will be validated using this field. + * + * Generated from protobuf field bytes oidc_jwks = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOidcJwks() + { + return $this->oidc_jwks; + } + + /** + * Optional. OIDC verification keys for this Membership in JWKS format (RFC + * 7517). + * When this field is set, OIDC discovery will NOT be performed on `issuer`, + * and instead OIDC tokens will be validated using this field. + * + * Generated from protobuf field bytes oidc_jwks = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOidcJwks($var) + { + GPBUtil::checkString($var, False); + $this->oidc_jwks = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/BinaryAuthorizationConfig.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/BinaryAuthorizationConfig.php new file mode 100644 index 000000000000..25e27fcaeb8f --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/BinaryAuthorizationConfig.php @@ -0,0 +1,102 @@ +google.cloud.gkehub.v1.BinaryAuthorizationConfig + */ +class BinaryAuthorizationConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Mode of operation for binauthz policy evaluation. + * + * Generated from protobuf field .google.cloud.gkehub.v1.BinaryAuthorizationConfig.EvaluationMode evaluation_mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $evaluation_mode = 0; + /** + * Optional. Binauthz policies that apply to this cluster. + * + * Generated from protobuf field repeated .google.cloud.gkehub.v1.BinaryAuthorizationConfig.PolicyBinding policy_bindings = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $policy_bindings; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $evaluation_mode + * Optional. Mode of operation for binauthz policy evaluation. + * @type array<\Google\Cloud\GkeHub\V1\BinaryAuthorizationConfig\PolicyBinding>|\Google\Protobuf\Internal\RepeatedField $policy_bindings + * Optional. Binauthz policies that apply to this cluster. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Fleet::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Mode of operation for binauthz policy evaluation. + * + * Generated from protobuf field .google.cloud.gkehub.v1.BinaryAuthorizationConfig.EvaluationMode evaluation_mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getEvaluationMode() + { + return $this->evaluation_mode; + } + + /** + * Optional. Mode of operation for binauthz policy evaluation. + * + * Generated from protobuf field .google.cloud.gkehub.v1.BinaryAuthorizationConfig.EvaluationMode evaluation_mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setEvaluationMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\V1\BinaryAuthorizationConfig\EvaluationMode::class); + $this->evaluation_mode = $var; + + return $this; + } + + /** + * Optional. Binauthz policies that apply to this cluster. + * + * Generated from protobuf field repeated .google.cloud.gkehub.v1.BinaryAuthorizationConfig.PolicyBinding policy_bindings = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPolicyBindings() + { + return $this->policy_bindings; + } + + /** + * Optional. Binauthz policies that apply to this cluster. + * + * Generated from protobuf field repeated .google.cloud.gkehub.v1.BinaryAuthorizationConfig.PolicyBinding policy_bindings = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\GkeHub\V1\BinaryAuthorizationConfig\PolicyBinding>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPolicyBindings($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\V1\BinaryAuthorizationConfig\PolicyBinding::class); + $this->policy_bindings = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/BinaryAuthorizationConfig/EvaluationMode.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/BinaryAuthorizationConfig/EvaluationMode.php new file mode 100644 index 000000000000..8aaca2a41b58 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/BinaryAuthorizationConfig/EvaluationMode.php @@ -0,0 +1,64 @@ +google.cloud.gkehub.v1.BinaryAuthorizationConfig.EvaluationMode + */ +class EvaluationMode +{ + /** + * Default value + * + * Generated from protobuf enum EVALUATION_MODE_UNSPECIFIED = 0; + */ + const EVALUATION_MODE_UNSPECIFIED = 0; + /** + * Disable BinaryAuthorization + * + * Generated from protobuf enum DISABLED = 1; + */ + const DISABLED = 1; + /** + * Use Binary Authorization with the policies specified in policy_bindings. + * + * Generated from protobuf enum POLICY_BINDINGS = 2; + */ + const POLICY_BINDINGS = 2; + + private static $valueToName = [ + self::EVALUATION_MODE_UNSPECIFIED => 'EVALUATION_MODE_UNSPECIFIED', + self::DISABLED => 'DISABLED', + self::POLICY_BINDINGS => 'POLICY_BINDINGS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(EvaluationMode::class, \Google\Cloud\GkeHub\V1\BinaryAuthorizationConfig_EvaluationMode::class); + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/BinaryAuthorizationConfig/PolicyBinding.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/BinaryAuthorizationConfig/PolicyBinding.php new file mode 100644 index 000000000000..a8af1337d415 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/BinaryAuthorizationConfig/PolicyBinding.php @@ -0,0 +1,78 @@ +google.cloud.gkehub.v1.BinaryAuthorizationConfig.PolicyBinding + */ +class PolicyBinding extends \Google\Protobuf\Internal\Message +{ + /** + * The relative resource name of the binauthz platform policy to audit. GKE + * platform policies have the following format: + * `projects/{project_number}/platforms/gke/policies/{policy_id}`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The relative resource name of the binauthz platform policy to audit. GKE + * platform policies have the following format: + * `projects/{project_number}/platforms/gke/policies/{policy_id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Fleet::initOnce(); + parent::__construct($data); + } + + /** + * The relative resource name of the binauthz platform policy to audit. GKE + * platform policies have the following format: + * `projects/{project_number}/platforms/gke/policies/{policy_id}`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The relative resource name of the binauthz platform policy to audit. GKE + * platform policies have the following format: + * `projects/{project_number}/platforms/gke/policies/{policy_id}`. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PolicyBinding::class, \Google\Cloud\GkeHub\V1\BinaryAuthorizationConfig_PolicyBinding::class); + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CommonFeatureSpec.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CommonFeatureSpec.php new file mode 100644 index 000000000000..7f7c7a4ded08 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CommonFeatureSpec.php @@ -0,0 +1,75 @@ +google.cloud.gkehub.v1.CommonFeatureSpec + */ +class CommonFeatureSpec extends \Google\Protobuf\Internal\Message +{ + protected $feature_spec; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\GkeHub\MultiClusterIngress\V1\FeatureSpec $multiclusteringress + * Multicluster Ingress-specific spec. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Feature::initOnce(); + parent::__construct($data); + } + + /** + * Multicluster Ingress-specific spec. + * + * Generated from protobuf field .google.cloud.gkehub.multiclusteringress.v1.FeatureSpec multiclusteringress = 102; + * @return \Google\Cloud\GkeHub\MultiClusterIngress\V1\FeatureSpec|null + */ + public function getMulticlusteringress() + { + return $this->readOneof(102); + } + + public function hasMulticlusteringress() + { + return $this->hasOneof(102); + } + + /** + * Multicluster Ingress-specific spec. + * + * Generated from protobuf field .google.cloud.gkehub.multiclusteringress.v1.FeatureSpec multiclusteringress = 102; + * @param \Google\Cloud\GkeHub\MultiClusterIngress\V1\FeatureSpec $var + * @return $this + */ + public function setMulticlusteringress($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\MultiClusterIngress\V1\FeatureSpec::class); + $this->writeOneof(102, $var); + + return $this; + } + + /** + * @return string + */ + public function getFeatureSpec() + { + return $this->whichOneof("feature_spec"); + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CommonFeatureState.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CommonFeatureState.php new file mode 100644 index 000000000000..735109ce2381 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CommonFeatureState.php @@ -0,0 +1,119 @@ +google.cloud.gkehub.v1.CommonFeatureState + */ +class CommonFeatureState extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The "running state" of the Feature in this Fleet. + * + * Generated from protobuf field .google.cloud.gkehub.v1.FeatureState state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = null; + protected $feature_state; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\GkeHub\RbacRoleBindingActuation\V1\FeatureState $rbacrolebindingactuation + * RBAC Role Binding Actuation feature state + * @type \Google\Cloud\GkeHub\V1\FeatureState $state + * Output only. The "running state" of the Feature in this Fleet. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Feature::initOnce(); + parent::__construct($data); + } + + /** + * RBAC Role Binding Actuation feature state + * + * Generated from protobuf field .google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureState rbacrolebindingactuation = 120; + * @return \Google\Cloud\GkeHub\RbacRoleBindingActuation\V1\FeatureState|null + */ + public function getRbacrolebindingactuation() + { + return $this->readOneof(120); + } + + public function hasRbacrolebindingactuation() + { + return $this->hasOneof(120); + } + + /** + * RBAC Role Binding Actuation feature state + * + * Generated from protobuf field .google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureState rbacrolebindingactuation = 120; + * @param \Google\Cloud\GkeHub\RbacRoleBindingActuation\V1\FeatureState $var + * @return $this + */ + public function setRbacrolebindingactuation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\RbacRoleBindingActuation\V1\FeatureState::class); + $this->writeOneof(120, $var); + + return $this; + } + + /** + * Output only. The "running state" of the Feature in this Fleet. + * + * Generated from protobuf field .google.cloud.gkehub.v1.FeatureState state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\GkeHub\V1\FeatureState|null + */ + public function getState() + { + return $this->state; + } + + public function hasState() + { + return isset($this->state); + } + + public function clearState() + { + unset($this->state); + } + + /** + * Output only. The "running state" of the Feature in this Fleet. + * + * Generated from protobuf field .google.cloud.gkehub.v1.FeatureState state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\GkeHub\V1\FeatureState $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\FeatureState::class); + $this->state = $var; + + return $this; + } + + /** + * @return string + */ + public function getFeatureState() + { + return $this->whichOneof("feature_state"); + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CompliancePostureConfig.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CompliancePostureConfig.php new file mode 100644 index 000000000000..97ff18dc2f63 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CompliancePostureConfig.php @@ -0,0 +1,102 @@ +google.cloud.gkehub.v1.CompliancePostureConfig + */ +class CompliancePostureConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Defines the enablement mode for Compliance Posture. + * + * Generated from protobuf field .google.cloud.gkehub.v1.CompliancePostureConfig.Mode mode = 1; + */ + protected $mode = 0; + /** + * List of enabled compliance standards. + * + * Generated from protobuf field repeated .google.cloud.gkehub.v1.CompliancePostureConfig.ComplianceStandard compliance_standards = 2; + */ + private $compliance_standards; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $mode + * Defines the enablement mode for Compliance Posture. + * @type array<\Google\Cloud\GkeHub\V1\CompliancePostureConfig\ComplianceStandard>|\Google\Protobuf\Internal\RepeatedField $compliance_standards + * List of enabled compliance standards. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Fleet::initOnce(); + parent::__construct($data); + } + + /** + * Defines the enablement mode for Compliance Posture. + * + * Generated from protobuf field .google.cloud.gkehub.v1.CompliancePostureConfig.Mode mode = 1; + * @return int + */ + public function getMode() + { + return $this->mode; + } + + /** + * Defines the enablement mode for Compliance Posture. + * + * Generated from protobuf field .google.cloud.gkehub.v1.CompliancePostureConfig.Mode mode = 1; + * @param int $var + * @return $this + */ + public function setMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\V1\CompliancePostureConfig\Mode::class); + $this->mode = $var; + + return $this; + } + + /** + * List of enabled compliance standards. + * + * Generated from protobuf field repeated .google.cloud.gkehub.v1.CompliancePostureConfig.ComplianceStandard compliance_standards = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getComplianceStandards() + { + return $this->compliance_standards; + } + + /** + * List of enabled compliance standards. + * + * Generated from protobuf field repeated .google.cloud.gkehub.v1.CompliancePostureConfig.ComplianceStandard compliance_standards = 2; + * @param array<\Google\Cloud\GkeHub\V1\CompliancePostureConfig\ComplianceStandard>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setComplianceStandards($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\V1\CompliancePostureConfig\ComplianceStandard::class); + $this->compliance_standards = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CompliancePostureConfig/ComplianceStandard.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CompliancePostureConfig/ComplianceStandard.php new file mode 100644 index 000000000000..8ea368f23cc6 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CompliancePostureConfig/ComplianceStandard.php @@ -0,0 +1,68 @@ +google.cloud.gkehub.v1.CompliancePostureConfig.ComplianceStandard + */ +class ComplianceStandard extends \Google\Protobuf\Internal\Message +{ + /** + * Name of the compliance standard. + * + * Generated from protobuf field string standard = 1; + */ + protected $standard = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $standard + * Name of the compliance standard. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Fleet::initOnce(); + parent::__construct($data); + } + + /** + * Name of the compliance standard. + * + * Generated from protobuf field string standard = 1; + * @return string + */ + public function getStandard() + { + return $this->standard; + } + + /** + * Name of the compliance standard. + * + * Generated from protobuf field string standard = 1; + * @param string $var + * @return $this + */ + public function setStandard($var) + { + GPBUtil::checkString($var, True); + $this->standard = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ComplianceStandard::class, \Google\Cloud\GkeHub\V1\CompliancePostureConfig_ComplianceStandard::class); + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CompliancePostureConfig/Mode.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CompliancePostureConfig/Mode.php new file mode 100644 index 000000000000..34f9319ab412 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CompliancePostureConfig/Mode.php @@ -0,0 +1,62 @@ +google.cloud.gkehub.v1.CompliancePostureConfig.Mode + */ +class Mode +{ + /** + * Default value not specified. + * + * Generated from protobuf enum MODE_UNSPECIFIED = 0; + */ + const MODE_UNSPECIFIED = 0; + /** + * Disables Compliance Posture features on the cluster. + * + * Generated from protobuf enum DISABLED = 1; + */ + const DISABLED = 1; + /** + * Enables Compliance Posture features on the cluster. + * + * Generated from protobuf enum ENABLED = 2; + */ + const ENABLED = 2; + + private static $valueToName = [ + self::MODE_UNSPECIFIED => 'MODE_UNSPECIFIED', + self::DISABLED => 'DISABLED', + self::ENABLED => 'ENABLED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Mode::class, \Google\Cloud\GkeHub\V1\CompliancePostureConfig_Mode::class); + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ConnectAgentResource.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ConnectAgentResource.php new file mode 100644 index 000000000000..4514fd3f1b41 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ConnectAgentResource.php @@ -0,0 +1,112 @@ +google.cloud.gkehub.v1.ConnectAgentResource + */ +class ConnectAgentResource extends \Google\Protobuf\Internal\Message +{ + /** + * Kubernetes type of the resource. + * + * Generated from protobuf field .google.cloud.gkehub.v1.TypeMeta type = 1; + */ + protected $type = null; + /** + * YAML manifest of the resource. + * + * Generated from protobuf field string manifest = 2; + */ + protected $manifest = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\GkeHub\V1\TypeMeta $type + * Kubernetes type of the resource. + * @type string $manifest + * YAML manifest of the resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Kubernetes type of the resource. + * + * Generated from protobuf field .google.cloud.gkehub.v1.TypeMeta type = 1; + * @return \Google\Cloud\GkeHub\V1\TypeMeta|null + */ + public function getType() + { + return $this->type; + } + + public function hasType() + { + return isset($this->type); + } + + public function clearType() + { + unset($this->type); + } + + /** + * Kubernetes type of the resource. + * + * Generated from protobuf field .google.cloud.gkehub.v1.TypeMeta type = 1; + * @param \Google\Cloud\GkeHub\V1\TypeMeta $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\TypeMeta::class); + $this->type = $var; + + return $this; + } + + /** + * YAML manifest of the resource. + * + * Generated from protobuf field string manifest = 2; + * @return string + */ + public function getManifest() + { + return $this->manifest; + } + + /** + * YAML manifest of the resource. + * + * Generated from protobuf field string manifest = 2; + * @param string $var + * @return $this + */ + public function setManifest($var) + { + GPBUtil::checkString($var, True); + $this->manifest = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateFeatureRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateFeatureRequest.php new file mode 100644 index 000000000000..695f638751c3 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateFeatureRequest.php @@ -0,0 +1,241 @@ +google.cloud.gkehub.v1.CreateFeatureRequest + */ +class CreateFeatureRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent (project and location) where the Feature will be + * created. Specified in the format `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The ID of the feature to create. + * + * Generated from protobuf field string feature_id = 2; + */ + protected $feature_id = ''; + /** + * The Feature resource to create. + * + * Generated from protobuf field .google.cloud.gkehub.v1.Feature resource = 3; + */ + protected $resource = null; + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The parent (project and location) where the Feature will be + * created. Specified in the format `projects/*/locations/*`. + * @param \Google\Cloud\GkeHub\V1\Feature $resource The Feature resource to create. + * @param string $featureId The ID of the feature to create. + * + * @return \Google\Cloud\GkeHub\V1\CreateFeatureRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\GkeHub\V1\Feature $resource, string $featureId): self + { + return (new self()) + ->setParent($parent) + ->setResource($resource) + ->setFeatureId($featureId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent (project and location) where the Feature will be + * created. Specified in the format `projects/*/locations/*`. + * @type string $feature_id + * The ID of the feature to create. + * @type \Google\Cloud\GkeHub\V1\Feature $resource + * The Feature resource to create. + * @type string $request_id + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent (project and location) where the Feature will be + * created. Specified in the format `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent (project and location) where the Feature will be + * created. Specified in the format `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The ID of the feature to create. + * + * Generated from protobuf field string feature_id = 2; + * @return string + */ + public function getFeatureId() + { + return $this->feature_id; + } + + /** + * The ID of the feature to create. + * + * Generated from protobuf field string feature_id = 2; + * @param string $var + * @return $this + */ + public function setFeatureId($var) + { + GPBUtil::checkString($var, True); + $this->feature_id = $var; + + return $this; + } + + /** + * The Feature resource to create. + * + * Generated from protobuf field .google.cloud.gkehub.v1.Feature resource = 3; + * @return \Google\Cloud\GkeHub\V1\Feature|null + */ + public function getResource() + { + return $this->resource; + } + + public function hasResource() + { + return isset($this->resource); + } + + public function clearResource() + { + unset($this->resource); + } + + /** + * The Feature resource to create. + * + * Generated from protobuf field .google.cloud.gkehub.v1.Feature resource = 3; + * @param \Google\Cloud\GkeHub\V1\Feature $var + * @return $this + */ + public function setResource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\Feature::class); + $this->resource = $var; + + return $this; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateFleetRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateFleetRequest.php new file mode 100644 index 000000000000..42b09741456d --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateFleetRequest.php @@ -0,0 +1,132 @@ +google.cloud.gkehub.v1.CreateFleetRequest + */ +class CreateFleetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent (project and location) where the Fleet will be + * created. Specified in the format `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The fleet to create. + * + * Generated from protobuf field .google.cloud.gkehub.v1.Fleet fleet = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $fleet = null; + + /** + * @param string $parent Required. The parent (project and location) where the Fleet will be + * created. Specified in the format `projects/*/locations/*`. Please see + * {@see GkeHubClient::locationName()} for help formatting this field. + * @param \Google\Cloud\GkeHub\V1\Fleet $fleet Required. The fleet to create. + * + * @return \Google\Cloud\GkeHub\V1\CreateFleetRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\GkeHub\V1\Fleet $fleet): self + { + return (new self()) + ->setParent($parent) + ->setFleet($fleet); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent (project and location) where the Fleet will be + * created. Specified in the format `projects/*/locations/*`. + * @type \Google\Cloud\GkeHub\V1\Fleet $fleet + * Required. The fleet to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent (project and location) where the Fleet will be + * created. Specified in the format `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent (project and location) where the Fleet will be + * created. Specified in the format `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The fleet to create. + * + * Generated from protobuf field .google.cloud.gkehub.v1.Fleet fleet = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\GkeHub\V1\Fleet|null + */ + public function getFleet() + { + return $this->fleet; + } + + public function hasFleet() + { + return isset($this->fleet); + } + + public function clearFleet() + { + unset($this->fleet); + } + + /** + * Required. The fleet to create. + * + * Generated from protobuf field .google.cloud.gkehub.v1.Fleet fleet = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\GkeHub\V1\Fleet $var + * @return $this + */ + public function setFleet($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\Fleet::class); + $this->fleet = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateMembershipBindingRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateMembershipBindingRequest.php new file mode 100644 index 000000000000..b198ff4157f8 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateMembershipBindingRequest.php @@ -0,0 +1,173 @@ +google.cloud.gkehub.v1.CreateMembershipBindingRequest + */ +class CreateMembershipBindingRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent (project and location) where the MembershipBinding + * will be created. Specified in the format + * `projects/*/locations/*/memberships/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The MembershipBinding to create. + * + * Generated from protobuf field .google.cloud.gkehub.v1.MembershipBinding membership_binding = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $membership_binding = null; + /** + * Required. The ID to use for the MembershipBinding. + * + * Generated from protobuf field string membership_binding_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $membership_binding_id = ''; + + /** + * @param string $parent Required. The parent (project and location) where the MembershipBinding + * will be created. Specified in the format + * `projects/*/locations/*/memberships/*`. Please see + * {@see GkeHubClient::membershipName()} for help formatting this field. + * @param \Google\Cloud\GkeHub\V1\MembershipBinding $membershipBinding Required. The MembershipBinding to create. + * @param string $membershipBindingId Required. The ID to use for the MembershipBinding. + * + * @return \Google\Cloud\GkeHub\V1\CreateMembershipBindingRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\GkeHub\V1\MembershipBinding $membershipBinding, string $membershipBindingId): self + { + return (new self()) + ->setParent($parent) + ->setMembershipBinding($membershipBinding) + ->setMembershipBindingId($membershipBindingId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent (project and location) where the MembershipBinding + * will be created. Specified in the format + * `projects/*/locations/*/memberships/*`. + * @type \Google\Cloud\GkeHub\V1\MembershipBinding $membership_binding + * Required. The MembershipBinding to create. + * @type string $membership_binding_id + * Required. The ID to use for the MembershipBinding. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent (project and location) where the MembershipBinding + * will be created. Specified in the format + * `projects/*/locations/*/memberships/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent (project and location) where the MembershipBinding + * will be created. Specified in the format + * `projects/*/locations/*/memberships/*`. + * + * 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 MembershipBinding to create. + * + * Generated from protobuf field .google.cloud.gkehub.v1.MembershipBinding membership_binding = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\GkeHub\V1\MembershipBinding|null + */ + public function getMembershipBinding() + { + return $this->membership_binding; + } + + public function hasMembershipBinding() + { + return isset($this->membership_binding); + } + + public function clearMembershipBinding() + { + unset($this->membership_binding); + } + + /** + * Required. The MembershipBinding to create. + * + * Generated from protobuf field .google.cloud.gkehub.v1.MembershipBinding membership_binding = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\GkeHub\V1\MembershipBinding $var + * @return $this + */ + public function setMembershipBinding($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\MembershipBinding::class); + $this->membership_binding = $var; + + return $this; + } + + /** + * Required. The ID to use for the MembershipBinding. + * + * Generated from protobuf field string membership_binding_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getMembershipBindingId() + { + return $this->membership_binding_id; + } + + /** + * Required. The ID to use for the MembershipBinding. + * + * Generated from protobuf field string membership_binding_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setMembershipBindingId($var) + { + GPBUtil::checkString($var, True); + $this->membership_binding_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateMembershipRBACRoleBindingRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateMembershipRBACRoleBindingRequest.php new file mode 100644 index 000000000000..1a6aaf3c5ca7 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateMembershipRBACRoleBindingRequest.php @@ -0,0 +1,200 @@ +google.cloud.gkehub.v1.CreateMembershipRBACRoleBindingRequest + */ +class CreateMembershipRBACRoleBindingRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent (project and location) where the RBACRoleBinding will + * be created. Specified in the format `projects/*/locations/*/memberships/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` + * must be a valid RFC 1123 compliant DNS label: + * 1. At most 63 characters in length + * 2. It must consist of lower case alphanumeric characters or `-` + * 3. It must start and end with an alphanumeric character + * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + * with a maximum length of 63 characters. + * + * Generated from protobuf field string rbacrolebinding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $rbacrolebinding_id = ''; + /** + * Required. The rbacrolebindings to create. + * + * Generated from protobuf field .google.cloud.gkehub.v1.RBACRoleBinding rbacrolebinding = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $rbacrolebinding = null; + + /** + * @param string $parent Required. The parent (project and location) where the RBACRoleBinding will + * be created. Specified in the format `projects/*/locations/*/memberships/*`. Please see + * {@see GkeHubClient::scopeName()} for help formatting this field. + * @param \Google\Cloud\GkeHub\V1\RBACRoleBinding $rbacrolebinding Required. The rbacrolebindings to create. + * @param string $rbacrolebindingId Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` + * must be a valid RFC 1123 compliant DNS label: + * + * 1. At most 63 characters in length + * 2. It must consist of lower case alphanumeric characters or `-` + * 3. It must start and end with an alphanumeric character + * + * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + * with a maximum length of 63 characters. + * + * @return \Google\Cloud\GkeHub\V1\CreateMembershipRBACRoleBindingRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\GkeHub\V1\RBACRoleBinding $rbacrolebinding, string $rbacrolebindingId): self + { + return (new self()) + ->setParent($parent) + ->setRbacrolebinding($rbacrolebinding) + ->setRbacrolebindingId($rbacrolebindingId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent (project and location) where the RBACRoleBinding will + * be created. Specified in the format `projects/*/locations/*/memberships/*`. + * @type string $rbacrolebinding_id + * Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` + * must be a valid RFC 1123 compliant DNS label: + * 1. At most 63 characters in length + * 2. It must consist of lower case alphanumeric characters or `-` + * 3. It must start and end with an alphanumeric character + * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + * with a maximum length of 63 characters. + * @type \Google\Cloud\GkeHub\V1\RBACRoleBinding $rbacrolebinding + * Required. The rbacrolebindings to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent (project and location) where the RBACRoleBinding will + * be created. Specified in the format `projects/*/locations/*/memberships/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent (project and location) where the RBACRoleBinding will + * be created. Specified in the format `projects/*/locations/*/memberships/*`. + * + * 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. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` + * must be a valid RFC 1123 compliant DNS label: + * 1. At most 63 characters in length + * 2. It must consist of lower case alphanumeric characters or `-` + * 3. It must start and end with an alphanumeric character + * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + * with a maximum length of 63 characters. + * + * Generated from protobuf field string rbacrolebinding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getRbacrolebindingId() + { + return $this->rbacrolebinding_id; + } + + /** + * Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` + * must be a valid RFC 1123 compliant DNS label: + * 1. At most 63 characters in length + * 2. It must consist of lower case alphanumeric characters or `-` + * 3. It must start and end with an alphanumeric character + * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + * with a maximum length of 63 characters. + * + * Generated from protobuf field string rbacrolebinding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setRbacrolebindingId($var) + { + GPBUtil::checkString($var, True); + $this->rbacrolebinding_id = $var; + + return $this; + } + + /** + * Required. The rbacrolebindings to create. + * + * Generated from protobuf field .google.cloud.gkehub.v1.RBACRoleBinding rbacrolebinding = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\GkeHub\V1\RBACRoleBinding|null + */ + public function getRbacrolebinding() + { + return $this->rbacrolebinding; + } + + public function hasRbacrolebinding() + { + return isset($this->rbacrolebinding); + } + + public function clearRbacrolebinding() + { + unset($this->rbacrolebinding); + } + + /** + * Required. The rbacrolebindings to create. + * + * Generated from protobuf field .google.cloud.gkehub.v1.RBACRoleBinding rbacrolebinding = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\GkeHub\V1\RBACRoleBinding $var + * @return $this + */ + public function setRbacrolebinding($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\RBACRoleBinding::class); + $this->rbacrolebinding = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateMembershipRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateMembershipRequest.php new file mode 100644 index 000000000000..7ed12c498291 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateMembershipRequest.php @@ -0,0 +1,274 @@ +google.cloud.gkehub.v1.CreateMembershipRequest + */ +class CreateMembershipRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent (project and location) where the Memberships will be + * created. Specified in the format `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Client chosen ID for the membership. `membership_id` must be a + * valid RFC 1123 compliant DNS label: + * 1. At most 63 characters in length + * 2. It must consist of lower case alphanumeric characters or `-` + * 3. It must start and end with an alphanumeric character + * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + * with a maximum length of 63 characters. + * + * Generated from protobuf field string membership_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $membership_id = ''; + /** + * Required. The membership to create. + * + * Generated from protobuf field .google.cloud.gkehub.v1.Membership resource = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $resource = null; + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The parent (project and location) where the Memberships will be + * created. Specified in the format `projects/*/locations/*`. Please see + * {@see GkeHubClient::locationName()} for help formatting this field. + * @param \Google\Cloud\GkeHub\V1\Membership $resource Required. The membership to create. + * @param string $membershipId Required. Client chosen ID for the membership. `membership_id` must be a + * valid RFC 1123 compliant DNS label: + * + * 1. At most 63 characters in length + * 2. It must consist of lower case alphanumeric characters or `-` + * 3. It must start and end with an alphanumeric character + * + * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + * with a maximum length of 63 characters. + * + * @return \Google\Cloud\GkeHub\V1\CreateMembershipRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\GkeHub\V1\Membership $resource, string $membershipId): self + { + return (new self()) + ->setParent($parent) + ->setResource($resource) + ->setMembershipId($membershipId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent (project and location) where the Memberships will be + * created. Specified in the format `projects/*/locations/*`. + * @type string $membership_id + * Required. Client chosen ID for the membership. `membership_id` must be a + * valid RFC 1123 compliant DNS label: + * 1. At most 63 characters in length + * 2. It must consist of lower case alphanumeric characters or `-` + * 3. It must start and end with an alphanumeric character + * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + * with a maximum length of 63 characters. + * @type \Google\Cloud\GkeHub\V1\Membership $resource + * Required. The membership to create. + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent (project and location) where the Memberships will be + * created. Specified in the format `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent (project and location) where the Memberships will be + * created. Specified in the format `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. Client chosen ID for the membership. `membership_id` must be a + * valid RFC 1123 compliant DNS label: + * 1. At most 63 characters in length + * 2. It must consist of lower case alphanumeric characters or `-` + * 3. It must start and end with an alphanumeric character + * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + * with a maximum length of 63 characters. + * + * Generated from protobuf field string membership_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getMembershipId() + { + return $this->membership_id; + } + + /** + * Required. Client chosen ID for the membership. `membership_id` must be a + * valid RFC 1123 compliant DNS label: + * 1. At most 63 characters in length + * 2. It must consist of lower case alphanumeric characters or `-` + * 3. It must start and end with an alphanumeric character + * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + * with a maximum length of 63 characters. + * + * Generated from protobuf field string membership_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setMembershipId($var) + { + GPBUtil::checkString($var, True); + $this->membership_id = $var; + + return $this; + } + + /** + * Required. The membership to create. + * + * Generated from protobuf field .google.cloud.gkehub.v1.Membership resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\GkeHub\V1\Membership|null + */ + public function getResource() + { + return $this->resource; + } + + public function hasResource() + { + return isset($this->resource); + } + + public function clearResource() + { + unset($this->resource); + } + + /** + * Required. The membership to create. + * + * Generated from protobuf field .google.cloud.gkehub.v1.Membership resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\GkeHub\V1\Membership $var + * @return $this + */ + public function setResource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\Membership::class); + $this->resource = $var; + + return $this; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateScopeNamespaceRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateScopeNamespaceRequest.php new file mode 100644 index 000000000000..7cee2fb195a1 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateScopeNamespaceRequest.php @@ -0,0 +1,200 @@ +google.cloud.gkehub.v1.CreateScopeNamespaceRequest + */ +class CreateScopeNamespaceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent (project and location) where the Namespace will be + * created. Specified in the format `projects/*/locations/*/scopes/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Client chosen ID for the Namespace. `namespace_id` must be a + * valid RFC 1123 compliant DNS label: + * 1. At most 63 characters in length + * 2. It must consist of lower case alphanumeric characters or `-` + * 3. It must start and end with an alphanumeric character + * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + * with a maximum length of 63 characters. + * + * Generated from protobuf field string scope_namespace_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $scope_namespace_id = ''; + /** + * Required. The fleet namespace to create. + * + * Generated from protobuf field .google.cloud.gkehub.v1.Namespace scope_namespace = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $scope_namespace = null; + + /** + * @param string $parent Required. The parent (project and location) where the Namespace will be + * created. Specified in the format `projects/*/locations/*/scopes/*`. Please see + * {@see GkeHubClient::scopeName()} for help formatting this field. + * @param \Google\Cloud\GkeHub\V1\PBNamespace $scopeNamespace Required. The fleet namespace to create. + * @param string $scopeNamespaceId Required. Client chosen ID for the Namespace. `namespace_id` must be a + * valid RFC 1123 compliant DNS label: + * + * 1. At most 63 characters in length + * 2. It must consist of lower case alphanumeric characters or `-` + * 3. It must start and end with an alphanumeric character + * + * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + * with a maximum length of 63 characters. + * + * @return \Google\Cloud\GkeHub\V1\CreateScopeNamespaceRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\GkeHub\V1\PBNamespace $scopeNamespace, string $scopeNamespaceId): self + { + return (new self()) + ->setParent($parent) + ->setScopeNamespace($scopeNamespace) + ->setScopeNamespaceId($scopeNamespaceId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent (project and location) where the Namespace will be + * created. Specified in the format `projects/*/locations/*/scopes/*`. + * @type string $scope_namespace_id + * Required. Client chosen ID for the Namespace. `namespace_id` must be a + * valid RFC 1123 compliant DNS label: + * 1. At most 63 characters in length + * 2. It must consist of lower case alphanumeric characters or `-` + * 3. It must start and end with an alphanumeric character + * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + * with a maximum length of 63 characters. + * @type \Google\Cloud\GkeHub\V1\PBNamespace $scope_namespace + * Required. The fleet namespace to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent (project and location) where the Namespace will be + * created. Specified in the format `projects/*/locations/*/scopes/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent (project and location) where the Namespace will be + * created. Specified in the format `projects/*/locations/*/scopes/*`. + * + * 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. Client chosen ID for the Namespace. `namespace_id` must be a + * valid RFC 1123 compliant DNS label: + * 1. At most 63 characters in length + * 2. It must consist of lower case alphanumeric characters or `-` + * 3. It must start and end with an alphanumeric character + * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + * with a maximum length of 63 characters. + * + * Generated from protobuf field string scope_namespace_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getScopeNamespaceId() + { + return $this->scope_namespace_id; + } + + /** + * Required. Client chosen ID for the Namespace. `namespace_id` must be a + * valid RFC 1123 compliant DNS label: + * 1. At most 63 characters in length + * 2. It must consist of lower case alphanumeric characters or `-` + * 3. It must start and end with an alphanumeric character + * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + * with a maximum length of 63 characters. + * + * Generated from protobuf field string scope_namespace_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setScopeNamespaceId($var) + { + GPBUtil::checkString($var, True); + $this->scope_namespace_id = $var; + + return $this; + } + + /** + * Required. The fleet namespace to create. + * + * Generated from protobuf field .google.cloud.gkehub.v1.Namespace scope_namespace = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\GkeHub\V1\PBNamespace|null + */ + public function getScopeNamespace() + { + return $this->scope_namespace; + } + + public function hasScopeNamespace() + { + return isset($this->scope_namespace); + } + + public function clearScopeNamespace() + { + unset($this->scope_namespace); + } + + /** + * Required. The fleet namespace to create. + * + * Generated from protobuf field .google.cloud.gkehub.v1.Namespace scope_namespace = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\GkeHub\V1\PBNamespace $var + * @return $this + */ + public function setScopeNamespace($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\PBNamespace::class); + $this->scope_namespace = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateScopeRBACRoleBindingRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateScopeRBACRoleBindingRequest.php new file mode 100644 index 000000000000..86ecf8a65955 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateScopeRBACRoleBindingRequest.php @@ -0,0 +1,200 @@ +google.cloud.gkehub.v1.CreateScopeRBACRoleBindingRequest + */ +class CreateScopeRBACRoleBindingRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent (project and location) where the RBACRoleBinding will + * be created. Specified in the format `projects/*/locations/*/scopes/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` + * must be a valid RFC 1123 compliant DNS label: + * 1. At most 63 characters in length + * 2. It must consist of lower case alphanumeric characters or `-` + * 3. It must start and end with an alphanumeric character + * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + * with a maximum length of 63 characters. + * + * Generated from protobuf field string rbacrolebinding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $rbacrolebinding_id = ''; + /** + * Required. The rbacrolebindings to create. + * + * Generated from protobuf field .google.cloud.gkehub.v1.RBACRoleBinding rbacrolebinding = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $rbacrolebinding = null; + + /** + * @param string $parent Required. The parent (project and location) where the RBACRoleBinding will + * be created. Specified in the format `projects/*/locations/*/scopes/*`. Please see + * {@see GkeHubClient::scopeName()} for help formatting this field. + * @param \Google\Cloud\GkeHub\V1\RBACRoleBinding $rbacrolebinding Required. The rbacrolebindings to create. + * @param string $rbacrolebindingId Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` + * must be a valid RFC 1123 compliant DNS label: + * + * 1. At most 63 characters in length + * 2. It must consist of lower case alphanumeric characters or `-` + * 3. It must start and end with an alphanumeric character + * + * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + * with a maximum length of 63 characters. + * + * @return \Google\Cloud\GkeHub\V1\CreateScopeRBACRoleBindingRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\GkeHub\V1\RBACRoleBinding $rbacrolebinding, string $rbacrolebindingId): self + { + return (new self()) + ->setParent($parent) + ->setRbacrolebinding($rbacrolebinding) + ->setRbacrolebindingId($rbacrolebindingId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent (project and location) where the RBACRoleBinding will + * be created. Specified in the format `projects/*/locations/*/scopes/*`. + * @type string $rbacrolebinding_id + * Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` + * must be a valid RFC 1123 compliant DNS label: + * 1. At most 63 characters in length + * 2. It must consist of lower case alphanumeric characters or `-` + * 3. It must start and end with an alphanumeric character + * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + * with a maximum length of 63 characters. + * @type \Google\Cloud\GkeHub\V1\RBACRoleBinding $rbacrolebinding + * Required. The rbacrolebindings to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent (project and location) where the RBACRoleBinding will + * be created. Specified in the format `projects/*/locations/*/scopes/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent (project and location) where the RBACRoleBinding will + * be created. Specified in the format `projects/*/locations/*/scopes/*`. + * + * 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. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` + * must be a valid RFC 1123 compliant DNS label: + * 1. At most 63 characters in length + * 2. It must consist of lower case alphanumeric characters or `-` + * 3. It must start and end with an alphanumeric character + * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + * with a maximum length of 63 characters. + * + * Generated from protobuf field string rbacrolebinding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getRbacrolebindingId() + { + return $this->rbacrolebinding_id; + } + + /** + * Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` + * must be a valid RFC 1123 compliant DNS label: + * 1. At most 63 characters in length + * 2. It must consist of lower case alphanumeric characters or `-` + * 3. It must start and end with an alphanumeric character + * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + * with a maximum length of 63 characters. + * + * Generated from protobuf field string rbacrolebinding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setRbacrolebindingId($var) + { + GPBUtil::checkString($var, True); + $this->rbacrolebinding_id = $var; + + return $this; + } + + /** + * Required. The rbacrolebindings to create. + * + * Generated from protobuf field .google.cloud.gkehub.v1.RBACRoleBinding rbacrolebinding = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\GkeHub\V1\RBACRoleBinding|null + */ + public function getRbacrolebinding() + { + return $this->rbacrolebinding; + } + + public function hasRbacrolebinding() + { + return isset($this->rbacrolebinding); + } + + public function clearRbacrolebinding() + { + unset($this->rbacrolebinding); + } + + /** + * Required. The rbacrolebindings to create. + * + * Generated from protobuf field .google.cloud.gkehub.v1.RBACRoleBinding rbacrolebinding = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\GkeHub\V1\RBACRoleBinding $var + * @return $this + */ + public function setRbacrolebinding($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\RBACRoleBinding::class); + $this->rbacrolebinding = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateScopeRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateScopeRequest.php new file mode 100644 index 000000000000..f43515f00b0f --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateScopeRequest.php @@ -0,0 +1,173 @@ +google.cloud.gkehub.v1.CreateScopeRequest + */ +class CreateScopeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent (project and location) where the Scope will be + * created. Specified in the format `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Client chosen ID for the Scope. `scope_id` must be a + * ???? + * + * Generated from protobuf field string scope_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $scope_id = ''; + /** + * Required. The Scope to create. + * + * Generated from protobuf field .google.cloud.gkehub.v1.Scope scope = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $scope = null; + + /** + * @param string $parent Required. The parent (project and location) where the Scope will be + * created. Specified in the format `projects/*/locations/*`. Please see + * {@see GkeHubClient::locationName()} for help formatting this field. + * @param \Google\Cloud\GkeHub\V1\Scope $scope Required. The Scope to create. + * @param string $scopeId Required. Client chosen ID for the Scope. `scope_id` must be a + * ???? + * + * @return \Google\Cloud\GkeHub\V1\CreateScopeRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\GkeHub\V1\Scope $scope, string $scopeId): self + { + return (new self()) + ->setParent($parent) + ->setScope($scope) + ->setScopeId($scopeId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent (project and location) where the Scope will be + * created. Specified in the format `projects/*/locations/*`. + * @type string $scope_id + * Required. Client chosen ID for the Scope. `scope_id` must be a + * ???? + * @type \Google\Cloud\GkeHub\V1\Scope $scope + * Required. The Scope to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent (project and location) where the Scope will be + * created. Specified in the format `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent (project and location) where the Scope will be + * created. Specified in the format `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. Client chosen ID for the Scope. `scope_id` must be a + * ???? + * + * Generated from protobuf field string scope_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getScopeId() + { + return $this->scope_id; + } + + /** + * Required. Client chosen ID for the Scope. `scope_id` must be a + * ???? + * + * Generated from protobuf field string scope_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setScopeId($var) + { + GPBUtil::checkString($var, True); + $this->scope_id = $var; + + return $this; + } + + /** + * Required. The Scope to create. + * + * Generated from protobuf field .google.cloud.gkehub.v1.Scope scope = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\GkeHub\V1\Scope|null + */ + public function getScope() + { + return $this->scope; + } + + public function hasScope() + { + return isset($this->scope); + } + + public function clearScope() + { + unset($this->scope); + } + + /** + * Required. The Scope to create. + * + * Generated from protobuf field .google.cloud.gkehub.v1.Scope scope = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\GkeHub\V1\Scope $var + * @return $this + */ + public function setScope($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\Scope::class); + $this->scope = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DefaultClusterConfig.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DefaultClusterConfig.php new file mode 100644 index 000000000000..4bceba2aca0e --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DefaultClusterConfig.php @@ -0,0 +1,174 @@ +google.cloud.gkehub.v1.DefaultClusterConfig + */ +class DefaultClusterConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Enable/Disable Security Posture features for the cluster. + * + * Generated from protobuf field .google.cloud.gkehub.v1.SecurityPostureConfig security_posture_config = 1; + */ + protected $security_posture_config = null; + /** + * Optional. Enable/Disable binary authorization features for the cluster. + * + * Generated from protobuf field .google.cloud.gkehub.v1.BinaryAuthorizationConfig binary_authorization_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $binary_authorization_config = null; + /** + * Optional. Enable/Disable Compliance Posture features for the cluster. + * Note that on UpdateFleet, only full replacement of this field is allowed. + * Users are not allowed for partial updates through field mask. + * + * Generated from protobuf field .google.cloud.gkehub.v1.CompliancePostureConfig compliance_posture_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $compliance_posture_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\GkeHub\V1\SecurityPostureConfig $security_posture_config + * Enable/Disable Security Posture features for the cluster. + * @type \Google\Cloud\GkeHub\V1\BinaryAuthorizationConfig $binary_authorization_config + * Optional. Enable/Disable binary authorization features for the cluster. + * @type \Google\Cloud\GkeHub\V1\CompliancePostureConfig $compliance_posture_config + * Optional. Enable/Disable Compliance Posture features for the cluster. + * Note that on UpdateFleet, only full replacement of this field is allowed. + * Users are not allowed for partial updates through field mask. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Fleet::initOnce(); + parent::__construct($data); + } + + /** + * Enable/Disable Security Posture features for the cluster. + * + * Generated from protobuf field .google.cloud.gkehub.v1.SecurityPostureConfig security_posture_config = 1; + * @return \Google\Cloud\GkeHub\V1\SecurityPostureConfig|null + */ + public function getSecurityPostureConfig() + { + return $this->security_posture_config; + } + + public function hasSecurityPostureConfig() + { + return isset($this->security_posture_config); + } + + public function clearSecurityPostureConfig() + { + unset($this->security_posture_config); + } + + /** + * Enable/Disable Security Posture features for the cluster. + * + * Generated from protobuf field .google.cloud.gkehub.v1.SecurityPostureConfig security_posture_config = 1; + * @param \Google\Cloud\GkeHub\V1\SecurityPostureConfig $var + * @return $this + */ + public function setSecurityPostureConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\SecurityPostureConfig::class); + $this->security_posture_config = $var; + + return $this; + } + + /** + * Optional. Enable/Disable binary authorization features for the cluster. + * + * Generated from protobuf field .google.cloud.gkehub.v1.BinaryAuthorizationConfig binary_authorization_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeHub\V1\BinaryAuthorizationConfig|null + */ + public function getBinaryAuthorizationConfig() + { + return $this->binary_authorization_config; + } + + public function hasBinaryAuthorizationConfig() + { + return isset($this->binary_authorization_config); + } + + public function clearBinaryAuthorizationConfig() + { + unset($this->binary_authorization_config); + } + + /** + * Optional. Enable/Disable binary authorization features for the cluster. + * + * Generated from protobuf field .google.cloud.gkehub.v1.BinaryAuthorizationConfig binary_authorization_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeHub\V1\BinaryAuthorizationConfig $var + * @return $this + */ + public function setBinaryAuthorizationConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\BinaryAuthorizationConfig::class); + $this->binary_authorization_config = $var; + + return $this; + } + + /** + * Optional. Enable/Disable Compliance Posture features for the cluster. + * Note that on UpdateFleet, only full replacement of this field is allowed. + * Users are not allowed for partial updates through field mask. + * + * Generated from protobuf field .google.cloud.gkehub.v1.CompliancePostureConfig compliance_posture_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeHub\V1\CompliancePostureConfig|null + */ + public function getCompliancePostureConfig() + { + return $this->compliance_posture_config; + } + + public function hasCompliancePostureConfig() + { + return isset($this->compliance_posture_config); + } + + public function clearCompliancePostureConfig() + { + unset($this->compliance_posture_config); + } + + /** + * Optional. Enable/Disable Compliance Posture features for the cluster. + * Note that on UpdateFleet, only full replacement of this field is allowed. + * Users are not allowed for partial updates through field mask. + * + * Generated from protobuf field .google.cloud.gkehub.v1.CompliancePostureConfig compliance_posture_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeHub\V1\CompliancePostureConfig $var + * @return $this + */ + public function setCompliancePostureConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\CompliancePostureConfig::class); + $this->compliance_posture_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteFeatureRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteFeatureRequest.php new file mode 100644 index 000000000000..e4859d9f53cb --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteFeatureRequest.php @@ -0,0 +1,201 @@ +google.cloud.gkehub.v1.DeleteFeatureRequest + */ +class DeleteFeatureRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Feature resource name in the format + * `projects/*/locations/*/features/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * If set to true, the delete will ignore any outstanding resources for + * this Feature (that is, `FeatureState.has_resources` is set to true). These + * resources will NOT be cleaned up or modified in any way. + * + * Generated from protobuf field bool force = 2; + */ + protected $force = false; + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $name Required. The Feature resource name in the format + * `projects/*/locations/*/features/*`. + * + * @return \Google\Cloud\GkeHub\V1\DeleteFeatureRequest + * + * @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 Feature resource name in the format + * `projects/*/locations/*/features/*`. + * @type bool $force + * If set to true, the delete will ignore any outstanding resources for + * this Feature (that is, `FeatureState.has_resources` is set to true). These + * resources will NOT be cleaned up or modified in any way. + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Feature resource name in the format + * `projects/*/locations/*/features/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The Feature resource name in the format + * `projects/*/locations/*/features/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * If set to true, the delete will ignore any outstanding resources for + * this Feature (that is, `FeatureState.has_resources` is set to true). These + * resources will NOT be cleaned up or modified in any way. + * + * Generated from protobuf field bool force = 2; + * @return bool + */ + public function getForce() + { + return $this->force; + } + + /** + * If set to true, the delete will ignore any outstanding resources for + * this Feature (that is, `FeatureState.has_resources` is set to true). These + * resources will NOT be cleaned up or modified in any way. + * + * Generated from protobuf field bool force = 2; + * @param bool $var + * @return $this + */ + public function setForce($var) + { + GPBUtil::checkBool($var); + $this->force = $var; + + return $this; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteFleetRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteFleetRequest.php new file mode 100644 index 000000000000..1168f4e80769 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteFleetRequest.php @@ -0,0 +1,86 @@ +google.cloud.gkehub.v1.DeleteFleetRequest + */ +class DeleteFleetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Fleet resource name in the format + * `projects/*/locations/*/fleets/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The Fleet resource name in the format + * `projects/*/locations/*/fleets/*`. Please see + * {@see GkeHubClient::fleetName()} for help formatting this field. + * + * @return \Google\Cloud\GkeHub\V1\DeleteFleetRequest + * + * @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 Fleet resource name in the format + * `projects/*/locations/*/fleets/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Fleet resource name in the format + * `projects/*/locations/*/fleets/*`. + * + * 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 Fleet resource name in the format + * `projects/*/locations/*/fleets/*`. + * + * 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/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteMembershipBindingRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteMembershipBindingRequest.php new file mode 100644 index 000000000000..59e9d5387ef6 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteMembershipBindingRequest.php @@ -0,0 +1,86 @@ +google.cloud.gkehub.v1.DeleteMembershipBindingRequest + */ +class DeleteMembershipBindingRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The MembershipBinding resource name in the format + * `projects/*/locations/*/memberships/*/bindings/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The MembershipBinding resource name in the format + * `projects/*/locations/*/memberships/*/bindings/*`. Please see + * {@see GkeHubClient::membershipBindingName()} for help formatting this field. + * + * @return \Google\Cloud\GkeHub\V1\DeleteMembershipBindingRequest + * + * @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 MembershipBinding resource name in the format + * `projects/*/locations/*/memberships/*/bindings/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The MembershipBinding resource name in the format + * `projects/*/locations/*/memberships/*/bindings/*`. + * + * 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 MembershipBinding resource name in the format + * `projects/*/locations/*/memberships/*/bindings/*`. + * + * 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/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteMembershipRBACRoleBindingRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteMembershipRBACRoleBindingRequest.php new file mode 100644 index 000000000000..6e2ce93d3178 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteMembershipRBACRoleBindingRequest.php @@ -0,0 +1,86 @@ +google.cloud.gkehub.v1.DeleteMembershipRBACRoleBindingRequest + */ +class DeleteMembershipRBACRoleBindingRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The RBACRoleBinding resource name in the format + * `projects/*/locations/*/memberships/*/rbacrolebindings/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The RBACRoleBinding resource name in the format + * `projects/*/locations/*/memberships/*/rbacrolebindings/*`. Please see + * {@see GkeHubClient::rBACRoleBindingName()} for help formatting this field. + * + * @return \Google\Cloud\GkeHub\V1\DeleteMembershipRBACRoleBindingRequest + * + * @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 RBACRoleBinding resource name in the format + * `projects/*/locations/*/memberships/*/rbacrolebindings/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The RBACRoleBinding resource name in the format + * `projects/*/locations/*/memberships/*/rbacrolebindings/*`. + * + * 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 RBACRoleBinding resource name in the format + * `projects/*/locations/*/memberships/*/rbacrolebindings/*`. + * + * 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/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteMembershipRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteMembershipRequest.php new file mode 100644 index 000000000000..cf246161bdbe --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteMembershipRequest.php @@ -0,0 +1,202 @@ +google.cloud.gkehub.v1.DeleteMembershipRequest + */ +class DeleteMembershipRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Membership resource name in the format + * `projects/*/locations/*/memberships/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + /** + * Optional. If set to true, any subresource from this Membership will also be + * deleted. Otherwise, the request will only work if the Membership has no + * subresource. + * + * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $force = false; + + /** + * @param string $name Required. The Membership resource name in the format + * `projects/*/locations/*/memberships/*`. Please see + * {@see GkeHubClient::membershipName()} for help formatting this field. + * + * @return \Google\Cloud\GkeHub\V1\DeleteMembershipRequest + * + * @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 Membership resource name in the format + * `projects/*/locations/*/memberships/*`. + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type bool $force + * Optional. If set to true, any subresource from this Membership will also be + * deleted. Otherwise, the request will only work if the Membership has no + * subresource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Membership resource name in the format + * `projects/*/locations/*/memberships/*`. + * + * 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 Membership resource name in the format + * `projects/*/locations/*/memberships/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Optional. If set to true, any subresource from this Membership will also be + * deleted. Otherwise, the request will only work if the Membership has no + * subresource. + * + * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getForce() + { + return $this->force; + } + + /** + * Optional. If set to true, any subresource from this Membership will also be + * deleted. Otherwise, the request will only work if the Membership has no + * subresource. + * + * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setForce($var) + { + GPBUtil::checkBool($var); + $this->force = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteScopeNamespaceRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteScopeNamespaceRequest.php new file mode 100644 index 000000000000..da4a45ddeccf --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteScopeNamespaceRequest.php @@ -0,0 +1,86 @@ +google.cloud.gkehub.v1.DeleteScopeNamespaceRequest + */ +class DeleteScopeNamespaceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Namespace resource name in the format + * `projects/*/locations/*/scopes/*/namespaces/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The Namespace resource name in the format + * `projects/*/locations/*/scopes/*/namespaces/*`. Please see + * {@see GkeHubClient::namespaceName()} for help formatting this field. + * + * @return \Google\Cloud\GkeHub\V1\DeleteScopeNamespaceRequest + * + * @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 Namespace resource name in the format + * `projects/*/locations/*/scopes/*/namespaces/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Namespace resource name in the format + * `projects/*/locations/*/scopes/*/namespaces/*`. + * + * 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 Namespace resource name in the format + * `projects/*/locations/*/scopes/*/namespaces/*`. + * + * 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/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteScopeRBACRoleBindingRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteScopeRBACRoleBindingRequest.php new file mode 100644 index 000000000000..f7cb6755ae90 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteScopeRBACRoleBindingRequest.php @@ -0,0 +1,86 @@ +google.cloud.gkehub.v1.DeleteScopeRBACRoleBindingRequest + */ +class DeleteScopeRBACRoleBindingRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The RBACRoleBinding resource name in the format + * `projects/*/locations/*/scopes/*/rbacrolebindings/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The RBACRoleBinding resource name in the format + * `projects/*/locations/*/scopes/*/rbacrolebindings/*`. Please see + * {@see GkeHubClient::rBACRoleBindingName()} for help formatting this field. + * + * @return \Google\Cloud\GkeHub\V1\DeleteScopeRBACRoleBindingRequest + * + * @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 RBACRoleBinding resource name in the format + * `projects/*/locations/*/scopes/*/rbacrolebindings/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The RBACRoleBinding resource name in the format + * `projects/*/locations/*/scopes/*/rbacrolebindings/*`. + * + * 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 RBACRoleBinding resource name in the format + * `projects/*/locations/*/scopes/*/rbacrolebindings/*`. + * + * 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/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteScopeRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteScopeRequest.php new file mode 100644 index 000000000000..5f41f3d6f5eb --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteScopeRequest.php @@ -0,0 +1,86 @@ +google.cloud.gkehub.v1.DeleteScopeRequest + */ +class DeleteScopeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Scope resource name in the format + * `projects/*/locations/*/scopes/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The Scope resource name in the format + * `projects/*/locations/*/scopes/*`. Please see + * {@see GkeHubClient::scopeName()} for help formatting this field. + * + * @return \Google\Cloud\GkeHub\V1\DeleteScopeRequest + * + * @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 Scope resource name in the format + * `projects/*/locations/*/scopes/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Scope resource name in the format + * `projects/*/locations/*/scopes/*`. + * + * 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 Scope resource name in the format + * `projects/*/locations/*/scopes/*`. + * + * 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/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/Feature.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/Feature.php new file mode 100644 index 000000000000..72d52cfe3f02 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/Feature.php @@ -0,0 +1,687 @@ +google.cloud.gkehub.v1.Feature + */ +class Feature extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The full, unique name of this Feature resource in the format + * `projects/*/locations/*/features/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Labels for this Feature. + * + * Generated from protobuf field map labels = 2; + */ + private $labels; + /** + * Output only. State of the Feature resource itself. + * + * Generated from protobuf field .google.cloud.gkehub.v1.FeatureResourceState resource_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $resource_state = null; + /** + * Optional. Fleet-wide Feature configuration. If this Feature does not + * support any Fleet-wide configuration, this field may be unused. + * + * Generated from protobuf field .google.cloud.gkehub.v1.CommonFeatureSpec spec = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $spec = null; + /** + * Optional. Membership-specific configuration for this Feature. If this + * Feature does not support any per-Membership configuration, this field may + * be unused. + * The keys indicate which Membership the configuration is for, in the form: + * `projects/{p}/locations/{l}/memberships/{m}` + * Where {p} is the project, {l} is a valid location and {m} is a valid + * Membership in this project at that location. {p} WILL match the Feature's + * project. + * {p} will always be returned as the project number, but the project ID is + * also accepted during input. If the same Membership is specified in the map + * twice (using the project ID form, and the project number form), exactly + * ONE of the entries will be saved, with no guarantees as to which. For this + * reason, it is recommended the same format be used for all entries when + * mutating a Feature. + * + * Generated from protobuf field map membership_specs = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $membership_specs; + /** + * Output only. The Fleet-wide Feature state. + * + * Generated from protobuf field .google.cloud.gkehub.v1.CommonFeatureState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = null; + /** + * Output only. Membership-specific Feature status. If this Feature does + * report any per-Membership status, this field may be unused. + * The keys indicate which Membership the state is for, in the form: + * `projects/{p}/locations/{l}/memberships/{m}` + * Where {p} is the project number, {l} is a valid location and {m} is a valid + * Membership in this project at that location. {p} MUST match the Feature's + * project number. + * + * Generated from protobuf field map membership_states = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $membership_states; + /** + * Output only. When the Feature resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. When the Feature resource was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. When the Feature resource was deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $delete_time = null; + /** + * Optional. Scope-specific configuration for this Feature. If this Feature + * does not support any per-Scope configuration, this field may be unused. + * The keys indicate which Scope the configuration is for, in the form: + * `projects/{p}/locations/global/scopes/{s}` + * Where {p} is the project, {s} is a valid Scope in this project. + * {p} WILL match the Feature's project. + * {p} will always be returned as the project number, but the project ID is + * also accepted during input. If the same Scope is specified in the map + * twice (using the project ID form, and the project number form), exactly + * ONE of the entries will be saved, with no guarantees as to which. For this + * reason, it is recommended the same format be used for all entries when + * mutating a Feature. + * + * Generated from protobuf field map scope_specs = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $scope_specs; + /** + * Output only. Scope-specific Feature status. If this Feature does + * report any per-Scope status, this field may be unused. + * The keys indicate which Scope the state is for, in the form: + * `projects/{p}/locations/global/scopes/{s}` + * Where {p} is the project, {s} is a valid Scope in this project. + * {p} WILL match the Feature's project. + * + * Generated from protobuf field map scope_states = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $scope_states; + /** + * Output only. List of locations that could not be reached while fetching + * this feature. + * + * Generated from protobuf field repeated string unreachable = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The full, unique name of this Feature resource in the format + * `projects/*/locations/*/features/*`. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Labels for this Feature. + * @type \Google\Cloud\GkeHub\V1\FeatureResourceState $resource_state + * Output only. State of the Feature resource itself. + * @type \Google\Cloud\GkeHub\V1\CommonFeatureSpec $spec + * Optional. Fleet-wide Feature configuration. If this Feature does not + * support any Fleet-wide configuration, this field may be unused. + * @type array|\Google\Protobuf\Internal\MapField $membership_specs + * Optional. Membership-specific configuration for this Feature. If this + * Feature does not support any per-Membership configuration, this field may + * be unused. + * The keys indicate which Membership the configuration is for, in the form: + * `projects/{p}/locations/{l}/memberships/{m}` + * Where {p} is the project, {l} is a valid location and {m} is a valid + * Membership in this project at that location. {p} WILL match the Feature's + * project. + * {p} will always be returned as the project number, but the project ID is + * also accepted during input. If the same Membership is specified in the map + * twice (using the project ID form, and the project number form), exactly + * ONE of the entries will be saved, with no guarantees as to which. For this + * reason, it is recommended the same format be used for all entries when + * mutating a Feature. + * @type \Google\Cloud\GkeHub\V1\CommonFeatureState $state + * Output only. The Fleet-wide Feature state. + * @type array|\Google\Protobuf\Internal\MapField $membership_states + * Output only. Membership-specific Feature status. If this Feature does + * report any per-Membership status, this field may be unused. + * The keys indicate which Membership the state is for, in the form: + * `projects/{p}/locations/{l}/memberships/{m}` + * Where {p} is the project number, {l} is a valid location and {m} is a valid + * Membership in this project at that location. {p} MUST match the Feature's + * project number. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. When the Feature resource was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. When the Feature resource was last updated. + * @type \Google\Protobuf\Timestamp $delete_time + * Output only. When the Feature resource was deleted. + * @type array|\Google\Protobuf\Internal\MapField $scope_specs + * Optional. Scope-specific configuration for this Feature. If this Feature + * does not support any per-Scope configuration, this field may be unused. + * The keys indicate which Scope the configuration is for, in the form: + * `projects/{p}/locations/global/scopes/{s}` + * Where {p} is the project, {s} is a valid Scope in this project. + * {p} WILL match the Feature's project. + * {p} will always be returned as the project number, but the project ID is + * also accepted during input. If the same Scope is specified in the map + * twice (using the project ID form, and the project number form), exactly + * ONE of the entries will be saved, with no guarantees as to which. For this + * reason, it is recommended the same format be used for all entries when + * mutating a Feature. + * @type array|\Google\Protobuf\Internal\MapField $scope_states + * Output only. Scope-specific Feature status. If this Feature does + * report any per-Scope status, this field may be unused. + * The keys indicate which Scope the state is for, in the form: + * `projects/{p}/locations/global/scopes/{s}` + * Where {p} is the project, {s} is a valid Scope in this project. + * {p} WILL match the Feature's project. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Output only. List of locations that could not be reached while fetching + * this feature. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Feature::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The full, unique name of this Feature resource in the format + * `projects/*/locations/*/features/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The full, unique name of this Feature resource in the format + * `projects/*/locations/*/features/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Labels for this Feature. + * + * Generated from protobuf field map labels = 2; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Labels for this Feature. + * + * Generated from protobuf field map labels = 2; + * @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. State of the Feature resource itself. + * + * Generated from protobuf field .google.cloud.gkehub.v1.FeatureResourceState resource_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\GkeHub\V1\FeatureResourceState|null + */ + public function getResourceState() + { + return $this->resource_state; + } + + public function hasResourceState() + { + return isset($this->resource_state); + } + + public function clearResourceState() + { + unset($this->resource_state); + } + + /** + * Output only. State of the Feature resource itself. + * + * Generated from protobuf field .google.cloud.gkehub.v1.FeatureResourceState resource_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\GkeHub\V1\FeatureResourceState $var + * @return $this + */ + public function setResourceState($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\FeatureResourceState::class); + $this->resource_state = $var; + + return $this; + } + + /** + * Optional. Fleet-wide Feature configuration. If this Feature does not + * support any Fleet-wide configuration, this field may be unused. + * + * Generated from protobuf field .google.cloud.gkehub.v1.CommonFeatureSpec spec = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeHub\V1\CommonFeatureSpec|null + */ + public function getSpec() + { + return $this->spec; + } + + public function hasSpec() + { + return isset($this->spec); + } + + public function clearSpec() + { + unset($this->spec); + } + + /** + * Optional. Fleet-wide Feature configuration. If this Feature does not + * support any Fleet-wide configuration, this field may be unused. + * + * Generated from protobuf field .google.cloud.gkehub.v1.CommonFeatureSpec spec = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeHub\V1\CommonFeatureSpec $var + * @return $this + */ + public function setSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\CommonFeatureSpec::class); + $this->spec = $var; + + return $this; + } + + /** + * Optional. Membership-specific configuration for this Feature. If this + * Feature does not support any per-Membership configuration, this field may + * be unused. + * The keys indicate which Membership the configuration is for, in the form: + * `projects/{p}/locations/{l}/memberships/{m}` + * Where {p} is the project, {l} is a valid location and {m} is a valid + * Membership in this project at that location. {p} WILL match the Feature's + * project. + * {p} will always be returned as the project number, but the project ID is + * also accepted during input. If the same Membership is specified in the map + * twice (using the project ID form, and the project number form), exactly + * ONE of the entries will be saved, with no guarantees as to which. For this + * reason, it is recommended the same format be used for all entries when + * mutating a Feature. + * + * Generated from protobuf field map membership_specs = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getMembershipSpecs() + { + return $this->membership_specs; + } + + /** + * Optional. Membership-specific configuration for this Feature. If this + * Feature does not support any per-Membership configuration, this field may + * be unused. + * The keys indicate which Membership the configuration is for, in the form: + * `projects/{p}/locations/{l}/memberships/{m}` + * Where {p} is the project, {l} is a valid location and {m} is a valid + * Membership in this project at that location. {p} WILL match the Feature's + * project. + * {p} will always be returned as the project number, but the project ID is + * also accepted during input. If the same Membership is specified in the map + * twice (using the project ID form, and the project number form), exactly + * ONE of the entries will be saved, with no guarantees as to which. For this + * reason, it is recommended the same format be used for all entries when + * mutating a Feature. + * + * Generated from protobuf field map membership_specs = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setMembershipSpecs($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\V1\MembershipFeatureSpec::class); + $this->membership_specs = $arr; + + return $this; + } + + /** + * Output only. The Fleet-wide Feature state. + * + * Generated from protobuf field .google.cloud.gkehub.v1.CommonFeatureState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\GkeHub\V1\CommonFeatureState|null + */ + public function getState() + { + return $this->state; + } + + public function hasState() + { + return isset($this->state); + } + + public function clearState() + { + unset($this->state); + } + + /** + * Output only. The Fleet-wide Feature state. + * + * Generated from protobuf field .google.cloud.gkehub.v1.CommonFeatureState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\GkeHub\V1\CommonFeatureState $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\CommonFeatureState::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. Membership-specific Feature status. If this Feature does + * report any per-Membership status, this field may be unused. + * The keys indicate which Membership the state is for, in the form: + * `projects/{p}/locations/{l}/memberships/{m}` + * Where {p} is the project number, {l} is a valid location and {m} is a valid + * Membership in this project at that location. {p} MUST match the Feature's + * project number. + * + * Generated from protobuf field map membership_states = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getMembershipStates() + { + return $this->membership_states; + } + + /** + * Output only. Membership-specific Feature status. If this Feature does + * report any per-Membership status, this field may be unused. + * The keys indicate which Membership the state is for, in the form: + * `projects/{p}/locations/{l}/memberships/{m}` + * Where {p} is the project number, {l} is a valid location and {m} is a valid + * Membership in this project at that location. {p} MUST match the Feature's + * project number. + * + * Generated from protobuf field map membership_states = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setMembershipStates($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\V1\MembershipFeatureState::class); + $this->membership_states = $arr; + + return $this; + } + + /** + * Output only. When the Feature resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. When the Feature resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. When the Feature resource was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. When the Feature resource was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. When the Feature resource was deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getDeleteTime() + { + return $this->delete_time; + } + + public function hasDeleteTime() + { + return isset($this->delete_time); + } + + public function clearDeleteTime() + { + unset($this->delete_time); + } + + /** + * Output only. When the Feature resource was deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setDeleteTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->delete_time = $var; + + return $this; + } + + /** + * Optional. Scope-specific configuration for this Feature. If this Feature + * does not support any per-Scope configuration, this field may be unused. + * The keys indicate which Scope the configuration is for, in the form: + * `projects/{p}/locations/global/scopes/{s}` + * Where {p} is the project, {s} is a valid Scope in this project. + * {p} WILL match the Feature's project. + * {p} will always be returned as the project number, but the project ID is + * also accepted during input. If the same Scope is specified in the map + * twice (using the project ID form, and the project number form), exactly + * ONE of the entries will be saved, with no guarantees as to which. For this + * reason, it is recommended the same format be used for all entries when + * mutating a Feature. + * + * Generated from protobuf field map scope_specs = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getScopeSpecs() + { + return $this->scope_specs; + } + + /** + * Optional. Scope-specific configuration for this Feature. If this Feature + * does not support any per-Scope configuration, this field may be unused. + * The keys indicate which Scope the configuration is for, in the form: + * `projects/{p}/locations/global/scopes/{s}` + * Where {p} is the project, {s} is a valid Scope in this project. + * {p} WILL match the Feature's project. + * {p} will always be returned as the project number, but the project ID is + * also accepted during input. If the same Scope is specified in the map + * twice (using the project ID form, and the project number form), exactly + * ONE of the entries will be saved, with no guarantees as to which. For this + * reason, it is recommended the same format be used for all entries when + * mutating a Feature. + * + * Generated from protobuf field map scope_specs = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setScopeSpecs($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\V1\ScopeFeatureSpec::class); + $this->scope_specs = $arr; + + return $this; + } + + /** + * Output only. Scope-specific Feature status. If this Feature does + * report any per-Scope status, this field may be unused. + * The keys indicate which Scope the state is for, in the form: + * `projects/{p}/locations/global/scopes/{s}` + * Where {p} is the project, {s} is a valid Scope in this project. + * {p} WILL match the Feature's project. + * + * Generated from protobuf field map scope_states = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getScopeStates() + { + return $this->scope_states; + } + + /** + * Output only. Scope-specific Feature status. If this Feature does + * report any per-Scope status, this field may be unused. + * The keys indicate which Scope the state is for, in the form: + * `projects/{p}/locations/global/scopes/{s}` + * Where {p} is the project, {s} is a valid Scope in this project. + * {p} WILL match the Feature's project. + * + * Generated from protobuf field map scope_states = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setScopeStates($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\V1\ScopeFeatureState::class); + $this->scope_states = $arr; + + return $this; + } + + /** + * Output only. List of locations that could not be reached while fetching + * this feature. + * + * Generated from protobuf field repeated string unreachable = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Output only. List of locations that could not be reached while fetching + * this feature. + * + * Generated from protobuf field repeated string unreachable = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/FeatureResourceState.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/FeatureResourceState.php new file mode 100644 index 000000000000..5337d248ca6d --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/FeatureResourceState.php @@ -0,0 +1,69 @@ +google.cloud.gkehub.v1.FeatureResourceState + */ +class FeatureResourceState extends \Google\Protobuf\Internal\Message +{ + /** + * The current state of the Feature resource in the Hub API. + * + * Generated from protobuf field .google.cloud.gkehub.v1.FeatureResourceState.State state = 1; + */ + protected $state = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $state + * The current state of the Feature resource in the Hub API. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Feature::initOnce(); + parent::__construct($data); + } + + /** + * The current state of the Feature resource in the Hub API. + * + * Generated from protobuf field .google.cloud.gkehub.v1.FeatureResourceState.State state = 1; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The current state of the Feature resource in the Hub API. + * + * Generated from protobuf field .google.cloud.gkehub.v1.FeatureResourceState.State state = 1; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\V1\FeatureResourceState\State::class); + $this->state = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/FeatureResourceState/State.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/FeatureResourceState/State.php new file mode 100644 index 000000000000..d27eb2680999 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/FeatureResourceState/State.php @@ -0,0 +1,88 @@ +google.cloud.gkehub.v1.FeatureResourceState.State + */ +class State +{ + /** + * State is unknown or not set. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The Feature is being enabled, and the Feature resource is being created. + * Once complete, the corresponding Feature will be enabled in this Fleet. + * + * Generated from protobuf enum ENABLING = 1; + */ + const ENABLING = 1; + /** + * The Feature is enabled in this Fleet, and the Feature resource is fully + * available. + * + * Generated from protobuf enum ACTIVE = 2; + */ + const ACTIVE = 2; + /** + * The Feature is being disabled in this Fleet, and the Feature resource + * is being deleted. + * + * Generated from protobuf enum DISABLING = 3; + */ + const DISABLING = 3; + /** + * The Feature resource is being updated. + * + * Generated from protobuf enum UPDATING = 4; + */ + const UPDATING = 4; + /** + * The Feature resource is being updated by the Hub Service. + * + * Generated from protobuf enum SERVICE_UPDATING = 5; + */ + const SERVICE_UPDATING = 5; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::ENABLING => 'ENABLING', + self::ACTIVE => 'ACTIVE', + self::DISABLING => 'DISABLING', + self::UPDATING => 'UPDATING', + self::SERVICE_UPDATING => 'SERVICE_UPDATING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\GkeHub\V1\FeatureResourceState_State::class); + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/FeatureState.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/FeatureState.php new file mode 100644 index 000000000000..d2188bb9360d --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/FeatureState.php @@ -0,0 +1,147 @@ +google.cloud.gkehub.v1.FeatureState + */ +class FeatureState extends \Google\Protobuf\Internal\Message +{ + /** + * The high-level, machine-readable status of this Feature. + * + * Generated from protobuf field .google.cloud.gkehub.v1.FeatureState.Code code = 1; + */ + protected $code = 0; + /** + * A human-readable description of the current status. + * + * Generated from protobuf field string description = 2; + */ + protected $description = ''; + /** + * The time this status and any related Feature-specific details were updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; + */ + protected $update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $code + * The high-level, machine-readable status of this Feature. + * @type string $description + * A human-readable description of the current status. + * @type \Google\Protobuf\Timestamp $update_time + * The time this status and any related Feature-specific details were updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Feature::initOnce(); + parent::__construct($data); + } + + /** + * The high-level, machine-readable status of this Feature. + * + * Generated from protobuf field .google.cloud.gkehub.v1.FeatureState.Code code = 1; + * @return int + */ + public function getCode() + { + return $this->code; + } + + /** + * The high-level, machine-readable status of this Feature. + * + * Generated from protobuf field .google.cloud.gkehub.v1.FeatureState.Code code = 1; + * @param int $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\V1\FeatureState\Code::class); + $this->code = $var; + + return $this; + } + + /** + * A human-readable description of the current status. + * + * Generated from protobuf field string description = 2; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * A human-readable description of the current status. + * + * Generated from protobuf field string description = 2; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * The time this status and any related Feature-specific details were updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * The time this status and any related Feature-specific details were updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/FeatureState/Code.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/FeatureState/Code.php new file mode 100644 index 000000000000..5fe378f63660 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/FeatureState/Code.php @@ -0,0 +1,77 @@ +google.cloud.gkehub.v1.FeatureState.Code + */ +class Code +{ + /** + * Unknown or not set. + * + * Generated from protobuf enum CODE_UNSPECIFIED = 0; + */ + const CODE_UNSPECIFIED = 0; + /** + * The Feature is operating normally. + * + * Generated from protobuf enum OK = 1; + */ + const OK = 1; + /** + * The Feature has encountered an issue, and is operating in a degraded + * state. The Feature may need intervention to return to normal operation. + * See the description and any associated Feature-specific details for more + * information. + * + * Generated from protobuf enum WARNING = 2; + */ + const WARNING = 2; + /** + * The Feature is not operating or is in a severely degraded state. + * The Feature may need intervention to return to normal operation. + * See the description and any associated Feature-specific details for more + * information. + * + * Generated from protobuf enum ERROR = 3; + */ + const ERROR = 3; + + private static $valueToName = [ + self::CODE_UNSPECIFIED => 'CODE_UNSPECIFIED', + self::OK => 'OK', + self::WARNING => 'WARNING', + self::ERROR => 'ERROR', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Code::class, \Google\Cloud\GkeHub\V1\FeatureState_Code::class); + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/Fleet.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/Fleet.php new file mode 100644 index 000000000000..b394422e96a4 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/Fleet.php @@ -0,0 +1,425 @@ +google.cloud.gkehub.v1.Fleet + */ +class Fleet extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The full, unique resource name of this fleet in the format of + * `projects/{project}/locations/{location}/fleets/{fleet}`. + * Each Google Cloud project can have at most one fleet resource, named + * "default". + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Optional. A user-assigned display name of the Fleet. + * When present, it must be between 4 to 30 characters. + * Allowed characters are: lowercase and uppercase letters, numbers, + * hyphen, single-quote, double-quote, space, and exclamation point. + * Example: `Production Fleet` + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $display_name = ''; + /** + * Output only. When the Fleet was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. When the Fleet was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. When the Fleet was deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $delete_time = null; + /** + * Output only. Google-generated UUID for this resource. This is unique across + * all Fleet resources. If a Fleet resource is deleted and another resource + * with the same name is created, it gets a different uid. + * + * Generated from protobuf field string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + /** + * Output only. State of the namespace resource. + * + * Generated from protobuf field .google.cloud.gkehub.v1.FleetLifecycleState state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = null; + /** + * Optional. The default cluster configurations to apply across the fleet. + * + * Generated from protobuf field .google.cloud.gkehub.v1.DefaultClusterConfig default_cluster_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $default_cluster_config = null; + /** + * Optional. Labels for this Fleet. + * + * Generated from protobuf field map labels = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The full, unique resource name of this fleet in the format of + * `projects/{project}/locations/{location}/fleets/{fleet}`. + * Each Google Cloud project can have at most one fleet resource, named + * "default". + * @type string $display_name + * Optional. A user-assigned display name of the Fleet. + * When present, it must be between 4 to 30 characters. + * Allowed characters are: lowercase and uppercase letters, numbers, + * hyphen, single-quote, double-quote, space, and exclamation point. + * Example: `Production Fleet` + * @type \Google\Protobuf\Timestamp $create_time + * Output only. When the Fleet was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. When the Fleet was last updated. + * @type \Google\Protobuf\Timestamp $delete_time + * Output only. When the Fleet was deleted. + * @type string $uid + * Output only. Google-generated UUID for this resource. This is unique across + * all Fleet resources. If a Fleet resource is deleted and another resource + * with the same name is created, it gets a different uid. + * @type \Google\Cloud\GkeHub\V1\FleetLifecycleState $state + * Output only. State of the namespace resource. + * @type \Google\Cloud\GkeHub\V1\DefaultClusterConfig $default_cluster_config + * Optional. The default cluster configurations to apply across the fleet. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Labels for this Fleet. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Fleet::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The full, unique resource name of this fleet in the format of + * `projects/{project}/locations/{location}/fleets/{fleet}`. + * Each Google Cloud project can have at most one fleet resource, named + * "default". + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The full, unique resource name of this fleet in the format of + * `projects/{project}/locations/{location}/fleets/{fleet}`. + * Each Google Cloud project can have at most one fleet resource, named + * "default". + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. A user-assigned display name of the Fleet. + * When present, it must be between 4 to 30 characters. + * Allowed characters are: lowercase and uppercase letters, numbers, + * hyphen, single-quote, double-quote, space, and exclamation point. + * Example: `Production Fleet` + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Optional. A user-assigned display name of the Fleet. + * When present, it must be between 4 to 30 characters. + * Allowed characters are: lowercase and uppercase letters, numbers, + * hyphen, single-quote, double-quote, space, and exclamation point. + * Example: `Production Fleet` + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Output only. When the Fleet was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. When the Fleet was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. When the Fleet was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. When the Fleet was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. When the Fleet was deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getDeleteTime() + { + return $this->delete_time; + } + + public function hasDeleteTime() + { + return isset($this->delete_time); + } + + public function clearDeleteTime() + { + unset($this->delete_time); + } + + /** + * Output only. When the Fleet was deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setDeleteTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->delete_time = $var; + + return $this; + } + + /** + * Output only. Google-generated UUID for this resource. This is unique across + * all Fleet resources. If a Fleet resource is deleted and another resource + * with the same name is created, it gets a different uid. + * + * Generated from protobuf field string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. Google-generated UUID for this resource. This is unique across + * all Fleet resources. If a Fleet resource is deleted and another resource + * with the same name is created, it gets a different uid. + * + * Generated from protobuf field string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Output only. State of the namespace resource. + * + * Generated from protobuf field .google.cloud.gkehub.v1.FleetLifecycleState state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\GkeHub\V1\FleetLifecycleState|null + */ + public function getState() + { + return $this->state; + } + + public function hasState() + { + return isset($this->state); + } + + public function clearState() + { + unset($this->state); + } + + /** + * Output only. State of the namespace resource. + * + * Generated from protobuf field .google.cloud.gkehub.v1.FleetLifecycleState state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\GkeHub\V1\FleetLifecycleState $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\FleetLifecycleState::class); + $this->state = $var; + + return $this; + } + + /** + * Optional. The default cluster configurations to apply across the fleet. + * + * Generated from protobuf field .google.cloud.gkehub.v1.DefaultClusterConfig default_cluster_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeHub\V1\DefaultClusterConfig|null + */ + public function getDefaultClusterConfig() + { + return $this->default_cluster_config; + } + + public function hasDefaultClusterConfig() + { + return isset($this->default_cluster_config); + } + + public function clearDefaultClusterConfig() + { + unset($this->default_cluster_config); + } + + /** + * Optional. The default cluster configurations to apply across the fleet. + * + * Generated from protobuf field .google.cloud.gkehub.v1.DefaultClusterConfig default_cluster_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeHub\V1\DefaultClusterConfig $var + * @return $this + */ + public function setDefaultClusterConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\DefaultClusterConfig::class); + $this->default_cluster_config = $var; + + return $this; + } + + /** + * Optional. Labels for this Fleet. + * + * Generated from protobuf field map labels = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Labels for this Fleet. + * + * Generated from protobuf field map labels = 11 [(.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; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/FleetLifecycleState.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/FleetLifecycleState.php new file mode 100644 index 000000000000..30e10a49f2ab --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/FleetLifecycleState.php @@ -0,0 +1,67 @@ +google.cloud.gkehub.v1.FleetLifecycleState + */ +class FleetLifecycleState extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The current state of the Fleet resource. + * + * Generated from protobuf field .google.cloud.gkehub.v1.FleetLifecycleState.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $code = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $code + * Output only. The current state of the Fleet resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Fleet::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The current state of the Fleet resource. + * + * Generated from protobuf field .google.cloud.gkehub.v1.FleetLifecycleState.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getCode() + { + return $this->code; + } + + /** + * Output only. The current state of the Fleet resource. + * + * Generated from protobuf field .google.cloud.gkehub.v1.FleetLifecycleState.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\V1\FleetLifecycleState\Code::class); + $this->code = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/FleetLifecycleState/Code.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/FleetLifecycleState/Code.php new file mode 100644 index 000000000000..4fc07ad7b39c --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/FleetLifecycleState/Code.php @@ -0,0 +1,78 @@ +google.cloud.gkehub.v1.FleetLifecycleState.Code + */ +class Code +{ + /** + * The code is not set. + * + * Generated from protobuf enum CODE_UNSPECIFIED = 0; + */ + const CODE_UNSPECIFIED = 0; + /** + * The fleet is being created. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * The fleet active. + * + * Generated from protobuf enum READY = 2; + */ + const READY = 2; + /** + * The fleet is being deleted. + * + * Generated from protobuf enum DELETING = 3; + */ + const DELETING = 3; + /** + * The fleet is being updated. + * + * Generated from protobuf enum UPDATING = 4; + */ + const UPDATING = 4; + + private static $valueToName = [ + self::CODE_UNSPECIFIED => 'CODE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::READY => 'READY', + self::DELETING => 'DELETING', + self::UPDATING => 'UPDATING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Code::class, \Google\Cloud\GkeHub\V1\FleetLifecycleState_Code::class); + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GenerateConnectManifestRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GenerateConnectManifestRequest.php new file mode 100644 index 000000000000..70f450cccddc --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GenerateConnectManifestRequest.php @@ -0,0 +1,321 @@ +google.cloud.gkehub.v1.GenerateConnectManifestRequest + */ +class GenerateConnectManifestRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Membership resource name the Agent will associate with, in + * the format `projects/*/locations/*/memberships/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. Namespace for GKE Connect agent resources. Defaults to + * `gke-connect`. + * The Connect Agent is authorized automatically when run in the default + * namespace. Otherwise, explicit authorization must be granted with an + * additional IAM binding. + * + * Generated from protobuf field string namespace = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $namespace = ''; + /** + * Optional. URI of a proxy if connectivity from the agent to + * gkeconnect.googleapis.com requires the use of a proxy. Format must be in + * the form `http(s)://{proxy_address}`, depending on the HTTP/HTTPS protocol + * supported by the proxy. This will direct the connect agent's outbound + * traffic through a HTTP(S) proxy. + * + * Generated from protobuf field bytes proxy = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $proxy = ''; + /** + * Optional. The Connect agent version to use. Defaults to the most current + * version. + * + * Generated from protobuf field string version = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $version = ''; + /** + * Optional. If true, generate the resources for upgrade only. Some resources + * generated only for installation (e.g. secrets) will be excluded. + * + * Generated from protobuf field bool is_upgrade = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $is_upgrade = false; + /** + * Optional. The registry to fetch the connect agent image from. Defaults to + * gcr.io/gkeconnect. + * + * Generated from protobuf field string registry = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $registry = ''; + /** + * Optional. The image pull secret content for the registry, if not public. + * + * Generated from protobuf field bytes image_pull_secret_content = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $image_pull_secret_content = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The Membership resource name the Agent will associate with, in + * the format `projects/*/locations/*/memberships/*`. + * @type string $namespace + * Optional. Namespace for GKE Connect agent resources. Defaults to + * `gke-connect`. + * The Connect Agent is authorized automatically when run in the default + * namespace. Otherwise, explicit authorization must be granted with an + * additional IAM binding. + * @type string $proxy + * Optional. URI of a proxy if connectivity from the agent to + * gkeconnect.googleapis.com requires the use of a proxy. Format must be in + * the form `http(s)://{proxy_address}`, depending on the HTTP/HTTPS protocol + * supported by the proxy. This will direct the connect agent's outbound + * traffic through a HTTP(S) proxy. + * @type string $version + * Optional. The Connect agent version to use. Defaults to the most current + * version. + * @type bool $is_upgrade + * Optional. If true, generate the resources for upgrade only. Some resources + * generated only for installation (e.g. secrets) will be excluded. + * @type string $registry + * Optional. The registry to fetch the connect agent image from. Defaults to + * gcr.io/gkeconnect. + * @type string $image_pull_secret_content + * Optional. The image pull secret content for the registry, if not public. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Membership resource name the Agent will associate with, in + * the format `projects/*/locations/*/memberships/*`. + * + * 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 Membership resource name the Agent will associate with, in + * the format `projects/*/locations/*/memberships/*`. + * + * 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. Namespace for GKE Connect agent resources. Defaults to + * `gke-connect`. + * The Connect Agent is authorized automatically when run in the default + * namespace. Otherwise, explicit authorization must be granted with an + * additional IAM binding. + * + * Generated from protobuf field string namespace = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Optional. Namespace for GKE Connect agent resources. Defaults to + * `gke-connect`. + * The Connect Agent is authorized automatically when run in the default + * namespace. Otherwise, explicit authorization must be granted with an + * additional IAM binding. + * + * Generated from protobuf field string namespace = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Optional. URI of a proxy if connectivity from the agent to + * gkeconnect.googleapis.com requires the use of a proxy. Format must be in + * the form `http(s)://{proxy_address}`, depending on the HTTP/HTTPS protocol + * supported by the proxy. This will direct the connect agent's outbound + * traffic through a HTTP(S) proxy. + * + * Generated from protobuf field bytes proxy = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getProxy() + { + return $this->proxy; + } + + /** + * Optional. URI of a proxy if connectivity from the agent to + * gkeconnect.googleapis.com requires the use of a proxy. Format must be in + * the form `http(s)://{proxy_address}`, depending on the HTTP/HTTPS protocol + * supported by the proxy. This will direct the connect agent's outbound + * traffic through a HTTP(S) proxy. + * + * Generated from protobuf field bytes proxy = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setProxy($var) + { + GPBUtil::checkString($var, False); + $this->proxy = $var; + + return $this; + } + + /** + * Optional. The Connect agent version to use. Defaults to the most current + * version. + * + * Generated from protobuf field string version = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Optional. The Connect agent version to use. Defaults to the most current + * version. + * + * Generated from protobuf field string version = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + + /** + * Optional. If true, generate the resources for upgrade only. Some resources + * generated only for installation (e.g. secrets) will be excluded. + * + * Generated from protobuf field bool is_upgrade = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getIsUpgrade() + { + return $this->is_upgrade; + } + + /** + * Optional. If true, generate the resources for upgrade only. Some resources + * generated only for installation (e.g. secrets) will be excluded. + * + * Generated from protobuf field bool is_upgrade = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setIsUpgrade($var) + { + GPBUtil::checkBool($var); + $this->is_upgrade = $var; + + return $this; + } + + /** + * Optional. The registry to fetch the connect agent image from. Defaults to + * gcr.io/gkeconnect. + * + * Generated from protobuf field string registry = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRegistry() + { + return $this->registry; + } + + /** + * Optional. The registry to fetch the connect agent image from. Defaults to + * gcr.io/gkeconnect. + * + * Generated from protobuf field string registry = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRegistry($var) + { + GPBUtil::checkString($var, True); + $this->registry = $var; + + return $this; + } + + /** + * Optional. The image pull secret content for the registry, if not public. + * + * Generated from protobuf field bytes image_pull_secret_content = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getImagePullSecretContent() + { + return $this->image_pull_secret_content; + } + + /** + * Optional. The image pull secret content for the registry, if not public. + * + * Generated from protobuf field bytes image_pull_secret_content = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setImagePullSecretContent($var) + { + GPBUtil::checkString($var, False); + $this->image_pull_secret_content = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GenerateConnectManifestResponse.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GenerateConnectManifestResponse.php new file mode 100644 index 000000000000..fbecc64a2c15 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GenerateConnectManifestResponse.php @@ -0,0 +1,72 @@ +google.cloud.gkehub.v1.GenerateConnectManifestResponse + */ +class GenerateConnectManifestResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The ordered list of Kubernetes resources that need to be applied to the + * cluster for GKE Connect agent installation/upgrade. + * + * Generated from protobuf field repeated .google.cloud.gkehub.v1.ConnectAgentResource manifest = 1; + */ + private $manifest; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\GkeHub\V1\ConnectAgentResource>|\Google\Protobuf\Internal\RepeatedField $manifest + * The ordered list of Kubernetes resources that need to be applied to the + * cluster for GKE Connect agent installation/upgrade. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * The ordered list of Kubernetes resources that need to be applied to the + * cluster for GKE Connect agent installation/upgrade. + * + * Generated from protobuf field repeated .google.cloud.gkehub.v1.ConnectAgentResource manifest = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getManifest() + { + return $this->manifest; + } + + /** + * The ordered list of Kubernetes resources that need to be applied to the + * cluster for GKE Connect agent installation/upgrade. + * + * Generated from protobuf field repeated .google.cloud.gkehub.v1.ConnectAgentResource manifest = 1; + * @param array<\Google\Cloud\GkeHub\V1\ConnectAgentResource>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setManifest($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\V1\ConnectAgentResource::class); + $this->manifest = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GenerateMembershipRBACRoleBindingYAMLRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GenerateMembershipRBACRoleBindingYAMLRequest.php new file mode 100644 index 000000000000..0a8f53f5db8f --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GenerateMembershipRBACRoleBindingYAMLRequest.php @@ -0,0 +1,174 @@ +google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLRequest + */ +class GenerateMembershipRBACRoleBindingYAMLRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent (project and location) where the RBACRoleBinding will + * be created. Specified in the format `projects/*/locations/*/memberships/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` + * must be a valid RFC 1123 compliant DNS label: + * 1. At most 63 characters in length + * 2. It must consist of lower case alphanumeric characters or `-` + * 3. It must start and end with an alphanumeric character + * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + * with a maximum length of 63 characters. + * + * Generated from protobuf field string rbacrolebinding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $rbacrolebinding_id = ''; + /** + * Required. The rbacrolebindings to generate the YAML for. + * + * Generated from protobuf field .google.cloud.gkehub.v1.RBACRoleBinding rbacrolebinding = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $rbacrolebinding = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent (project and location) where the RBACRoleBinding will + * be created. Specified in the format `projects/*/locations/*/memberships/*`. + * @type string $rbacrolebinding_id + * Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` + * must be a valid RFC 1123 compliant DNS label: + * 1. At most 63 characters in length + * 2. It must consist of lower case alphanumeric characters or `-` + * 3. It must start and end with an alphanumeric character + * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + * with a maximum length of 63 characters. + * @type \Google\Cloud\GkeHub\V1\RBACRoleBinding $rbacrolebinding + * Required. The rbacrolebindings to generate the YAML for. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent (project and location) where the RBACRoleBinding will + * be created. Specified in the format `projects/*/locations/*/memberships/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent (project and location) where the RBACRoleBinding will + * be created. Specified in the format `projects/*/locations/*/memberships/*`. + * + * 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. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` + * must be a valid RFC 1123 compliant DNS label: + * 1. At most 63 characters in length + * 2. It must consist of lower case alphanumeric characters or `-` + * 3. It must start and end with an alphanumeric character + * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + * with a maximum length of 63 characters. + * + * Generated from protobuf field string rbacrolebinding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getRbacrolebindingId() + { + return $this->rbacrolebinding_id; + } + + /** + * Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` + * must be a valid RFC 1123 compliant DNS label: + * 1. At most 63 characters in length + * 2. It must consist of lower case alphanumeric characters or `-` + * 3. It must start and end with an alphanumeric character + * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + * with a maximum length of 63 characters. + * + * Generated from protobuf field string rbacrolebinding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setRbacrolebindingId($var) + { + GPBUtil::checkString($var, True); + $this->rbacrolebinding_id = $var; + + return $this; + } + + /** + * Required. The rbacrolebindings to generate the YAML for. + * + * Generated from protobuf field .google.cloud.gkehub.v1.RBACRoleBinding rbacrolebinding = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\GkeHub\V1\RBACRoleBinding|null + */ + public function getRbacrolebinding() + { + return $this->rbacrolebinding; + } + + public function hasRbacrolebinding() + { + return isset($this->rbacrolebinding); + } + + public function clearRbacrolebinding() + { + unset($this->rbacrolebinding); + } + + /** + * Required. The rbacrolebindings to generate the YAML for. + * + * Generated from protobuf field .google.cloud.gkehub.v1.RBACRoleBinding rbacrolebinding = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\GkeHub\V1\RBACRoleBinding $var + * @return $this + */ + public function setRbacrolebinding($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\RBACRoleBinding::class); + $this->rbacrolebinding = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GenerateMembershipRBACRoleBindingYAMLResponse.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GenerateMembershipRBACRoleBindingYAMLResponse.php new file mode 100644 index 000000000000..9a5ad5ab8627 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GenerateMembershipRBACRoleBindingYAMLResponse.php @@ -0,0 +1,67 @@ +google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLResponse + */ +class GenerateMembershipRBACRoleBindingYAMLResponse extends \Google\Protobuf\Internal\Message +{ + /** + * a yaml text blob including the RBAC policies. + * + * Generated from protobuf field string role_bindings_yaml = 1; + */ + protected $role_bindings_yaml = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $role_bindings_yaml + * a yaml text blob including the RBAC policies. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * a yaml text blob including the RBAC policies. + * + * Generated from protobuf field string role_bindings_yaml = 1; + * @return string + */ + public function getRoleBindingsYaml() + { + return $this->role_bindings_yaml; + } + + /** + * a yaml text blob including the RBAC policies. + * + * Generated from protobuf field string role_bindings_yaml = 1; + * @param string $var + * @return $this + */ + public function setRoleBindingsYaml($var) + { + GPBUtil::checkString($var, True); + $this->role_bindings_yaml = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetFeatureRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetFeatureRequest.php new file mode 100644 index 000000000000..62ab7c5a9934 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetFeatureRequest.php @@ -0,0 +1,131 @@ +google.cloud.gkehub.v1.GetFeatureRequest + */ +class GetFeatureRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Feature resource name in the format + * `projects/*/locations/*/features/*` + * + * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. If set to true, the response will return partial results when + * some regions are unreachable and the unreachable field in Feature proto + * will be populated. If set to false, the request will fail when some regions + * are unreachable. + * + * Generated from protobuf field bool return_partial_success = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $return_partial_success = false; + + /** + * @param string $name Required. The Feature resource name in the format + * `projects/*/locations/*/features/*` + * + * @return \Google\Cloud\GkeHub\V1\GetFeatureRequest + * + * @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 Feature resource name in the format + * `projects/*/locations/*/features/*` + * @type bool $return_partial_success + * Optional. If set to true, the response will return partial results when + * some regions are unreachable and the unreachable field in Feature proto + * will be populated. If set to false, the request will fail when some regions + * are unreachable. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Feature resource name in the format + * `projects/*/locations/*/features/*` + * + * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The Feature resource name in the format + * `projects/*/locations/*/features/*` + * + * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. If set to true, the response will return partial results when + * some regions are unreachable and the unreachable field in Feature proto + * will be populated. If set to false, the request will fail when some regions + * are unreachable. + * + * Generated from protobuf field bool return_partial_success = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getReturnPartialSuccess() + { + return $this->return_partial_success; + } + + /** + * Optional. If set to true, the response will return partial results when + * some regions are unreachable and the unreachable field in Feature proto + * will be populated. If set to false, the request will fail when some regions + * are unreachable. + * + * Generated from protobuf field bool return_partial_success = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setReturnPartialSuccess($var) + { + GPBUtil::checkBool($var); + $this->return_partial_success = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetFleetRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetFleetRequest.php new file mode 100644 index 000000000000..c6888038d2aa --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetFleetRequest.php @@ -0,0 +1,86 @@ +google.cloud.gkehub.v1.GetFleetRequest + */ +class GetFleetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Fleet resource name in the format + * `projects/*/locations/*/fleets/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The Fleet resource name in the format + * `projects/*/locations/*/fleets/*`. Please see + * {@see GkeHubClient::fleetName()} for help formatting this field. + * + * @return \Google\Cloud\GkeHub\V1\GetFleetRequest + * + * @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 Fleet resource name in the format + * `projects/*/locations/*/fleets/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Fleet resource name in the format + * `projects/*/locations/*/fleets/*`. + * + * 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 Fleet resource name in the format + * `projects/*/locations/*/fleets/*`. + * + * 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/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetMembershipBindingRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetMembershipBindingRequest.php new file mode 100644 index 000000000000..281f8ca52922 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetMembershipBindingRequest.php @@ -0,0 +1,86 @@ +google.cloud.gkehub.v1.GetMembershipBindingRequest + */ +class GetMembershipBindingRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The MembershipBinding resource name in the format + * `projects/*/locations/*/memberships/*/bindings/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The MembershipBinding resource name in the format + * `projects/*/locations/*/memberships/*/bindings/*`. Please see + * {@see GkeHubClient::membershipBindingName()} for help formatting this field. + * + * @return \Google\Cloud\GkeHub\V1\GetMembershipBindingRequest + * + * @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 MembershipBinding resource name in the format + * `projects/*/locations/*/memberships/*/bindings/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The MembershipBinding resource name in the format + * `projects/*/locations/*/memberships/*/bindings/*`. + * + * 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 MembershipBinding resource name in the format + * `projects/*/locations/*/memberships/*/bindings/*`. + * + * 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/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetMembershipRBACRoleBindingRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetMembershipRBACRoleBindingRequest.php new file mode 100644 index 000000000000..1116fbf218c4 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetMembershipRBACRoleBindingRequest.php @@ -0,0 +1,86 @@ +google.cloud.gkehub.v1.GetMembershipRBACRoleBindingRequest + */ +class GetMembershipRBACRoleBindingRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The RBACRoleBinding resource name in the format + * `projects/*/locations/*/memberships/*/rbacrolebindings/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The RBACRoleBinding resource name in the format + * `projects/*/locations/*/memberships/*/rbacrolebindings/*`. Please see + * {@see GkeHubClient::rBACRoleBindingName()} for help formatting this field. + * + * @return \Google\Cloud\GkeHub\V1\GetMembershipRBACRoleBindingRequest + * + * @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 RBACRoleBinding resource name in the format + * `projects/*/locations/*/memberships/*/rbacrolebindings/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The RBACRoleBinding resource name in the format + * `projects/*/locations/*/memberships/*/rbacrolebindings/*`. + * + * 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 RBACRoleBinding resource name in the format + * `projects/*/locations/*/memberships/*/rbacrolebindings/*`. + * + * 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/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetMembershipRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetMembershipRequest.php new file mode 100644 index 000000000000..8f1b1f43d5a4 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetMembershipRequest.php @@ -0,0 +1,86 @@ +google.cloud.gkehub.v1.GetMembershipRequest + */ +class GetMembershipRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Membership resource name in the format + * `projects/*/locations/*/memberships/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The Membership resource name in the format + * `projects/*/locations/*/memberships/*`. Please see + * {@see GkeHubClient::membershipName()} for help formatting this field. + * + * @return \Google\Cloud\GkeHub\V1\GetMembershipRequest + * + * @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 Membership resource name in the format + * `projects/*/locations/*/memberships/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Membership resource name in the format + * `projects/*/locations/*/memberships/*`. + * + * 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 Membership resource name in the format + * `projects/*/locations/*/memberships/*`. + * + * 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/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetScopeNamespaceRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetScopeNamespaceRequest.php new file mode 100644 index 000000000000..c0379c17da1b --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetScopeNamespaceRequest.php @@ -0,0 +1,86 @@ +google.cloud.gkehub.v1.GetScopeNamespaceRequest + */ +class GetScopeNamespaceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Namespace resource name in the format + * `projects/*/locations/*/scopes/*/namespaces/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The Namespace resource name in the format + * `projects/*/locations/*/scopes/*/namespaces/*`. Please see + * {@see GkeHubClient::namespaceName()} for help formatting this field. + * + * @return \Google\Cloud\GkeHub\V1\GetScopeNamespaceRequest + * + * @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 Namespace resource name in the format + * `projects/*/locations/*/scopes/*/namespaces/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Namespace resource name in the format + * `projects/*/locations/*/scopes/*/namespaces/*`. + * + * 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 Namespace resource name in the format + * `projects/*/locations/*/scopes/*/namespaces/*`. + * + * 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/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetScopeRBACRoleBindingRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetScopeRBACRoleBindingRequest.php new file mode 100644 index 000000000000..6ffacd6594e2 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetScopeRBACRoleBindingRequest.php @@ -0,0 +1,86 @@ +google.cloud.gkehub.v1.GetScopeRBACRoleBindingRequest + */ +class GetScopeRBACRoleBindingRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The RBACRoleBinding resource name in the format + * `projects/*/locations/*/scopes/*/rbacrolebindings/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The RBACRoleBinding resource name in the format + * `projects/*/locations/*/scopes/*/rbacrolebindings/*`. Please see + * {@see GkeHubClient::rBACRoleBindingName()} for help formatting this field. + * + * @return \Google\Cloud\GkeHub\V1\GetScopeRBACRoleBindingRequest + * + * @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 RBACRoleBinding resource name in the format + * `projects/*/locations/*/scopes/*/rbacrolebindings/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The RBACRoleBinding resource name in the format + * `projects/*/locations/*/scopes/*/rbacrolebindings/*`. + * + * 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 RBACRoleBinding resource name in the format + * `projects/*/locations/*/scopes/*/rbacrolebindings/*`. + * + * 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/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetScopeRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetScopeRequest.php new file mode 100644 index 000000000000..f9e686bce4b2 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetScopeRequest.php @@ -0,0 +1,86 @@ +google.cloud.gkehub.v1.GetScopeRequest + */ +class GetScopeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Scope resource name in the format + * `projects/*/locations/*/scopes/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The Scope resource name in the format + * `projects/*/locations/*/scopes/*`. Please see + * {@see GkeHubClient::scopeName()} for help formatting this field. + * + * @return \Google\Cloud\GkeHub\V1\GetScopeRequest + * + * @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 Scope resource name in the format + * `projects/*/locations/*/scopes/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Scope resource name in the format + * `projects/*/locations/*/scopes/*`. + * + * 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 Scope resource name in the format + * `projects/*/locations/*/scopes/*`. + * + * 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/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GkeCluster.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GkeCluster.php new file mode 100644 index 000000000000..5fc98881e773 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GkeCluster.php @@ -0,0 +1,117 @@ +google.cloud.gkehub.v1.GkeCluster + */ +class GkeCluster extends \Google\Protobuf\Internal\Message +{ + /** + * Immutable. Self-link of the Google Cloud resource for the GKE cluster. For + * example: + * //container.googleapis.com/projects/my-project/locations/us-west1-a/clusters/my-cluster + * Zonal clusters are also supported. + * + * Generated from protobuf field string resource_link = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $resource_link = ''; + /** + * Output only. If cluster_missing is set then it denotes that the GKE cluster + * no longer exists in the GKE Control Plane. + * + * Generated from protobuf field bool cluster_missing = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $cluster_missing = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $resource_link + * Immutable. Self-link of the Google Cloud resource for the GKE cluster. For + * example: + * //container.googleapis.com/projects/my-project/locations/us-west1-a/clusters/my-cluster + * Zonal clusters are also supported. + * @type bool $cluster_missing + * Output only. If cluster_missing is set then it denotes that the GKE cluster + * no longer exists in the GKE Control Plane. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Membership::initOnce(); + parent::__construct($data); + } + + /** + * Immutable. Self-link of the Google Cloud resource for the GKE cluster. For + * example: + * //container.googleapis.com/projects/my-project/locations/us-west1-a/clusters/my-cluster + * Zonal clusters are also supported. + * + * Generated from protobuf field string resource_link = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getResourceLink() + { + return $this->resource_link; + } + + /** + * Immutable. Self-link of the Google Cloud resource for the GKE cluster. For + * example: + * //container.googleapis.com/projects/my-project/locations/us-west1-a/clusters/my-cluster + * Zonal clusters are also supported. + * + * Generated from protobuf field string resource_link = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setResourceLink($var) + { + GPBUtil::checkString($var, True); + $this->resource_link = $var; + + return $this; + } + + /** + * Output only. If cluster_missing is set then it denotes that the GKE cluster + * no longer exists in the GKE Control Plane. + * + * Generated from protobuf field bool cluster_missing = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getClusterMissing() + { + return $this->cluster_missing; + } + + /** + * Output only. If cluster_missing is set then it denotes that the GKE cluster + * no longer exists in the GKE Control Plane. + * + * Generated from protobuf field bool cluster_missing = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setClusterMissing($var) + { + GPBUtil::checkBool($var); + $this->cluster_missing = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/KubernetesMetadata.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/KubernetesMetadata.php new file mode 100644 index 000000000000..54fd9c79de89 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/KubernetesMetadata.php @@ -0,0 +1,276 @@ +google.cloud.gkehub.v1.KubernetesMetadata + */ +class KubernetesMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Kubernetes API server version string as reported by + * `/version`. + * + * Generated from protobuf field string kubernetes_api_server_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $kubernetes_api_server_version = ''; + /** + * Output only. Node providerID as reported by the first node in the list of + * nodes on the Kubernetes endpoint. On Kubernetes platforms that support + * zero-node clusters (like GKE-on-GCP), the node_count will be zero and the + * node_provider_id will be empty. + * + * Generated from protobuf field string node_provider_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $node_provider_id = ''; + /** + * Output only. Node count as reported by Kubernetes nodes resources. + * + * Generated from protobuf field int32 node_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $node_count = 0; + /** + * Output only. vCPU count as reported by Kubernetes nodes resources. + * + * Generated from protobuf field int32 vcpu_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $vcpu_count = 0; + /** + * Output only. The total memory capacity as reported by the sum of all + * Kubernetes nodes resources, defined in MB. + * + * Generated from protobuf field int32 memory_mb = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $memory_mb = 0; + /** + * Output only. The time at which these details were last updated. This + * update_time is different from the Membership-level update_time since + * EndpointDetails are updated internally for API consumers. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 100 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kubernetes_api_server_version + * Output only. Kubernetes API server version string as reported by + * `/version`. + * @type string $node_provider_id + * Output only. Node providerID as reported by the first node in the list of + * nodes on the Kubernetes endpoint. On Kubernetes platforms that support + * zero-node clusters (like GKE-on-GCP), the node_count will be zero and the + * node_provider_id will be empty. + * @type int $node_count + * Output only. Node count as reported by Kubernetes nodes resources. + * @type int $vcpu_count + * Output only. vCPU count as reported by Kubernetes nodes resources. + * @type int $memory_mb + * Output only. The total memory capacity as reported by the sum of all + * Kubernetes nodes resources, defined in MB. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time at which these details were last updated. This + * update_time is different from the Membership-level update_time since + * EndpointDetails are updated internally for API consumers. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Membership::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Kubernetes API server version string as reported by + * `/version`. + * + * Generated from protobuf field string kubernetes_api_server_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getKubernetesApiServerVersion() + { + return $this->kubernetes_api_server_version; + } + + /** + * Output only. Kubernetes API server version string as reported by + * `/version`. + * + * Generated from protobuf field string kubernetes_api_server_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setKubernetesApiServerVersion($var) + { + GPBUtil::checkString($var, True); + $this->kubernetes_api_server_version = $var; + + return $this; + } + + /** + * Output only. Node providerID as reported by the first node in the list of + * nodes on the Kubernetes endpoint. On Kubernetes platforms that support + * zero-node clusters (like GKE-on-GCP), the node_count will be zero and the + * node_provider_id will be empty. + * + * Generated from protobuf field string node_provider_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getNodeProviderId() + { + return $this->node_provider_id; + } + + /** + * Output only. Node providerID as reported by the first node in the list of + * nodes on the Kubernetes endpoint. On Kubernetes platforms that support + * zero-node clusters (like GKE-on-GCP), the node_count will be zero and the + * node_provider_id will be empty. + * + * Generated from protobuf field string node_provider_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setNodeProviderId($var) + { + GPBUtil::checkString($var, True); + $this->node_provider_id = $var; + + return $this; + } + + /** + * Output only. Node count as reported by Kubernetes nodes resources. + * + * Generated from protobuf field int32 node_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getNodeCount() + { + return $this->node_count; + } + + /** + * Output only. Node count as reported by Kubernetes nodes resources. + * + * Generated from protobuf field int32 node_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setNodeCount($var) + { + GPBUtil::checkInt32($var); + $this->node_count = $var; + + return $this; + } + + /** + * Output only. vCPU count as reported by Kubernetes nodes resources. + * + * Generated from protobuf field int32 vcpu_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getVcpuCount() + { + return $this->vcpu_count; + } + + /** + * Output only. vCPU count as reported by Kubernetes nodes resources. + * + * Generated from protobuf field int32 vcpu_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setVcpuCount($var) + { + GPBUtil::checkInt32($var); + $this->vcpu_count = $var; + + return $this; + } + + /** + * Output only. The total memory capacity as reported by the sum of all + * Kubernetes nodes resources, defined in MB. + * + * Generated from protobuf field int32 memory_mb = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getMemoryMb() + { + return $this->memory_mb; + } + + /** + * Output only. The total memory capacity as reported by the sum of all + * Kubernetes nodes resources, defined in MB. + * + * Generated from protobuf field int32 memory_mb = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setMemoryMb($var) + { + GPBUtil::checkInt32($var); + $this->memory_mb = $var; + + return $this; + } + + /** + * Output only. The time at which these details were last updated. This + * update_time is different from the Membership-level update_time since + * EndpointDetails are updated internally for API consumers. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 100 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The time at which these details were last updated. This + * update_time is different from the Membership-level update_time since + * EndpointDetails are updated internally for API consumers. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 100 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/KubernetesResource.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/KubernetesResource.php new file mode 100644 index 000000000000..6bd38f96b363 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/KubernetesResource.php @@ -0,0 +1,245 @@ +google.cloud.gkehub.v1.KubernetesResource + */ +class KubernetesResource extends \Google\Protobuf\Internal\Message +{ + /** + * Input only. The YAML representation of the Membership CR. This field is + * ignored for GKE clusters where Hub can read the CR directly. + * Callers should provide the CR that is currently present in the cluster + * during CreateMembership or UpdateMembership, or leave this field empty if + * none exists. The CR manifest is used to validate the cluster has not been + * registered with another Membership. + * + * Generated from protobuf field string membership_cr_manifest = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $membership_cr_manifest = ''; + /** + * Output only. Additional Kubernetes resources that need to be applied to the + * cluster after Membership creation, and after every update. + * This field is only populated in the Membership returned from a successful + * long-running operation from CreateMembership or UpdateMembership. It is not + * populated during normal GetMembership or ListMemberships requests. To get + * the resource manifest after the initial registration, the caller should + * make a UpdateMembership call with an empty field mask. + * + * Generated from protobuf field repeated .google.cloud.gkehub.v1.ResourceManifest membership_resources = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $membership_resources; + /** + * Output only. The Kubernetes resources for installing the GKE Connect agent + * This field is only populated in the Membership returned from a successful + * long-running operation from CreateMembership or UpdateMembership. It is not + * populated during normal GetMembership or ListMemberships requests. To get + * the resource manifest after the initial registration, the caller should + * make a UpdateMembership call with an empty field mask. + * + * Generated from protobuf field repeated .google.cloud.gkehub.v1.ResourceManifest connect_resources = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $connect_resources; + /** + * Optional. Options for Kubernetes resource generation. + * + * Generated from protobuf field .google.cloud.gkehub.v1.ResourceOptions resource_options = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $resource_options = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $membership_cr_manifest + * Input only. The YAML representation of the Membership CR. This field is + * ignored for GKE clusters where Hub can read the CR directly. + * Callers should provide the CR that is currently present in the cluster + * during CreateMembership or UpdateMembership, or leave this field empty if + * none exists. The CR manifest is used to validate the cluster has not been + * registered with another Membership. + * @type array<\Google\Cloud\GkeHub\V1\ResourceManifest>|\Google\Protobuf\Internal\RepeatedField $membership_resources + * Output only. Additional Kubernetes resources that need to be applied to the + * cluster after Membership creation, and after every update. + * This field is only populated in the Membership returned from a successful + * long-running operation from CreateMembership or UpdateMembership. It is not + * populated during normal GetMembership or ListMemberships requests. To get + * the resource manifest after the initial registration, the caller should + * make a UpdateMembership call with an empty field mask. + * @type array<\Google\Cloud\GkeHub\V1\ResourceManifest>|\Google\Protobuf\Internal\RepeatedField $connect_resources + * Output only. The Kubernetes resources for installing the GKE Connect agent + * This field is only populated in the Membership returned from a successful + * long-running operation from CreateMembership or UpdateMembership. It is not + * populated during normal GetMembership or ListMemberships requests. To get + * the resource manifest after the initial registration, the caller should + * make a UpdateMembership call with an empty field mask. + * @type \Google\Cloud\GkeHub\V1\ResourceOptions $resource_options + * Optional. Options for Kubernetes resource generation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Membership::initOnce(); + parent::__construct($data); + } + + /** + * Input only. The YAML representation of the Membership CR. This field is + * ignored for GKE clusters where Hub can read the CR directly. + * Callers should provide the CR that is currently present in the cluster + * during CreateMembership or UpdateMembership, or leave this field empty if + * none exists. The CR manifest is used to validate the cluster has not been + * registered with another Membership. + * + * Generated from protobuf field string membership_cr_manifest = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return string + */ + public function getMembershipCrManifest() + { + return $this->membership_cr_manifest; + } + + /** + * Input only. The YAML representation of the Membership CR. This field is + * ignored for GKE clusters where Hub can read the CR directly. + * Callers should provide the CR that is currently present in the cluster + * during CreateMembership or UpdateMembership, or leave this field empty if + * none exists. The CR manifest is used to validate the cluster has not been + * registered with another Membership. + * + * Generated from protobuf field string membership_cr_manifest = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setMembershipCrManifest($var) + { + GPBUtil::checkString($var, True); + $this->membership_cr_manifest = $var; + + return $this; + } + + /** + * Output only. Additional Kubernetes resources that need to be applied to the + * cluster after Membership creation, and after every update. + * This field is only populated in the Membership returned from a successful + * long-running operation from CreateMembership or UpdateMembership. It is not + * populated during normal GetMembership or ListMemberships requests. To get + * the resource manifest after the initial registration, the caller should + * make a UpdateMembership call with an empty field mask. + * + * Generated from protobuf field repeated .google.cloud.gkehub.v1.ResourceManifest membership_resources = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMembershipResources() + { + return $this->membership_resources; + } + + /** + * Output only. Additional Kubernetes resources that need to be applied to the + * cluster after Membership creation, and after every update. + * This field is only populated in the Membership returned from a successful + * long-running operation from CreateMembership or UpdateMembership. It is not + * populated during normal GetMembership or ListMemberships requests. To get + * the resource manifest after the initial registration, the caller should + * make a UpdateMembership call with an empty field mask. + * + * Generated from protobuf field repeated .google.cloud.gkehub.v1.ResourceManifest membership_resources = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\GkeHub\V1\ResourceManifest>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMembershipResources($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\V1\ResourceManifest::class); + $this->membership_resources = $arr; + + return $this; + } + + /** + * Output only. The Kubernetes resources for installing the GKE Connect agent + * This field is only populated in the Membership returned from a successful + * long-running operation from CreateMembership or UpdateMembership. It is not + * populated during normal GetMembership or ListMemberships requests. To get + * the resource manifest after the initial registration, the caller should + * make a UpdateMembership call with an empty field mask. + * + * Generated from protobuf field repeated .google.cloud.gkehub.v1.ResourceManifest connect_resources = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getConnectResources() + { + return $this->connect_resources; + } + + /** + * Output only. The Kubernetes resources for installing the GKE Connect agent + * This field is only populated in the Membership returned from a successful + * long-running operation from CreateMembership or UpdateMembership. It is not + * populated during normal GetMembership or ListMemberships requests. To get + * the resource manifest after the initial registration, the caller should + * make a UpdateMembership call with an empty field mask. + * + * Generated from protobuf field repeated .google.cloud.gkehub.v1.ResourceManifest connect_resources = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\GkeHub\V1\ResourceManifest>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setConnectResources($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\V1\ResourceManifest::class); + $this->connect_resources = $arr; + + return $this; + } + + /** + * Optional. Options for Kubernetes resource generation. + * + * Generated from protobuf field .google.cloud.gkehub.v1.ResourceOptions resource_options = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeHub\V1\ResourceOptions|null + */ + public function getResourceOptions() + { + return $this->resource_options; + } + + public function hasResourceOptions() + { + return isset($this->resource_options); + } + + public function clearResourceOptions() + { + unset($this->resource_options); + } + + /** + * Optional. Options for Kubernetes resource generation. + * + * Generated from protobuf field .google.cloud.gkehub.v1.ResourceOptions resource_options = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeHub\V1\ResourceOptions $var + * @return $this + */ + public function setResourceOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\ResourceOptions::class); + $this->resource_options = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListBoundMembershipsRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListBoundMembershipsRequest.php new file mode 100644 index 000000000000..bde56c249ee1 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListBoundMembershipsRequest.php @@ -0,0 +1,220 @@ +google.cloud.gkehub.v1.ListBoundMembershipsRequest + */ +class ListBoundMembershipsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the Scope, in the format + * `projects/*/locations/global/scopes/*`, to which the Memberships are bound. + * + * Generated from protobuf field string scope_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $scope_name = ''; + /** + * Optional. Lists Memberships that match the filter expression, following the + * syntax outlined in https://google.aip.dev/160. Currently, filtering + * can be done only based on Memberships's `name`, `labels`, `create_time`, + * `update_time`, and `unique_id`. + * + * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. Pagination is currently not supported; therefore, setting + * this field does not have any impact for now. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. Token returned by previous call to `ListBoundMemberships` which + * specifies the position in the list from where to continue listing the + * resources. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $scopeName Required. Name of the Scope, in the format + * `projects/*/locations/global/scopes/*`, to which the Memberships are bound. Please see + * {@see GkeHubClient::scopeName()} for help formatting this field. + * + * @return \Google\Cloud\GkeHub\V1\ListBoundMembershipsRequest + * + * @experimental + */ + public static function build(string $scopeName): self + { + return (new self()) + ->setScopeName($scopeName); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $scope_name + * Required. Name of the Scope, in the format + * `projects/*/locations/global/scopes/*`, to which the Memberships are bound. + * @type string $filter + * Optional. Lists Memberships that match the filter expression, following the + * syntax outlined in https://google.aip.dev/160. Currently, filtering + * can be done only based on Memberships's `name`, `labels`, `create_time`, + * `update_time`, and `unique_id`. + * @type int $page_size + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. Pagination is currently not supported; therefore, setting + * this field does not have any impact for now. + * @type string $page_token + * Optional. Token returned by previous call to `ListBoundMemberships` which + * specifies the position in the list from where to continue listing the + * resources. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the Scope, in the format + * `projects/*/locations/global/scopes/*`, to which the Memberships are bound. + * + * Generated from protobuf field string scope_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getScopeName() + { + return $this->scope_name; + } + + /** + * Required. Name of the Scope, in the format + * `projects/*/locations/global/scopes/*`, to which the Memberships are bound. + * + * Generated from protobuf field string scope_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setScopeName($var) + { + GPBUtil::checkString($var, True); + $this->scope_name = $var; + + return $this; + } + + /** + * Optional. Lists Memberships that match the filter expression, following the + * syntax outlined in https://google.aip.dev/160. Currently, filtering + * can be done only based on Memberships's `name`, `labels`, `create_time`, + * `update_time`, and `unique_id`. + * + * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Lists Memberships that match the filter expression, following the + * syntax outlined in https://google.aip.dev/160. Currently, filtering + * can be done only based on Memberships's `name`, `labels`, `create_time`, + * `update_time`, and `unique_id`. + * + * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. Pagination is currently not supported; therefore, setting + * this field does not have any impact for now. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. Pagination is currently not supported; therefore, setting + * this field does not have any impact for now. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. Token returned by previous call to `ListBoundMemberships` which + * specifies the position in the list from where to continue listing the + * resources. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. Token returned by previous call to `ListBoundMemberships` which + * specifies the position in the list from where to continue listing the + * resources. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListBoundMembershipsResponse.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListBoundMembershipsResponse.php new file mode 100644 index 000000000000..c0b97a46566c --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListBoundMembershipsResponse.php @@ -0,0 +1,143 @@ +google.cloud.gkehub.v1.ListBoundMembershipsResponse + */ +class ListBoundMembershipsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of Memberships bound to the given Scope. + * + * Generated from protobuf field repeated .google.cloud.gkehub.v1.Membership memberships = 1; + */ + private $memberships; + /** + * List of locations that could not be reached while fetching this list. + * + * Generated from protobuf field repeated string unreachable = 2; + */ + private $unreachable; + /** + * A token to request the next page of resources from the + * `ListBoundMemberships` method. The value of an empty string means that + * there are no more resources to return. + * + * Generated from protobuf field string next_page_token = 3; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\GkeHub\V1\Membership>|\Google\Protobuf\Internal\RepeatedField $memberships + * The list of Memberships bound to the given Scope. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * List of locations that could not be reached while fetching this list. + * @type string $next_page_token + * A token to request the next page of resources from the + * `ListBoundMemberships` method. The value of an empty string means that + * there are no more resources to return. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * The list of Memberships bound to the given Scope. + * + * Generated from protobuf field repeated .google.cloud.gkehub.v1.Membership memberships = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMemberships() + { + return $this->memberships; + } + + /** + * The list of Memberships bound to the given Scope. + * + * Generated from protobuf field repeated .google.cloud.gkehub.v1.Membership memberships = 1; + * @param array<\Google\Cloud\GkeHub\V1\Membership>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMemberships($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\V1\Membership::class); + $this->memberships = $arr; + + return $this; + } + + /** + * List of locations that could not be reached while fetching this list. + * + * Generated from protobuf field repeated string unreachable = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * List of locations that could not be reached while fetching this list. + * + * Generated from protobuf field repeated string unreachable = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + + /** + * A token to request the next page of resources from the + * `ListBoundMemberships` method. The value of an empty string means that + * there are no more resources to return. + * + * Generated from protobuf field string next_page_token = 3; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to request the next page of resources from the + * `ListBoundMemberships` method. The value of an empty string means that + * there are no more resources to return. + * + * Generated from protobuf field string next_page_token = 3; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListFeaturesRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListFeaturesRequest.php new file mode 100644 index 000000000000..47144ac4215d --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListFeaturesRequest.php @@ -0,0 +1,319 @@ +google.cloud.gkehub.v1.ListFeaturesRequest + */ +class ListFeaturesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent (project and location) where the Features will be + * listed. Specified in the format `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * When requesting a 'page' of resources, `page_size` specifies number of + * resources to return. If unspecified or set to 0, all resources will + * be returned. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * Token returned by previous call to `ListFeatures` which + * specifies the position in the list from where to continue listing the + * resources. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Lists Features that match the filter expression, following the syntax + * outlined in https://google.aip.dev/160. + * Examples: + * - Feature with the name "servicemesh" in project "foo-proj": + * name = "projects/foo-proj/locations/global/features/servicemesh" + * - Features that have a label called `foo`: + * labels.foo:* + * - Features that have a label called `foo` whose value is `bar`: + * labels.foo = bar + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * One or more fields to compare and use to sort the output. + * See https://google.aip.dev/132#ordering. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + /** + * Optional. If set to true, the response will return partial results when + * some regions are unreachable and the unreachable field in Feature proto + * will be populated. If set to false, the request will fail when some regions + * are unreachable. + * + * Generated from protobuf field bool return_partial_success = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $return_partial_success = false; + + /** + * @param string $parent Required. The parent (project and location) where the Features will be + * listed. Specified in the format `projects/*/locations/*`. + * + * @return \Google\Cloud\GkeHub\V1\ListFeaturesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent (project and location) where the Features will be + * listed. Specified in the format `projects/*/locations/*`. + * @type int $page_size + * When requesting a 'page' of resources, `page_size` specifies number of + * resources to return. If unspecified or set to 0, all resources will + * be returned. + * @type string $page_token + * Token returned by previous call to `ListFeatures` which + * specifies the position in the list from where to continue listing the + * resources. + * @type string $filter + * Lists Features that match the filter expression, following the syntax + * outlined in https://google.aip.dev/160. + * Examples: + * - Feature with the name "servicemesh" in project "foo-proj": + * name = "projects/foo-proj/locations/global/features/servicemesh" + * - Features that have a label called `foo`: + * labels.foo:* + * - Features that have a label called `foo` whose value is `bar`: + * labels.foo = bar + * @type string $order_by + * One or more fields to compare and use to sort the output. + * See https://google.aip.dev/132#ordering. + * @type bool $return_partial_success + * Optional. If set to true, the response will return partial results when + * some regions are unreachable and the unreachable field in Feature proto + * will be populated. If set to false, the request will fail when some regions + * are unreachable. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent (project and location) where the Features will be + * listed. Specified in the format `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent (project and location) where the Features will be + * listed. Specified in the format `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * When requesting a 'page' of resources, `page_size` specifies number of + * resources to return. If unspecified or set to 0, all resources will + * be returned. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * When requesting a 'page' of resources, `page_size` specifies number of + * resources to return. If unspecified or set to 0, all resources will + * be returned. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Token returned by previous call to `ListFeatures` which + * specifies the position in the list from where to continue listing the + * resources. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Token returned by previous call to `ListFeatures` which + * specifies the position in the list from where to continue listing the + * resources. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Lists Features that match the filter expression, following the syntax + * outlined in https://google.aip.dev/160. + * Examples: + * - Feature with the name "servicemesh" in project "foo-proj": + * name = "projects/foo-proj/locations/global/features/servicemesh" + * - Features that have a label called `foo`: + * labels.foo:* + * - Features that have a label called `foo` whose value is `bar`: + * labels.foo = bar + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Lists Features that match the filter expression, following the syntax + * outlined in https://google.aip.dev/160. + * Examples: + * - Feature with the name "servicemesh" in project "foo-proj": + * name = "projects/foo-proj/locations/global/features/servicemesh" + * - Features that have a label called `foo`: + * labels.foo:* + * - Features that have a label called `foo` whose value is `bar`: + * labels.foo = bar + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * One or more fields to compare and use to sort the output. + * See https://google.aip.dev/132#ordering. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * One or more fields to compare and use to sort the output. + * See https://google.aip.dev/132#ordering. + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Optional. If set to true, the response will return partial results when + * some regions are unreachable and the unreachable field in Feature proto + * will be populated. If set to false, the request will fail when some regions + * are unreachable. + * + * Generated from protobuf field bool return_partial_success = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getReturnPartialSuccess() + { + return $this->return_partial_success; + } + + /** + * Optional. If set to true, the response will return partial results when + * some regions are unreachable and the unreachable field in Feature proto + * will be populated. If set to false, the request will fail when some regions + * are unreachable. + * + * Generated from protobuf field bool return_partial_success = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setReturnPartialSuccess($var) + { + GPBUtil::checkBool($var); + $this->return_partial_success = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListFeaturesResponse.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListFeaturesResponse.php new file mode 100644 index 000000000000..a1b284439a46 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListFeaturesResponse.php @@ -0,0 +1,109 @@ +google.cloud.gkehub.v1.ListFeaturesResponse + */ +class ListFeaturesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of matching Features + * + * Generated from protobuf field repeated .google.cloud.gkehub.v1.Feature resources = 1; + */ + private $resources; + /** + * A token to request the next page of resources from the + * `ListFeatures` method. The value of an empty string means + * that there are no more resources to return. + * + * 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\GkeHub\V1\Feature>|\Google\Protobuf\Internal\RepeatedField $resources + * The list of matching Features + * @type string $next_page_token + * A token to request the next page of resources from the + * `ListFeatures` method. The value of an empty string means + * that there are no more resources to return. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * The list of matching Features + * + * Generated from protobuf field repeated .google.cloud.gkehub.v1.Feature resources = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getResources() + { + return $this->resources; + } + + /** + * The list of matching Features + * + * Generated from protobuf field repeated .google.cloud.gkehub.v1.Feature resources = 1; + * @param array<\Google\Cloud\GkeHub\V1\Feature>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setResources($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\V1\Feature::class); + $this->resources = $arr; + + return $this; + } + + /** + * A token to request the next page of resources from the + * `ListFeatures` method. The value of an empty string means + * that there are no more resources to return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to request the next page of resources from the + * `ListFeatures` method. The value of an empty string means + * that there are no more resources to return. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListFleetsRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListFleetsRequest.php new file mode 100644 index 000000000000..efb3dd2c7711 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListFleetsRequest.php @@ -0,0 +1,174 @@ +google.cloud.gkehub.v1.ListFleetsRequest + */ +class ListFleetsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The organization or project to list for Fleets under, in the + * format `organizations/*/locations/*` or `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. A page token, received from a previous `ListFleets` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListFleets` must match + * the call that provided the page token. + * + * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. The maximum number of fleets to return. The service may return + * fewer than this value. If unspecified, at most 200 fleets will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + + /** + * @param string $parent Required. The organization or project to list for Fleets under, in the + * format `organizations/*/locations/*` or `projects/*/locations/*`. Please see + * {@see GkeHubClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\GkeHub\V1\ListFleetsRequest + * + * @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 organization or project to list for Fleets under, in the + * format `organizations/*/locations/*` or `projects/*/locations/*`. + * @type string $page_token + * Optional. A page token, received from a previous `ListFleets` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListFleets` must match + * the call that provided the page token. + * @type int $page_size + * Optional. The maximum number of fleets to return. The service may return + * fewer than this value. If unspecified, at most 200 fleets will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The organization or project to list for Fleets under, in the + * format `organizations/*/locations/*` or `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The organization or project to list for Fleets under, in the + * format `organizations/*/locations/*` or `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. A page token, received from a previous `ListFleets` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListFleets` must match + * the call that provided the page token. + * + * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A page token, received from a previous `ListFleets` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListFleets` must match + * the call that provided the page token. + * + * Generated from protobuf field string page_token = 2 [(.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 maximum number of fleets to return. The service may return + * fewer than this value. If unspecified, at most 200 fleets will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of fleets to return. The service may return + * fewer than this value. If unspecified, at most 200 fleets will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListFleetsResponse.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListFleetsResponse.php new file mode 100644 index 000000000000..d9c8ecb26d5a --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListFleetsResponse.php @@ -0,0 +1,109 @@ +google.cloud.gkehub.v1.ListFleetsResponse + */ +class ListFleetsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of matching fleets. + * + * Generated from protobuf field repeated .google.cloud.gkehub.v1.Fleet fleets = 1; + */ + private $fleets; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * The token is only valid for 1h. + * + * 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\GkeHub\V1\Fleet>|\Google\Protobuf\Internal\RepeatedField $fleets + * The list of matching fleets. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * The token is only valid for 1h. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * The list of matching fleets. + * + * Generated from protobuf field repeated .google.cloud.gkehub.v1.Fleet fleets = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFleets() + { + return $this->fleets; + } + + /** + * The list of matching fleets. + * + * Generated from protobuf field repeated .google.cloud.gkehub.v1.Fleet fleets = 1; + * @param array<\Google\Cloud\GkeHub\V1\Fleet>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFleets($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\V1\Fleet::class); + $this->fleets = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * The token is only valid for 1h. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * The token is only valid for 1h. + * + * 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/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListMembershipBindingsRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListMembershipBindingsRequest.php new file mode 100644 index 000000000000..76ec9ec5b06a --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListMembershipBindingsRequest.php @@ -0,0 +1,208 @@ +google.cloud.gkehub.v1.ListMembershipBindingsRequest + */ +class ListMembershipBindingsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent Membership for which the MembershipBindings will be + * listed. Specified in the format `projects/*/locations/*/memberships/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. Token returned by previous call to `ListMembershipBindings` which + * specifies the position in the list from where to continue listing the + * resources. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Lists MembershipBindings that match the filter expression, + * following the syntax outlined in https://google.aip.dev/160. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + + /** + * @param string $parent Required. The parent Membership for which the MembershipBindings will be + * listed. Specified in the format `projects/*/locations/*/memberships/*`. Please see + * {@see GkeHubClient::membershipName()} for help formatting this field. + * + * @return \Google\Cloud\GkeHub\V1\ListMembershipBindingsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent Membership for which the MembershipBindings will be + * listed. Specified in the format `projects/*/locations/*/memberships/*`. + * @type int $page_size + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. + * @type string $page_token + * Optional. Token returned by previous call to `ListMembershipBindings` which + * specifies the position in the list from where to continue listing the + * resources. + * @type string $filter + * Optional. Lists MembershipBindings that match the filter expression, + * following the syntax outlined in https://google.aip.dev/160. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent Membership for which the MembershipBindings will be + * listed. Specified in the format `projects/*/locations/*/memberships/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent Membership for which the MembershipBindings will be + * listed. Specified in the format `projects/*/locations/*/memberships/*`. + * + * 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. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. + * + * 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. Token returned by previous call to `ListMembershipBindings` which + * specifies the position in the list from where to continue listing the + * resources. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. Token returned by previous call to `ListMembershipBindings` which + * specifies the position in the list from where to continue listing the + * resources. + * + * 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. Lists MembershipBindings that match the filter expression, + * following the syntax outlined in https://google.aip.dev/160. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Lists MembershipBindings that match the filter expression, + * following the syntax outlined in https://google.aip.dev/160. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListMembershipBindingsResponse.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListMembershipBindingsResponse.php new file mode 100644 index 000000000000..3c64db6acada --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListMembershipBindingsResponse.php @@ -0,0 +1,143 @@ +google.cloud.gkehub.v1.ListMembershipBindingsResponse + */ +class ListMembershipBindingsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of membership_bindings + * + * Generated from protobuf field repeated .google.cloud.gkehub.v1.MembershipBinding membership_bindings = 1; + */ + private $membership_bindings; + /** + * A token to request the next page of resources from the + * `ListMembershipBindings` method. The value of an empty string means + * that there are no more resources to return. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * List of locations that could not be reached while fetching this list. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\GkeHub\V1\MembershipBinding>|\Google\Protobuf\Internal\RepeatedField $membership_bindings + * The list of membership_bindings + * @type string $next_page_token + * A token to request the next page of resources from the + * `ListMembershipBindings` method. The value of an empty string means + * that there are no more resources to return. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * List of locations that could not be reached while fetching this list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * The list of membership_bindings + * + * Generated from protobuf field repeated .google.cloud.gkehub.v1.MembershipBinding membership_bindings = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMembershipBindings() + { + return $this->membership_bindings; + } + + /** + * The list of membership_bindings + * + * Generated from protobuf field repeated .google.cloud.gkehub.v1.MembershipBinding membership_bindings = 1; + * @param array<\Google\Cloud\GkeHub\V1\MembershipBinding>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMembershipBindings($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\V1\MembershipBinding::class); + $this->membership_bindings = $arr; + + return $this; + } + + /** + * A token to request the next page of resources from the + * `ListMembershipBindings` method. The value of an empty string means + * that there are no more resources to return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to request the next page of resources from the + * `ListMembershipBindings` method. The value of an empty string means + * that there are no more resources to return. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * List of locations that could not be reached while fetching this list. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * List of locations that could not be reached while fetching this list. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListMembershipRBACRoleBindingsRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListMembershipRBACRoleBindingsRequest.php new file mode 100644 index 000000000000..ac01d9d83bd7 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListMembershipRBACRoleBindingsRequest.php @@ -0,0 +1,170 @@ +google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsRequest + */ +class ListMembershipRBACRoleBindingsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent (project and location) where the Features will be + * listed. Specified in the format `projects/*/locations/*/memberships/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. Token returned by previous call to + * `ListMembershipRBACRoleBindings` which specifies the position in the list + * from where to continue listing the resources. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The parent (project and location) where the Features will be + * listed. Specified in the format `projects/*/locations/*/memberships/*`. Please see + * {@see GkeHubClient::scopeName()} for help formatting this field. + * + * @return \Google\Cloud\GkeHub\V1\ListMembershipRBACRoleBindingsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent (project and location) where the Features will be + * listed. Specified in the format `projects/*/locations/*/memberships/*`. + * @type int $page_size + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. + * @type string $page_token + * Optional. Token returned by previous call to + * `ListMembershipRBACRoleBindings` which specifies the position in the list + * from where to continue listing the resources. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent (project and location) where the Features will be + * listed. Specified in the format `projects/*/locations/*/memberships/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent (project and location) where the Features will be + * listed. Specified in the format `projects/*/locations/*/memberships/*`. + * + * 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. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. + * + * 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. Token returned by previous call to + * `ListMembershipRBACRoleBindings` which specifies the position in the list + * from where to continue listing the resources. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. Token returned by previous call to + * `ListMembershipRBACRoleBindings` which specifies the position in the list + * from where to continue listing the resources. + * + * 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; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListMembershipRBACRoleBindingsResponse.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListMembershipRBACRoleBindingsResponse.php new file mode 100644 index 000000000000..d03fe6a7bf5d --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListMembershipRBACRoleBindingsResponse.php @@ -0,0 +1,143 @@ +google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsResponse + */ +class ListMembershipRBACRoleBindingsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of Membership RBACRoleBindings. + * + * Generated from protobuf field repeated .google.cloud.gkehub.v1.RBACRoleBinding rbacrolebindings = 1; + */ + private $rbacrolebindings; + /** + * A token to request the next page of resources from the + * `ListMembershipRBACRoleBindings` method. The value of an empty string means + * that there are no more resources to return. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * List of locations that could not be reached while fetching this list. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\GkeHub\V1\RBACRoleBinding>|\Google\Protobuf\Internal\RepeatedField $rbacrolebindings + * The list of Membership RBACRoleBindings. + * @type string $next_page_token + * A token to request the next page of resources from the + * `ListMembershipRBACRoleBindings` method. The value of an empty string means + * that there are no more resources to return. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * List of locations that could not be reached while fetching this list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * The list of Membership RBACRoleBindings. + * + * Generated from protobuf field repeated .google.cloud.gkehub.v1.RBACRoleBinding rbacrolebindings = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRbacrolebindings() + { + return $this->rbacrolebindings; + } + + /** + * The list of Membership RBACRoleBindings. + * + * Generated from protobuf field repeated .google.cloud.gkehub.v1.RBACRoleBinding rbacrolebindings = 1; + * @param array<\Google\Cloud\GkeHub\V1\RBACRoleBinding>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRbacrolebindings($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\V1\RBACRoleBinding::class); + $this->rbacrolebindings = $arr; + + return $this; + } + + /** + * A token to request the next page of resources from the + * `ListMembershipRBACRoleBindings` method. The value of an empty string means + * that there are no more resources to return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to request the next page of resources from the + * `ListMembershipRBACRoleBindings` method. The value of an empty string means + * that there are no more resources to return. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * List of locations that could not be reached while fetching this list. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * List of locations that could not be reached while fetching this list. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListMembershipsRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListMembershipsRequest.php new file mode 100644 index 000000000000..4ae0d7ee4984 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListMembershipsRequest.php @@ -0,0 +1,287 @@ +google.cloud.gkehub.v1.ListMembershipsRequest + */ +class ListMembershipsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent (project and location) where the Memberships will be + * listed. Specified in the format `projects/*/locations/*`. + * `projects/*/locations/-` list memberships in all the regions. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. Token returned by previous call to `ListMemberships` which + * specifies the position in the list from where to continue listing the + * resources. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Lists Memberships that match the filter expression, following the + * syntax outlined in https://google.aip.dev/160. + * Examples: + * - Name is `bar` in project `foo-proj` and location `global`: + * name = "projects/foo-proj/locations/global/membership/bar" + * - Memberships that have a label called `foo`: + * labels.foo:* + * - Memberships that have a label called `foo` whose value is `bar`: + * labels.foo = bar + * - Memberships in the CREATING state: + * state = CREATING + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. One or more fields to compare and use to sort the output. + * See https://google.aip.dev/132#ordering. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The parent (project and location) where the Memberships will be + * listed. Specified in the format `projects/*/locations/*`. + * `projects/*/locations/-` list memberships in all the regions. Please see + * {@see GkeHubClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\GkeHub\V1\ListMembershipsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent (project and location) where the Memberships will be + * listed. Specified in the format `projects/*/locations/*`. + * `projects/*/locations/-` list memberships in all the regions. + * @type int $page_size + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. + * @type string $page_token + * Optional. Token returned by previous call to `ListMemberships` which + * specifies the position in the list from where to continue listing the + * resources. + * @type string $filter + * Optional. Lists Memberships that match the filter expression, following the + * syntax outlined in https://google.aip.dev/160. + * Examples: + * - Name is `bar` in project `foo-proj` and location `global`: + * name = "projects/foo-proj/locations/global/membership/bar" + * - Memberships that have a label called `foo`: + * labels.foo:* + * - Memberships that have a label called `foo` whose value is `bar`: + * labels.foo = bar + * - Memberships in the CREATING state: + * state = CREATING + * @type string $order_by + * Optional. One or more fields to compare and use to sort the output. + * See https://google.aip.dev/132#ordering. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent (project and location) where the Memberships will be + * listed. Specified in the format `projects/*/locations/*`. + * `projects/*/locations/-` list memberships in all the regions. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent (project and location) where the Memberships will be + * listed. Specified in the format `projects/*/locations/*`. + * `projects/*/locations/-` list memberships in all the regions. + * + * 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. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. + * + * 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. Token returned by previous call to `ListMemberships` which + * specifies the position in the list from where to continue listing the + * resources. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. Token returned by previous call to `ListMemberships` which + * specifies the position in the list from where to continue listing the + * resources. + * + * 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. Lists Memberships that match the filter expression, following the + * syntax outlined in https://google.aip.dev/160. + * Examples: + * - Name is `bar` in project `foo-proj` and location `global`: + * name = "projects/foo-proj/locations/global/membership/bar" + * - Memberships that have a label called `foo`: + * labels.foo:* + * - Memberships that have a label called `foo` whose value is `bar`: + * labels.foo = bar + * - Memberships in the CREATING state: + * state = CREATING + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Lists Memberships that match the filter expression, following the + * syntax outlined in https://google.aip.dev/160. + * Examples: + * - Name is `bar` in project `foo-proj` and location `global`: + * name = "projects/foo-proj/locations/global/membership/bar" + * - Memberships that have a label called `foo`: + * labels.foo:* + * - Memberships that have a label called `foo` whose value is `bar`: + * labels.foo = bar + * - Memberships in the CREATING state: + * state = CREATING + * + * 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. One or more fields to compare and use to sort the output. + * See https://google.aip.dev/132#ordering. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. One or more fields to compare and use to sort the output. + * See https://google.aip.dev/132#ordering. + * + * Generated from protobuf field string order_by = 5 [(.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/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListMembershipsResponse.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListMembershipsResponse.php new file mode 100644 index 000000000000..401758bd06e4 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListMembershipsResponse.php @@ -0,0 +1,143 @@ +google.cloud.gkehub.v1.ListMembershipsResponse + */ +class ListMembershipsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of matching Memberships. + * + * Generated from protobuf field repeated .google.cloud.gkehub.v1.Membership resources = 1; + */ + private $resources; + /** + * A token to request the next page of resources from the + * `ListMemberships` method. The value of an empty string means that + * there are no more resources to return. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * List of locations that could not be reached while fetching this list. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\GkeHub\V1\Membership>|\Google\Protobuf\Internal\RepeatedField $resources + * The list of matching Memberships. + * @type string $next_page_token + * A token to request the next page of resources from the + * `ListMemberships` method. The value of an empty string means that + * there are no more resources to return. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * List of locations that could not be reached while fetching this list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * The list of matching Memberships. + * + * Generated from protobuf field repeated .google.cloud.gkehub.v1.Membership resources = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getResources() + { + return $this->resources; + } + + /** + * The list of matching Memberships. + * + * Generated from protobuf field repeated .google.cloud.gkehub.v1.Membership resources = 1; + * @param array<\Google\Cloud\GkeHub\V1\Membership>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setResources($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\V1\Membership::class); + $this->resources = $arr; + + return $this; + } + + /** + * A token to request the next page of resources from the + * `ListMemberships` method. The value of an empty string means that + * there are no more resources to return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to request the next page of resources from the + * `ListMemberships` method. The value of an empty string means that + * there are no more resources to return. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * List of locations that could not be reached while fetching this list. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * List of locations that could not be reached while fetching this list. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListPermittedScopesRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListPermittedScopesRequest.php new file mode 100644 index 000000000000..d9c4c66e32ed --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListPermittedScopesRequest.php @@ -0,0 +1,170 @@ +google.cloud.gkehub.v1.ListPermittedScopesRequest + */ +class ListPermittedScopesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent (project and location) where the Scope will be listed. + * Specified in the format `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. Token returned by previous call to `ListPermittedScopes` which + * specifies the position in the list from where to continue listing the + * resources. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The parent (project and location) where the Scope will be listed. + * Specified in the format `projects/*/locations/*`. Please see + * {@see GkeHubClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\GkeHub\V1\ListPermittedScopesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent (project and location) where the Scope will be listed. + * Specified in the format `projects/*/locations/*`. + * @type int $page_size + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. + * @type string $page_token + * Optional. Token returned by previous call to `ListPermittedScopes` which + * specifies the position in the list from where to continue listing the + * resources. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent (project and location) where the Scope will be listed. + * Specified in the format `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent (project and location) where the Scope will be listed. + * Specified in the format `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. + * + * 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. Token returned by previous call to `ListPermittedScopes` which + * specifies the position in the list from where to continue listing the + * resources. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. Token returned by previous call to `ListPermittedScopes` which + * specifies the position in the list from where to continue listing the + * resources. + * + * 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; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListPermittedScopesResponse.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListPermittedScopesResponse.php new file mode 100644 index 000000000000..2cc7053c4d7a --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListPermittedScopesResponse.php @@ -0,0 +1,109 @@ +google.cloud.gkehub.v1.ListPermittedScopesResponse + */ +class ListPermittedScopesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of permitted Scopes + * + * Generated from protobuf field repeated .google.cloud.gkehub.v1.Scope scopes = 1; + */ + private $scopes; + /** + * A token to request the next page of resources from the + * `ListPermittedScopes` method. The value of an empty string means + * that there are no more resources to return. + * + * 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\GkeHub\V1\Scope>|\Google\Protobuf\Internal\RepeatedField $scopes + * The list of permitted Scopes + * @type string $next_page_token + * A token to request the next page of resources from the + * `ListPermittedScopes` method. The value of an empty string means + * that there are no more resources to return. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * The list of permitted Scopes + * + * Generated from protobuf field repeated .google.cloud.gkehub.v1.Scope scopes = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getScopes() + { + return $this->scopes; + } + + /** + * The list of permitted Scopes + * + * Generated from protobuf field repeated .google.cloud.gkehub.v1.Scope scopes = 1; + * @param array<\Google\Cloud\GkeHub\V1\Scope>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setScopes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\V1\Scope::class); + $this->scopes = $arr; + + return $this; + } + + /** + * A token to request the next page of resources from the + * `ListPermittedScopes` method. The value of an empty string means + * that there are no more resources to return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to request the next page of resources from the + * `ListPermittedScopes` method. The value of an empty string means + * that there are no more resources to return. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListScopeNamespacesRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListScopeNamespacesRequest.php new file mode 100644 index 000000000000..78d6b756b883 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListScopeNamespacesRequest.php @@ -0,0 +1,170 @@ +google.cloud.gkehub.v1.ListScopeNamespacesRequest + */ +class ListScopeNamespacesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent (project and location) where the Features will be + * listed. Specified in the format `projects/*/locations/*/scopes/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. Token returned by previous call to `ListFeatures` which + * specifies the position in the list from where to continue listing the + * resources. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The parent (project and location) where the Features will be + * listed. Specified in the format `projects/*/locations/*/scopes/*`. Please see + * {@see GkeHubClient::scopeName()} for help formatting this field. + * + * @return \Google\Cloud\GkeHub\V1\ListScopeNamespacesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent (project and location) where the Features will be + * listed. Specified in the format `projects/*/locations/*/scopes/*`. + * @type int $page_size + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. + * @type string $page_token + * Optional. Token returned by previous call to `ListFeatures` which + * specifies the position in the list from where to continue listing the + * resources. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent (project and location) where the Features will be + * listed. Specified in the format `projects/*/locations/*/scopes/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent (project and location) where the Features will be + * listed. Specified in the format `projects/*/locations/*/scopes/*`. + * + * 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. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. + * + * 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. Token returned by previous call to `ListFeatures` which + * specifies the position in the list from where to continue listing the + * resources. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. Token returned by previous call to `ListFeatures` which + * specifies the position in the list from where to continue listing the + * resources. + * + * 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; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListScopeNamespacesResponse.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListScopeNamespacesResponse.php new file mode 100644 index 000000000000..aa84bc4d604f --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListScopeNamespacesResponse.php @@ -0,0 +1,109 @@ +google.cloud.gkehub.v1.ListScopeNamespacesResponse + */ +class ListScopeNamespacesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of fleet namespaces + * + * Generated from protobuf field repeated .google.cloud.gkehub.v1.Namespace scope_namespaces = 1; + */ + private $scope_namespaces; + /** + * A token to request the next page of resources from the + * `ListNamespaces` method. The value of an empty string means + * that there are no more resources to return. + * + * 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\GkeHub\V1\PBNamespace>|\Google\Protobuf\Internal\RepeatedField $scope_namespaces + * The list of fleet namespaces + * @type string $next_page_token + * A token to request the next page of resources from the + * `ListNamespaces` method. The value of an empty string means + * that there are no more resources to return. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * The list of fleet namespaces + * + * Generated from protobuf field repeated .google.cloud.gkehub.v1.Namespace scope_namespaces = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getScopeNamespaces() + { + return $this->scope_namespaces; + } + + /** + * The list of fleet namespaces + * + * Generated from protobuf field repeated .google.cloud.gkehub.v1.Namespace scope_namespaces = 1; + * @param array<\Google\Cloud\GkeHub\V1\PBNamespace>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setScopeNamespaces($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\V1\PBNamespace::class); + $this->scope_namespaces = $arr; + + return $this; + } + + /** + * A token to request the next page of resources from the + * `ListNamespaces` method. The value of an empty string means + * that there are no more resources to return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to request the next page of resources from the + * `ListNamespaces` method. The value of an empty string means + * that there are no more resources to return. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListScopeRBACRoleBindingsRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListScopeRBACRoleBindingsRequest.php new file mode 100644 index 000000000000..b6cb81f007f1 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListScopeRBACRoleBindingsRequest.php @@ -0,0 +1,170 @@ +google.cloud.gkehub.v1.ListScopeRBACRoleBindingsRequest + */ +class ListScopeRBACRoleBindingsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent (project and location) where the Features will be + * listed. Specified in the format `projects/*/locations/*/scopes/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. Token returned by previous call to `ListScopeRBACRoleBindings` + * which specifies the position in the list from where to continue listing the + * resources. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The parent (project and location) where the Features will be + * listed. Specified in the format `projects/*/locations/*/scopes/*`. Please see + * {@see GkeHubClient::scopeName()} for help formatting this field. + * + * @return \Google\Cloud\GkeHub\V1\ListScopeRBACRoleBindingsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent (project and location) where the Features will be + * listed. Specified in the format `projects/*/locations/*/scopes/*`. + * @type int $page_size + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. + * @type string $page_token + * Optional. Token returned by previous call to `ListScopeRBACRoleBindings` + * which specifies the position in the list from where to continue listing the + * resources. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent (project and location) where the Features will be + * listed. Specified in the format `projects/*/locations/*/scopes/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent (project and location) where the Features will be + * listed. Specified in the format `projects/*/locations/*/scopes/*`. + * + * 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. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. + * + * 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. Token returned by previous call to `ListScopeRBACRoleBindings` + * which specifies the position in the list from where to continue listing the + * resources. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. Token returned by previous call to `ListScopeRBACRoleBindings` + * which specifies the position in the list from where to continue listing the + * resources. + * + * 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; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListScopeRBACRoleBindingsResponse.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListScopeRBACRoleBindingsResponse.php new file mode 100644 index 000000000000..efe78b890344 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListScopeRBACRoleBindingsResponse.php @@ -0,0 +1,109 @@ +google.cloud.gkehub.v1.ListScopeRBACRoleBindingsResponse + */ +class ListScopeRBACRoleBindingsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of Scope RBACRoleBindings. + * + * Generated from protobuf field repeated .google.cloud.gkehub.v1.RBACRoleBinding rbacrolebindings = 1; + */ + private $rbacrolebindings; + /** + * A token to request the next page of resources from the + * `ListScopeRBACRoleBindings` method. The value of an empty string means + * that there are no more resources to return. + * + * 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\GkeHub\V1\RBACRoleBinding>|\Google\Protobuf\Internal\RepeatedField $rbacrolebindings + * The list of Scope RBACRoleBindings. + * @type string $next_page_token + * A token to request the next page of resources from the + * `ListScopeRBACRoleBindings` method. The value of an empty string means + * that there are no more resources to return. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * The list of Scope RBACRoleBindings. + * + * Generated from protobuf field repeated .google.cloud.gkehub.v1.RBACRoleBinding rbacrolebindings = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRbacrolebindings() + { + return $this->rbacrolebindings; + } + + /** + * The list of Scope RBACRoleBindings. + * + * Generated from protobuf field repeated .google.cloud.gkehub.v1.RBACRoleBinding rbacrolebindings = 1; + * @param array<\Google\Cloud\GkeHub\V1\RBACRoleBinding>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRbacrolebindings($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\V1\RBACRoleBinding::class); + $this->rbacrolebindings = $arr; + + return $this; + } + + /** + * A token to request the next page of resources from the + * `ListScopeRBACRoleBindings` method. The value of an empty string means + * that there are no more resources to return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to request the next page of resources from the + * `ListScopeRBACRoleBindings` method. The value of an empty string means + * that there are no more resources to return. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListScopesRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListScopesRequest.php new file mode 100644 index 000000000000..62786ed385c1 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListScopesRequest.php @@ -0,0 +1,170 @@ +google.cloud.gkehub.v1.ListScopesRequest + */ +class ListScopesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent (project and location) where the Scope will be listed. + * Specified in the format `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. Token returned by previous call to `ListScopes` which + * specifies the position in the list from where to continue listing the + * resources. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The parent (project and location) where the Scope will be listed. + * Specified in the format `projects/*/locations/*`. Please see + * {@see GkeHubClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\GkeHub\V1\ListScopesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent (project and location) where the Scope will be listed. + * Specified in the format `projects/*/locations/*`. + * @type int $page_size + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. + * @type string $page_token + * Optional. Token returned by previous call to `ListScopes` which + * specifies the position in the list from where to continue listing the + * resources. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent (project and location) where the Scope will be listed. + * Specified in the format `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent (project and location) where the Scope will be listed. + * Specified in the format `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. + * + * 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. Token returned by previous call to `ListScopes` which + * specifies the position in the list from where to continue listing the + * resources. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. Token returned by previous call to `ListScopes` which + * specifies the position in the list from where to continue listing the + * resources. + * + * 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; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListScopesResponse.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListScopesResponse.php new file mode 100644 index 000000000000..11f51612af64 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListScopesResponse.php @@ -0,0 +1,109 @@ +google.cloud.gkehub.v1.ListScopesResponse + */ +class ListScopesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of Scopes + * + * Generated from protobuf field repeated .google.cloud.gkehub.v1.Scope scopes = 1; + */ + private $scopes; + /** + * A token to request the next page of resources from the + * `ListScopes` method. The value of an empty string means + * that there are no more resources to return. + * + * 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\GkeHub\V1\Scope>|\Google\Protobuf\Internal\RepeatedField $scopes + * The list of Scopes + * @type string $next_page_token + * A token to request the next page of resources from the + * `ListScopes` method. The value of an empty string means + * that there are no more resources to return. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * The list of Scopes + * + * Generated from protobuf field repeated .google.cloud.gkehub.v1.Scope scopes = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getScopes() + { + return $this->scopes; + } + + /** + * The list of Scopes + * + * Generated from protobuf field repeated .google.cloud.gkehub.v1.Scope scopes = 1; + * @param array<\Google\Cloud\GkeHub\V1\Scope>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setScopes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\V1\Scope::class); + $this->scopes = $arr; + + return $this; + } + + /** + * A token to request the next page of resources from the + * `ListScopes` method. The value of an empty string means + * that there are no more resources to return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to request the next page of resources from the + * `ListScopes` method. The value of an empty string means + * that there are no more resources to return. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/Membership.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/Membership.php new file mode 100644 index 000000000000..38ddfe562907 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/Membership.php @@ -0,0 +1,641 @@ +google.cloud.gkehub.v1.Membership + */ +class Membership extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The full, unique name of this Membership resource in the + * format `projects/*/locations/*/memberships/{membership_id}`, set during + * creation. + * `membership_id` must be a valid RFC 1123 compliant DNS label: + * 1. At most 63 characters in length + * 2. It must consist of lower case alphanumeric characters or `-` + * 3. It must start and end with an alphanumeric character + * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + * with a maximum length of 63 characters. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Optional. Labels for this membership. + * + * Generated from protobuf field map labels = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Output only. Description of this membership, limited to 63 characters. + * Must match the regex: `[a-zA-Z0-9][a-zA-Z0-9_\-\.\ ]*` + * This field is present for legacy purposes. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $description = ''; + /** + * Output only. State of the Membership resource. + * + * Generated from protobuf field .google.cloud.gkehub.v1.MembershipState state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = null; + /** + * Output only. When the Membership was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. When the Membership was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. When the Membership was deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $delete_time = null; + /** + * Optional. An externally-generated and managed ID for this Membership. This + * ID may be modified after creation, but this is not recommended. + * The ID must match the regex: `[a-zA-Z0-9][a-zA-Z0-9_\-\.]*` + * If this Membership represents a Kubernetes cluster, this value should be + * set to the UID of the `kube-system` namespace object. + * + * Generated from protobuf field string external_id = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $external_id = ''; + /** + * Output only. For clusters using Connect, the timestamp of the most recent + * connection established with Google Cloud. This time is updated every + * several minutes, not continuously. For clusters that do not use GKE + * Connect, or that have never connected successfully, this field will be + * unset. + * + * Generated from protobuf field .google.protobuf.Timestamp last_connection_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $last_connection_time = null; + /** + * Output only. Google-generated UUID for this resource. This is unique across + * all Membership resources. If a Membership resource is deleted and another + * resource with the same name is created, it gets a different unique_id. + * + * Generated from protobuf field string unique_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $unique_id = ''; + /** + * Optional. How to identify workloads from this Membership. + * See the documentation on Workload Identity for more details: + * https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity + * + * Generated from protobuf field .google.cloud.gkehub.v1.Authority authority = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $authority = null; + /** + * Optional. The monitoring config information for this membership. + * + * Generated from protobuf field .google.cloud.gkehub.v1.MonitoringConfig monitoring_config = 14 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $monitoring_config = null; + protected $type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\GkeHub\V1\MembershipEndpoint $endpoint + * Optional. Endpoint information to reach this member. + * @type string $name + * Output only. The full, unique name of this Membership resource in the + * format `projects/*/locations/*/memberships/{membership_id}`, set during + * creation. + * `membership_id` must be a valid RFC 1123 compliant DNS label: + * 1. At most 63 characters in length + * 2. It must consist of lower case alphanumeric characters or `-` + * 3. It must start and end with an alphanumeric character + * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + * with a maximum length of 63 characters. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Labels for this membership. + * @type string $description + * Output only. Description of this membership, limited to 63 characters. + * Must match the regex: `[a-zA-Z0-9][a-zA-Z0-9_\-\.\ ]*` + * This field is present for legacy purposes. + * @type \Google\Cloud\GkeHub\V1\MembershipState $state + * Output only. State of the Membership resource. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. When the Membership was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. When the Membership was last updated. + * @type \Google\Protobuf\Timestamp $delete_time + * Output only. When the Membership was deleted. + * @type string $external_id + * Optional. An externally-generated and managed ID for this Membership. This + * ID may be modified after creation, but this is not recommended. + * The ID must match the regex: `[a-zA-Z0-9][a-zA-Z0-9_\-\.]*` + * If this Membership represents a Kubernetes cluster, this value should be + * set to the UID of the `kube-system` namespace object. + * @type \Google\Protobuf\Timestamp $last_connection_time + * Output only. For clusters using Connect, the timestamp of the most recent + * connection established with Google Cloud. This time is updated every + * several minutes, not continuously. For clusters that do not use GKE + * Connect, or that have never connected successfully, this field will be + * unset. + * @type string $unique_id + * Output only. Google-generated UUID for this resource. This is unique across + * all Membership resources. If a Membership resource is deleted and another + * resource with the same name is created, it gets a different unique_id. + * @type \Google\Cloud\GkeHub\V1\Authority $authority + * Optional. How to identify workloads from this Membership. + * See the documentation on Workload Identity for more details: + * https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity + * @type \Google\Cloud\GkeHub\V1\MonitoringConfig $monitoring_config + * Optional. The monitoring config information for this membership. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Membership::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Endpoint information to reach this member. + * + * Generated from protobuf field .google.cloud.gkehub.v1.MembershipEndpoint endpoint = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeHub\V1\MembershipEndpoint|null + */ + public function getEndpoint() + { + return $this->readOneof(4); + } + + public function hasEndpoint() + { + return $this->hasOneof(4); + } + + /** + * Optional. Endpoint information to reach this member. + * + * Generated from protobuf field .google.cloud.gkehub.v1.MembershipEndpoint endpoint = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeHub\V1\MembershipEndpoint $var + * @return $this + */ + public function setEndpoint($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\MembershipEndpoint::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Output only. The full, unique name of this Membership resource in the + * format `projects/*/locations/*/memberships/{membership_id}`, set during + * creation. + * `membership_id` must be a valid RFC 1123 compliant DNS label: + * 1. At most 63 characters in length + * 2. It must consist of lower case alphanumeric characters or `-` + * 3. It must start and end with an alphanumeric character + * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + * with a maximum length of 63 characters. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The full, unique name of this Membership resource in the + * format `projects/*/locations/*/memberships/{membership_id}`, set during + * creation. + * `membership_id` must be a valid RFC 1123 compliant DNS label: + * 1. At most 63 characters in length + * 2. It must consist of lower case alphanumeric characters or `-` + * 3. It must start and end with an alphanumeric character + * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + * with a maximum length of 63 characters. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. Labels for this membership. + * + * Generated from protobuf field map labels = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Labels for this membership. + * + * 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. Description of this membership, limited to 63 characters. + * Must match the regex: `[a-zA-Z0-9][a-zA-Z0-9_\-\.\ ]*` + * This field is present for legacy purposes. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Output only. Description of this membership, limited to 63 characters. + * Must match the regex: `[a-zA-Z0-9][a-zA-Z0-9_\-\.\ ]*` + * This field is present for legacy purposes. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. State of the Membership resource. + * + * Generated from protobuf field .google.cloud.gkehub.v1.MembershipState state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\GkeHub\V1\MembershipState|null + */ + public function getState() + { + return $this->state; + } + + public function hasState() + { + return isset($this->state); + } + + public function clearState() + { + unset($this->state); + } + + /** + * Output only. State of the Membership resource. + * + * Generated from protobuf field .google.cloud.gkehub.v1.MembershipState state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\GkeHub\V1\MembershipState $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\MembershipState::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. When the Membership was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. When the Membership was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. When the Membership was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. When the Membership was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. When the Membership was deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getDeleteTime() + { + return $this->delete_time; + } + + public function hasDeleteTime() + { + return isset($this->delete_time); + } + + public function clearDeleteTime() + { + unset($this->delete_time); + } + + /** + * Output only. When the Membership was deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setDeleteTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->delete_time = $var; + + return $this; + } + + /** + * Optional. An externally-generated and managed ID for this Membership. This + * ID may be modified after creation, but this is not recommended. + * The ID must match the regex: `[a-zA-Z0-9][a-zA-Z0-9_\-\.]*` + * If this Membership represents a Kubernetes cluster, this value should be + * set to the UID of the `kube-system` namespace object. + * + * Generated from protobuf field string external_id = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getExternalId() + { + return $this->external_id; + } + + /** + * Optional. An externally-generated and managed ID for this Membership. This + * ID may be modified after creation, but this is not recommended. + * The ID must match the regex: `[a-zA-Z0-9][a-zA-Z0-9_\-\.]*` + * If this Membership represents a Kubernetes cluster, this value should be + * set to the UID of the `kube-system` namespace object. + * + * Generated from protobuf field string external_id = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setExternalId($var) + { + GPBUtil::checkString($var, True); + $this->external_id = $var; + + return $this; + } + + /** + * Output only. For clusters using Connect, the timestamp of the most recent + * connection established with Google Cloud. This time is updated every + * several minutes, not continuously. For clusters that do not use GKE + * Connect, or that have never connected successfully, this field will be + * unset. + * + * Generated from protobuf field .google.protobuf.Timestamp last_connection_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastConnectionTime() + { + return $this->last_connection_time; + } + + public function hasLastConnectionTime() + { + return isset($this->last_connection_time); + } + + public function clearLastConnectionTime() + { + unset($this->last_connection_time); + } + + /** + * Output only. For clusters using Connect, the timestamp of the most recent + * connection established with Google Cloud. This time is updated every + * several minutes, not continuously. For clusters that do not use GKE + * Connect, or that have never connected successfully, this field will be + * unset. + * + * Generated from protobuf field .google.protobuf.Timestamp last_connection_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastConnectionTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_connection_time = $var; + + return $this; + } + + /** + * Output only. Google-generated UUID for this resource. This is unique across + * all Membership resources. If a Membership resource is deleted and another + * resource with the same name is created, it gets a different unique_id. + * + * Generated from protobuf field string unique_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUniqueId() + { + return $this->unique_id; + } + + /** + * Output only. Google-generated UUID for this resource. This is unique across + * all Membership resources. If a Membership resource is deleted and another + * resource with the same name is created, it gets a different unique_id. + * + * Generated from protobuf field string unique_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUniqueId($var) + { + GPBUtil::checkString($var, True); + $this->unique_id = $var; + + return $this; + } + + /** + * Optional. How to identify workloads from this Membership. + * See the documentation on Workload Identity for more details: + * https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity + * + * Generated from protobuf field .google.cloud.gkehub.v1.Authority authority = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeHub\V1\Authority|null + */ + public function getAuthority() + { + return $this->authority; + } + + public function hasAuthority() + { + return isset($this->authority); + } + + public function clearAuthority() + { + unset($this->authority); + } + + /** + * Optional. How to identify workloads from this Membership. + * See the documentation on Workload Identity for more details: + * https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity + * + * Generated from protobuf field .google.cloud.gkehub.v1.Authority authority = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeHub\V1\Authority $var + * @return $this + */ + public function setAuthority($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\Authority::class); + $this->authority = $var; + + return $this; + } + + /** + * Optional. The monitoring config information for this membership. + * + * Generated from protobuf field .google.cloud.gkehub.v1.MonitoringConfig monitoring_config = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeHub\V1\MonitoringConfig|null + */ + public function getMonitoringConfig() + { + return $this->monitoring_config; + } + + public function hasMonitoringConfig() + { + return isset($this->monitoring_config); + } + + public function clearMonitoringConfig() + { + unset($this->monitoring_config); + } + + /** + * Optional. The monitoring config information for this membership. + * + * Generated from protobuf field .google.cloud.gkehub.v1.MonitoringConfig monitoring_config = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeHub\V1\MonitoringConfig $var + * @return $this + */ + public function setMonitoringConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\MonitoringConfig::class); + $this->monitoring_config = $var; + + return $this; + } + + /** + * @return string + */ + public function getType() + { + return $this->whichOneof("type"); + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipBinding.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipBinding.php new file mode 100644 index 000000000000..b845df157a71 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipBinding.php @@ -0,0 +1,374 @@ +google.cloud.gkehub.v1.MembershipBinding + */ +class MembershipBinding extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name for the membershipbinding itself + * `projects/{project}/locations/{location}/memberships/{membership}/bindings/{membershipbinding}` + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Output only. Google-generated UUID for this resource. This is unique across + * all membershipbinding resources. If a membershipbinding resource is deleted + * and another resource with the same name is created, it gets a different + * uid. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + /** + * Output only. When the membership binding was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. When the membership binding was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. When the membership binding was deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $delete_time = null; + /** + * Output only. State of the membership binding resource. + * + * Generated from protobuf field .google.cloud.gkehub.v1.MembershipBindingLifecycleState state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = null; + /** + * Optional. Labels for this MembershipBinding. + * + * Generated from protobuf field map labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + protected $target; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $scope + * A Scope resource name in the format + * `projects/*/locations/*/scopes/*`. + * @type string $name + * The resource name for the membershipbinding itself + * `projects/{project}/locations/{location}/memberships/{membership}/bindings/{membershipbinding}` + * @type string $uid + * Output only. Google-generated UUID for this resource. This is unique across + * all membershipbinding resources. If a membershipbinding resource is deleted + * and another resource with the same name is created, it gets a different + * uid. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. When the membership binding was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. When the membership binding was last updated. + * @type \Google\Protobuf\Timestamp $delete_time + * Output only. When the membership binding was deleted. + * @type \Google\Cloud\GkeHub\V1\MembershipBindingLifecycleState $state + * Output only. State of the membership binding resource. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Labels for this MembershipBinding. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Fleet::initOnce(); + parent::__construct($data); + } + + /** + * A Scope resource name in the format + * `projects/*/locations/*/scopes/*`. + * + * Generated from protobuf field string scope = 3 [(.google.api.resource_reference) = { + * @return string + */ + public function getScope() + { + return $this->readOneof(3); + } + + public function hasScope() + { + return $this->hasOneof(3); + } + + /** + * A Scope resource name in the format + * `projects/*/locations/*/scopes/*`. + * + * Generated from protobuf field string scope = 3 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setScope($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * The resource name for the membershipbinding itself + * `projects/{project}/locations/{location}/memberships/{membership}/bindings/{membershipbinding}` + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name for the membershipbinding itself + * `projects/{project}/locations/{location}/memberships/{membership}/bindings/{membershipbinding}` + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. Google-generated UUID for this resource. This is unique across + * all membershipbinding resources. If a membershipbinding resource is deleted + * and another resource with the same name is created, it gets a different + * uid. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. Google-generated UUID for this resource. This is unique across + * all membershipbinding resources. If a membershipbinding resource is deleted + * and another resource with the same name is created, it gets a different + * uid. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Output only. When the membership binding was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. When the membership binding was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. When the membership binding was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. When the membership binding was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. When the membership binding was deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getDeleteTime() + { + return $this->delete_time; + } + + public function hasDeleteTime() + { + return isset($this->delete_time); + } + + public function clearDeleteTime() + { + unset($this->delete_time); + } + + /** + * Output only. When the membership binding was deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setDeleteTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->delete_time = $var; + + return $this; + } + + /** + * Output only. State of the membership binding resource. + * + * Generated from protobuf field .google.cloud.gkehub.v1.MembershipBindingLifecycleState state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\GkeHub\V1\MembershipBindingLifecycleState|null + */ + public function getState() + { + return $this->state; + } + + public function hasState() + { + return isset($this->state); + } + + public function clearState() + { + unset($this->state); + } + + /** + * Output only. State of the membership binding resource. + * + * Generated from protobuf field .google.cloud.gkehub.v1.MembershipBindingLifecycleState state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\GkeHub\V1\MembershipBindingLifecycleState $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\MembershipBindingLifecycleState::class); + $this->state = $var; + + return $this; + } + + /** + * Optional. Labels for this MembershipBinding. + * + * Generated from protobuf field map labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Labels for this MembershipBinding. + * + * Generated from protobuf field map labels = 9 [(.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; + } + + /** + * @return string + */ + public function getTarget() + { + return $this->whichOneof("target"); + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipBindingLifecycleState.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipBindingLifecycleState.php new file mode 100644 index 000000000000..268a32dfd8bf --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipBindingLifecycleState.php @@ -0,0 +1,67 @@ +google.cloud.gkehub.v1.MembershipBindingLifecycleState + */ +class MembershipBindingLifecycleState extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The current state of the MembershipBinding resource. + * + * Generated from protobuf field .google.cloud.gkehub.v1.MembershipBindingLifecycleState.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $code = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $code + * Output only. The current state of the MembershipBinding resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Fleet::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The current state of the MembershipBinding resource. + * + * Generated from protobuf field .google.cloud.gkehub.v1.MembershipBindingLifecycleState.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getCode() + { + return $this->code; + } + + /** + * Output only. The current state of the MembershipBinding resource. + * + * Generated from protobuf field .google.cloud.gkehub.v1.MembershipBindingLifecycleState.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\V1\MembershipBindingLifecycleState\Code::class); + $this->code = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipBindingLifecycleState/Code.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipBindingLifecycleState/Code.php new file mode 100644 index 000000000000..7fae8caaf4fa --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipBindingLifecycleState/Code.php @@ -0,0 +1,78 @@ +google.cloud.gkehub.v1.MembershipBindingLifecycleState.Code + */ +class Code +{ + /** + * The code is not set. + * + * Generated from protobuf enum CODE_UNSPECIFIED = 0; + */ + const CODE_UNSPECIFIED = 0; + /** + * The membershipbinding is being created. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * The membershipbinding active. + * + * Generated from protobuf enum READY = 2; + */ + const READY = 2; + /** + * The membershipbinding is being deleted. + * + * Generated from protobuf enum DELETING = 3; + */ + const DELETING = 3; + /** + * The membershipbinding is being updated. + * + * Generated from protobuf enum UPDATING = 4; + */ + const UPDATING = 4; + + private static $valueToName = [ + self::CODE_UNSPECIFIED => 'CODE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::READY => 'READY', + self::DELETING => 'DELETING', + self::UPDATING => 'UPDATING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Code::class, \Google\Cloud\GkeHub\V1\MembershipBindingLifecycleState_Code::class); + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipEndpoint.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipEndpoint.php new file mode 100644 index 000000000000..6558053fe879 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipEndpoint.php @@ -0,0 +1,228 @@ +google.cloud.gkehub.v1.MembershipEndpoint + */ +class MembershipEndpoint extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. GKE-specific information. Only present if this Membership is a GKE cluster. + * + * Generated from protobuf field .google.cloud.gkehub.v1.GkeCluster gke_cluster = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $gke_cluster = null; + /** + * Output only. Useful Kubernetes-specific metadata. + * + * Generated from protobuf field .google.cloud.gkehub.v1.KubernetesMetadata kubernetes_metadata = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $kubernetes_metadata = null; + /** + * Optional. The in-cluster Kubernetes Resources that should be applied for a + * correctly registered cluster, in the steady state. These resources: + * * Ensure that the cluster is exclusively registered to one and only one + * Hub Membership. + * * Propagate Workload Pool Information available in the Membership + * Authority field. + * * Ensure proper initial configuration of default Hub Features. + * + * Generated from protobuf field .google.cloud.gkehub.v1.KubernetesResource kubernetes_resource = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $kubernetes_resource = null; + /** + * Output only. Whether the lifecycle of this membership is managed by a + * google cluster platform service. + * + * Generated from protobuf field bool google_managed = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $google_managed = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\GkeHub\V1\GkeCluster $gke_cluster + * Optional. GKE-specific information. Only present if this Membership is a GKE cluster. + * @type \Google\Cloud\GkeHub\V1\KubernetesMetadata $kubernetes_metadata + * Output only. Useful Kubernetes-specific metadata. + * @type \Google\Cloud\GkeHub\V1\KubernetesResource $kubernetes_resource + * Optional. The in-cluster Kubernetes Resources that should be applied for a + * correctly registered cluster, in the steady state. These resources: + * * Ensure that the cluster is exclusively registered to one and only one + * Hub Membership. + * * Propagate Workload Pool Information available in the Membership + * Authority field. + * * Ensure proper initial configuration of default Hub Features. + * @type bool $google_managed + * Output only. Whether the lifecycle of this membership is managed by a + * google cluster platform service. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Membership::initOnce(); + parent::__construct($data); + } + + /** + * Optional. GKE-specific information. Only present if this Membership is a GKE cluster. + * + * Generated from protobuf field .google.cloud.gkehub.v1.GkeCluster gke_cluster = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeHub\V1\GkeCluster|null + */ + public function getGkeCluster() + { + return $this->gke_cluster; + } + + public function hasGkeCluster() + { + return isset($this->gke_cluster); + } + + public function clearGkeCluster() + { + unset($this->gke_cluster); + } + + /** + * Optional. GKE-specific information. Only present if this Membership is a GKE cluster. + * + * Generated from protobuf field .google.cloud.gkehub.v1.GkeCluster gke_cluster = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeHub\V1\GkeCluster $var + * @return $this + */ + public function setGkeCluster($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\GkeCluster::class); + $this->gke_cluster = $var; + + return $this; + } + + /** + * Output only. Useful Kubernetes-specific metadata. + * + * Generated from protobuf field .google.cloud.gkehub.v1.KubernetesMetadata kubernetes_metadata = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\GkeHub\V1\KubernetesMetadata|null + */ + public function getKubernetesMetadata() + { + return $this->kubernetes_metadata; + } + + public function hasKubernetesMetadata() + { + return isset($this->kubernetes_metadata); + } + + public function clearKubernetesMetadata() + { + unset($this->kubernetes_metadata); + } + + /** + * Output only. Useful Kubernetes-specific metadata. + * + * Generated from protobuf field .google.cloud.gkehub.v1.KubernetesMetadata kubernetes_metadata = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\GkeHub\V1\KubernetesMetadata $var + * @return $this + */ + public function setKubernetesMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\KubernetesMetadata::class); + $this->kubernetes_metadata = $var; + + return $this; + } + + /** + * Optional. The in-cluster Kubernetes Resources that should be applied for a + * correctly registered cluster, in the steady state. These resources: + * * Ensure that the cluster is exclusively registered to one and only one + * Hub Membership. + * * Propagate Workload Pool Information available in the Membership + * Authority field. + * * Ensure proper initial configuration of default Hub Features. + * + * Generated from protobuf field .google.cloud.gkehub.v1.KubernetesResource kubernetes_resource = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeHub\V1\KubernetesResource|null + */ + public function getKubernetesResource() + { + return $this->kubernetes_resource; + } + + public function hasKubernetesResource() + { + return isset($this->kubernetes_resource); + } + + public function clearKubernetesResource() + { + unset($this->kubernetes_resource); + } + + /** + * Optional. The in-cluster Kubernetes Resources that should be applied for a + * correctly registered cluster, in the steady state. These resources: + * * Ensure that the cluster is exclusively registered to one and only one + * Hub Membership. + * * Propagate Workload Pool Information available in the Membership + * Authority field. + * * Ensure proper initial configuration of default Hub Features. + * + * Generated from protobuf field .google.cloud.gkehub.v1.KubernetesResource kubernetes_resource = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeHub\V1\KubernetesResource $var + * @return $this + */ + public function setKubernetesResource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\KubernetesResource::class); + $this->kubernetes_resource = $var; + + return $this; + } + + /** + * Output only. Whether the lifecycle of this membership is managed by a + * google cluster platform service. + * + * Generated from protobuf field bool google_managed = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getGoogleManaged() + { + return $this->google_managed; + } + + /** + * Output only. Whether the lifecycle of this membership is managed by a + * google cluster platform service. + * + * Generated from protobuf field bool google_managed = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setGoogleManaged($var) + { + GPBUtil::checkBool($var); + $this->google_managed = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipFeatureSpec.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipFeatureSpec.php new file mode 100644 index 000000000000..cbb126324b89 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipFeatureSpec.php @@ -0,0 +1,76 @@ +google.cloud.gkehub.v1.MembershipFeatureSpec + */ +class MembershipFeatureSpec extends \Google\Protobuf\Internal\Message +{ + protected $feature_spec; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\GkeHub\ConfigManagement\V1\MembershipSpec $configmanagement + * Config Management-specific spec. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Feature::initOnce(); + parent::__construct($data); + } + + /** + * Config Management-specific spec. + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.MembershipSpec configmanagement = 106; + * @return \Google\Cloud\GkeHub\ConfigManagement\V1\MembershipSpec|null + */ + public function getConfigmanagement() + { + return $this->readOneof(106); + } + + public function hasConfigmanagement() + { + return $this->hasOneof(106); + } + + /** + * Config Management-specific spec. + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.MembershipSpec configmanagement = 106; + * @param \Google\Cloud\GkeHub\ConfigManagement\V1\MembershipSpec $var + * @return $this + */ + public function setConfigmanagement($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\ConfigManagement\V1\MembershipSpec::class); + $this->writeOneof(106, $var); + + return $this; + } + + /** + * @return string + */ + public function getFeatureSpec() + { + return $this->whichOneof("feature_spec"); + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipFeatureState.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipFeatureState.php new file mode 100644 index 000000000000..cdbc23edb08a --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipFeatureState.php @@ -0,0 +1,120 @@ +google.cloud.gkehub.v1.MembershipFeatureState + */ +class MembershipFeatureState extends \Google\Protobuf\Internal\Message +{ + /** + * The high-level state of this Feature for a single membership. + * + * Generated from protobuf field .google.cloud.gkehub.v1.FeatureState state = 1; + */ + protected $state = null; + protected $feature_state; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\GkeHub\ConfigManagement\V1\MembershipState $configmanagement + * Config Management-specific state. + * @type \Google\Cloud\GkeHub\V1\FeatureState $state + * The high-level state of this Feature for a single membership. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Feature::initOnce(); + parent::__construct($data); + } + + /** + * Config Management-specific state. + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.MembershipState configmanagement = 106; + * @return \Google\Cloud\GkeHub\ConfigManagement\V1\MembershipState|null + */ + public function getConfigmanagement() + { + return $this->readOneof(106); + } + + public function hasConfigmanagement() + { + return $this->hasOneof(106); + } + + /** + * Config Management-specific state. + * + * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.MembershipState configmanagement = 106; + * @param \Google\Cloud\GkeHub\ConfigManagement\V1\MembershipState $var + * @return $this + */ + public function setConfigmanagement($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\ConfigManagement\V1\MembershipState::class); + $this->writeOneof(106, $var); + + return $this; + } + + /** + * The high-level state of this Feature for a single membership. + * + * Generated from protobuf field .google.cloud.gkehub.v1.FeatureState state = 1; + * @return \Google\Cloud\GkeHub\V1\FeatureState|null + */ + public function getState() + { + return $this->state; + } + + public function hasState() + { + return isset($this->state); + } + + public function clearState() + { + unset($this->state); + } + + /** + * The high-level state of this Feature for a single membership. + * + * Generated from protobuf field .google.cloud.gkehub.v1.FeatureState state = 1; + * @param \Google\Cloud\GkeHub\V1\FeatureState $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\FeatureState::class); + $this->state = $var; + + return $this; + } + + /** + * @return string + */ + public function getFeatureState() + { + return $this->whichOneof("feature_state"); + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipState.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipState.php new file mode 100644 index 000000000000..c46968fcb0e0 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipState.php @@ -0,0 +1,67 @@ +google.cloud.gkehub.v1.MembershipState + */ +class MembershipState extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The current state of the Membership resource. + * + * Generated from protobuf field .google.cloud.gkehub.v1.MembershipState.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $code = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $code + * Output only. The current state of the Membership resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Membership::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The current state of the Membership resource. + * + * Generated from protobuf field .google.cloud.gkehub.v1.MembershipState.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getCode() + { + return $this->code; + } + + /** + * Output only. The current state of the Membership resource. + * + * Generated from protobuf field .google.cloud.gkehub.v1.MembershipState.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\V1\MembershipState\Code::class); + $this->code = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipState/Code.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipState/Code.php new file mode 100644 index 000000000000..7c40449feacd --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipState/Code.php @@ -0,0 +1,85 @@ +google.cloud.gkehub.v1.MembershipState.Code + */ +class Code +{ + /** + * The code is not set. + * + * Generated from protobuf enum CODE_UNSPECIFIED = 0; + */ + const CODE_UNSPECIFIED = 0; + /** + * The cluster is being registered. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * The cluster is registered. + * + * Generated from protobuf enum READY = 2; + */ + const READY = 2; + /** + * The cluster is being unregistered. + * + * Generated from protobuf enum DELETING = 3; + */ + const DELETING = 3; + /** + * The Membership is being updated. + * + * Generated from protobuf enum UPDATING = 4; + */ + const UPDATING = 4; + /** + * The Membership is being updated by the Hub Service. + * + * Generated from protobuf enum SERVICE_UPDATING = 5; + */ + const SERVICE_UPDATING = 5; + + private static $valueToName = [ + self::CODE_UNSPECIFIED => 'CODE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::READY => 'READY', + self::DELETING => 'DELETING', + self::UPDATING => 'UPDATING', + self::SERVICE_UPDATING => 'SERVICE_UPDATING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Code::class, \Google\Cloud\GkeHub\V1\MembershipState_Code::class); + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MonitoringConfig.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MonitoringConfig.php new file mode 100644 index 000000000000..94b7778b1b70 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MonitoringConfig.php @@ -0,0 +1,244 @@ +google.cloud.gkehub.v1.MonitoringConfig + */ +class MonitoringConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Immutable. Project used to report Metrics + * + * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $project_id = ''; + /** + * Immutable. Location used to report Metrics + * + * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $location = ''; + /** + * Immutable. Cluster name used to report metrics. + * For Anthos on VMWare/Baremetal, it would be in format + * `memberClusters/cluster_name`; And for Anthos on MultiCloud, it would be in + * format + * `{azureClusters, awsClusters}/cluster_name`. + * + * Generated from protobuf field string cluster = 3 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $cluster = ''; + /** + * Kubernetes system metrics, if available, are written to this prefix. + * This defaults to kubernetes.io for GKE, and kubernetes.io/anthos for Anthos + * eventually. Noted: Anthos MultiCloud will have kubernetes.io prefix today + * but will migration to be under kubernetes.io/anthos + * + * Generated from protobuf field string kubernetes_metrics_prefix = 4; + */ + protected $kubernetes_metrics_prefix = ''; + /** + * Immutable. Cluster hash, this is a unique string generated by google code, + * which does not contain any PII, which we can use to reference the cluster. + * This is expected to be created by the monitoring stack and persisted into + * the Cluster object as well as to GKE-Hub. + * + * Generated from protobuf field string cluster_hash = 5 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $cluster_hash = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $project_id + * Immutable. Project used to report Metrics + * @type string $location + * Immutable. Location used to report Metrics + * @type string $cluster + * Immutable. Cluster name used to report metrics. + * For Anthos on VMWare/Baremetal, it would be in format + * `memberClusters/cluster_name`; And for Anthos on MultiCloud, it would be in + * format + * `{azureClusters, awsClusters}/cluster_name`. + * @type string $kubernetes_metrics_prefix + * Kubernetes system metrics, if available, are written to this prefix. + * This defaults to kubernetes.io for GKE, and kubernetes.io/anthos for Anthos + * eventually. Noted: Anthos MultiCloud will have kubernetes.io prefix today + * but will migration to be under kubernetes.io/anthos + * @type string $cluster_hash + * Immutable. Cluster hash, this is a unique string generated by google code, + * which does not contain any PII, which we can use to reference the cluster. + * This is expected to be created by the monitoring stack and persisted into + * the Cluster object as well as to GKE-Hub. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Membership::initOnce(); + parent::__construct($data); + } + + /** + * Immutable. Project used to report Metrics + * + * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getProjectId() + { + return $this->project_id; + } + + /** + * Immutable. Project used to report Metrics + * + * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setProjectId($var) + { + GPBUtil::checkString($var, True); + $this->project_id = $var; + + return $this; + } + + /** + * Immutable. Location used to report Metrics + * + * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * Immutable. Location used to report Metrics + * + * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + + /** + * Immutable. Cluster name used to report metrics. + * For Anthos on VMWare/Baremetal, it would be in format + * `memberClusters/cluster_name`; And for Anthos on MultiCloud, it would be in + * format + * `{azureClusters, awsClusters}/cluster_name`. + * + * Generated from protobuf field string cluster = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getCluster() + { + return $this->cluster; + } + + /** + * Immutable. Cluster name used to report metrics. + * For Anthos on VMWare/Baremetal, it would be in format + * `memberClusters/cluster_name`; And for Anthos on MultiCloud, it would be in + * format + * `{azureClusters, awsClusters}/cluster_name`. + * + * Generated from protobuf field string cluster = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setCluster($var) + { + GPBUtil::checkString($var, True); + $this->cluster = $var; + + return $this; + } + + /** + * Kubernetes system metrics, if available, are written to this prefix. + * This defaults to kubernetes.io for GKE, and kubernetes.io/anthos for Anthos + * eventually. Noted: Anthos MultiCloud will have kubernetes.io prefix today + * but will migration to be under kubernetes.io/anthos + * + * Generated from protobuf field string kubernetes_metrics_prefix = 4; + * @return string + */ + public function getKubernetesMetricsPrefix() + { + return $this->kubernetes_metrics_prefix; + } + + /** + * Kubernetes system metrics, if available, are written to this prefix. + * This defaults to kubernetes.io for GKE, and kubernetes.io/anthos for Anthos + * eventually. Noted: Anthos MultiCloud will have kubernetes.io prefix today + * but will migration to be under kubernetes.io/anthos + * + * Generated from protobuf field string kubernetes_metrics_prefix = 4; + * @param string $var + * @return $this + */ + public function setKubernetesMetricsPrefix($var) + { + GPBUtil::checkString($var, True); + $this->kubernetes_metrics_prefix = $var; + + return $this; + } + + /** + * Immutable. Cluster hash, this is a unique string generated by google code, + * which does not contain any PII, which we can use to reference the cluster. + * This is expected to be created by the monitoring stack and persisted into + * the Cluster object as well as to GKE-Hub. + * + * Generated from protobuf field string cluster_hash = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getClusterHash() + { + return $this->cluster_hash; + } + + /** + * Immutable. Cluster hash, this is a unique string generated by google code, + * which does not contain any PII, which we can use to reference the cluster. + * This is expected to be created by the monitoring stack and persisted into + * the Cluster object as well as to GKE-Hub. + * + * Generated from protobuf field string cluster_hash = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setClusterHash($var) + { + GPBUtil::checkString($var, True); + $this->cluster_hash = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/NamespaceLifecycleState.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/NamespaceLifecycleState.php new file mode 100644 index 000000000000..356165d63119 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/NamespaceLifecycleState.php @@ -0,0 +1,67 @@ +google.cloud.gkehub.v1.NamespaceLifecycleState + */ +class NamespaceLifecycleState extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The current state of the Namespace resource. + * + * Generated from protobuf field .google.cloud.gkehub.v1.NamespaceLifecycleState.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $code = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $code + * Output only. The current state of the Namespace resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Fleet::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The current state of the Namespace resource. + * + * Generated from protobuf field .google.cloud.gkehub.v1.NamespaceLifecycleState.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getCode() + { + return $this->code; + } + + /** + * Output only. The current state of the Namespace resource. + * + * Generated from protobuf field .google.cloud.gkehub.v1.NamespaceLifecycleState.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\V1\NamespaceLifecycleState\Code::class); + $this->code = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/NamespaceLifecycleState/Code.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/NamespaceLifecycleState/Code.php new file mode 100644 index 000000000000..93662e9d9fac --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/NamespaceLifecycleState/Code.php @@ -0,0 +1,78 @@ +google.cloud.gkehub.v1.NamespaceLifecycleState.Code + */ +class Code +{ + /** + * The code is not set. + * + * Generated from protobuf enum CODE_UNSPECIFIED = 0; + */ + const CODE_UNSPECIFIED = 0; + /** + * The namespace is being created. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * The namespace active. + * + * Generated from protobuf enum READY = 2; + */ + const READY = 2; + /** + * The namespace is being deleted. + * + * Generated from protobuf enum DELETING = 3; + */ + const DELETING = 3; + /** + * The namespace is being updated. + * + * Generated from protobuf enum UPDATING = 4; + */ + const UPDATING = 4; + + private static $valueToName = [ + self::CODE_UNSPECIFIED => 'CODE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::READY => 'READY', + self::DELETING => 'DELETING', + self::UPDATING => 'UPDATING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Code::class, \Google\Cloud\GkeHub\V1\NamespaceLifecycleState_Code::class); + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/OperationMetadata.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/OperationMetadata.php new file mode 100644 index 000000000000..0dfdf1677061 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/OperationMetadata.php @@ -0,0 +1,311 @@ +google.cloud.gkehub.v1.OperationMetadata + */ +class OperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $target = ''; + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $verb = ''; + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_detail = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $status_detail = ''; + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have + * [google.longrunning.Operation.error][google.longrunning.Operation.error] + * value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + * corresponding to `Code.CANCELLED`. + * + * Generated from protobuf field bool cancel_requested = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $cancel_requested = false; + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $api_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time the operation was created. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. The time the operation finished running. + * @type string $target + * Output only. Server-defined resource path for the target of the operation. + * @type string $verb + * Output only. Name of the verb executed by the operation. + * @type string $status_detail + * Output only. Human-readable status of the operation, if any. + * @type bool $cancel_requested + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have + * [google.longrunning.Operation.error][google.longrunning.Operation.error] + * value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + * corresponding to `Code.CANCELLED`. + * @type string $api_version + * Output only. API version used to start the operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getTarget() + { + return $this->target; + } + + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setTarget($var) + { + GPBUtil::checkString($var, True); + $this->target = $var; + + return $this; + } + + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getVerb() + { + return $this->verb; + } + + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setVerb($var) + { + GPBUtil::checkString($var, True); + $this->verb = $var; + + return $this; + } + + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_detail = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getStatusDetail() + { + return $this->status_detail; + } + + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_detail = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setStatusDetail($var) + { + GPBUtil::checkString($var, True); + $this->status_detail = $var; + + return $this; + } + + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have + * [google.longrunning.Operation.error][google.longrunning.Operation.error] + * value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + * corresponding to `Code.CANCELLED`. + * + * Generated from protobuf field bool cancel_requested = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getCancelRequested() + { + return $this->cancel_requested; + } + + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have + * [google.longrunning.Operation.error][google.longrunning.Operation.error] + * value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + * corresponding to `Code.CANCELLED`. + * + * Generated from protobuf field bool cancel_requested = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setCancelRequested($var) + { + GPBUtil::checkBool($var); + $this->cancel_requested = $var; + + return $this; + } + + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getApiVersion() + { + return $this->api_version; + } + + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setApiVersion($var) + { + GPBUtil::checkString($var, True); + $this->api_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/PBNamespace.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/PBNamespace.php new file mode 100644 index 000000000000..2f14f6436c88 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/PBNamespace.php @@ -0,0 +1,407 @@ +google.cloud.gkehub.v1.Namespace + */ +class PBNamespace extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name for the namespace + * `projects/{project}/locations/{location}/namespaces/{namespace}` + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Output only. Google-generated UUID for this resource. This is unique across + * all namespace resources. If a namespace resource is deleted and another + * resource with the same name is created, it gets a different uid. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + /** + * Output only. When the namespace was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. When the namespace was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. When the namespace was deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $delete_time = null; + /** + * Output only. State of the namespace resource. + * + * Generated from protobuf field .google.cloud.gkehub.v1.NamespaceLifecycleState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = null; + /** + * Required. Scope associated with the namespace + * + * Generated from protobuf field string scope = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $scope = ''; + /** + * Optional. Namespace-level cluster namespace labels. These labels are + * applied to the related namespace of the member clusters bound to the parent + * Scope. Scope-level labels (`namespace_labels` in the Fleet Scope + * resource) take precedence over Namespace-level labels if they share + * a key. Keys and values must be Kubernetes-conformant. + * + * Generated from protobuf field map namespace_labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $namespace_labels; + /** + * Optional. Labels for this Namespace. + * + * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name for the namespace + * `projects/{project}/locations/{location}/namespaces/{namespace}` + * @type string $uid + * Output only. Google-generated UUID for this resource. This is unique across + * all namespace resources. If a namespace resource is deleted and another + * resource with the same name is created, it gets a different uid. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. When the namespace was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. When the namespace was last updated. + * @type \Google\Protobuf\Timestamp $delete_time + * Output only. When the namespace was deleted. + * @type \Google\Cloud\GkeHub\V1\NamespaceLifecycleState $state + * Output only. State of the namespace resource. + * @type string $scope + * Required. Scope associated with the namespace + * @type array|\Google\Protobuf\Internal\MapField $namespace_labels + * Optional. Namespace-level cluster namespace labels. These labels are + * applied to the related namespace of the member clusters bound to the parent + * Scope. Scope-level labels (`namespace_labels` in the Fleet Scope + * resource) take precedence over Namespace-level labels if they share + * a key. Keys and values must be Kubernetes-conformant. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Labels for this Namespace. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Fleet::initOnce(); + parent::__construct($data); + } + + /** + * The resource name for the namespace + * `projects/{project}/locations/{location}/namespaces/{namespace}` + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name for the namespace + * `projects/{project}/locations/{location}/namespaces/{namespace}` + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. Google-generated UUID for this resource. This is unique across + * all namespace resources. If a namespace resource is deleted and another + * resource with the same name is created, it gets a different uid. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. Google-generated UUID for this resource. This is unique across + * all namespace resources. If a namespace resource is deleted and another + * resource with the same name is created, it gets a different uid. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Output only. When the namespace was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. When the namespace was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. When the namespace was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. When the namespace was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. When the namespace was deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getDeleteTime() + { + return $this->delete_time; + } + + public function hasDeleteTime() + { + return isset($this->delete_time); + } + + public function clearDeleteTime() + { + unset($this->delete_time); + } + + /** + * Output only. When the namespace was deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setDeleteTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->delete_time = $var; + + return $this; + } + + /** + * Output only. State of the namespace resource. + * + * Generated from protobuf field .google.cloud.gkehub.v1.NamespaceLifecycleState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\GkeHub\V1\NamespaceLifecycleState|null + */ + public function getState() + { + return $this->state; + } + + public function hasState() + { + return isset($this->state); + } + + public function clearState() + { + unset($this->state); + } + + /** + * Output only. State of the namespace resource. + * + * Generated from protobuf field .google.cloud.gkehub.v1.NamespaceLifecycleState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\GkeHub\V1\NamespaceLifecycleState $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\NamespaceLifecycleState::class); + $this->state = $var; + + return $this; + } + + /** + * Required. Scope associated with the namespace + * + * Generated from protobuf field string scope = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getScope() + { + return $this->scope; + } + + /** + * Required. Scope associated with the namespace + * + * Generated from protobuf field string scope = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setScope($var) + { + GPBUtil::checkString($var, True); + $this->scope = $var; + + return $this; + } + + /** + * Optional. Namespace-level cluster namespace labels. These labels are + * applied to the related namespace of the member clusters bound to the parent + * Scope. Scope-level labels (`namespace_labels` in the Fleet Scope + * resource) take precedence over Namespace-level labels if they share + * a key. Keys and values must be Kubernetes-conformant. + * + * Generated from protobuf field map namespace_labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getNamespaceLabels() + { + return $this->namespace_labels; + } + + /** + * Optional. Namespace-level cluster namespace labels. These labels are + * applied to the related namespace of the member clusters bound to the parent + * Scope. Scope-level labels (`namespace_labels` in the Fleet Scope + * resource) take precedence over Namespace-level labels if they share + * a key. Keys and values must be Kubernetes-conformant. + * + * Generated from protobuf field map namespace_labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setNamespaceLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->namespace_labels = $arr; + + return $this; + } + + /** + * Optional. Labels for this Namespace. + * + * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Labels for this Namespace. + * + * Generated from protobuf field map labels = 10 [(.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; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/RBACRoleBinding.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/RBACRoleBinding.php new file mode 100644 index 000000000000..dcc8783e0510 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/RBACRoleBinding.php @@ -0,0 +1,453 @@ +google.cloud.gkehub.v1.RBACRoleBinding + */ +class RBACRoleBinding extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name for the rbacrolebinding + * `projects/{project}/locations/{location}/scopes/{scope}/rbacrolebindings/{rbacrolebinding}` + * or + * `projects/{project}/locations/{location}/memberships/{membership}/rbacrolebindings/{rbacrolebinding}` + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Output only. Google-generated UUID for this resource. This is unique across + * all rbacrolebinding resources. If a rbacrolebinding resource is deleted and + * another resource with the same name is created, it gets a different uid. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + /** + * Output only. When the rbacrolebinding was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. When the rbacrolebinding was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. When the rbacrolebinding was deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $delete_time = null; + /** + * Output only. State of the rbacrolebinding resource. + * + * Generated from protobuf field .google.cloud.gkehub.v1.RBACRoleBindingLifecycleState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = null; + /** + * Required. Role to bind to the principal + * + * Generated from protobuf field .google.cloud.gkehub.v1.RBACRoleBinding.Role role = 9 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $role = null; + /** + * Optional. Labels for this RBACRolebinding. + * + * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + protected $principal; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $user + * user is the name of the user as seen by the kubernetes cluster, example + * "alice" or "alice@domain.tld" + * @type string $group + * group is the group, as seen by the kubernetes cluster. + * @type string $name + * The resource name for the rbacrolebinding + * `projects/{project}/locations/{location}/scopes/{scope}/rbacrolebindings/{rbacrolebinding}` + * or + * `projects/{project}/locations/{location}/memberships/{membership}/rbacrolebindings/{rbacrolebinding}` + * @type string $uid + * Output only. Google-generated UUID for this resource. This is unique across + * all rbacrolebinding resources. If a rbacrolebinding resource is deleted and + * another resource with the same name is created, it gets a different uid. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. When the rbacrolebinding was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. When the rbacrolebinding was last updated. + * @type \Google\Protobuf\Timestamp $delete_time + * Output only. When the rbacrolebinding was deleted. + * @type \Google\Cloud\GkeHub\V1\RBACRoleBindingLifecycleState $state + * Output only. State of the rbacrolebinding resource. + * @type \Google\Cloud\GkeHub\V1\RBACRoleBinding\Role $role + * Required. Role to bind to the principal + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Labels for this RBACRolebinding. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Fleet::initOnce(); + parent::__construct($data); + } + + /** + * user is the name of the user as seen by the kubernetes cluster, example + * "alice" or "alice@domain.tld" + * + * Generated from protobuf field string user = 7; + * @return string + */ + public function getUser() + { + return $this->readOneof(7); + } + + public function hasUser() + { + return $this->hasOneof(7); + } + + /** + * user is the name of the user as seen by the kubernetes cluster, example + * "alice" or "alice@domain.tld" + * + * Generated from protobuf field string user = 7; + * @param string $var + * @return $this + */ + public function setUser($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * group is the group, as seen by the kubernetes cluster. + * + * Generated from protobuf field string group = 8; + * @return string + */ + public function getGroup() + { + return $this->readOneof(8); + } + + public function hasGroup() + { + return $this->hasOneof(8); + } + + /** + * group is the group, as seen by the kubernetes cluster. + * + * Generated from protobuf field string group = 8; + * @param string $var + * @return $this + */ + public function setGroup($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * The resource name for the rbacrolebinding + * `projects/{project}/locations/{location}/scopes/{scope}/rbacrolebindings/{rbacrolebinding}` + * or + * `projects/{project}/locations/{location}/memberships/{membership}/rbacrolebindings/{rbacrolebinding}` + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name for the rbacrolebinding + * `projects/{project}/locations/{location}/scopes/{scope}/rbacrolebindings/{rbacrolebinding}` + * or + * `projects/{project}/locations/{location}/memberships/{membership}/rbacrolebindings/{rbacrolebinding}` + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. Google-generated UUID for this resource. This is unique across + * all rbacrolebinding resources. If a rbacrolebinding resource is deleted and + * another resource with the same name is created, it gets a different uid. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. Google-generated UUID for this resource. This is unique across + * all rbacrolebinding resources. If a rbacrolebinding resource is deleted and + * another resource with the same name is created, it gets a different uid. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Output only. When the rbacrolebinding was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. When the rbacrolebinding was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. When the rbacrolebinding was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. When the rbacrolebinding was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. When the rbacrolebinding was deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getDeleteTime() + { + return $this->delete_time; + } + + public function hasDeleteTime() + { + return isset($this->delete_time); + } + + public function clearDeleteTime() + { + unset($this->delete_time); + } + + /** + * Output only. When the rbacrolebinding was deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setDeleteTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->delete_time = $var; + + return $this; + } + + /** + * Output only. State of the rbacrolebinding resource. + * + * Generated from protobuf field .google.cloud.gkehub.v1.RBACRoleBindingLifecycleState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\GkeHub\V1\RBACRoleBindingLifecycleState|null + */ + public function getState() + { + return $this->state; + } + + public function hasState() + { + return isset($this->state); + } + + public function clearState() + { + unset($this->state); + } + + /** + * Output only. State of the rbacrolebinding resource. + * + * Generated from protobuf field .google.cloud.gkehub.v1.RBACRoleBindingLifecycleState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\GkeHub\V1\RBACRoleBindingLifecycleState $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\RBACRoleBindingLifecycleState::class); + $this->state = $var; + + return $this; + } + + /** + * Required. Role to bind to the principal + * + * Generated from protobuf field .google.cloud.gkehub.v1.RBACRoleBinding.Role role = 9 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\GkeHub\V1\RBACRoleBinding\Role|null + */ + public function getRole() + { + return $this->role; + } + + public function hasRole() + { + return isset($this->role); + } + + public function clearRole() + { + unset($this->role); + } + + /** + * Required. Role to bind to the principal + * + * Generated from protobuf field .google.cloud.gkehub.v1.RBACRoleBinding.Role role = 9 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\GkeHub\V1\RBACRoleBinding\Role $var + * @return $this + */ + public function setRole($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\RBACRoleBinding\Role::class); + $this->role = $var; + + return $this; + } + + /** + * Optional. Labels for this RBACRolebinding. + * + * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Labels for this RBACRolebinding. + * + * Generated from protobuf field map labels = 10 [(.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; + } + + /** + * @return string + */ + public function getPrincipal() + { + return $this->whichOneof("principal"); + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/RBACRoleBinding/Role.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/RBACRoleBinding/Role.php new file mode 100644 index 000000000000..f987acfc3260 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/RBACRoleBinding/Role.php @@ -0,0 +1,108 @@ +google.cloud.gkehub.v1.RBACRoleBinding.Role + */ +class Role extends \Google\Protobuf\Internal\Message +{ + /** + * predefined_role is the Kubernetes default role to use + * + * Generated from protobuf field .google.cloud.gkehub.v1.RBACRoleBinding.Role.PredefinedRoles predefined_role = 1; + */ + protected $predefined_role = 0; + /** + * Optional. custom_role is the name of a custom KubernetesClusterRole to + * use. + * + * Generated from protobuf field string custom_role = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $custom_role = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $predefined_role + * predefined_role is the Kubernetes default role to use + * @type string $custom_role + * Optional. custom_role is the name of a custom KubernetesClusterRole to + * use. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Fleet::initOnce(); + parent::__construct($data); + } + + /** + * predefined_role is the Kubernetes default role to use + * + * Generated from protobuf field .google.cloud.gkehub.v1.RBACRoleBinding.Role.PredefinedRoles predefined_role = 1; + * @return int + */ + public function getPredefinedRole() + { + return $this->predefined_role; + } + + /** + * predefined_role is the Kubernetes default role to use + * + * Generated from protobuf field .google.cloud.gkehub.v1.RBACRoleBinding.Role.PredefinedRoles predefined_role = 1; + * @param int $var + * @return $this + */ + public function setPredefinedRole($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\V1\RBACRoleBinding\Role\PredefinedRoles::class); + $this->predefined_role = $var; + + return $this; + } + + /** + * Optional. custom_role is the name of a custom KubernetesClusterRole to + * use. + * + * Generated from protobuf field string custom_role = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getCustomRole() + { + return $this->custom_role; + } + + /** + * Optional. custom_role is the name of a custom KubernetesClusterRole to + * use. + * + * Generated from protobuf field string custom_role = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setCustomRole($var) + { + GPBUtil::checkString($var, True); + $this->custom_role = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Role::class, \Google\Cloud\GkeHub\V1\RBACRoleBinding_Role::class); + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/RBACRoleBinding/Role/PredefinedRoles.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/RBACRoleBinding/Role/PredefinedRoles.php new file mode 100644 index 000000000000..00d774e00db3 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/RBACRoleBinding/Role/PredefinedRoles.php @@ -0,0 +1,79 @@ +google.cloud.gkehub.v1.RBACRoleBinding.Role.PredefinedRoles + */ +class PredefinedRoles +{ + /** + * UNKNOWN + * + * Generated from protobuf enum UNKNOWN = 0; + */ + const UNKNOWN = 0; + /** + * ADMIN has EDIT and RBAC permissions + * + * Generated from protobuf enum ADMIN = 1; + */ + const ADMIN = 1; + /** + * EDIT can edit all resources except RBAC + * + * Generated from protobuf enum EDIT = 2; + */ + const EDIT = 2; + /** + * VIEW can only read resources + * + * Generated from protobuf enum VIEW = 3; + */ + const VIEW = 3; + /** + * ANTHOS_SUPPORT gives Google Support read-only access to a number of + * cluster resources. + * + * Generated from protobuf enum ANTHOS_SUPPORT = 4; + */ + const ANTHOS_SUPPORT = 4; + + private static $valueToName = [ + self::UNKNOWN => 'UNKNOWN', + self::ADMIN => 'ADMIN', + self::EDIT => 'EDIT', + self::VIEW => 'VIEW', + self::ANTHOS_SUPPORT => 'ANTHOS_SUPPORT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PredefinedRoles::class, \Google\Cloud\GkeHub\V1\RBACRoleBinding_Role_PredefinedRoles::class); + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/RBACRoleBindingLifecycleState.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/RBACRoleBindingLifecycleState.php new file mode 100644 index 000000000000..7a36415506a4 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/RBACRoleBindingLifecycleState.php @@ -0,0 +1,68 @@ +google.cloud.gkehub.v1.RBACRoleBindingLifecycleState + */ +class RBACRoleBindingLifecycleState extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The current state of the rbacrolebinding resource. + * + * Generated from protobuf field .google.cloud.gkehub.v1.RBACRoleBindingLifecycleState.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $code = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $code + * Output only. The current state of the rbacrolebinding resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Fleet::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The current state of the rbacrolebinding resource. + * + * Generated from protobuf field .google.cloud.gkehub.v1.RBACRoleBindingLifecycleState.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getCode() + { + return $this->code; + } + + /** + * Output only. The current state of the rbacrolebinding resource. + * + * Generated from protobuf field .google.cloud.gkehub.v1.RBACRoleBindingLifecycleState.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\V1\RBACRoleBindingLifecycleState\Code::class); + $this->code = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/RBACRoleBindingLifecycleState/Code.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/RBACRoleBindingLifecycleState/Code.php new file mode 100644 index 000000000000..c28675492e5c --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/RBACRoleBindingLifecycleState/Code.php @@ -0,0 +1,78 @@ +google.cloud.gkehub.v1.RBACRoleBindingLifecycleState.Code + */ +class Code +{ + /** + * The code is not set. + * + * Generated from protobuf enum CODE_UNSPECIFIED = 0; + */ + const CODE_UNSPECIFIED = 0; + /** + * The rbacrolebinding is being created. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * The rbacrolebinding active. + * + * Generated from protobuf enum READY = 2; + */ + const READY = 2; + /** + * The rbacrolebinding is being deleted. + * + * Generated from protobuf enum DELETING = 3; + */ + const DELETING = 3; + /** + * The rbacrolebinding is being updated. + * + * Generated from protobuf enum UPDATING = 4; + */ + const UPDATING = 4; + + private static $valueToName = [ + self::CODE_UNSPECIFIED => 'CODE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::READY => 'READY', + self::DELETING => 'DELETING', + self::UPDATING => 'UPDATING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Code::class, \Google\Cloud\GkeHub\V1\RBACRoleBindingLifecycleState_Code::class); + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ResourceManifest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ResourceManifest.php new file mode 100644 index 000000000000..1ae0d6196454 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ResourceManifest.php @@ -0,0 +1,114 @@ +google.cloud.gkehub.v1.ResourceManifest + */ +class ResourceManifest extends \Google\Protobuf\Internal\Message +{ + /** + * YAML manifest of the resource. + * + * Generated from protobuf field string manifest = 1; + */ + protected $manifest = ''; + /** + * Whether the resource provided in the manifest is `cluster_scoped`. + * If unset, the manifest is assumed to be namespace scoped. + * This field is used for REST mapping when applying the resource in a + * cluster. + * + * Generated from protobuf field bool cluster_scoped = 2; + */ + protected $cluster_scoped = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $manifest + * YAML manifest of the resource. + * @type bool $cluster_scoped + * Whether the resource provided in the manifest is `cluster_scoped`. + * If unset, the manifest is assumed to be namespace scoped. + * This field is used for REST mapping when applying the resource in a + * cluster. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Membership::initOnce(); + parent::__construct($data); + } + + /** + * YAML manifest of the resource. + * + * Generated from protobuf field string manifest = 1; + * @return string + */ + public function getManifest() + { + return $this->manifest; + } + + /** + * YAML manifest of the resource. + * + * Generated from protobuf field string manifest = 1; + * @param string $var + * @return $this + */ + public function setManifest($var) + { + GPBUtil::checkString($var, True); + $this->manifest = $var; + + return $this; + } + + /** + * Whether the resource provided in the manifest is `cluster_scoped`. + * If unset, the manifest is assumed to be namespace scoped. + * This field is used for REST mapping when applying the resource in a + * cluster. + * + * Generated from protobuf field bool cluster_scoped = 2; + * @return bool + */ + public function getClusterScoped() + { + return $this->cluster_scoped; + } + + /** + * Whether the resource provided in the manifest is `cluster_scoped`. + * If unset, the manifest is assumed to be namespace scoped. + * This field is used for REST mapping when applying the resource in a + * cluster. + * + * Generated from protobuf field bool cluster_scoped = 2; + * @param bool $var + * @return $this + */ + public function setClusterScoped($var) + { + GPBUtil::checkBool($var); + $this->cluster_scoped = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ResourceOptions.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ResourceOptions.php new file mode 100644 index 000000000000..bb595ca99482 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ResourceOptions.php @@ -0,0 +1,205 @@ +google.cloud.gkehub.v1.ResourceOptions + */ +class ResourceOptions extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The Connect agent version to use for connect_resources. Defaults + * to the latest GKE Connect version. The version must be a currently + * supported version, obsolete versions will be rejected. + * + * Generated from protobuf field string connect_version = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $connect_version = ''; + /** + * Optional. Use `apiextensions/v1beta1` instead of `apiextensions/v1` for + * CustomResourceDefinition resources. + * This option should be set for clusters with Kubernetes apiserver versions + * <1.16. + * + * Generated from protobuf field bool v1beta1_crd = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $v1beta1_crd = false; + /** + * Optional. Major and minor version of the Kubernetes cluster. This is only + * used to determine which version to use for the CustomResourceDefinition + * resources, `apiextensions/v1beta1` or`apiextensions/v1`. + * + * Generated from protobuf field string k8s_version = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $k8s_version = ''; + /** + * Optional. Git version of the Kubernetes cluster. This is only used to gate + * the Connect Agent migration to svc.id.goog on GDC-SO 1.33.100 patch and + * above. + * + * Generated from protobuf field string k8s_git_version = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $k8s_git_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $connect_version + * Optional. The Connect agent version to use for connect_resources. Defaults + * to the latest GKE Connect version. The version must be a currently + * supported version, obsolete versions will be rejected. + * @type bool $v1beta1_crd + * Optional. Use `apiextensions/v1beta1` instead of `apiextensions/v1` for + * CustomResourceDefinition resources. + * This option should be set for clusters with Kubernetes apiserver versions + * <1.16. + * @type string $k8s_version + * Optional. Major and minor version of the Kubernetes cluster. This is only + * used to determine which version to use for the CustomResourceDefinition + * resources, `apiextensions/v1beta1` or`apiextensions/v1`. + * @type string $k8s_git_version + * Optional. Git version of the Kubernetes cluster. This is only used to gate + * the Connect Agent migration to svc.id.goog on GDC-SO 1.33.100 patch and + * above. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Membership::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The Connect agent version to use for connect_resources. Defaults + * to the latest GKE Connect version. The version must be a currently + * supported version, obsolete versions will be rejected. + * + * Generated from protobuf field string connect_version = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getConnectVersion() + { + return $this->connect_version; + } + + /** + * Optional. The Connect agent version to use for connect_resources. Defaults + * to the latest GKE Connect version. The version must be a currently + * supported version, obsolete versions will be rejected. + * + * Generated from protobuf field string connect_version = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setConnectVersion($var) + { + GPBUtil::checkString($var, True); + $this->connect_version = $var; + + return $this; + } + + /** + * Optional. Use `apiextensions/v1beta1` instead of `apiextensions/v1` for + * CustomResourceDefinition resources. + * This option should be set for clusters with Kubernetes apiserver versions + * <1.16. + * + * Generated from protobuf field bool v1beta1_crd = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getV1Beta1Crd() + { + return $this->v1beta1_crd; + } + + /** + * Optional. Use `apiextensions/v1beta1` instead of `apiextensions/v1` for + * CustomResourceDefinition resources. + * This option should be set for clusters with Kubernetes apiserver versions + * <1.16. + * + * Generated from protobuf field bool v1beta1_crd = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setV1Beta1Crd($var) + { + GPBUtil::checkBool($var); + $this->v1beta1_crd = $var; + + return $this; + } + + /** + * Optional. Major and minor version of the Kubernetes cluster. This is only + * used to determine which version to use for the CustomResourceDefinition + * resources, `apiextensions/v1beta1` or`apiextensions/v1`. + * + * Generated from protobuf field string k8s_version = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getK8SVersion() + { + return $this->k8s_version; + } + + /** + * Optional. Major and minor version of the Kubernetes cluster. This is only + * used to determine which version to use for the CustomResourceDefinition + * resources, `apiextensions/v1beta1` or`apiextensions/v1`. + * + * Generated from protobuf field string k8s_version = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setK8SVersion($var) + { + GPBUtil::checkString($var, True); + $this->k8s_version = $var; + + return $this; + } + + /** + * Optional. Git version of the Kubernetes cluster. This is only used to gate + * the Connect Agent migration to svc.id.goog on GDC-SO 1.33.100 patch and + * above. + * + * Generated from protobuf field string k8s_git_version = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getK8SGitVersion() + { + return $this->k8s_git_version; + } + + /** + * Optional. Git version of the Kubernetes cluster. This is only used to gate + * the Connect Agent migration to svc.id.goog on GDC-SO 1.33.100 patch and + * above. + * + * Generated from protobuf field string k8s_git_version = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setK8SGitVersion($var) + { + GPBUtil::checkString($var, True); + $this->k8s_git_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/Scope.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/Scope.php new file mode 100644 index 000000000000..ecdfc81637f4 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/Scope.php @@ -0,0 +1,373 @@ +google.cloud.gkehub.v1.Scope + */ +class Scope extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name for the scope + * `projects/{project}/locations/{location}/scopes/{scope}` + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Output only. Google-generated UUID for this resource. This is unique across + * all scope resources. If a scope resource is deleted and another resource + * with the same name is created, it gets a different uid. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + /** + * Output only. When the scope was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. When the scope was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. When the scope was deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $delete_time = null; + /** + * Output only. State of the scope resource. + * + * Generated from protobuf field .google.cloud.gkehub.v1.ScopeLifecycleState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = null; + /** + * Optional. Scope-level cluster namespace labels. For the member clusters + * bound to the Scope, these labels are applied to each namespace under the + * Scope. Scope-level labels take precedence over Namespace-level + * labels (`namespace_labels` in the Fleet Namespace resource) if they + * share a key. Keys and values must be Kubernetes-conformant. + * + * Generated from protobuf field map namespace_labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $namespace_labels; + /** + * Optional. Labels for this Scope. + * + * Generated from protobuf field map labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name for the scope + * `projects/{project}/locations/{location}/scopes/{scope}` + * @type string $uid + * Output only. Google-generated UUID for this resource. This is unique across + * all scope resources. If a scope resource is deleted and another resource + * with the same name is created, it gets a different uid. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. When the scope was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. When the scope was last updated. + * @type \Google\Protobuf\Timestamp $delete_time + * Output only. When the scope was deleted. + * @type \Google\Cloud\GkeHub\V1\ScopeLifecycleState $state + * Output only. State of the scope resource. + * @type array|\Google\Protobuf\Internal\MapField $namespace_labels + * Optional. Scope-level cluster namespace labels. For the member clusters + * bound to the Scope, these labels are applied to each namespace under the + * Scope. Scope-level labels take precedence over Namespace-level + * labels (`namespace_labels` in the Fleet Namespace resource) if they + * share a key. Keys and values must be Kubernetes-conformant. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Labels for this Scope. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Fleet::initOnce(); + parent::__construct($data); + } + + /** + * The resource name for the scope + * `projects/{project}/locations/{location}/scopes/{scope}` + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name for the scope + * `projects/{project}/locations/{location}/scopes/{scope}` + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. Google-generated UUID for this resource. This is unique across + * all scope resources. If a scope resource is deleted and another resource + * with the same name is created, it gets a different uid. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. Google-generated UUID for this resource. This is unique across + * all scope resources. If a scope resource is deleted and another resource + * with the same name is created, it gets a different uid. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Output only. When the scope was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. When the scope was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. When the scope was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. When the scope was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. When the scope was deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getDeleteTime() + { + return $this->delete_time; + } + + public function hasDeleteTime() + { + return isset($this->delete_time); + } + + public function clearDeleteTime() + { + unset($this->delete_time); + } + + /** + * Output only. When the scope was deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setDeleteTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->delete_time = $var; + + return $this; + } + + /** + * Output only. State of the scope resource. + * + * Generated from protobuf field .google.cloud.gkehub.v1.ScopeLifecycleState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\GkeHub\V1\ScopeLifecycleState|null + */ + public function getState() + { + return $this->state; + } + + public function hasState() + { + return isset($this->state); + } + + public function clearState() + { + unset($this->state); + } + + /** + * Output only. State of the scope resource. + * + * Generated from protobuf field .google.cloud.gkehub.v1.ScopeLifecycleState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\GkeHub\V1\ScopeLifecycleState $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\ScopeLifecycleState::class); + $this->state = $var; + + return $this; + } + + /** + * Optional. Scope-level cluster namespace labels. For the member clusters + * bound to the Scope, these labels are applied to each namespace under the + * Scope. Scope-level labels take precedence over Namespace-level + * labels (`namespace_labels` in the Fleet Namespace resource) if they + * share a key. Keys and values must be Kubernetes-conformant. + * + * Generated from protobuf field map namespace_labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getNamespaceLabels() + { + return $this->namespace_labels; + } + + /** + * Optional. Scope-level cluster namespace labels. For the member clusters + * bound to the Scope, these labels are applied to each namespace under the + * Scope. Scope-level labels take precedence over Namespace-level + * labels (`namespace_labels` in the Fleet Namespace resource) if they + * share a key. Keys and values must be Kubernetes-conformant. + * + * Generated from protobuf field map namespace_labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setNamespaceLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->namespace_labels = $arr; + + return $this; + } + + /** + * Optional. Labels for this Scope. + * + * Generated from protobuf field map labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Labels for this Scope. + * + * Generated from protobuf field map labels = 9 [(.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; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ScopeFeatureSpec.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ScopeFeatureSpec.php new file mode 100644 index 000000000000..c40b81a5b8a3 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ScopeFeatureSpec.php @@ -0,0 +1,33 @@ +google.cloud.gkehub.v1.ScopeFeatureSpec + */ +class ScopeFeatureSpec extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Feature::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ScopeFeatureState.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ScopeFeatureState.php new file mode 100644 index 000000000000..7e86a6076fd2 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ScopeFeatureState.php @@ -0,0 +1,77 @@ +google.cloud.gkehub.v1.ScopeFeatureState + */ +class ScopeFeatureState extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The "running state" of the Feature in this Scope. + * + * Generated from protobuf field .google.cloud.gkehub.v1.FeatureState state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\GkeHub\V1\FeatureState $state + * Output only. The "running state" of the Feature in this Scope. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Feature::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The "running state" of the Feature in this Scope. + * + * Generated from protobuf field .google.cloud.gkehub.v1.FeatureState state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\GkeHub\V1\FeatureState|null + */ + public function getState() + { + return $this->state; + } + + public function hasState() + { + return isset($this->state); + } + + public function clearState() + { + unset($this->state); + } + + /** + * Output only. The "running state" of the Feature in this Scope. + * + * Generated from protobuf field .google.cloud.gkehub.v1.FeatureState state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\GkeHub\V1\FeatureState $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\FeatureState::class); + $this->state = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ScopeLifecycleState.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ScopeLifecycleState.php new file mode 100644 index 000000000000..156752d228a3 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ScopeLifecycleState.php @@ -0,0 +1,67 @@ +google.cloud.gkehub.v1.ScopeLifecycleState + */ +class ScopeLifecycleState extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The current state of the scope resource. + * + * Generated from protobuf field .google.cloud.gkehub.v1.ScopeLifecycleState.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $code = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $code + * Output only. The current state of the scope resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Fleet::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The current state of the scope resource. + * + * Generated from protobuf field .google.cloud.gkehub.v1.ScopeLifecycleState.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getCode() + { + return $this->code; + } + + /** + * Output only. The current state of the scope resource. + * + * Generated from protobuf field .google.cloud.gkehub.v1.ScopeLifecycleState.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\V1\ScopeLifecycleState\Code::class); + $this->code = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ScopeLifecycleState/Code.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ScopeLifecycleState/Code.php new file mode 100644 index 000000000000..ac1f47da56ba --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ScopeLifecycleState/Code.php @@ -0,0 +1,78 @@ +google.cloud.gkehub.v1.ScopeLifecycleState.Code + */ +class Code +{ + /** + * The code is not set. + * + * Generated from protobuf enum CODE_UNSPECIFIED = 0; + */ + const CODE_UNSPECIFIED = 0; + /** + * The scope is being created. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * The scope active. + * + * Generated from protobuf enum READY = 2; + */ + const READY = 2; + /** + * The scope is being deleted. + * + * Generated from protobuf enum DELETING = 3; + */ + const DELETING = 3; + /** + * The scope is being updated. + * + * Generated from protobuf enum UPDATING = 4; + */ + const UPDATING = 4; + + private static $valueToName = [ + self::CODE_UNSPECIFIED => 'CODE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::READY => 'READY', + self::DELETING => 'DELETING', + self::UPDATING => 'UPDATING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Code::class, \Google\Cloud\GkeHub\V1\ScopeLifecycleState_Code::class); + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/SecurityPostureConfig.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/SecurityPostureConfig.php new file mode 100644 index 000000000000..fd91e6b2887e --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/SecurityPostureConfig.php @@ -0,0 +1,102 @@ +google.cloud.gkehub.v1.SecurityPostureConfig + */ +class SecurityPostureConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Sets which mode to use for Security Posture features. + * + * Generated from protobuf field .google.cloud.gkehub.v1.SecurityPostureConfig.Mode mode = 1; + */ + protected $mode = 0; + /** + * Sets which mode to use for vulnerability scanning. + * + * Generated from protobuf field .google.cloud.gkehub.v1.SecurityPostureConfig.VulnerabilityMode vulnerability_mode = 2; + */ + protected $vulnerability_mode = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $mode + * Sets which mode to use for Security Posture features. + * @type int $vulnerability_mode + * Sets which mode to use for vulnerability scanning. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Fleet::initOnce(); + parent::__construct($data); + } + + /** + * Sets which mode to use for Security Posture features. + * + * Generated from protobuf field .google.cloud.gkehub.v1.SecurityPostureConfig.Mode mode = 1; + * @return int + */ + public function getMode() + { + return $this->mode; + } + + /** + * Sets which mode to use for Security Posture features. + * + * Generated from protobuf field .google.cloud.gkehub.v1.SecurityPostureConfig.Mode mode = 1; + * @param int $var + * @return $this + */ + public function setMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\V1\SecurityPostureConfig\Mode::class); + $this->mode = $var; + + return $this; + } + + /** + * Sets which mode to use for vulnerability scanning. + * + * Generated from protobuf field .google.cloud.gkehub.v1.SecurityPostureConfig.VulnerabilityMode vulnerability_mode = 2; + * @return int + */ + public function getVulnerabilityMode() + { + return $this->vulnerability_mode; + } + + /** + * Sets which mode to use for vulnerability scanning. + * + * Generated from protobuf field .google.cloud.gkehub.v1.SecurityPostureConfig.VulnerabilityMode vulnerability_mode = 2; + * @param int $var + * @return $this + */ + public function setVulnerabilityMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\V1\SecurityPostureConfig\VulnerabilityMode::class); + $this->vulnerability_mode = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/SecurityPostureConfig/Mode.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/SecurityPostureConfig/Mode.php new file mode 100644 index 000000000000..e2785519d8d6 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/SecurityPostureConfig/Mode.php @@ -0,0 +1,71 @@ +google.cloud.gkehub.v1.SecurityPostureConfig.Mode + */ +class Mode +{ + /** + * Default value not specified. + * + * Generated from protobuf enum MODE_UNSPECIFIED = 0; + */ + const MODE_UNSPECIFIED = 0; + /** + * Disables Security Posture features on the cluster. + * + * Generated from protobuf enum DISABLED = 1; + */ + const DISABLED = 1; + /** + * Applies Security Posture features on the cluster. + * + * Generated from protobuf enum BASIC = 2; + */ + const BASIC = 2; + /** + * Applies the Security Posture off cluster Enterprise level features. + * + * Generated from protobuf enum ENTERPRISE = 3; + */ + const ENTERPRISE = 3; + + private static $valueToName = [ + self::MODE_UNSPECIFIED => 'MODE_UNSPECIFIED', + self::DISABLED => 'DISABLED', + self::BASIC => 'BASIC', + self::ENTERPRISE => 'ENTERPRISE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Mode::class, \Google\Cloud\GkeHub\V1\SecurityPostureConfig_Mode::class); + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/SecurityPostureConfig/VulnerabilityMode.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/SecurityPostureConfig/VulnerabilityMode.php new file mode 100644 index 000000000000..47b90b4a0716 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/SecurityPostureConfig/VulnerabilityMode.php @@ -0,0 +1,72 @@ +google.cloud.gkehub.v1.SecurityPostureConfig.VulnerabilityMode + */ +class VulnerabilityMode +{ + /** + * Default value not specified. + * + * Generated from protobuf enum VULNERABILITY_MODE_UNSPECIFIED = 0; + */ + const VULNERABILITY_MODE_UNSPECIFIED = 0; + /** + * Disables vulnerability scanning on the cluster. + * + * Generated from protobuf enum VULNERABILITY_DISABLED = 1; + */ + const VULNERABILITY_DISABLED = 1; + /** + * Applies basic vulnerability scanning on the cluster. + * + * Generated from protobuf enum VULNERABILITY_BASIC = 2; + */ + const VULNERABILITY_BASIC = 2; + /** + * Applies the Security Posture's vulnerability on cluster Enterprise level + * features. + * + * Generated from protobuf enum VULNERABILITY_ENTERPRISE = 3; + */ + const VULNERABILITY_ENTERPRISE = 3; + + private static $valueToName = [ + self::VULNERABILITY_MODE_UNSPECIFIED => 'VULNERABILITY_MODE_UNSPECIFIED', + self::VULNERABILITY_DISABLED => 'VULNERABILITY_DISABLED', + self::VULNERABILITY_BASIC => 'VULNERABILITY_BASIC', + self::VULNERABILITY_ENTERPRISE => 'VULNERABILITY_ENTERPRISE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(VulnerabilityMode::class, \Google\Cloud\GkeHub\V1\SecurityPostureConfig_VulnerabilityMode::class); + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/TypeMeta.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/TypeMeta.php new file mode 100644 index 000000000000..d04c88055885 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/TypeMeta.php @@ -0,0 +1,102 @@ +google.cloud.gkehub.v1.TypeMeta + */ +class TypeMeta extends \Google\Protobuf\Internal\Message +{ + /** + * Kind of the resource (e.g. Deployment). + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * APIVersion of the resource (e.g. v1). + * + * Generated from protobuf field string api_version = 2; + */ + protected $api_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * Kind of the resource (e.g. Deployment). + * @type string $api_version + * APIVersion of the resource (e.g. v1). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Kind of the resource (e.g. Deployment). + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * Kind of the resource (e.g. Deployment). + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * APIVersion of the resource (e.g. v1). + * + * Generated from protobuf field string api_version = 2; + * @return string + */ + public function getApiVersion() + { + return $this->api_version; + } + + /** + * APIVersion of the resource (e.g. v1). + * + * Generated from protobuf field string api_version = 2; + * @param string $var + * @return $this + */ + public function setApiVersion($var) + { + GPBUtil::checkString($var, True); + $this->api_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateFeatureRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateFeatureRequest.php new file mode 100644 index 000000000000..1433112bee7b --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateFeatureRequest.php @@ -0,0 +1,286 @@ +google.cloud.gkehub.v1.UpdateFeatureRequest + */ +class UpdateFeatureRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Feature resource name in the format + * `projects/*/locations/*/features/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Mask of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + /** + * Only fields specified in update_mask are updated. + * If you specify a field in the update_mask but don't specify its value here + * that field will be deleted. + * If you are updating a map field, set the value of a key to null or empty + * string to delete the key from the map. It's not possible to update a key's + * value to the empty string. + * If you specify the update_mask to be a special path "*", fully replaces all + * user-modifiable fields to match `resource`. + * + * Generated from protobuf field .google.cloud.gkehub.v1.Feature resource = 3; + */ + protected $resource = null; + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4; + */ + protected $request_id = ''; + + /** + * @param string $name Required. The Feature resource name in the format + * `projects/*/locations/*/features/*`. + * @param \Google\Cloud\GkeHub\V1\Feature $resource Only fields specified in update_mask are updated. + * If you specify a field in the update_mask but don't specify its value here + * that field will be deleted. + * If you are updating a map field, set the value of a key to null or empty + * string to delete the key from the map. It's not possible to update a key's + * value to the empty string. + * If you specify the update_mask to be a special path "*", fully replaces all + * user-modifiable fields to match `resource`. + * @param \Google\Protobuf\FieldMask $updateMask Mask of fields to update. + * + * @return \Google\Cloud\GkeHub\V1\UpdateFeatureRequest + * + * @experimental + */ + public static function build(string $name, \Google\Cloud\GkeHub\V1\Feature $resource, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setName($name) + ->setResource($resource) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The Feature resource name in the format + * `projects/*/locations/*/features/*`. + * @type \Google\Protobuf\FieldMask $update_mask + * Mask of fields to update. + * @type \Google\Cloud\GkeHub\V1\Feature $resource + * Only fields specified in update_mask are updated. + * If you specify a field in the update_mask but don't specify its value here + * that field will be deleted. + * If you are updating a map field, set the value of a key to null or empty + * string to delete the key from the map. It's not possible to update a key's + * value to the empty string. + * If you specify the update_mask to be a special path "*", fully replaces all + * user-modifiable fields to match `resource`. + * @type string $request_id + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Feature resource name in the format + * `projects/*/locations/*/features/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The Feature resource name in the format + * `projects/*/locations/*/features/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Mask of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Mask of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Only fields specified in update_mask are updated. + * If you specify a field in the update_mask but don't specify its value here + * that field will be deleted. + * If you are updating a map field, set the value of a key to null or empty + * string to delete the key from the map. It's not possible to update a key's + * value to the empty string. + * If you specify the update_mask to be a special path "*", fully replaces all + * user-modifiable fields to match `resource`. + * + * Generated from protobuf field .google.cloud.gkehub.v1.Feature resource = 3; + * @return \Google\Cloud\GkeHub\V1\Feature|null + */ + public function getResource() + { + return $this->resource; + } + + public function hasResource() + { + return isset($this->resource); + } + + public function clearResource() + { + unset($this->resource); + } + + /** + * Only fields specified in update_mask are updated. + * If you specify a field in the update_mask but don't specify its value here + * that field will be deleted. + * If you are updating a map field, set the value of a key to null or empty + * string to delete the key from the map. It's not possible to update a key's + * value to the empty string. + * If you specify the update_mask to be a special path "*", fully replaces all + * user-modifiable fields to match `resource`. + * + * Generated from protobuf field .google.cloud.gkehub.v1.Feature resource = 3; + * @param \Google\Cloud\GkeHub\V1\Feature $var + * @return $this + */ + public function setResource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\Feature::class); + $this->resource = $var; + + return $this; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateFleetRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateFleetRequest.php new file mode 100644 index 000000000000..cf9e71565a9d --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateFleetRequest.php @@ -0,0 +1,147 @@ +google.cloud.gkehub.v1.UpdateFleetRequest + */ +class UpdateFleetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Fleet to update. + * The `name` field of the Fleet object identifies which fleet will be + * updated. + * + * Generated from protobuf field .google.cloud.gkehub.v1.Fleet fleet = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $fleet = null; + /** + * Required. The fields to be updated; + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\GkeHub\V1\Fleet $fleet Required. The Fleet to update. + * + * The `name` field of the Fleet object identifies which fleet will be + * updated. + * @param \Google\Protobuf\FieldMask $updateMask Required. The fields to be updated; + * + * @return \Google\Cloud\GkeHub\V1\UpdateFleetRequest + * + * @experimental + */ + public static function build(\Google\Cloud\GkeHub\V1\Fleet $fleet, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setFleet($fleet) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\GkeHub\V1\Fleet $fleet + * Required. The Fleet to update. + * The `name` field of the Fleet object identifies which fleet will be + * updated. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The fields to be updated; + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Fleet to update. + * The `name` field of the Fleet object identifies which fleet will be + * updated. + * + * Generated from protobuf field .google.cloud.gkehub.v1.Fleet fleet = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\GkeHub\V1\Fleet|null + */ + public function getFleet() + { + return $this->fleet; + } + + public function hasFleet() + { + return isset($this->fleet); + } + + public function clearFleet() + { + unset($this->fleet); + } + + /** + * Required. The Fleet to update. + * The `name` field of the Fleet object identifies which fleet will be + * updated. + * + * Generated from protobuf field .google.cloud.gkehub.v1.Fleet fleet = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\GkeHub\V1\Fleet $var + * @return $this + */ + public function setFleet($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\Fleet::class); + $this->fleet = $var; + + return $this; + } + + /** + * Required. The fields to be updated; + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. The fields to be updated; + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateMembershipBindingRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateMembershipBindingRequest.php new file mode 100644 index 000000000000..09166b9134b5 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateMembershipBindingRequest.php @@ -0,0 +1,136 @@ +google.cloud.gkehub.v1.UpdateMembershipBindingRequest + */ +class UpdateMembershipBindingRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The MembershipBinding object with fields updated. + * + * Generated from protobuf field .google.cloud.gkehub.v1.MembershipBinding membership_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $membership_binding = null; + /** + * Required. The fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\GkeHub\V1\MembershipBinding $membershipBinding Required. The MembershipBinding object with fields updated. + * @param \Google\Protobuf\FieldMask $updateMask Required. The fields to be updated. + * + * @return \Google\Cloud\GkeHub\V1\UpdateMembershipBindingRequest + * + * @experimental + */ + public static function build(\Google\Cloud\GkeHub\V1\MembershipBinding $membershipBinding, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setMembershipBinding($membershipBinding) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\GkeHub\V1\MembershipBinding $membership_binding + * Required. The MembershipBinding object with fields updated. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The fields to be updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The MembershipBinding object with fields updated. + * + * Generated from protobuf field .google.cloud.gkehub.v1.MembershipBinding membership_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\GkeHub\V1\MembershipBinding|null + */ + public function getMembershipBinding() + { + return $this->membership_binding; + } + + public function hasMembershipBinding() + { + return isset($this->membership_binding); + } + + public function clearMembershipBinding() + { + unset($this->membership_binding); + } + + /** + * Required. The MembershipBinding object with fields updated. + * + * Generated from protobuf field .google.cloud.gkehub.v1.MembershipBinding membership_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\GkeHub\V1\MembershipBinding $var + * @return $this + */ + public function setMembershipBinding($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\MembershipBinding::class); + $this->membership_binding = $var; + + return $this; + } + + /** + * Required. The fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. The fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateMembershipRBACRoleBindingRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateMembershipRBACRoleBindingRequest.php new file mode 100644 index 000000000000..10c3eab25c35 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateMembershipRBACRoleBindingRequest.php @@ -0,0 +1,141 @@ +google.cloud.gkehub.v1.UpdateMembershipRBACRoleBindingRequest + */ +class UpdateMembershipRBACRoleBindingRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A rbacrolebinding with fields updated. The 'name' field in this + * rbacrolebinding is used to identify the resource to update. + * + * Generated from protobuf field .google.cloud.gkehub.v1.RBACRoleBinding rbacrolebinding = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $rbacrolebinding = null; + /** + * Required. The fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\GkeHub\V1\RBACRoleBinding $rbacrolebinding Required. A rbacrolebinding with fields updated. The 'name' field in this + * rbacrolebinding is used to identify the resource to update. + * @param \Google\Protobuf\FieldMask $updateMask Required. The fields to be updated. + * + * @return \Google\Cloud\GkeHub\V1\UpdateMembershipRBACRoleBindingRequest + * + * @experimental + */ + public static function build(\Google\Cloud\GkeHub\V1\RBACRoleBinding $rbacrolebinding, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setRbacrolebinding($rbacrolebinding) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\GkeHub\V1\RBACRoleBinding $rbacrolebinding + * Required. A rbacrolebinding with fields updated. The 'name' field in this + * rbacrolebinding is used to identify the resource to update. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The fields to be updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. A rbacrolebinding with fields updated. The 'name' field in this + * rbacrolebinding is used to identify the resource to update. + * + * Generated from protobuf field .google.cloud.gkehub.v1.RBACRoleBinding rbacrolebinding = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\GkeHub\V1\RBACRoleBinding|null + */ + public function getRbacrolebinding() + { + return $this->rbacrolebinding; + } + + public function hasRbacrolebinding() + { + return isset($this->rbacrolebinding); + } + + public function clearRbacrolebinding() + { + unset($this->rbacrolebinding); + } + + /** + * Required. A rbacrolebinding with fields updated. The 'name' field in this + * rbacrolebinding is used to identify the resource to update. + * + * Generated from protobuf field .google.cloud.gkehub.v1.RBACRoleBinding rbacrolebinding = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\GkeHub\V1\RBACRoleBinding $var + * @return $this + */ + public function setRbacrolebinding($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\RBACRoleBinding::class); + $this->rbacrolebinding = $var; + + return $this; + } + + /** + * Required. The fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. The fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateMembershipRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateMembershipRequest.php new file mode 100644 index 000000000000..18371b71de73 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateMembershipRequest.php @@ -0,0 +1,287 @@ +google.cloud.gkehub.v1.UpdateMembershipRequest + */ +class UpdateMembershipRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Membership resource name in the format + * `projects/*/locations/*/memberships/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. Mask of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. Only fields specified in update_mask are updated. + * If you specify a field in the update_mask but don't specify its value here + * that field will be deleted. + * If you are updating a map field, set the value of a key to null or empty + * string to delete the key from the map. It's not possible to update a key's + * value to the empty string. + * If you specify the update_mask to be a special path "*", fully replaces all + * user-modifiable fields to match `resource`. + * + * Generated from protobuf field .google.cloud.gkehub.v1.Membership resource = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $resource = null; + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $name Required. The Membership resource name in the format + * `projects/*/locations/*/memberships/*`. Please see + * {@see GkeHubClient::membershipName()} for help formatting this field. + * @param \Google\Cloud\GkeHub\V1\Membership $resource Required. Only fields specified in update_mask are updated. + * If you specify a field in the update_mask but don't specify its value here + * that field will be deleted. + * If you are updating a map field, set the value of a key to null or empty + * string to delete the key from the map. It's not possible to update a key's + * value to the empty string. + * If you specify the update_mask to be a special path "*", fully replaces all + * user-modifiable fields to match `resource`. + * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. + * + * @return \Google\Cloud\GkeHub\V1\UpdateMembershipRequest + * + * @experimental + */ + public static function build(string $name, \Google\Cloud\GkeHub\V1\Membership $resource, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setName($name) + ->setResource($resource) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The Membership resource name in the format + * `projects/*/locations/*/memberships/*`. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Mask of fields to update. + * @type \Google\Cloud\GkeHub\V1\Membership $resource + * Required. Only fields specified in update_mask are updated. + * If you specify a field in the update_mask but don't specify its value here + * that field will be deleted. + * If you are updating a map field, set the value of a key to null or empty + * string to delete the key from the map. It's not possible to update a key's + * value to the empty string. + * If you specify the update_mask to be a special path "*", fully replaces all + * user-modifiable fields to match `resource`. + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Membership resource name in the format + * `projects/*/locations/*/memberships/*`. + * + * 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 Membership resource name in the format + * `projects/*/locations/*/memberships/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. Mask of fields to update. + * + * 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. Mask of fields to update. + * + * 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; + } + + /** + * Required. Only fields specified in update_mask are updated. + * If you specify a field in the update_mask but don't specify its value here + * that field will be deleted. + * If you are updating a map field, set the value of a key to null or empty + * string to delete the key from the map. It's not possible to update a key's + * value to the empty string. + * If you specify the update_mask to be a special path "*", fully replaces all + * user-modifiable fields to match `resource`. + * + * Generated from protobuf field .google.cloud.gkehub.v1.Membership resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\GkeHub\V1\Membership|null + */ + public function getResource() + { + return $this->resource; + } + + public function hasResource() + { + return isset($this->resource); + } + + public function clearResource() + { + unset($this->resource); + } + + /** + * Required. Only fields specified in update_mask are updated. + * If you specify a field in the update_mask but don't specify its value here + * that field will be deleted. + * If you are updating a map field, set the value of a key to null or empty + * string to delete the key from the map. It's not possible to update a key's + * value to the empty string. + * If you specify the update_mask to be a special path "*", fully replaces all + * user-modifiable fields to match `resource`. + * + * Generated from protobuf field .google.cloud.gkehub.v1.Membership resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\GkeHub\V1\Membership $var + * @return $this + */ + public function setResource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\Membership::class); + $this->resource = $var; + + return $this; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateScopeNamespaceRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateScopeNamespaceRequest.php new file mode 100644 index 000000000000..266ef1a2f7c2 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateScopeNamespaceRequest.php @@ -0,0 +1,146 @@ +google.cloud.gkehub.v1.UpdateScopeNamespaceRequest + */ +class UpdateScopeNamespaceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A namespace with fields updated. The 'name' field in this + * namespace is used to identify the resource to update. Given 'updated' + * prefix to follow go/proto-best-practices-checkers#keyword_conflict + * + * Generated from protobuf field .google.cloud.gkehub.v1.Namespace scope_namespace = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $scope_namespace = null; + /** + * Required. The fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\GkeHub\V1\PBNamespace $scopeNamespace Required. A namespace with fields updated. The 'name' field in this + * namespace is used to identify the resource to update. Given 'updated' + * prefix to follow go/proto-best-practices-checkers#keyword_conflict + * @param \Google\Protobuf\FieldMask $updateMask Required. The fields to be updated. + * + * @return \Google\Cloud\GkeHub\V1\UpdateScopeNamespaceRequest + * + * @experimental + */ + public static function build(\Google\Cloud\GkeHub\V1\PBNamespace $scopeNamespace, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setScopeNamespace($scopeNamespace) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\GkeHub\V1\PBNamespace $scope_namespace + * Required. A namespace with fields updated. The 'name' field in this + * namespace is used to identify the resource to update. Given 'updated' + * prefix to follow go/proto-best-practices-checkers#keyword_conflict + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The fields to be updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. A namespace with fields updated. The 'name' field in this + * namespace is used to identify the resource to update. Given 'updated' + * prefix to follow go/proto-best-practices-checkers#keyword_conflict + * + * Generated from protobuf field .google.cloud.gkehub.v1.Namespace scope_namespace = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\GkeHub\V1\PBNamespace|null + */ + public function getScopeNamespace() + { + return $this->scope_namespace; + } + + public function hasScopeNamespace() + { + return isset($this->scope_namespace); + } + + public function clearScopeNamespace() + { + unset($this->scope_namespace); + } + + /** + * Required. A namespace with fields updated. The 'name' field in this + * namespace is used to identify the resource to update. Given 'updated' + * prefix to follow go/proto-best-practices-checkers#keyword_conflict + * + * Generated from protobuf field .google.cloud.gkehub.v1.Namespace scope_namespace = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\GkeHub\V1\PBNamespace $var + * @return $this + */ + public function setScopeNamespace($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\PBNamespace::class); + $this->scope_namespace = $var; + + return $this; + } + + /** + * Required. The fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. The fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateScopeRBACRoleBindingRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateScopeRBACRoleBindingRequest.php new file mode 100644 index 000000000000..d2279d02f03e --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateScopeRBACRoleBindingRequest.php @@ -0,0 +1,141 @@ +google.cloud.gkehub.v1.UpdateScopeRBACRoleBindingRequest + */ +class UpdateScopeRBACRoleBindingRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A rbacrolebinding with fields updated. The 'name' field in this + * rbacrolebinding is used to identify the resource to update. + * + * Generated from protobuf field .google.cloud.gkehub.v1.RBACRoleBinding rbacrolebinding = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $rbacrolebinding = null; + /** + * Required. The fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\GkeHub\V1\RBACRoleBinding $rbacrolebinding Required. A rbacrolebinding with fields updated. The 'name' field in this + * rbacrolebinding is used to identify the resource to update. + * @param \Google\Protobuf\FieldMask $updateMask Required. The fields to be updated. + * + * @return \Google\Cloud\GkeHub\V1\UpdateScopeRBACRoleBindingRequest + * + * @experimental + */ + public static function build(\Google\Cloud\GkeHub\V1\RBACRoleBinding $rbacrolebinding, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setRbacrolebinding($rbacrolebinding) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\GkeHub\V1\RBACRoleBinding $rbacrolebinding + * Required. A rbacrolebinding with fields updated. The 'name' field in this + * rbacrolebinding is used to identify the resource to update. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The fields to be updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. A rbacrolebinding with fields updated. The 'name' field in this + * rbacrolebinding is used to identify the resource to update. + * + * Generated from protobuf field .google.cloud.gkehub.v1.RBACRoleBinding rbacrolebinding = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\GkeHub\V1\RBACRoleBinding|null + */ + public function getRbacrolebinding() + { + return $this->rbacrolebinding; + } + + public function hasRbacrolebinding() + { + return isset($this->rbacrolebinding); + } + + public function clearRbacrolebinding() + { + unset($this->rbacrolebinding); + } + + /** + * Required. A rbacrolebinding with fields updated. The 'name' field in this + * rbacrolebinding is used to identify the resource to update. + * + * Generated from protobuf field .google.cloud.gkehub.v1.RBACRoleBinding rbacrolebinding = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\GkeHub\V1\RBACRoleBinding $var + * @return $this + */ + public function setRbacrolebinding($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\RBACRoleBinding::class); + $this->rbacrolebinding = $var; + + return $this; + } + + /** + * Required. The fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. The fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateScopeRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateScopeRequest.php new file mode 100644 index 000000000000..43853b5613d9 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateScopeRequest.php @@ -0,0 +1,141 @@ +google.cloud.gkehub.v1.UpdateScopeRequest + */ +class UpdateScopeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A Scope with fields updated. The 'name' field in this + * namespace is used to identify the resource to update. + * + * Generated from protobuf field .google.cloud.gkehub.v1.Scope scope = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $scope = null; + /** + * Required. The fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\GkeHub\V1\Scope $scope Required. A Scope with fields updated. The 'name' field in this + * namespace is used to identify the resource to update. + * @param \Google\Protobuf\FieldMask $updateMask Required. The fields to be updated. + * + * @return \Google\Cloud\GkeHub\V1\UpdateScopeRequest + * + * @experimental + */ + public static function build(\Google\Cloud\GkeHub\V1\Scope $scope, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setScope($scope) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\GkeHub\V1\Scope $scope + * Required. A Scope with fields updated. The 'name' field in this + * namespace is used to identify the resource to update. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The fields to be updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. A Scope with fields updated. The 'name' field in this + * namespace is used to identify the resource to update. + * + * Generated from protobuf field .google.cloud.gkehub.v1.Scope scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\GkeHub\V1\Scope|null + */ + public function getScope() + { + return $this->scope; + } + + public function hasScope() + { + return isset($this->scope); + } + + public function clearScope() + { + unset($this->scope); + } + + /** + * Required. A Scope with fields updated. The 'name' field in this + * namespace is used to identify the resource to update. + * + * Generated from protobuf field .google.cloud.gkehub.v1.Scope scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\GkeHub\V1\Scope $var + * @return $this + */ + public function setScope($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\Scope::class); + $this->scope = $var; + + return $this; + } + + /** + * Required. The fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. The fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/create_feature.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/create_feature.php new file mode 100644 index 000000000000..7eab338d1f05 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/create_feature.php @@ -0,0 +1,69 @@ +createFeature($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Feature $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END gkehub_v1_generated_GkeHub_CreateFeature_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/create_fleet.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/create_fleet.php new file mode 100644 index 000000000000..5721765b8dc4 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/create_fleet.php @@ -0,0 +1,86 @@ +setParent($formattedParent) + ->setFleet($fleet); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $gkeHubClient->createFleet($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Fleet $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = GkeHubClient::locationName('[PROJECT]', '[LOCATION]'); + + create_fleet_sample($formattedParent); +} +// [END gkehub_v1_generated_GkeHub_CreateFleet_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/create_membership.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/create_membership.php new file mode 100644 index 000000000000..7fc95934eea1 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/create_membership.php @@ -0,0 +1,101 @@ +setParent($formattedParent) + ->setMembershipId($membershipId) + ->setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $gkeHubClient->createMembership($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Membership $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = GkeHubClient::locationName('[PROJECT]', '[LOCATION]'); + $membershipId = '[MEMBERSHIP_ID]'; + + create_membership_sample($formattedParent, $membershipId); +} +// [END gkehub_v1_generated_GkeHub_CreateMembership_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/create_membership_binding.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/create_membership_binding.php new file mode 100644 index 000000000000..5a0758554366 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/create_membership_binding.php @@ -0,0 +1,92 @@ +setParent($formattedParent) + ->setMembershipBinding($membershipBinding) + ->setMembershipBindingId($membershipBindingId); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $gkeHubClient->createMembershipBinding($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var MembershipBinding $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = GkeHubClient::membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); + $membershipBindingId = '[MEMBERSHIP_BINDING_ID]'; + + create_membership_binding_sample($formattedParent, $membershipBindingId); +} +// [END gkehub_v1_generated_GkeHub_CreateMembershipBinding_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/create_membership_rbac_role_binding.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/create_membership_rbac_role_binding.php new file mode 100644 index 000000000000..9769b43a3552 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/create_membership_rbac_role_binding.php @@ -0,0 +1,102 @@ +setRole($rbacrolebindingRole); + $request = (new CreateMembershipRBACRoleBindingRequest()) + ->setParent($formattedParent) + ->setRbacrolebindingId($rbacrolebindingId) + ->setRbacrolebinding($rbacrolebinding); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $gkeHubClient->createMembershipRBACRoleBinding($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var RBACRoleBinding $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = GkeHubClient::scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); + $rbacrolebindingId = '[RBACROLEBINDING_ID]'; + + create_membership_rbac_role_binding_sample($formattedParent, $rbacrolebindingId); +} +// [END gkehub_v1_generated_GkeHub_CreateMembershipRBACRoleBinding_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/create_scope.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/create_scope.php new file mode 100644 index 000000000000..03384a4204e9 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/create_scope.php @@ -0,0 +1,90 @@ +setParent($formattedParent) + ->setScopeId($scopeId) + ->setScope($scope); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $gkeHubClient->createScope($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Scope $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = GkeHubClient::locationName('[PROJECT]', '[LOCATION]'); + $scopeId = '[SCOPE_ID]'; + + create_scope_sample($formattedParent, $scopeId); +} +// [END gkehub_v1_generated_GkeHub_CreateScope_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/create_scope_namespace.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/create_scope_namespace.php new file mode 100644 index 000000000000..d62c115c9bbb --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/create_scope_namespace.php @@ -0,0 +1,104 @@ +setScope($formattedScopeNamespaceScope); + $request = (new CreateScopeNamespaceRequest()) + ->setParent($formattedParent) + ->setScopeNamespaceId($scopeNamespaceId) + ->setScopeNamespace($scopeNamespace); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $gkeHubClient->createScopeNamespace($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var PBNamespace $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = GkeHubClient::scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); + $scopeNamespaceId = '[SCOPE_NAMESPACE_ID]'; + $formattedScopeNamespaceScope = GkeHubClient::scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); + + create_scope_namespace_sample($formattedParent, $scopeNamespaceId, $formattedScopeNamespaceScope); +} +// [END gkehub_v1_generated_GkeHub_CreateScopeNamespace_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/create_scope_rbac_role_binding.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/create_scope_rbac_role_binding.php new file mode 100644 index 000000000000..3a4b33f8320d --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/create_scope_rbac_role_binding.php @@ -0,0 +1,102 @@ +setRole($rbacrolebindingRole); + $request = (new CreateScopeRBACRoleBindingRequest()) + ->setParent($formattedParent) + ->setRbacrolebindingId($rbacrolebindingId) + ->setRbacrolebinding($rbacrolebinding); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $gkeHubClient->createScopeRBACRoleBinding($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var RBACRoleBinding $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = GkeHubClient::scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); + $rbacrolebindingId = '[RBACROLEBINDING_ID]'; + + create_scope_rbac_role_binding_sample($formattedParent, $rbacrolebindingId); +} +// [END gkehub_v1_generated_GkeHub_CreateScopeRBACRoleBinding_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/delete_feature.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/delete_feature.php new file mode 100644 index 000000000000..fb1eaab4865c --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/delete_feature.php @@ -0,0 +1,66 @@ +deleteFeature($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END gkehub_v1_generated_GkeHub_DeleteFeature_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/delete_fleet.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/delete_fleet.php new file mode 100644 index 000000000000..a17fdcf3d80e --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/delete_fleet.php @@ -0,0 +1,81 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $gkeHubClient->deleteFleet($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = GkeHubClient::fleetName('[PROJECT]', '[LOCATION]', '[FLEET]'); + + delete_fleet_sample($formattedName); +} +// [END gkehub_v1_generated_GkeHub_DeleteFleet_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/delete_membership.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/delete_membership.php new file mode 100644 index 000000000000..1571f9963514 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/delete_membership.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $gkeHubClient->deleteMembership($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = GkeHubClient::membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); + + delete_membership_sample($formattedName); +} +// [END gkehub_v1_generated_GkeHub_DeleteMembership_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/delete_membership_binding.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/delete_membership_binding.php new file mode 100644 index 000000000000..d33574ead7b0 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/delete_membership_binding.php @@ -0,0 +1,86 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $gkeHubClient->deleteMembershipBinding($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = GkeHubClient::membershipBindingName( + '[PROJECT]', + '[LOCATION]', + '[MEMBERSHIP]', + '[MEMBERSHIPBINDING]' + ); + + delete_membership_binding_sample($formattedName); +} +// [END gkehub_v1_generated_GkeHub_DeleteMembershipBinding_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/delete_membership_rbac_role_binding.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/delete_membership_rbac_role_binding.php new file mode 100644 index 000000000000..d0796b608d3d --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/delete_membership_rbac_role_binding.php @@ -0,0 +1,86 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $gkeHubClient->deleteMembershipRBACRoleBinding($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = GkeHubClient::rBACRoleBindingName( + '[PROJECT]', + '[LOCATION]', + '[SCOPE]', + '[RBACROLEBINDING]' + ); + + delete_membership_rbac_role_binding_sample($formattedName); +} +// [END gkehub_v1_generated_GkeHub_DeleteMembershipRBACRoleBinding_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/delete_scope.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/delete_scope.php new file mode 100644 index 000000000000..dfa3180c70c7 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/delete_scope.php @@ -0,0 +1,81 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $gkeHubClient->deleteScope($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = GkeHubClient::scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); + + delete_scope_sample($formattedName); +} +// [END gkehub_v1_generated_GkeHub_DeleteScope_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/delete_scope_namespace.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/delete_scope_namespace.php new file mode 100644 index 000000000000..322bf21fbd09 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/delete_scope_namespace.php @@ -0,0 +1,81 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $gkeHubClient->deleteScopeNamespace($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = GkeHubClient::namespaceName('[PROJECT]', '[LOCATION]', '[SCOPE]', '[NAMESPACE]'); + + delete_scope_namespace_sample($formattedName); +} +// [END gkehub_v1_generated_GkeHub_DeleteScopeNamespace_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/delete_scope_rbac_role_binding.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/delete_scope_rbac_role_binding.php new file mode 100644 index 000000000000..5710584b271c --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/delete_scope_rbac_role_binding.php @@ -0,0 +1,86 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $gkeHubClient->deleteScopeRBACRoleBinding($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = GkeHubClient::rBACRoleBindingName( + '[PROJECT]', + '[LOCATION]', + '[SCOPE]', + '[RBACROLEBINDING]' + ); + + delete_scope_rbac_role_binding_sample($formattedName); +} +// [END gkehub_v1_generated_GkeHub_DeleteScopeRBACRoleBinding_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/generate_connect_manifest.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/generate_connect_manifest.php new file mode 100644 index 000000000000..39a41ac908b0 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/generate_connect_manifest.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var GenerateConnectManifestResponse $response */ + $response = $gkeHubClient->generateConnectManifest($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 = GkeHubClient::membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); + + generate_connect_manifest_sample($formattedName); +} +// [END gkehub_v1_generated_GkeHub_GenerateConnectManifest_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/generate_membership_rbac_role_binding_yaml.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/generate_membership_rbac_role_binding_yaml.php new file mode 100644 index 000000000000..94dfd1851e73 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/generate_membership_rbac_role_binding_yaml.php @@ -0,0 +1,92 @@ +setRole($rbacrolebindingRole); + $request = (new GenerateMembershipRBACRoleBindingYAMLRequest()) + ->setParent($formattedParent) + ->setRbacrolebindingId($rbacrolebindingId) + ->setRbacrolebinding($rbacrolebinding); + + // Call the API and handle any network failures. + try { + /** @var GenerateMembershipRBACRoleBindingYAMLResponse $response */ + $response = $gkeHubClient->generateMembershipRBACRoleBindingYAML($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 = GkeHubClient::membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); + $rbacrolebindingId = '[RBACROLEBINDING_ID]'; + + generate_membership_rbac_role_binding_yaml_sample($formattedParent, $rbacrolebindingId); +} +// [END gkehub_v1_generated_GkeHub_GenerateMembershipRBACRoleBindingYAML_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/get_feature.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/get_feature.php new file mode 100644 index 000000000000..bb4566556497 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/get_feature.php @@ -0,0 +1,57 @@ +getFeature($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END gkehub_v1_generated_GkeHub_GetFeature_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/get_fleet.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/get_fleet.php new file mode 100644 index 000000000000..530d7576828b --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/get_fleet.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Fleet $response */ + $response = $gkeHubClient->getFleet($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 = GkeHubClient::fleetName('[PROJECT]', '[LOCATION]', '[FLEET]'); + + get_fleet_sample($formattedName); +} +// [END gkehub_v1_generated_GkeHub_GetFleet_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/get_membership.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/get_membership.php new file mode 100644 index 000000000000..0e7071464581 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/get_membership.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Membership $response */ + $response = $gkeHubClient->getMembership($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 = GkeHubClient::membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); + + get_membership_sample($formattedName); +} +// [END gkehub_v1_generated_GkeHub_GetMembership_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/get_membership_binding.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/get_membership_binding.php new file mode 100644 index 000000000000..a8b2eb57588b --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/get_membership_binding.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var MembershipBinding $response */ + $response = $gkeHubClient->getMembershipBinding($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 = GkeHubClient::membershipBindingName( + '[PROJECT]', + '[LOCATION]', + '[MEMBERSHIP]', + '[MEMBERSHIPBINDING]' + ); + + get_membership_binding_sample($formattedName); +} +// [END gkehub_v1_generated_GkeHub_GetMembershipBinding_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/get_membership_rbac_role_binding.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/get_membership_rbac_role_binding.php new file mode 100644 index 000000000000..0f017f6da4be --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/get_membership_rbac_role_binding.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var RBACRoleBinding $response */ + $response = $gkeHubClient->getMembershipRBACRoleBinding($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 = GkeHubClient::rBACRoleBindingName( + '[PROJECT]', + '[LOCATION]', + '[SCOPE]', + '[RBACROLEBINDING]' + ); + + get_membership_rbac_role_binding_sample($formattedName); +} +// [END gkehub_v1_generated_GkeHub_GetMembershipRBACRoleBinding_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/get_scope.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/get_scope.php new file mode 100644 index 000000000000..1d784dc4df6f --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/get_scope.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Scope $response */ + $response = $gkeHubClient->getScope($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 = GkeHubClient::scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); + + get_scope_sample($formattedName); +} +// [END gkehub_v1_generated_GkeHub_GetScope_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/get_scope_namespace.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/get_scope_namespace.php new file mode 100644 index 000000000000..34731ff6f754 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/get_scope_namespace.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var PBNamespace $response */ + $response = $gkeHubClient->getScopeNamespace($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 = GkeHubClient::namespaceName('[PROJECT]', '[LOCATION]', '[SCOPE]', '[NAMESPACE]'); + + get_scope_namespace_sample($formattedName); +} +// [END gkehub_v1_generated_GkeHub_GetScopeNamespace_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/get_scope_rbac_role_binding.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/get_scope_rbac_role_binding.php new file mode 100644 index 000000000000..a4a4f0f23686 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/get_scope_rbac_role_binding.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var RBACRoleBinding $response */ + $response = $gkeHubClient->getScopeRBACRoleBinding($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 = GkeHubClient::rBACRoleBindingName( + '[PROJECT]', + '[LOCATION]', + '[SCOPE]', + '[RBACROLEBINDING]' + ); + + get_scope_rbac_role_binding_sample($formattedName); +} +// [END gkehub_v1_generated_GkeHub_GetScopeRBACRoleBinding_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_bound_memberships.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_bound_memberships.php new file mode 100644 index 000000000000..a95655798984 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_bound_memberships.php @@ -0,0 +1,78 @@ +setScopeName($formattedScopeName); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $gkeHubClient->listBoundMemberships($request); + + /** @var Membership $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 +{ + $formattedScopeName = GkeHubClient::scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); + + list_bound_memberships_sample($formattedScopeName); +} +// [END gkehub_v1_generated_GkeHub_ListBoundMemberships_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_features.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_features.php new file mode 100644 index 000000000000..b81a3bac87b1 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_features.php @@ -0,0 +1,62 @@ +listFeatures($request); + + /** @var Feature $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 gkehub_v1_generated_GkeHub_ListFeatures_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_fleets.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_fleets.php new file mode 100644 index 000000000000..b2f8cadb7911 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_fleets.php @@ -0,0 +1,78 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $gkeHubClient->listFleets($request); + + /** @var Fleet $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 = GkeHubClient::locationName('[PROJECT]', '[LOCATION]'); + + list_fleets_sample($formattedParent); +} +// [END gkehub_v1_generated_GkeHub_ListFleets_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_membership_bindings.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_membership_bindings.php new file mode 100644 index 000000000000..e8b2cb7667d2 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_membership_bindings.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $gkeHubClient->listMembershipBindings($request); + + /** @var MembershipBinding $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 = GkeHubClient::membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); + + list_membership_bindings_sample($formattedParent); +} +// [END gkehub_v1_generated_GkeHub_ListMembershipBindings_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_membership_rbac_role_bindings.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_membership_rbac_role_bindings.php new file mode 100644 index 000000000000..35fafd292544 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_membership_rbac_role_bindings.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $gkeHubClient->listMembershipRBACRoleBindings($request); + + /** @var RBACRoleBinding $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 = GkeHubClient::scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); + + list_membership_rbac_role_bindings_sample($formattedParent); +} +// [END gkehub_v1_generated_GkeHub_ListMembershipRBACRoleBindings_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_memberships.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_memberships.php new file mode 100644 index 000000000000..853750c18e6c --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_memberships.php @@ -0,0 +1,78 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $gkeHubClient->listMemberships($request); + + /** @var Membership $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 = GkeHubClient::locationName('[PROJECT]', '[LOCATION]'); + + list_memberships_sample($formattedParent); +} +// [END gkehub_v1_generated_GkeHub_ListMemberships_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_permitted_scopes.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_permitted_scopes.php new file mode 100644 index 000000000000..2283dad77ec4 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_permitted_scopes.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $gkeHubClient->listPermittedScopes($request); + + /** @var Scope $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 = GkeHubClient::locationName('[PROJECT]', '[LOCATION]'); + + list_permitted_scopes_sample($formattedParent); +} +// [END gkehub_v1_generated_GkeHub_ListPermittedScopes_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_scope_namespaces.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_scope_namespaces.php new file mode 100644 index 000000000000..6ddc9423d332 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_scope_namespaces.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $gkeHubClient->listScopeNamespaces($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 = GkeHubClient::scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); + + list_scope_namespaces_sample($formattedParent); +} +// [END gkehub_v1_generated_GkeHub_ListScopeNamespaces_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_scope_rbac_role_bindings.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_scope_rbac_role_bindings.php new file mode 100644 index 000000000000..4da4798533db --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_scope_rbac_role_bindings.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $gkeHubClient->listScopeRBACRoleBindings($request); + + /** @var RBACRoleBinding $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 = GkeHubClient::scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); + + list_scope_rbac_role_bindings_sample($formattedParent); +} +// [END gkehub_v1_generated_GkeHub_ListScopeRBACRoleBindings_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_scopes.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_scopes.php new file mode 100644 index 000000000000..bb224085cb23 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_scopes.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $gkeHubClient->listScopes($request); + + /** @var Scope $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 = GkeHubClient::locationName('[PROJECT]', '[LOCATION]'); + + list_scopes_sample($formattedParent); +} +// [END gkehub_v1_generated_GkeHub_ListScopes_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/update_feature.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/update_feature.php new file mode 100644 index 000000000000..9b203f4fba14 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/update_feature.php @@ -0,0 +1,69 @@ +updateFeature($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Feature $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END gkehub_v1_generated_GkeHub_UpdateFeature_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/update_fleet.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/update_fleet.php new file mode 100644 index 000000000000..28e85bb5cf3e --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/update_fleet.php @@ -0,0 +1,74 @@ +setFleet($fleet) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $gkeHubClient->updateFleet($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Fleet $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END gkehub_v1_generated_GkeHub_UpdateFleet_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/update_membership.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/update_membership.php new file mode 100644 index 000000000000..3f422948920c --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/update_membership.php @@ -0,0 +1,89 @@ +setName($formattedName) + ->setUpdateMask($updateMask) + ->setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $gkeHubClient->updateMembership($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Membership $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = GkeHubClient::membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); + + update_membership_sample($formattedName); +} +// [END gkehub_v1_generated_GkeHub_UpdateMembership_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/update_membership_binding.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/update_membership_binding.php new file mode 100644 index 000000000000..e1a30ffe4140 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/update_membership_binding.php @@ -0,0 +1,74 @@ +setMembershipBinding($membershipBinding) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $gkeHubClient->updateMembershipBinding($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var MembershipBinding $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END gkehub_v1_generated_GkeHub_UpdateMembershipBinding_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/update_membership_rbac_role_binding.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/update_membership_rbac_role_binding.php new file mode 100644 index 000000000000..67b58378a330 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/update_membership_rbac_role_binding.php @@ -0,0 +1,77 @@ +setRole($rbacrolebindingRole); + $updateMask = new FieldMask(); + $request = (new UpdateMembershipRBACRoleBindingRequest()) + ->setRbacrolebinding($rbacrolebinding) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $gkeHubClient->updateMembershipRBACRoleBinding($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var RBACRoleBinding $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END gkehub_v1_generated_GkeHub_UpdateMembershipRBACRoleBinding_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/update_scope.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/update_scope.php new file mode 100644 index 000000000000..08a67253bb5a --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/update_scope.php @@ -0,0 +1,74 @@ +setScope($scope) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $gkeHubClient->updateScope($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Scope $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END gkehub_v1_generated_GkeHub_UpdateScope_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/update_scope_namespace.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/update_scope_namespace.php new file mode 100644 index 000000000000..ce155884bc88 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/update_scope_namespace.php @@ -0,0 +1,88 @@ +setScope($formattedScopeNamespaceScope); + $updateMask = new FieldMask(); + $request = (new UpdateScopeNamespaceRequest()) + ->setScopeNamespace($scopeNamespace) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $gkeHubClient->updateScopeNamespace($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var PBNamespace $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedScopeNamespaceScope = GkeHubClient::scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); + + update_scope_namespace_sample($formattedScopeNamespaceScope); +} +// [END gkehub_v1_generated_GkeHub_UpdateScopeNamespace_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/update_scope_rbac_role_binding.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/update_scope_rbac_role_binding.php new file mode 100644 index 000000000000..e2eea1d1802a --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/update_scope_rbac_role_binding.php @@ -0,0 +1,77 @@ +setRole($rbacrolebindingRole); + $updateMask = new FieldMask(); + $request = (new UpdateScopeRBACRoleBindingRequest()) + ->setRbacrolebinding($rbacrolebinding) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $gkeHubClient->updateScopeRBACRoleBinding($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var RBACRoleBinding $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END gkehub_v1_generated_GkeHub_UpdateScopeRBACRoleBinding_sync] diff --git a/owl-bot-staging/GkeHub/v1/src/V1/Client/GkeHubClient.php b/owl-bot-staging/GkeHub/v1/src/V1/Client/GkeHubClient.php new file mode 100644 index 000000000000..526289f84443 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/src/V1/Client/GkeHubClient.php @@ -0,0 +1,1785 @@ + createFeatureAsync(CreateFeatureRequest $request, array $optionalArgs = []) + * @method PromiseInterface createFleetAsync(CreateFleetRequest $request, array $optionalArgs = []) + * @method PromiseInterface createMembershipAsync(CreateMembershipRequest $request, array $optionalArgs = []) + * @method PromiseInterface createMembershipBindingAsync(CreateMembershipBindingRequest $request, array $optionalArgs = []) + * @method PromiseInterface createMembershipRBACRoleBindingAsync(CreateMembershipRBACRoleBindingRequest $request, array $optionalArgs = []) + * @method PromiseInterface createScopeAsync(CreateScopeRequest $request, array $optionalArgs = []) + * @method PromiseInterface createScopeNamespaceAsync(CreateScopeNamespaceRequest $request, array $optionalArgs = []) + * @method PromiseInterface createScopeRBACRoleBindingAsync(CreateScopeRBACRoleBindingRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteFeatureAsync(DeleteFeatureRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteFleetAsync(DeleteFleetRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteMembershipAsync(DeleteMembershipRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteMembershipBindingAsync(DeleteMembershipBindingRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteMembershipRBACRoleBindingAsync(DeleteMembershipRBACRoleBindingRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteScopeAsync(DeleteScopeRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteScopeNamespaceAsync(DeleteScopeNamespaceRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteScopeRBACRoleBindingAsync(DeleteScopeRBACRoleBindingRequest $request, array $optionalArgs = []) + * @method PromiseInterface generateConnectManifestAsync(GenerateConnectManifestRequest $request, array $optionalArgs = []) + * @method PromiseInterface generateMembershipRBACRoleBindingYAMLAsync(GenerateMembershipRBACRoleBindingYAMLRequest $request, array $optionalArgs = []) + * @method PromiseInterface getFeatureAsync(GetFeatureRequest $request, array $optionalArgs = []) + * @method PromiseInterface getFleetAsync(GetFleetRequest $request, array $optionalArgs = []) + * @method PromiseInterface getMembershipAsync(GetMembershipRequest $request, array $optionalArgs = []) + * @method PromiseInterface getMembershipBindingAsync(GetMembershipBindingRequest $request, array $optionalArgs = []) + * @method PromiseInterface getMembershipRBACRoleBindingAsync(GetMembershipRBACRoleBindingRequest $request, array $optionalArgs = []) + * @method PromiseInterface getScopeAsync(GetScopeRequest $request, array $optionalArgs = []) + * @method PromiseInterface getScopeNamespaceAsync(GetScopeNamespaceRequest $request, array $optionalArgs = []) + * @method PromiseInterface getScopeRBACRoleBindingAsync(GetScopeRBACRoleBindingRequest $request, array $optionalArgs = []) + * @method PromiseInterface listBoundMembershipsAsync(ListBoundMembershipsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listFeaturesAsync(ListFeaturesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listFleetsAsync(ListFleetsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listMembershipBindingsAsync(ListMembershipBindingsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listMembershipRBACRoleBindingsAsync(ListMembershipRBACRoleBindingsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listMembershipsAsync(ListMembershipsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listPermittedScopesAsync(ListPermittedScopesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listScopeNamespacesAsync(ListScopeNamespacesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listScopeRBACRoleBindingsAsync(ListScopeRBACRoleBindingsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listScopesAsync(ListScopesRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateFeatureAsync(UpdateFeatureRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateFleetAsync(UpdateFleetRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateMembershipAsync(UpdateMembershipRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateMembershipBindingAsync(UpdateMembershipBindingRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateMembershipRBACRoleBindingAsync(UpdateMembershipRBACRoleBindingRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateScopeAsync(UpdateScopeRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateScopeNamespaceAsync(UpdateScopeNamespaceRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateScopeRBACRoleBindingAsync(UpdateScopeRBACRoleBindingRequest $request, array $optionalArgs = []) + */ +final class GkeHubClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.gkehub.v1.GkeHub'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'gkehub.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'gkehub.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 $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/gke_hub_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/gke_hub_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/gke_hub_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/gke_hub_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = $this->descriptors[$methodName]['longRunning'] ?? []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a feature + * resource. + * + * @param string $project + * @param string $location + * @param string $feature + * + * @return string The formatted feature resource. + */ + public static function featureName(string $project, string $location, string $feature): string + { + return self::getPathTemplate('feature')->render([ + 'project' => $project, + 'location' => $location, + 'feature' => $feature, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a fleet + * resource. + * + * @param string $project + * @param string $location + * @param string $fleet + * + * @return string The formatted fleet resource. + */ + public static function fleetName(string $project, string $location, string $fleet): string + { + return self::getPathTemplate('fleet')->render([ + 'project' => $project, + 'location' => $location, + 'fleet' => $fleet, + ]); + } + + /** + * 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 membership + * resource. + * + * @param string $project + * @param string $location + * @param string $membership + * + * @return string The formatted membership resource. + */ + public static function membershipName(string $project, string $location, string $membership): string + { + return self::getPathTemplate('membership')->render([ + 'project' => $project, + 'location' => $location, + 'membership' => $membership, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * membership_binding resource. + * + * @param string $project + * @param string $location + * @param string $membership + * @param string $membershipbinding + * + * @return string The formatted membership_binding resource. + */ + public static function membershipBindingName(string $project, string $location, string $membership, string $membershipbinding): string + { + return self::getPathTemplate('membershipBinding')->render([ + 'project' => $project, + 'location' => $location, + 'membership' => $membership, + 'membershipbinding' => $membershipbinding, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a namespace + * resource. + * + * @param string $project + * @param string $location + * @param string $scope + * @param string $namespace + * + * @return string The formatted namespace resource. + */ + public static function namespaceName(string $project, string $location, string $scope, string $namespace): string + { + return self::getPathTemplate('namespace')->render([ + 'project' => $project, + 'location' => $location, + 'scope' => $scope, + 'namespace' => $namespace, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_location_fleet resource. + * + * @param string $organization + * @param string $location + * @param string $fleet + * + * @return string The formatted organization_location_fleet resource. + */ + public static function organizationLocationFleetName(string $organization, string $location, string $fleet): string + { + return self::getPathTemplate('organizationLocationFleet')->render([ + 'organization' => $organization, + 'location' => $location, + 'fleet' => $fleet, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_fleet resource. + * + * @param string $project + * @param string $location + * @param string $fleet + * + * @return string The formatted project_location_fleet resource. + */ + public static function projectLocationFleetName(string $project, string $location, string $fleet): string + { + return self::getPathTemplate('projectLocationFleet')->render([ + 'project' => $project, + 'location' => $location, + 'fleet' => $fleet, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_membership_rbacrolebinding resource. + * + * @param string $project + * @param string $location + * @param string $membership + * @param string $rbacrolebinding + * + * @return string The formatted project_location_membership_rbacrolebinding resource. + */ + public static function projectLocationMembershipRbacrolebindingName(string $project, string $location, string $membership, string $rbacrolebinding): string + { + return self::getPathTemplate('projectLocationMembershipRbacrolebinding')->render([ + 'project' => $project, + 'location' => $location, + 'membership' => $membership, + 'rbacrolebinding' => $rbacrolebinding, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_scope_rbacrolebinding resource. + * + * @param string $project + * @param string $location + * @param string $scope + * @param string $rbacrolebinding + * + * @return string The formatted project_location_scope_rbacrolebinding resource. + */ + public static function projectLocationScopeRbacrolebindingName(string $project, string $location, string $scope, string $rbacrolebinding): string + { + return self::getPathTemplate('projectLocationScopeRbacrolebinding')->render([ + 'project' => $project, + 'location' => $location, + 'scope' => $scope, + 'rbacrolebinding' => $rbacrolebinding, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * rbac_role_binding resource. + * + * @param string $project + * @param string $location + * @param string $scope + * @param string $rbacrolebinding + * + * @return string The formatted rbac_role_binding resource. + */ + public static function rBACRoleBindingName(string $project, string $location, string $scope, string $rbacrolebinding): string + { + return self::getPathTemplate('rBACRoleBinding')->render([ + 'project' => $project, + 'location' => $location, + 'scope' => $scope, + 'rbacrolebinding' => $rbacrolebinding, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a scope + * resource. + * + * @param string $project + * @param string $location + * @param string $scope + * + * @return string The formatted scope resource. + */ + public static function scopeName(string $project, string $location, string $scope): string + { + return self::getPathTemplate('scope')->render([ + 'project' => $project, + 'location' => $location, + 'scope' => $scope, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - feature: projects/{project}/locations/{location}/features/{feature} + * - fleet: projects/{project}/locations/{location}/fleets/{fleet} + * - location: projects/{project}/locations/{location} + * - membership: projects/{project}/locations/{location}/memberships/{membership} + * - membershipBinding: projects/{project}/locations/{location}/memberships/{membership}/bindings/{membershipbinding} + * - namespace: projects/{project}/locations/{location}/scopes/{scope}/namespaces/{namespace} + * - organizationLocationFleet: organizations/{organization}/locations/{location}/fleets/{fleet} + * - projectLocationFleet: projects/{project}/locations/{location}/fleets/{fleet} + * - projectLocationMembershipRbacrolebinding: projects/{project}/locations/{location}/memberships/{membership}/rbacrolebindings/{rbacrolebinding} + * - projectLocationScopeRbacrolebinding: projects/{project}/locations/{location}/scopes/{scope}/rbacrolebindings/{rbacrolebinding} + * - rBACRoleBinding: projects/{project}/locations/{location}/scopes/{scope}/rbacrolebindings/{rbacrolebinding} + * - scope: projects/{project}/locations/{location}/scopes/{scope} + * + * 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|ClientOptions $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 'gkehub.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\GkeHub\V1\GkeHubClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new GkeHubClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @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. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Adds a new Feature. + * + * The async variant is {@see GkeHubClient::createFeatureAsync()} . + * + * @example samples/V1/GkeHubClient/create_feature.php + * + * @param CreateFeatureRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createFeature(CreateFeatureRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateFeature', $request, $callOptions)->wait(); + } + + /** + * Creates a fleet. + * + * The async variant is {@see GkeHubClient::createFleetAsync()} . + * + * @example samples/V1/GkeHubClient/create_fleet.php + * + * @param CreateFleetRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createFleet(CreateFleetRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateFleet', $request, $callOptions)->wait(); + } + + /** + * Creates a new Membership. + * + * **This is currently only supported for GKE clusters on Google Cloud**. + * To register other clusters, follow the instructions at + * https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster. + * + * The async variant is {@see GkeHubClient::createMembershipAsync()} . + * + * @example samples/V1/GkeHubClient/create_membership.php + * + * @param CreateMembershipRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createMembership(CreateMembershipRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateMembership', $request, $callOptions)->wait(); + } + + /** + * Creates a MembershipBinding. + * + * The async variant is {@see GkeHubClient::createMembershipBindingAsync()} . + * + * @example samples/V1/GkeHubClient/create_membership_binding.php + * + * @param CreateMembershipBindingRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createMembershipBinding(CreateMembershipBindingRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateMembershipBinding', $request, $callOptions)->wait(); + } + + /** + * Creates a Membership RBACRoleBinding. + * + * The async variant is {@see GkeHubClient::createMembershipRBACRoleBindingAsync()} + * . + * + * @example samples/V1/GkeHubClient/create_membership_rbac_role_binding.php + * + * @param CreateMembershipRBACRoleBindingRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createMembershipRBACRoleBinding(CreateMembershipRBACRoleBindingRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateMembershipRBACRoleBinding', $request, $callOptions)->wait(); + } + + /** + * Creates a Scope. + * + * The async variant is {@see GkeHubClient::createScopeAsync()} . + * + * @example samples/V1/GkeHubClient/create_scope.php + * + * @param CreateScopeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createScope(CreateScopeRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateScope', $request, $callOptions)->wait(); + } + + /** + * Creates a fleet namespace. + * + * The async variant is {@see GkeHubClient::createScopeNamespaceAsync()} . + * + * @example samples/V1/GkeHubClient/create_scope_namespace.php + * + * @param CreateScopeNamespaceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createScopeNamespace(CreateScopeNamespaceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateScopeNamespace', $request, $callOptions)->wait(); + } + + /** + * Creates a Scope RBACRoleBinding. + * + * The async variant is {@see GkeHubClient::createScopeRBACRoleBindingAsync()} . + * + * @example samples/V1/GkeHubClient/create_scope_rbac_role_binding.php + * + * @param CreateScopeRBACRoleBindingRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createScopeRBACRoleBinding(CreateScopeRBACRoleBindingRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateScopeRBACRoleBinding', $request, $callOptions)->wait(); + } + + /** + * Removes a Feature. + * + * The async variant is {@see GkeHubClient::deleteFeatureAsync()} . + * + * @example samples/V1/GkeHubClient/delete_feature.php + * + * @param DeleteFeatureRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteFeature(DeleteFeatureRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteFeature', $request, $callOptions)->wait(); + } + + /** + * Removes a Fleet. There must be no memberships remaining in the Fleet. + * + * The async variant is {@see GkeHubClient::deleteFleetAsync()} . + * + * @example samples/V1/GkeHubClient/delete_fleet.php + * + * @param DeleteFleetRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteFleet(DeleteFleetRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteFleet', $request, $callOptions)->wait(); + } + + /** + * Removes a Membership. + * + * **This is currently only supported for GKE clusters on Google Cloud**. + * To unregister other clusters, follow the instructions at + * https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster. + * + * The async variant is {@see GkeHubClient::deleteMembershipAsync()} . + * + * @example samples/V1/GkeHubClient/delete_membership.php + * + * @param DeleteMembershipRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteMembership(DeleteMembershipRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteMembership', $request, $callOptions)->wait(); + } + + /** + * Deletes a MembershipBinding. + * + * The async variant is {@see GkeHubClient::deleteMembershipBindingAsync()} . + * + * @example samples/V1/GkeHubClient/delete_membership_binding.php + * + * @param DeleteMembershipBindingRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteMembershipBinding(DeleteMembershipBindingRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteMembershipBinding', $request, $callOptions)->wait(); + } + + /** + * Deletes a Membership RBACRoleBinding. + * + * The async variant is {@see GkeHubClient::deleteMembershipRBACRoleBindingAsync()} + * . + * + * @example samples/V1/GkeHubClient/delete_membership_rbac_role_binding.php + * + * @param DeleteMembershipRBACRoleBindingRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteMembershipRBACRoleBinding(DeleteMembershipRBACRoleBindingRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteMembershipRBACRoleBinding', $request, $callOptions)->wait(); + } + + /** + * Deletes a Scope. + * + * The async variant is {@see GkeHubClient::deleteScopeAsync()} . + * + * @example samples/V1/GkeHubClient/delete_scope.php + * + * @param DeleteScopeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteScope(DeleteScopeRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteScope', $request, $callOptions)->wait(); + } + + /** + * Deletes a fleet namespace. + * + * The async variant is {@see GkeHubClient::deleteScopeNamespaceAsync()} . + * + * @example samples/V1/GkeHubClient/delete_scope_namespace.php + * + * @param DeleteScopeNamespaceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteScopeNamespace(DeleteScopeNamespaceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteScopeNamespace', $request, $callOptions)->wait(); + } + + /** + * Deletes a Scope RBACRoleBinding. + * + * The async variant is {@see GkeHubClient::deleteScopeRBACRoleBindingAsync()} . + * + * @example samples/V1/GkeHubClient/delete_scope_rbac_role_binding.php + * + * @param DeleteScopeRBACRoleBindingRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteScopeRBACRoleBinding(DeleteScopeRBACRoleBindingRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteScopeRBACRoleBinding', $request, $callOptions)->wait(); + } + + /** + * Generates the manifest for deployment of the GKE connect agent. + * + * **This method is used internally by Google-provided libraries.** + * Most clients should not need to call this method directly. + * + * The async variant is {@see GkeHubClient::generateConnectManifestAsync()} . + * + * @example samples/V1/GkeHubClient/generate_connect_manifest.php + * + * @param GenerateConnectManifestRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return GenerateConnectManifestResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function generateConnectManifest(GenerateConnectManifestRequest $request, array $callOptions = []): GenerateConnectManifestResponse + { + return $this->startApiCall('GenerateConnectManifest', $request, $callOptions)->wait(); + } + + /** + * Generates a YAML of the RBAC policies for the specified + * RoleBinding and its associated impersonation resources. + * + * The async variant is + * {@see GkeHubClient::generateMembershipRBACRoleBindingYAMLAsync()} . + * + * @example samples/V1/GkeHubClient/generate_membership_rbac_role_binding_yaml.php + * + * @param GenerateMembershipRBACRoleBindingYAMLRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return GenerateMembershipRBACRoleBindingYAMLResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function generateMembershipRBACRoleBindingYAML(GenerateMembershipRBACRoleBindingYAMLRequest $request, array $callOptions = []): GenerateMembershipRBACRoleBindingYAMLResponse + { + return $this->startApiCall('GenerateMembershipRBACRoleBindingYAML', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single Feature. + * + * The async variant is {@see GkeHubClient::getFeatureAsync()} . + * + * @example samples/V1/GkeHubClient/get_feature.php + * + * @param GetFeatureRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Feature + * + * @throws ApiException Thrown if the API call fails. + */ + public function getFeature(GetFeatureRequest $request, array $callOptions = []): Feature + { + return $this->startApiCall('GetFeature', $request, $callOptions)->wait(); + } + + /** + * Returns the details of a fleet. + * + * The async variant is {@see GkeHubClient::getFleetAsync()} . + * + * @example samples/V1/GkeHubClient/get_fleet.php + * + * @param GetFleetRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Fleet + * + * @throws ApiException Thrown if the API call fails. + */ + public function getFleet(GetFleetRequest $request, array $callOptions = []): Fleet + { + return $this->startApiCall('GetFleet', $request, $callOptions)->wait(); + } + + /** + * Gets the details of a Membership. + * + * The async variant is {@see GkeHubClient::getMembershipAsync()} . + * + * @example samples/V1/GkeHubClient/get_membership.php + * + * @param GetMembershipRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Membership + * + * @throws ApiException Thrown if the API call fails. + */ + public function getMembership(GetMembershipRequest $request, array $callOptions = []): Membership + { + return $this->startApiCall('GetMembership', $request, $callOptions)->wait(); + } + + /** + * Returns the details of a MembershipBinding. + * + * The async variant is {@see GkeHubClient::getMembershipBindingAsync()} . + * + * @example samples/V1/GkeHubClient/get_membership_binding.php + * + * @param GetMembershipBindingRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return MembershipBinding + * + * @throws ApiException Thrown if the API call fails. + */ + public function getMembershipBinding(GetMembershipBindingRequest $request, array $callOptions = []): MembershipBinding + { + return $this->startApiCall('GetMembershipBinding', $request, $callOptions)->wait(); + } + + /** + * Returns the details of a Membership RBACRoleBinding. + * + * The async variant is {@see GkeHubClient::getMembershipRBACRoleBindingAsync()} . + * + * @example samples/V1/GkeHubClient/get_membership_rbac_role_binding.php + * + * @param GetMembershipRBACRoleBindingRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return RBACRoleBinding + * + * @throws ApiException Thrown if the API call fails. + */ + public function getMembershipRBACRoleBinding(GetMembershipRBACRoleBindingRequest $request, array $callOptions = []): RBACRoleBinding + { + return $this->startApiCall('GetMembershipRBACRoleBinding', $request, $callOptions)->wait(); + } + + /** + * Returns the details of a Scope. + * + * The async variant is {@see GkeHubClient::getScopeAsync()} . + * + * @example samples/V1/GkeHubClient/get_scope.php + * + * @param GetScopeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Scope + * + * @throws ApiException Thrown if the API call fails. + */ + public function getScope(GetScopeRequest $request, array $callOptions = []): Scope + { + return $this->startApiCall('GetScope', $request, $callOptions)->wait(); + } + + /** + * Returns the details of a fleet namespace. + * + * The async variant is {@see GkeHubClient::getScopeNamespaceAsync()} . + * + * @example samples/V1/GkeHubClient/get_scope_namespace.php + * + * @param GetScopeNamespaceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 getScopeNamespace(GetScopeNamespaceRequest $request, array $callOptions = []): PBNamespace + { + return $this->startApiCall('GetScopeNamespace', $request, $callOptions)->wait(); + } + + /** + * Returns the details of a Scope RBACRoleBinding. + * + * The async variant is {@see GkeHubClient::getScopeRBACRoleBindingAsync()} . + * + * @example samples/V1/GkeHubClient/get_scope_rbac_role_binding.php + * + * @param GetScopeRBACRoleBindingRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return RBACRoleBinding + * + * @throws ApiException Thrown if the API call fails. + */ + public function getScopeRBACRoleBinding(GetScopeRBACRoleBindingRequest $request, array $callOptions = []): RBACRoleBinding + { + return $this->startApiCall('GetScopeRBACRoleBinding', $request, $callOptions)->wait(); + } + + /** + * Lists Memberships bound to a Scope. The response includes relevant + * Memberships from all regions. + * + * The async variant is {@see GkeHubClient::listBoundMembershipsAsync()} . + * + * @example samples/V1/GkeHubClient/list_bound_memberships.php + * + * @param ListBoundMembershipsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listBoundMemberships(ListBoundMembershipsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListBoundMemberships', $request, $callOptions); + } + + /** + * Lists Features in a given project and location. + * + * The async variant is {@see GkeHubClient::listFeaturesAsync()} . + * + * @example samples/V1/GkeHubClient/list_features.php + * + * @param ListFeaturesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listFeatures(ListFeaturesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListFeatures', $request, $callOptions); + } + + /** + * Returns all fleets within an organization or a project that the caller has + * access to. + * + * The async variant is {@see GkeHubClient::listFleetsAsync()} . + * + * @example samples/V1/GkeHubClient/list_fleets.php + * + * @param ListFleetsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listFleets(ListFleetsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListFleets', $request, $callOptions); + } + + /** + * Lists MembershipBindings. + * + * The async variant is {@see GkeHubClient::listMembershipBindingsAsync()} . + * + * @example samples/V1/GkeHubClient/list_membership_bindings.php + * + * @param ListMembershipBindingsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listMembershipBindings(ListMembershipBindingsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListMembershipBindings', $request, $callOptions); + } + + /** + * Lists all Membership RBACRoleBindings. + * + * The async variant is {@see GkeHubClient::listMembershipRBACRoleBindingsAsync()} + * . + * + * @example samples/V1/GkeHubClient/list_membership_rbac_role_bindings.php + * + * @param ListMembershipRBACRoleBindingsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listMembershipRBACRoleBindings(ListMembershipRBACRoleBindingsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListMembershipRBACRoleBindings', $request, $callOptions); + } + + /** + * Lists Memberships in a given project and location. + * + * The async variant is {@see GkeHubClient::listMembershipsAsync()} . + * + * @example samples/V1/GkeHubClient/list_memberships.php + * + * @param ListMembershipsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listMemberships(ListMembershipsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListMemberships', $request, $callOptions); + } + + /** + * Lists permitted Scopes. + * + * The async variant is {@see GkeHubClient::listPermittedScopesAsync()} . + * + * @example samples/V1/GkeHubClient/list_permitted_scopes.php + * + * @param ListPermittedScopesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listPermittedScopes(ListPermittedScopesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListPermittedScopes', $request, $callOptions); + } + + /** + * Lists fleet namespaces. + * + * The async variant is {@see GkeHubClient::listScopeNamespacesAsync()} . + * + * @example samples/V1/GkeHubClient/list_scope_namespaces.php + * + * @param ListScopeNamespacesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listScopeNamespaces(ListScopeNamespacesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListScopeNamespaces', $request, $callOptions); + } + + /** + * Lists all Scope RBACRoleBindings. + * + * The async variant is {@see GkeHubClient::listScopeRBACRoleBindingsAsync()} . + * + * @example samples/V1/GkeHubClient/list_scope_rbac_role_bindings.php + * + * @param ListScopeRBACRoleBindingsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listScopeRBACRoleBindings(ListScopeRBACRoleBindingsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListScopeRBACRoleBindings', $request, $callOptions); + } + + /** + * Lists Scopes. + * + * The async variant is {@see GkeHubClient::listScopesAsync()} . + * + * @example samples/V1/GkeHubClient/list_scopes.php + * + * @param ListScopesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listScopes(ListScopesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListScopes', $request, $callOptions); + } + + /** + * Updates an existing Feature. + * + * The async variant is {@see GkeHubClient::updateFeatureAsync()} . + * + * @example samples/V1/GkeHubClient/update_feature.php + * + * @param UpdateFeatureRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateFeature(UpdateFeatureRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateFeature', $request, $callOptions)->wait(); + } + + /** + * Updates a fleet. + * + * The async variant is {@see GkeHubClient::updateFleetAsync()} . + * + * @example samples/V1/GkeHubClient/update_fleet.php + * + * @param UpdateFleetRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateFleet(UpdateFleetRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateFleet', $request, $callOptions)->wait(); + } + + /** + * Updates an existing Membership. + * + * The async variant is {@see GkeHubClient::updateMembershipAsync()} . + * + * @example samples/V1/GkeHubClient/update_membership.php + * + * @param UpdateMembershipRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateMembership(UpdateMembershipRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateMembership', $request, $callOptions)->wait(); + } + + /** + * Updates a MembershipBinding. + * + * The async variant is {@see GkeHubClient::updateMembershipBindingAsync()} . + * + * @example samples/V1/GkeHubClient/update_membership_binding.php + * + * @param UpdateMembershipBindingRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateMembershipBinding(UpdateMembershipBindingRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateMembershipBinding', $request, $callOptions)->wait(); + } + + /** + * Updates a Membership RBACRoleBinding. + * + * The async variant is {@see GkeHubClient::updateMembershipRBACRoleBindingAsync()} + * . + * + * @example samples/V1/GkeHubClient/update_membership_rbac_role_binding.php + * + * @param UpdateMembershipRBACRoleBindingRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateMembershipRBACRoleBinding(UpdateMembershipRBACRoleBindingRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateMembershipRBACRoleBinding', $request, $callOptions)->wait(); + } + + /** + * Updates a scopes. + * + * The async variant is {@see GkeHubClient::updateScopeAsync()} . + * + * @example samples/V1/GkeHubClient/update_scope.php + * + * @param UpdateScopeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateScope(UpdateScopeRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateScope', $request, $callOptions)->wait(); + } + + /** + * Updates a fleet namespace. + * + * The async variant is {@see GkeHubClient::updateScopeNamespaceAsync()} . + * + * @example samples/V1/GkeHubClient/update_scope_namespace.php + * + * @param UpdateScopeNamespaceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateScopeNamespace(UpdateScopeNamespaceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateScopeNamespace', $request, $callOptions)->wait(); + } + + /** + * Updates a Scope RBACRoleBinding. + * + * The async variant is {@see GkeHubClient::updateScopeRBACRoleBindingAsync()} . + * + * @example samples/V1/GkeHubClient/update_scope_rbac_role_binding.php + * + * @param UpdateScopeRBACRoleBindingRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateScopeRBACRoleBinding(UpdateScopeRBACRoleBindingRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateScopeRBACRoleBinding', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/GkeHub/v1/src/V1/gapic_metadata.json b/owl-bot-staging/GkeHub/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..b97f2929ef6b --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/src/V1/gapic_metadata.json @@ -0,0 +1,238 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.gkehub.v1", + "libraryPackage": "Google\\Cloud\\GkeHub\\V1", + "services": { + "GkeHub": { + "clients": { + "grpc": { + "libraryClient": "GkeHubGapicClient", + "rpcs": { + "CreateFeature": { + "methods": [ + "createFeature" + ] + }, + "CreateFleet": { + "methods": [ + "createFleet" + ] + }, + "CreateMembership": { + "methods": [ + "createMembership" + ] + }, + "CreateMembershipBinding": { + "methods": [ + "createMembershipBinding" + ] + }, + "CreateMembershipRBACRoleBinding": { + "methods": [ + "createMembershipRBACRoleBinding" + ] + }, + "CreateScope": { + "methods": [ + "createScope" + ] + }, + "CreateScopeNamespace": { + "methods": [ + "createScopeNamespace" + ] + }, + "CreateScopeRBACRoleBinding": { + "methods": [ + "createScopeRBACRoleBinding" + ] + }, + "DeleteFeature": { + "methods": [ + "deleteFeature" + ] + }, + "DeleteFleet": { + "methods": [ + "deleteFleet" + ] + }, + "DeleteMembership": { + "methods": [ + "deleteMembership" + ] + }, + "DeleteMembershipBinding": { + "methods": [ + "deleteMembershipBinding" + ] + }, + "DeleteMembershipRBACRoleBinding": { + "methods": [ + "deleteMembershipRBACRoleBinding" + ] + }, + "DeleteScope": { + "methods": [ + "deleteScope" + ] + }, + "DeleteScopeNamespace": { + "methods": [ + "deleteScopeNamespace" + ] + }, + "DeleteScopeRBACRoleBinding": { + "methods": [ + "deleteScopeRBACRoleBinding" + ] + }, + "GenerateConnectManifest": { + "methods": [ + "generateConnectManifest" + ] + }, + "GenerateMembershipRBACRoleBindingYAML": { + "methods": [ + "generateMembershipRBACRoleBindingYAML" + ] + }, + "GetFeature": { + "methods": [ + "getFeature" + ] + }, + "GetFleet": { + "methods": [ + "getFleet" + ] + }, + "GetMembership": { + "methods": [ + "getMembership" + ] + }, + "GetMembershipBinding": { + "methods": [ + "getMembershipBinding" + ] + }, + "GetMembershipRBACRoleBinding": { + "methods": [ + "getMembershipRBACRoleBinding" + ] + }, + "GetScope": { + "methods": [ + "getScope" + ] + }, + "GetScopeNamespace": { + "methods": [ + "getScopeNamespace" + ] + }, + "GetScopeRBACRoleBinding": { + "methods": [ + "getScopeRBACRoleBinding" + ] + }, + "ListBoundMemberships": { + "methods": [ + "listBoundMemberships" + ] + }, + "ListFeatures": { + "methods": [ + "listFeatures" + ] + }, + "ListFleets": { + "methods": [ + "listFleets" + ] + }, + "ListMembershipBindings": { + "methods": [ + "listMembershipBindings" + ] + }, + "ListMembershipRBACRoleBindings": { + "methods": [ + "listMembershipRBACRoleBindings" + ] + }, + "ListMemberships": { + "methods": [ + "listMemberships" + ] + }, + "ListPermittedScopes": { + "methods": [ + "listPermittedScopes" + ] + }, + "ListScopeNamespaces": { + "methods": [ + "listScopeNamespaces" + ] + }, + "ListScopeRBACRoleBindings": { + "methods": [ + "listScopeRBACRoleBindings" + ] + }, + "ListScopes": { + "methods": [ + "listScopes" + ] + }, + "UpdateFeature": { + "methods": [ + "updateFeature" + ] + }, + "UpdateFleet": { + "methods": [ + "updateFleet" + ] + }, + "UpdateMembership": { + "methods": [ + "updateMembership" + ] + }, + "UpdateMembershipBinding": { + "methods": [ + "updateMembershipBinding" + ] + }, + "UpdateMembershipRBACRoleBinding": { + "methods": [ + "updateMembershipRBACRoleBinding" + ] + }, + "UpdateScope": { + "methods": [ + "updateScope" + ] + }, + "UpdateScopeNamespace": { + "methods": [ + "updateScopeNamespace" + ] + }, + "UpdateScopeRBACRoleBinding": { + "methods": [ + "updateScopeRBACRoleBinding" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/GkeHub/v1/src/V1/resources/gke_hub_client_config.json b/owl-bot-staging/GkeHub/v1/src/V1/resources/gke_hub_client_config.json new file mode 100644 index 000000000000..71f5c1b998c6 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/src/V1/resources/gke_hub_client_config.json @@ -0,0 +1,254 @@ +{ + "interfaces": { + "google.cloud.gkehub.v1.GkeHub": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "CreateFeature": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreateFleet": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreateMembership": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreateMembershipBinding": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreateMembershipRBACRoleBinding": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreateScope": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreateScopeNamespace": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreateScopeRBACRoleBinding": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteFeature": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteFleet": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteMembership": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteMembershipBinding": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteMembershipRBACRoleBinding": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteScope": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteScopeNamespace": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteScopeRBACRoleBinding": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GenerateConnectManifest": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GenerateMembershipRBACRoleBindingYAML": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetFeature": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetFleet": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetMembership": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetMembershipBinding": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetMembershipRBACRoleBinding": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetScope": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetScopeNamespace": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetScopeRBACRoleBinding": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListBoundMemberships": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListFeatures": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListFleets": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListMembershipBindings": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListMembershipRBACRoleBindings": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListMemberships": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListPermittedScopes": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListScopeNamespaces": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListScopeRBACRoleBindings": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListScopes": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateFeature": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateFleet": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateMembership": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateMembershipBinding": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateMembershipRBACRoleBinding": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateScope": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateScopeNamespace": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateScopeRBACRoleBinding": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/GkeHub/v1/src/V1/resources/gke_hub_descriptor_config.php b/owl-bot-staging/GkeHub/v1/src/V1/resources/gke_hub_descriptor_config.php new file mode 100644 index 000000000000..e44cf5183027 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/src/V1/resources/gke_hub_descriptor_config.php @@ -0,0 +1,824 @@ + [ + 'google.cloud.gkehub.v1.GkeHub' => [ + 'CreateFeature' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\GkeHub\V1\Feature', + 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateFleet' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\GkeHub\V1\Fleet', + 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateMembership' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\GkeHub\V1\Membership', + 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateMembershipBinding' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\GkeHub\V1\MembershipBinding', + 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateMembershipRBACRoleBinding' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\GkeHub\V1\RBACRoleBinding', + 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateScope' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\GkeHub\V1\Scope', + 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateScopeNamespace' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\GkeHub\V1\PBNamespace', + 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateScopeRBACRoleBinding' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\GkeHub\V1\RBACRoleBinding', + 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteFeature' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteFleet' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteMembership' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteMembershipBinding' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteMembershipRBACRoleBinding' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteScope' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteScopeNamespace' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteScopeRBACRoleBinding' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateFeature' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\GkeHub\V1\Feature', + 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateFleet' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\GkeHub\V1\Fleet', + 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'fleet.name', + 'fieldAccessors' => [ + 'getFleet', + 'getName', + ], + ], + ], + ], + 'UpdateMembership' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\GkeHub\V1\Membership', + 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateMembershipBinding' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\GkeHub\V1\MembershipBinding', + 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'membership_binding.name', + 'fieldAccessors' => [ + 'getMembershipBinding', + 'getName', + ], + ], + ], + ], + 'UpdateMembershipRBACRoleBinding' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\GkeHub\V1\RBACRoleBinding', + 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'rbacrolebinding.name', + 'fieldAccessors' => [ + 'getRbacrolebinding', + 'getName', + ], + ], + ], + ], + 'UpdateScope' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\GkeHub\V1\Scope', + 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'scope.name', + 'fieldAccessors' => [ + 'getScope', + 'getName', + ], + ], + ], + ], + 'UpdateScopeNamespace' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\GkeHub\V1\PBNamespace', + 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'scope_namespace.name', + 'fieldAccessors' => [ + 'getScopeNamespace', + 'getName', + ], + ], + ], + ], + 'UpdateScopeRBACRoleBinding' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\GkeHub\V1\RBACRoleBinding', + 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'rbacrolebinding.name', + 'fieldAccessors' => [ + 'getRbacrolebinding', + 'getName', + ], + ], + ], + ], + 'GenerateConnectManifest' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\GkeHub\V1\GenerateConnectManifestResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GenerateMembershipRBACRoleBindingYAML' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\GkeHub\V1\GenerateMembershipRBACRoleBindingYAMLResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'GetFeature' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\GkeHub\V1\Feature', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetFleet' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\GkeHub\V1\Fleet', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetMembership' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\GkeHub\V1\Membership', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetMembershipBinding' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\GkeHub\V1\MembershipBinding', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetMembershipRBACRoleBinding' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\GkeHub\V1\RBACRoleBinding', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetScope' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\GkeHub\V1\Scope', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetScopeNamespace' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\GkeHub\V1\PBNamespace', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetScopeRBACRoleBinding' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\GkeHub\V1\RBACRoleBinding', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListBoundMemberships' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getMemberships', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\GkeHub\V1\ListBoundMembershipsResponse', + 'headerParams' => [ + [ + 'keyName' => 'scope_name', + 'fieldAccessors' => [ + 'getScopeName', + ], + ], + ], + ], + 'ListFeatures' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getResources', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\GkeHub\V1\ListFeaturesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListFleets' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getFleets', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\GkeHub\V1\ListFleetsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListMembershipBindings' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getMembershipBindings', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\GkeHub\V1\ListMembershipBindingsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListMembershipRBACRoleBindings' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getRbacrolebindings', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\GkeHub\V1\ListMembershipRBACRoleBindingsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListMemberships' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getResources', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\GkeHub\V1\ListMembershipsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListPermittedScopes' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getScopes', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\GkeHub\V1\ListPermittedScopesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListScopeNamespaces' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getScopeNamespaces', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\GkeHub\V1\ListScopeNamespacesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListScopeRBACRoleBindings' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getRbacrolebindings', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\GkeHub\V1\ListScopeRBACRoleBindingsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListScopes' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getScopes', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\GkeHub\V1\ListScopesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'feature' => 'projects/{project}/locations/{location}/features/{feature}', + 'fleet' => 'projects/{project}/locations/{location}/fleets/{fleet}', + 'location' => 'projects/{project}/locations/{location}', + 'membership' => 'projects/{project}/locations/{location}/memberships/{membership}', + 'membershipBinding' => 'projects/{project}/locations/{location}/memberships/{membership}/bindings/{membershipbinding}', + 'namespace' => 'projects/{project}/locations/{location}/scopes/{scope}/namespaces/{namespace}', + 'organizationLocationFleet' => 'organizations/{organization}/locations/{location}/fleets/{fleet}', + 'projectLocationFleet' => 'projects/{project}/locations/{location}/fleets/{fleet}', + 'projectLocationMembershipRbacrolebinding' => 'projects/{project}/locations/{location}/memberships/{membership}/rbacrolebindings/{rbacrolebinding}', + 'projectLocationScopeRbacrolebinding' => 'projects/{project}/locations/{location}/scopes/{scope}/rbacrolebindings/{rbacrolebinding}', + 'rBACRoleBinding' => 'projects/{project}/locations/{location}/scopes/{scope}/rbacrolebindings/{rbacrolebinding}', + 'scope' => 'projects/{project}/locations/{location}/scopes/{scope}', + ], + ], + ], +]; diff --git a/owl-bot-staging/GkeHub/v1/src/V1/resources/gke_hub_rest_client_config.php b/owl-bot-staging/GkeHub/v1/src/V1/resources/gke_hub_rest_client_config.php new file mode 100644 index 000000000000..91b26a056ceb --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/src/V1/resources/gke_hub_rest_client_config.php @@ -0,0 +1,709 @@ + [ + 'google.cloud.gkehub.v1.GkeHub' => [ + 'CreateFeature' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/features', + 'body' => 'resource', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateFleet' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/fleets', + 'body' => 'fleet', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateMembership' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/memberships', + 'body' => 'resource', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'membership_id', + ], + ], + 'CreateMembershipBinding' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/memberships/*}/bindings', + 'body' => 'membership_binding', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'membership_binding_id', + ], + ], + 'CreateMembershipRBACRoleBinding' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/memberships/*}/rbacrolebindings', + 'body' => 'rbacrolebinding', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'rbacrolebinding_id', + ], + ], + 'CreateScope' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/scopes', + 'body' => 'scope', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'scope_id', + ], + ], + 'CreateScopeNamespace' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/scopes/*}/namespaces', + 'body' => 'scope_namespace', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'scope_namespace_id', + ], + ], + 'CreateScopeRBACRoleBinding' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/scopes/*}/rbacrolebindings', + 'body' => 'rbacrolebinding', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'rbacrolebinding_id', + ], + ], + 'DeleteFeature' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/features/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteFleet' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/fleets/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteMembership' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/memberships/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteMembershipBinding' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/memberships/*/bindings/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteMembershipRBACRoleBinding' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/memberships/*/rbacrolebindings/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteScope' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/scopes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteScopeNamespace' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/scopes/*/namespaces/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteScopeRBACRoleBinding' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/scopes/*/rbacrolebindings/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GenerateConnectManifest' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/memberships/*}:generateConnectManifest', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GenerateMembershipRBACRoleBindingYAML' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/memberships/*}/rbacrolebindings:generateMembershipRBACRoleBindingYAML', + 'body' => 'rbacrolebinding', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'GetFeature' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/features/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetFleet' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/fleets/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetMembership' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/memberships/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetMembershipBinding' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/memberships/*/bindings/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetMembershipRBACRoleBinding' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/memberships/*/rbacrolebindings/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetScope' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/scopes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetScopeNamespace' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/scopes/*/namespaces/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetScopeRBACRoleBinding' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/scopes/*/rbacrolebindings/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListBoundMemberships' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{scope_name=projects/*/locations/*/scopes/*}:listMemberships', + 'placeholders' => [ + 'scope_name' => [ + 'getters' => [ + 'getScopeName', + ], + ], + ], + ], + 'ListFeatures' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/features', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListFleets' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/fleets', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=organizations/*/locations/*}/fleets', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListMembershipBindings' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/memberships/*}/bindings', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListMembershipRBACRoleBindings' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/memberships/*}/rbacrolebindings', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListMemberships' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/memberships', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListPermittedScopes' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/scopes:listPermitted', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListScopeNamespaces' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/scopes/*}/namespaces', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListScopeRBACRoleBindings' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/scopes/*}/rbacrolebindings', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListScopes' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/scopes', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateFeature' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/features/*}', + 'body' => 'resource', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateFleet' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{fleet.name=projects/*/locations/*/fleets/*}', + 'body' => 'fleet', + 'placeholders' => [ + 'fleet.name' => [ + 'getters' => [ + 'getFleet', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateMembership' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/memberships/*}', + 'body' => 'resource', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateMembershipBinding' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{membership_binding.name=projects/*/locations/*/memberships/*/bindings/*}', + 'body' => 'membership_binding', + 'placeholders' => [ + 'membership_binding.name' => [ + 'getters' => [ + 'getMembershipBinding', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateMembershipRBACRoleBinding' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{rbacrolebinding.name=projects/*/locations/*/memberships/*/rbacrolebindings/*}', + 'body' => 'rbacrolebinding', + 'placeholders' => [ + 'rbacrolebinding.name' => [ + 'getters' => [ + 'getRbacrolebinding', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateScope' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{scope.name=projects/*/locations/*/scopes/*}', + 'body' => 'scope', + 'placeholders' => [ + 'scope.name' => [ + 'getters' => [ + 'getScope', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateScopeNamespace' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{scope_namespace.name=projects/*/locations/*/scopes/*/namespaces/*}', + 'body' => 'scope_namespace', + 'placeholders' => [ + 'scope_namespace.name' => [ + 'getters' => [ + 'getScopeNamespace', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateScopeRBACRoleBinding' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{rbacrolebinding.name=projects/*/locations/*/scopes/*/rbacrolebindings/*}', + 'body' => 'rbacrolebinding', + 'placeholders' => [ + 'rbacrolebinding.name' => [ + 'getters' => [ + 'getRbacrolebinding', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + '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.iam.v1.IAMPolicy' => [ + 'GetIamPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/memberships/*}:getIamPolicy', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/features/*}:getIamPolicy', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/memberships/*}:setIamPolicy', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/features/*}:setIamPolicy', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/memberships/*}:testIamPermissions', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/features/*}:testIamPermissions', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/GkeHub/v1/tests/Unit/V1/Client/GkeHubClientTest.php b/owl-bot-staging/GkeHub/v1/tests/Unit/V1/Client/GkeHubClientTest.php new file mode 100644 index 000000000000..c597159a407a --- /dev/null +++ b/owl-bot-staging/GkeHub/v1/tests/Unit/V1/Client/GkeHubClientTest.php @@ -0,0 +1,4695 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return GkeHubClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new GkeHubClient($options); + } + + /** @test */ + public function createFeatureTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createFeatureTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $expectedResponse = new Feature(); + $expectedResponse->setName($name); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createFeatureTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + $request = new CreateFeatureRequest(); + $response = $gapicClient->createFeature($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/CreateFeature', $actualApiFuncCall); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createFeatureTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createFeatureExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createFeatureTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + $request = new CreateFeatureRequest(); + $response = $gapicClient->createFeature($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createFeatureTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createFleetTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createFleetTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $uid = 'uid115792'; + $expectedResponse = new Fleet(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createFleetTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $fleet = new Fleet(); + $request = (new CreateFleetRequest()) + ->setParent($formattedParent) + ->setFleet($fleet); + $response = $gapicClient->createFleet($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/CreateFleet', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getFleet(); + $this->assertProtobufEquals($fleet, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createFleetTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createFleetExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createFleetTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $fleet = new Fleet(); + $request = (new CreateFleetRequest()) + ->setParent($formattedParent) + ->setFleet($fleet); + $response = $gapicClient->createFleet($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createFleetTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createMembershipTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createMembershipTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $externalId = 'externalId-1153075697'; + $uniqueId = 'uniqueId-538310583'; + $expectedResponse = new Membership(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setExternalId($externalId); + $expectedResponse->setUniqueId($uniqueId); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createMembershipTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $membershipId = 'membershipId-1132211676'; + $resource = new Membership(); + $request = (new CreateMembershipRequest()) + ->setParent($formattedParent) + ->setMembershipId($membershipId) + ->setResource($resource); + $response = $gapicClient->createMembership($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/CreateMembership', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getMembershipId(); + $this->assertProtobufEquals($membershipId, $actualValue); + $actualValue = $actualApiRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createMembershipTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createMembershipExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createMembershipTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $membershipId = 'membershipId-1132211676'; + $resource = new Membership(); + $request = (new CreateMembershipRequest()) + ->setParent($formattedParent) + ->setMembershipId($membershipId) + ->setResource($resource); + $response = $gapicClient->createMembership($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createMembershipTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createMembershipBindingTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createMembershipBindingTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $scope = 'scope109264468'; + $name = 'name3373707'; + $uid = 'uid115792'; + $expectedResponse = new MembershipBinding(); + $expectedResponse->setScope($scope); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createMembershipBindingTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); + $membershipBinding = new MembershipBinding(); + $membershipBindingId = 'membershipBindingId-1012849378'; + $request = (new CreateMembershipBindingRequest()) + ->setParent($formattedParent) + ->setMembershipBinding($membershipBinding) + ->setMembershipBindingId($membershipBindingId); + $response = $gapicClient->createMembershipBinding($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/CreateMembershipBinding', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getMembershipBinding(); + $this->assertProtobufEquals($membershipBinding, $actualValue); + $actualValue = $actualApiRequestObject->getMembershipBindingId(); + $this->assertProtobufEquals($membershipBindingId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createMembershipBindingTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createMembershipBindingExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createMembershipBindingTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); + $membershipBinding = new MembershipBinding(); + $membershipBindingId = 'membershipBindingId-1012849378'; + $request = (new CreateMembershipBindingRequest()) + ->setParent($formattedParent) + ->setMembershipBinding($membershipBinding) + ->setMembershipBindingId($membershipBindingId); + $response = $gapicClient->createMembershipBinding($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createMembershipBindingTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createMembershipRBACRoleBindingTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createMembershipRBACRoleBindingTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $user = 'user3599307'; + $name = 'name3373707'; + $uid = 'uid115792'; + $expectedResponse = new RBACRoleBinding(); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createMembershipRBACRoleBindingTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); + $rbacrolebindingId = 'rbacrolebindingId-114871075'; + $rbacrolebinding = new RBACRoleBinding(); + $rbacrolebindingRole = new Role(); + $rbacrolebinding->setRole($rbacrolebindingRole); + $request = (new CreateMembershipRBACRoleBindingRequest()) + ->setParent($formattedParent) + ->setRbacrolebindingId($rbacrolebindingId) + ->setRbacrolebinding($rbacrolebinding); + $response = $gapicClient->createMembershipRBACRoleBinding($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/CreateMembershipRBACRoleBinding', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getRbacrolebindingId(); + $this->assertProtobufEquals($rbacrolebindingId, $actualValue); + $actualValue = $actualApiRequestObject->getRbacrolebinding(); + $this->assertProtobufEquals($rbacrolebinding, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createMembershipRBACRoleBindingTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createMembershipRBACRoleBindingExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createMembershipRBACRoleBindingTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); + $rbacrolebindingId = 'rbacrolebindingId-114871075'; + $rbacrolebinding = new RBACRoleBinding(); + $rbacrolebindingRole = new Role(); + $rbacrolebinding->setRole($rbacrolebindingRole); + $request = (new CreateMembershipRBACRoleBindingRequest()) + ->setParent($formattedParent) + ->setRbacrolebindingId($rbacrolebindingId) + ->setRbacrolebinding($rbacrolebinding); + $response = $gapicClient->createMembershipRBACRoleBinding($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createMembershipRBACRoleBindingTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createScopeTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createScopeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uid = 'uid115792'; + $expectedResponse = new Scope(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createScopeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $scopeId = 'scopeId-487349530'; + $scope = new Scope(); + $request = (new CreateScopeRequest()) + ->setParent($formattedParent) + ->setScopeId($scopeId) + ->setScope($scope); + $response = $gapicClient->createScope($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/CreateScope', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getScopeId(); + $this->assertProtobufEquals($scopeId, $actualValue); + $actualValue = $actualApiRequestObject->getScope(); + $this->assertProtobufEquals($scope, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createScopeTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createScopeExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createScopeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $scopeId = 'scopeId-487349530'; + $scope = new Scope(); + $request = (new CreateScopeRequest()) + ->setParent($formattedParent) + ->setScopeId($scopeId) + ->setScope($scope); + $response = $gapicClient->createScope($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createScopeTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createScopeNamespaceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createScopeNamespaceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uid = 'uid115792'; + $scope = 'scope109264468'; + $expectedResponse = new PBNamespace(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setScope($scope); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createScopeNamespaceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); + $scopeNamespaceId = 'scopeNamespaceId-236818806'; + $scopeNamespace = new PBNamespace(); + $scopeNamespaceScope = $gapicClient->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); + $scopeNamespace->setScope($scopeNamespaceScope); + $request = (new CreateScopeNamespaceRequest()) + ->setParent($formattedParent) + ->setScopeNamespaceId($scopeNamespaceId) + ->setScopeNamespace($scopeNamespace); + $response = $gapicClient->createScopeNamespace($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/CreateScopeNamespace', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getScopeNamespaceId(); + $this->assertProtobufEquals($scopeNamespaceId, $actualValue); + $actualValue = $actualApiRequestObject->getScopeNamespace(); + $this->assertProtobufEquals($scopeNamespace, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createScopeNamespaceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createScopeNamespaceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createScopeNamespaceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); + $scopeNamespaceId = 'scopeNamespaceId-236818806'; + $scopeNamespace = new PBNamespace(); + $scopeNamespaceScope = $gapicClient->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); + $scopeNamespace->setScope($scopeNamespaceScope); + $request = (new CreateScopeNamespaceRequest()) + ->setParent($formattedParent) + ->setScopeNamespaceId($scopeNamespaceId) + ->setScopeNamespace($scopeNamespace); + $response = $gapicClient->createScopeNamespace($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createScopeNamespaceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createScopeRBACRoleBindingTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createScopeRBACRoleBindingTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $user = 'user3599307'; + $name = 'name3373707'; + $uid = 'uid115792'; + $expectedResponse = new RBACRoleBinding(); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createScopeRBACRoleBindingTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); + $rbacrolebindingId = 'rbacrolebindingId-114871075'; + $rbacrolebinding = new RBACRoleBinding(); + $rbacrolebindingRole = new Role(); + $rbacrolebinding->setRole($rbacrolebindingRole); + $request = (new CreateScopeRBACRoleBindingRequest()) + ->setParent($formattedParent) + ->setRbacrolebindingId($rbacrolebindingId) + ->setRbacrolebinding($rbacrolebinding); + $response = $gapicClient->createScopeRBACRoleBinding($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/CreateScopeRBACRoleBinding', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getRbacrolebindingId(); + $this->assertProtobufEquals($rbacrolebindingId, $actualValue); + $actualValue = $actualApiRequestObject->getRbacrolebinding(); + $this->assertProtobufEquals($rbacrolebinding, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createScopeRBACRoleBindingTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createScopeRBACRoleBindingExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createScopeRBACRoleBindingTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); + $rbacrolebindingId = 'rbacrolebindingId-114871075'; + $rbacrolebinding = new RBACRoleBinding(); + $rbacrolebindingRole = new Role(); + $rbacrolebinding->setRole($rbacrolebindingRole); + $request = (new CreateScopeRBACRoleBindingRequest()) + ->setParent($formattedParent) + ->setRbacrolebindingId($rbacrolebindingId) + ->setRbacrolebinding($rbacrolebinding); + $response = $gapicClient->createScopeRBACRoleBinding($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createScopeRBACRoleBindingTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteFeatureTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteFeatureTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteFeatureTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + $request = new DeleteFeatureRequest(); + $response = $gapicClient->deleteFeature($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/DeleteFeature', $actualApiFuncCall); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteFeatureTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteFeatureExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteFeatureTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + $request = new DeleteFeatureRequest(); + $response = $gapicClient->deleteFeature($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteFeatureTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteFleetTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteFleetTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteFleetTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->fleetName('[PROJECT]', '[LOCATION]', '[FLEET]'); + $request = (new DeleteFleetRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteFleet($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/DeleteFleet', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteFleetTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteFleetExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteFleetTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->fleetName('[PROJECT]', '[LOCATION]', '[FLEET]'); + $request = (new DeleteFleetRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteFleet($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteFleetTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteMembershipTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteMembershipTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteMembershipTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); + $request = (new DeleteMembershipRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteMembership($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/DeleteMembership', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteMembershipTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteMembershipExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteMembershipTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); + $request = (new DeleteMembershipRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteMembership($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteMembershipTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteMembershipBindingTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteMembershipBindingTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteMembershipBindingTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->membershipBindingName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]', '[MEMBERSHIPBINDING]'); + $request = (new DeleteMembershipBindingRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteMembershipBinding($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/DeleteMembershipBinding', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteMembershipBindingTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteMembershipBindingExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteMembershipBindingTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->membershipBindingName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]', '[MEMBERSHIPBINDING]'); + $request = (new DeleteMembershipBindingRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteMembershipBinding($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteMembershipBindingTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteMembershipRBACRoleBindingTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteMembershipRBACRoleBindingTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteMembershipRBACRoleBindingTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->rBACRoleBindingName('[PROJECT]', '[LOCATION]', '[SCOPE]', '[RBACROLEBINDING]'); + $request = (new DeleteMembershipRBACRoleBindingRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteMembershipRBACRoleBinding($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/DeleteMembershipRBACRoleBinding', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteMembershipRBACRoleBindingTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteMembershipRBACRoleBindingExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteMembershipRBACRoleBindingTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->rBACRoleBindingName('[PROJECT]', '[LOCATION]', '[SCOPE]', '[RBACROLEBINDING]'); + $request = (new DeleteMembershipRBACRoleBindingRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteMembershipRBACRoleBinding($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteMembershipRBACRoleBindingTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteScopeTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteScopeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteScopeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); + $request = (new DeleteScopeRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteScope($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/DeleteScope', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteScopeTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteScopeExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteScopeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); + $request = (new DeleteScopeRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteScope($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteScopeTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteScopeNamespaceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteScopeNamespaceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteScopeNamespaceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->namespaceName('[PROJECT]', '[LOCATION]', '[SCOPE]', '[NAMESPACE]'); + $request = (new DeleteScopeNamespaceRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteScopeNamespace($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/DeleteScopeNamespace', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteScopeNamespaceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteScopeNamespaceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteScopeNamespaceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->namespaceName('[PROJECT]', '[LOCATION]', '[SCOPE]', '[NAMESPACE]'); + $request = (new DeleteScopeNamespaceRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteScopeNamespace($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteScopeNamespaceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteScopeRBACRoleBindingTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteScopeRBACRoleBindingTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteScopeRBACRoleBindingTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->rBACRoleBindingName('[PROJECT]', '[LOCATION]', '[SCOPE]', '[RBACROLEBINDING]'); + $request = (new DeleteScopeRBACRoleBindingRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteScopeRBACRoleBinding($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/DeleteScopeRBACRoleBinding', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteScopeRBACRoleBindingTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteScopeRBACRoleBindingExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteScopeRBACRoleBindingTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->rBACRoleBindingName('[PROJECT]', '[LOCATION]', '[SCOPE]', '[RBACROLEBINDING]'); + $request = (new DeleteScopeRBACRoleBindingRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteScopeRBACRoleBinding($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteScopeRBACRoleBindingTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function generateConnectManifestTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GenerateConnectManifestResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); + $request = (new GenerateConnectManifestRequest()) + ->setName($formattedName); + $response = $gapicClient->generateConnectManifest($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.gkehub.v1.GkeHub/GenerateConnectManifest', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function generateConnectManifestExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); + $request = (new GenerateConnectManifestRequest()) + ->setName($formattedName); + try { + $gapicClient->generateConnectManifest($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 generateMembershipRBACRoleBindingYAMLTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $roleBindingsYaml = 'roleBindingsYaml1394984367'; + $expectedResponse = new GenerateMembershipRBACRoleBindingYAMLResponse(); + $expectedResponse->setRoleBindingsYaml($roleBindingsYaml); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); + $rbacrolebindingId = 'rbacrolebindingId-114871075'; + $rbacrolebinding = new RBACRoleBinding(); + $rbacrolebindingRole = new Role(); + $rbacrolebinding->setRole($rbacrolebindingRole); + $request = (new GenerateMembershipRBACRoleBindingYAMLRequest()) + ->setParent($formattedParent) + ->setRbacrolebindingId($rbacrolebindingId) + ->setRbacrolebinding($rbacrolebinding); + $response = $gapicClient->generateMembershipRBACRoleBindingYAML($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.gkehub.v1.GkeHub/GenerateMembershipRBACRoleBindingYAML', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getRbacrolebindingId(); + $this->assertProtobufEquals($rbacrolebindingId, $actualValue); + $actualValue = $actualRequestObject->getRbacrolebinding(); + $this->assertProtobufEquals($rbacrolebinding, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function generateMembershipRBACRoleBindingYAMLExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); + $rbacrolebindingId = 'rbacrolebindingId-114871075'; + $rbacrolebinding = new RBACRoleBinding(); + $rbacrolebindingRole = new Role(); + $rbacrolebinding->setRole($rbacrolebindingRole); + $request = (new GenerateMembershipRBACRoleBindingYAMLRequest()) + ->setParent($formattedParent) + ->setRbacrolebindingId($rbacrolebindingId) + ->setRbacrolebinding($rbacrolebinding); + try { + $gapicClient->generateMembershipRBACRoleBindingYAML($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 getFeatureTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new Feature(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + $request = new GetFeatureRequest(); + $response = $gapicClient->getFeature($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.gkehub.v1.GkeHub/GetFeature', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getFeatureExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 GetFeatureRequest(); + try { + $gapicClient->getFeature($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 getFleetTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $uid = 'uid115792'; + $expectedResponse = new Fleet(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setUid($uid); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->fleetName('[PROJECT]', '[LOCATION]', '[FLEET]'); + $request = (new GetFleetRequest()) + ->setName($formattedName); + $response = $gapicClient->getFleet($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.gkehub.v1.GkeHub/GetFleet', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getFleetExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->fleetName('[PROJECT]', '[LOCATION]', '[FLEET]'); + $request = (new GetFleetRequest()) + ->setName($formattedName); + try { + $gapicClient->getFleet($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 getMembershipTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $externalId = 'externalId-1153075697'; + $uniqueId = 'uniqueId-538310583'; + $expectedResponse = new Membership(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setExternalId($externalId); + $expectedResponse->setUniqueId($uniqueId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); + $request = (new GetMembershipRequest()) + ->setName($formattedName); + $response = $gapicClient->getMembership($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.gkehub.v1.GkeHub/GetMembership', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getMembershipExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); + $request = (new GetMembershipRequest()) + ->setName($formattedName); + try { + $gapicClient->getMembership($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 getMembershipBindingTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $scope = 'scope109264468'; + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $expectedResponse = new MembershipBinding(); + $expectedResponse->setScope($scope); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->membershipBindingName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]', '[MEMBERSHIPBINDING]'); + $request = (new GetMembershipBindingRequest()) + ->setName($formattedName); + $response = $gapicClient->getMembershipBinding($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.gkehub.v1.GkeHub/GetMembershipBinding', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getMembershipBindingExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->membershipBindingName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]', '[MEMBERSHIPBINDING]'); + $request = (new GetMembershipBindingRequest()) + ->setName($formattedName); + try { + $gapicClient->getMembershipBinding($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 getMembershipRBACRoleBindingTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $user = 'user3599307'; + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $expectedResponse = new RBACRoleBinding(); + $expectedResponse->setUser($user); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->rBACRoleBindingName('[PROJECT]', '[LOCATION]', '[SCOPE]', '[RBACROLEBINDING]'); + $request = (new GetMembershipRBACRoleBindingRequest()) + ->setName($formattedName); + $response = $gapicClient->getMembershipRBACRoleBinding($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.gkehub.v1.GkeHub/GetMembershipRBACRoleBinding', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getMembershipRBACRoleBindingExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->rBACRoleBindingName('[PROJECT]', '[LOCATION]', '[SCOPE]', '[RBACROLEBINDING]'); + $request = (new GetMembershipRBACRoleBindingRequest()) + ->setName($formattedName); + try { + $gapicClient->getMembershipRBACRoleBinding($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 getScopeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $expectedResponse = new Scope(); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); + $request = (new GetScopeRequest()) + ->setName($formattedName); + $response = $gapicClient->getScope($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.gkehub.v1.GkeHub/GetScope', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getScopeExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); + $request = (new GetScopeRequest()) + ->setName($formattedName); + try { + $gapicClient->getScope($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 getScopeNamespaceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $scope = 'scope109264468'; + $expectedResponse = new PBNamespace(); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $expectedResponse->setScope($scope); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->namespaceName('[PROJECT]', '[LOCATION]', '[SCOPE]', '[NAMESPACE]'); + $request = (new GetScopeNamespaceRequest()) + ->setName($formattedName); + $response = $gapicClient->getScopeNamespace($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.gkehub.v1.GkeHub/GetScopeNamespace', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getScopeNamespaceExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]', '[SCOPE]', '[NAMESPACE]'); + $request = (new GetScopeNamespaceRequest()) + ->setName($formattedName); + try { + $gapicClient->getScopeNamespace($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 getScopeRBACRoleBindingTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $user = 'user3599307'; + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $expectedResponse = new RBACRoleBinding(); + $expectedResponse->setUser($user); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->rBACRoleBindingName('[PROJECT]', '[LOCATION]', '[SCOPE]', '[RBACROLEBINDING]'); + $request = (new GetScopeRBACRoleBindingRequest()) + ->setName($formattedName); + $response = $gapicClient->getScopeRBACRoleBinding($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.gkehub.v1.GkeHub/GetScopeRBACRoleBinding', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getScopeRBACRoleBindingExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->rBACRoleBindingName('[PROJECT]', '[LOCATION]', '[SCOPE]', '[RBACROLEBINDING]'); + $request = (new GetScopeRBACRoleBindingRequest()) + ->setName($formattedName); + try { + $gapicClient->getScopeRBACRoleBinding($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 listBoundMembershipsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $membershipsElement = new Membership(); + $memberships = [ + $membershipsElement, + ]; + $expectedResponse = new ListBoundMembershipsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setMemberships($memberships); + $transport->addResponse($expectedResponse); + // Mock request + $formattedScopeName = $gapicClient->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); + $request = (new ListBoundMembershipsRequest()) + ->setScopeName($formattedScopeName); + $response = $gapicClient->listBoundMemberships($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getMemberships()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/ListBoundMemberships', $actualFuncCall); + $actualValue = $actualRequestObject->getScopeName(); + $this->assertProtobufEquals($formattedScopeName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listBoundMembershipsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedScopeName = $gapicClient->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); + $request = (new ListBoundMembershipsRequest()) + ->setScopeName($formattedScopeName); + try { + $gapicClient->listBoundMemberships($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 listFeaturesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $resourcesElement = new Feature(); + $resources = [ + $resourcesElement, + ]; + $expectedResponse = new ListFeaturesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setResources($resources); + $transport->addResponse($expectedResponse); + $request = new ListFeaturesRequest(); + $response = $gapicClient->listFeatures($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getResources()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/ListFeatures', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listFeaturesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 ListFeaturesRequest(); + try { + $gapicClient->listFeatures($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 listFleetsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $fleetsElement = new Fleet(); + $fleets = [ + $fleetsElement, + ]; + $expectedResponse = new ListFleetsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setFleets($fleets); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListFleetsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listFleets($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getFleets()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/ListFleets', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listFleetsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListFleetsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listFleets($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 listMembershipBindingsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $membershipBindingsElement = new MembershipBinding(); + $membershipBindings = [ + $membershipBindingsElement, + ]; + $expectedResponse = new ListMembershipBindingsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setMembershipBindings($membershipBindings); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); + $request = (new ListMembershipBindingsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listMembershipBindings($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getMembershipBindings()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/ListMembershipBindings', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listMembershipBindingsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); + $request = (new ListMembershipBindingsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listMembershipBindings($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 listMembershipRBACRoleBindingsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $rbacrolebindingsElement = new RBACRoleBinding(); + $rbacrolebindings = [ + $rbacrolebindingsElement, + ]; + $expectedResponse = new ListMembershipRBACRoleBindingsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setRbacrolebindings($rbacrolebindings); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); + $request = (new ListMembershipRBACRoleBindingsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listMembershipRBACRoleBindings($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getRbacrolebindings()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/ListMembershipRBACRoleBindings', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listMembershipRBACRoleBindingsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); + $request = (new ListMembershipRBACRoleBindingsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listMembershipRBACRoleBindings($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 listMembershipsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $resourcesElement = new Membership(); + $resources = [ + $resourcesElement, + ]; + $expectedResponse = new ListMembershipsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setResources($resources); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListMembershipsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listMemberships($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getResources()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/ListMemberships', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listMembershipsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListMembershipsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listMemberships($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 listPermittedScopesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $scopesElement = new Scope(); + $scopes = [ + $scopesElement, + ]; + $expectedResponse = new ListPermittedScopesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setScopes($scopes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListPermittedScopesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listPermittedScopes($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getScopes()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/ListPermittedScopes', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listPermittedScopesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListPermittedScopesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listPermittedScopes($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 listScopeNamespacesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $scopeNamespacesElement = new PBNamespace(); + $scopeNamespaces = [ + $scopeNamespacesElement, + ]; + $expectedResponse = new ListScopeNamespacesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setScopeNamespaces($scopeNamespaces); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); + $request = (new ListScopeNamespacesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listScopeNamespaces($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getScopeNamespaces()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/ListScopeNamespaces', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listScopeNamespacesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); + $request = (new ListScopeNamespacesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listScopeNamespaces($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 listScopeRBACRoleBindingsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $rbacrolebindingsElement = new RBACRoleBinding(); + $rbacrolebindings = [ + $rbacrolebindingsElement, + ]; + $expectedResponse = new ListScopeRBACRoleBindingsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setRbacrolebindings($rbacrolebindings); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); + $request = (new ListScopeRBACRoleBindingsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listScopeRBACRoleBindings($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getRbacrolebindings()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/ListScopeRBACRoleBindings', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listScopeRBACRoleBindingsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); + $request = (new ListScopeRBACRoleBindingsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listScopeRBACRoleBindings($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 listScopesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $scopesElement = new Scope(); + $scopes = [ + $scopesElement, + ]; + $expectedResponse = new ListScopesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setScopes($scopes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListScopesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listScopes($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getScopes()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/ListScopes', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listScopesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListScopesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listScopes($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 updateFeatureTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateFeatureTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $expectedResponse = new Feature(); + $expectedResponse->setName($name2); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateFeatureTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + $request = new UpdateFeatureRequest(); + $response = $gapicClient->updateFeature($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/UpdateFeature', $actualApiFuncCall); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateFeatureTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateFeatureExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateFeatureTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + $request = new UpdateFeatureRequest(); + $response = $gapicClient->updateFeature($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateFeatureTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateFleetTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateFleetTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $uid = 'uid115792'; + $expectedResponse = new Fleet(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateFleetTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $fleet = new Fleet(); + $updateMask = new FieldMask(); + $request = (new UpdateFleetRequest()) + ->setFleet($fleet) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateFleet($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/UpdateFleet', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getFleet(); + $this->assertProtobufEquals($fleet, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateFleetTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateFleetExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateFleetTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $fleet = new Fleet(); + $updateMask = new FieldMask(); + $request = (new UpdateFleetRequest()) + ->setFleet($fleet) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateFleet($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateFleetTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateMembershipTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateMembershipTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $externalId = 'externalId-1153075697'; + $uniqueId = 'uniqueId-538310583'; + $expectedResponse = new Membership(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setExternalId($externalId); + $expectedResponse->setUniqueId($uniqueId); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateMembershipTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); + $updateMask = new FieldMask(); + $resource = new Membership(); + $request = (new UpdateMembershipRequest()) + ->setName($formattedName) + ->setUpdateMask($updateMask) + ->setResource($resource); + $response = $gapicClient->updateMembership($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/UpdateMembership', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateMembershipTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateMembershipExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateMembershipTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); + $updateMask = new FieldMask(); + $resource = new Membership(); + $request = (new UpdateMembershipRequest()) + ->setName($formattedName) + ->setUpdateMask($updateMask) + ->setResource($resource); + $response = $gapicClient->updateMembership($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateMembershipTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateMembershipBindingTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateMembershipBindingTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $scope = 'scope109264468'; + $name = 'name3373707'; + $uid = 'uid115792'; + $expectedResponse = new MembershipBinding(); + $expectedResponse->setScope($scope); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateMembershipBindingTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $membershipBinding = new MembershipBinding(); + $updateMask = new FieldMask(); + $request = (new UpdateMembershipBindingRequest()) + ->setMembershipBinding($membershipBinding) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateMembershipBinding($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/UpdateMembershipBinding', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getMembershipBinding(); + $this->assertProtobufEquals($membershipBinding, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateMembershipBindingTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateMembershipBindingExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateMembershipBindingTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $membershipBinding = new MembershipBinding(); + $updateMask = new FieldMask(); + $request = (new UpdateMembershipBindingRequest()) + ->setMembershipBinding($membershipBinding) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateMembershipBinding($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateMembershipBindingTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateMembershipRBACRoleBindingTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateMembershipRBACRoleBindingTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $user = 'user3599307'; + $name = 'name3373707'; + $uid = 'uid115792'; + $expectedResponse = new RBACRoleBinding(); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateMembershipRBACRoleBindingTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $rbacrolebinding = new RBACRoleBinding(); + $rbacrolebindingRole = new Role(); + $rbacrolebinding->setRole($rbacrolebindingRole); + $updateMask = new FieldMask(); + $request = (new UpdateMembershipRBACRoleBindingRequest()) + ->setRbacrolebinding($rbacrolebinding) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateMembershipRBACRoleBinding($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/UpdateMembershipRBACRoleBinding', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getRbacrolebinding(); + $this->assertProtobufEquals($rbacrolebinding, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateMembershipRBACRoleBindingTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateMembershipRBACRoleBindingExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateMembershipRBACRoleBindingTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $rbacrolebinding = new RBACRoleBinding(); + $rbacrolebindingRole = new Role(); + $rbacrolebinding->setRole($rbacrolebindingRole); + $updateMask = new FieldMask(); + $request = (new UpdateMembershipRBACRoleBindingRequest()) + ->setRbacrolebinding($rbacrolebinding) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateMembershipRBACRoleBinding($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateMembershipRBACRoleBindingTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateScopeTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateScopeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uid = 'uid115792'; + $expectedResponse = new Scope(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateScopeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $scope = new Scope(); + $updateMask = new FieldMask(); + $request = (new UpdateScopeRequest()) + ->setScope($scope) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateScope($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/UpdateScope', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getScope(); + $this->assertProtobufEquals($scope, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateScopeTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateScopeExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateScopeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $scope = new Scope(); + $updateMask = new FieldMask(); + $request = (new UpdateScopeRequest()) + ->setScope($scope) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateScope($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateScopeTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateScopeNamespaceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateScopeNamespaceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uid = 'uid115792'; + $scope = 'scope109264468'; + $expectedResponse = new PBNamespace(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setScope($scope); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateScopeNamespaceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $scopeNamespace = new PBNamespace(); + $scopeNamespaceScope = $gapicClient->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); + $scopeNamespace->setScope($scopeNamespaceScope); + $updateMask = new FieldMask(); + $request = (new UpdateScopeNamespaceRequest()) + ->setScopeNamespace($scopeNamespace) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateScopeNamespace($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/UpdateScopeNamespace', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getScopeNamespace(); + $this->assertProtobufEquals($scopeNamespace, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateScopeNamespaceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateScopeNamespaceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateScopeNamespaceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $scopeNamespace = new PBNamespace(); + $scopeNamespaceScope = $gapicClient->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); + $scopeNamespace->setScope($scopeNamespaceScope); + $updateMask = new FieldMask(); + $request = (new UpdateScopeNamespaceRequest()) + ->setScopeNamespace($scopeNamespace) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateScopeNamespace($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateScopeNamespaceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateScopeRBACRoleBindingTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateScopeRBACRoleBindingTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $user = 'user3599307'; + $name = 'name3373707'; + $uid = 'uid115792'; + $expectedResponse = new RBACRoleBinding(); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateScopeRBACRoleBindingTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $rbacrolebinding = new RBACRoleBinding(); + $rbacrolebindingRole = new Role(); + $rbacrolebinding->setRole($rbacrolebindingRole); + $updateMask = new FieldMask(); + $request = (new UpdateScopeRBACRoleBindingRequest()) + ->setRbacrolebinding($rbacrolebinding) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateScopeRBACRoleBinding($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/UpdateScopeRBACRoleBinding', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getRbacrolebinding(); + $this->assertProtobufEquals($rbacrolebinding, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateScopeRBACRoleBindingTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateScopeRBACRoleBindingExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateScopeRBACRoleBindingTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $rbacrolebinding = new RBACRoleBinding(); + $rbacrolebindingRole = new Role(); + $rbacrolebinding->setRole($rbacrolebindingRole); + $updateMask = new FieldMask(); + $request = (new UpdateScopeRBACRoleBindingRequest()) + ->setRbacrolebinding($rbacrolebinding) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateScopeRBACRoleBinding($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateScopeRBACRoleBindingTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createFeatureAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createFeatureTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $expectedResponse = new Feature(); + $expectedResponse->setName($name); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createFeatureTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + $request = new CreateFeatureRequest(); + $response = $gapicClient->createFeatureAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/CreateFeature', $actualApiFuncCall); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createFeatureTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} From 7af4d94499a7936dbd9e41b010bce77c7bb87239 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Wed, 4 Feb 2026 04:12:47 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- GkeHub/metadata/V1/Feature.php | Bin 3244 -> 4013 bytes .../Gkehub => GkeHub/metadata}/V1/Fleet.php | Bin .../Rbacrolebindingactuation.php | 0 GkeHub/metadata/V1/Service.php | 238 +- .../samples/V1/GkeHubClient/create_fleet.php | 0 .../create_membership_binding.php | 0 .../create_membership_rbac_role_binding.php | 0 .../samples/V1/GkeHubClient/create_scope.php | 0 .../GkeHubClient/create_scope_namespace.php | 0 .../create_scope_rbac_role_binding.php | 0 .../samples/V1/GkeHubClient/delete_fleet.php | 0 .../delete_membership_binding.php | 0 .../delete_membership_rbac_role_binding.php | 0 .../samples/V1/GkeHubClient/delete_scope.php | 0 .../GkeHubClient/delete_scope_namespace.php | 0 .../delete_scope_rbac_role_binding.php | 0 ...rate_membership_rbac_role_binding_yaml.php | 0 .../samples/V1/GkeHubClient/get_fleet.php | 0 .../GkeHubClient/get_membership_binding.php | 0 .../get_membership_rbac_role_binding.php | 0 .../samples/V1/GkeHubClient/get_scope.php | 0 .../V1/GkeHubClient/get_scope_namespace.php | 0 .../get_scope_rbac_role_binding.php | 0 .../GkeHubClient/list_bound_memberships.php | 0 .../samples/V1/GkeHubClient/list_fleets.php | 0 .../GkeHubClient/list_membership_bindings.php | 0 .../list_membership_rbac_role_bindings.php | 0 .../V1/GkeHubClient/list_permitted_scopes.php | 0 .../V1/GkeHubClient/list_scope_namespaces.php | 0 .../list_scope_rbac_role_bindings.php | 0 .../samples/V1/GkeHubClient/list_scopes.php | 0 .../samples/V1/GkeHubClient/update_fleet.php | 0 .../update_membership_binding.php | 0 .../update_membership_rbac_role_binding.php | 0 .../samples/V1/GkeHubClient/update_scope.php | 0 .../GkeHubClient/update_scope_namespace.php | 0 .../update_scope_rbac_role_binding.php | 0 GkeHub/src/V1/Client/GkeHubClient.php | 1350 ++++- GkeHub/src/V1/FeatureSpec.php | 56 +- GkeHub/src/V1/FeatureState.php | 125 +- GkeHub/src/V1/gapic_metadata.json | 165 + .../V1/resources/gke_hub_client_config.json | 165 + .../resources/gke_hub_descriptor_config.php | 601 +++ .../resources/gke_hub_rest_client_config.php | 421 ++ .../tests/Unit/V1/Client/GkeHubClientTest.php | 3897 +++++++++++++- .../V1/Configmanagement/Configmanagement.php | Bin 6742 -> 0 bytes .../Google/Cloud/Gkehub/V1/Feature.php | Bin 4013 -> 0 bytes .../Google/Cloud/Gkehub/V1/Membership.php | Bin 3380 -> 0 bytes .../Multiclusteringress.php | 29 - .../Google/Cloud/Gkehub/V1/Service.php | 363 -- .../GkeHub/ConfigManagement/V1/ConfigSync.php | 323 -- .../V1/ConfigSyncDeploymentState.php | 271 - .../ConfigManagement/V1/ConfigSyncError.php | 67 - .../ConfigManagement/V1/ConfigSyncState.php | 309 -- .../V1/ConfigSyncState/CRDState.php | 78 - .../V1/ConfigSyncState/State.php | 76 - .../ConfigManagement/V1/ConfigSyncVersion.php | 271 - .../ConfigManagement/V1/DeploymentState.php | 75 - .../ConfigManagement/V1/ErrorResource.php | 179 - .../V1/GatekeeperDeploymentState.php | 101 - .../GkeHub/ConfigManagement/V1/GitConfig.php | 321 -- .../ConfigManagement/V1/GroupVersionKind.php | 135 - .../V1/HierarchyControllerConfig.php | 135 - .../V1/HierarchyControllerDeploymentState.php | 101 - .../V1/HierarchyControllerState.php | 121 - .../V1/HierarchyControllerVersion.php | 101 - .../ConfigManagement/V1/InstallError.php | 67 - .../ConfigManagement/V1/MembershipSpec.php | 292 - .../V1/MembershipSpec/Management.php | 64 - .../ConfigManagement/V1/MembershipState.php | 299 -- .../GkeHub/ConfigManagement/V1/OciConfig.php | 215 - .../ConfigManagement/V1/OperatorState.php | 135 - .../ConfigManagement/V1/PolicyController.php | 277 - .../V1/PolicyControllerState.php | 121 - .../V1/PolicyControllerVersion.php | 71 - .../GkeHub/ConfigManagement/V1/SyncError.php | 135 - .../GkeHub/ConfigManagement/V1/SyncState.php | 304 -- .../V1/SyncState/SyncCode.php | 99 - .../MultiClusterIngress/V1/FeatureSpec.php | 72 - .../V1/FeatureSpec.php | 76 - .../V1/FeatureState.php | 34 - .../src/Google/Cloud/GkeHub/V1/Authority.php | 235 - .../GkeHub/V1/BinaryAuthorizationConfig.php | 102 - .../EvaluationMode.php | 64 - .../PolicyBinding.php | 78 - .../Cloud/GkeHub/V1/CommonFeatureSpec.php | 75 - .../Cloud/GkeHub/V1/CommonFeatureState.php | 119 - .../GkeHub/V1/CompliancePostureConfig.php | 102 - .../ComplianceStandard.php | 68 - .../V1/CompliancePostureConfig/Mode.php | 62 - .../Cloud/GkeHub/V1/ConnectAgentResource.php | 112 - .../Cloud/GkeHub/V1/CreateFeatureRequest.php | 241 - .../Cloud/GkeHub/V1/CreateFleetRequest.php | 132 - .../V1/CreateMembershipBindingRequest.php | 173 - ...CreateMembershipRBACRoleBindingRequest.php | 200 - .../GkeHub/V1/CreateMembershipRequest.php | 274 - .../GkeHub/V1/CreateScopeNamespaceRequest.php | 200 - .../V1/CreateScopeRBACRoleBindingRequest.php | 200 - .../Cloud/GkeHub/V1/CreateScopeRequest.php | 173 - .../Cloud/GkeHub/V1/DefaultClusterConfig.php | 174 - .../Cloud/GkeHub/V1/DeleteFeatureRequest.php | 201 - .../Cloud/GkeHub/V1/DeleteFleetRequest.php | 86 - .../V1/DeleteMembershipBindingRequest.php | 86 - ...DeleteMembershipRBACRoleBindingRequest.php | 86 - .../GkeHub/V1/DeleteMembershipRequest.php | 202 - .../GkeHub/V1/DeleteScopeNamespaceRequest.php | 86 - .../V1/DeleteScopeRBACRoleBindingRequest.php | 86 - .../Cloud/GkeHub/V1/DeleteScopeRequest.php | 86 - .../src/Google/Cloud/GkeHub/V1/Feature.php | 687 --- .../Cloud/GkeHub/V1/FeatureResourceState.php | 69 - .../GkeHub/V1/FeatureResourceState/State.php | 88 - .../Google/Cloud/GkeHub/V1/FeatureState.php | 147 - .../Cloud/GkeHub/V1/FeatureState/Code.php | 77 - .../src/Google/Cloud/GkeHub/V1/Fleet.php | 425 -- .../Cloud/GkeHub/V1/FleetLifecycleState.php | 67 - .../GkeHub/V1/FleetLifecycleState/Code.php | 78 - .../V1/GenerateConnectManifestRequest.php | 321 -- .../V1/GenerateConnectManifestResponse.php | 72 - ...teMembershipRBACRoleBindingYAMLRequest.php | 174 - ...eMembershipRBACRoleBindingYAMLResponse.php | 67 - .../Cloud/GkeHub/V1/GetFeatureRequest.php | 131 - .../Cloud/GkeHub/V1/GetFleetRequest.php | 86 - .../GkeHub/V1/GetMembershipBindingRequest.php | 86 - .../GetMembershipRBACRoleBindingRequest.php | 86 - .../Cloud/GkeHub/V1/GetMembershipRequest.php | 86 - .../GkeHub/V1/GetScopeNamespaceRequest.php | 86 - .../V1/GetScopeRBACRoleBindingRequest.php | 86 - .../Cloud/GkeHub/V1/GetScopeRequest.php | 86 - .../src/Google/Cloud/GkeHub/V1/GkeCluster.php | 117 - .../Cloud/GkeHub/V1/KubernetesMetadata.php | 276 - .../Cloud/GkeHub/V1/KubernetesResource.php | 245 - .../GkeHub/V1/ListBoundMembershipsRequest.php | 220 - .../V1/ListBoundMembershipsResponse.php | 143 - .../Cloud/GkeHub/V1/ListFeaturesRequest.php | 319 -- .../Cloud/GkeHub/V1/ListFeaturesResponse.php | 109 - .../Cloud/GkeHub/V1/ListFleetsRequest.php | 174 - .../Cloud/GkeHub/V1/ListFleetsResponse.php | 109 - .../V1/ListMembershipBindingsRequest.php | 208 - .../V1/ListMembershipBindingsResponse.php | 143 - .../ListMembershipRBACRoleBindingsRequest.php | 170 - ...ListMembershipRBACRoleBindingsResponse.php | 143 - .../GkeHub/V1/ListMembershipsRequest.php | 287 - .../GkeHub/V1/ListMembershipsResponse.php | 143 - .../GkeHub/V1/ListPermittedScopesRequest.php | 170 - .../GkeHub/V1/ListPermittedScopesResponse.php | 109 - .../GkeHub/V1/ListScopeNamespacesRequest.php | 170 - .../GkeHub/V1/ListScopeNamespacesResponse.php | 109 - .../V1/ListScopeRBACRoleBindingsRequest.php | 170 - .../V1/ListScopeRBACRoleBindingsResponse.php | 109 - .../Cloud/GkeHub/V1/ListScopesRequest.php | 170 - .../Cloud/GkeHub/V1/ListScopesResponse.php | 109 - .../src/Google/Cloud/GkeHub/V1/Membership.php | 641 --- .../Cloud/GkeHub/V1/MembershipBinding.php | 374 -- .../V1/MembershipBindingLifecycleState.php | 67 - .../MembershipBindingLifecycleState/Code.php | 78 - .../Cloud/GkeHub/V1/MembershipEndpoint.php | 228 - .../Cloud/GkeHub/V1/MembershipFeatureSpec.php | 76 - .../GkeHub/V1/MembershipFeatureState.php | 120 - .../Cloud/GkeHub/V1/MembershipState.php | 67 - .../Cloud/GkeHub/V1/MembershipState/Code.php | 85 - .../Cloud/GkeHub/V1/MonitoringConfig.php | 244 - .../GkeHub/V1/NamespaceLifecycleState.php | 67 - .../V1/NamespaceLifecycleState/Code.php | 78 - .../Cloud/GkeHub/V1/OperationMetadata.php | 311 -- .../Google/Cloud/GkeHub/V1/PBNamespace.php | 407 -- .../Cloud/GkeHub/V1/RBACRoleBinding.php | 453 -- .../Cloud/GkeHub/V1/RBACRoleBinding/Role.php | 108 - .../RBACRoleBinding/Role/PredefinedRoles.php | 79 - .../V1/RBACRoleBindingLifecycleState.php | 68 - .../V1/RBACRoleBindingLifecycleState/Code.php | 78 - .../Cloud/GkeHub/V1/ResourceManifest.php | 114 - .../Cloud/GkeHub/V1/ResourceOptions.php | 205 - .../src/Google/Cloud/GkeHub/V1/Scope.php | 373 -- .../Cloud/GkeHub/V1/ScopeFeatureSpec.php | 33 - .../Cloud/GkeHub/V1/ScopeFeatureState.php | 77 - .../Cloud/GkeHub/V1/ScopeLifecycleState.php | 67 - .../GkeHub/V1/ScopeLifecycleState/Code.php | 78 - .../Cloud/GkeHub/V1/SecurityPostureConfig.php | 102 - .../GkeHub/V1/SecurityPostureConfig/Mode.php | 71 - .../VulnerabilityMode.php | 72 - .../src/Google/Cloud/GkeHub/V1/TypeMeta.php | 102 - .../Cloud/GkeHub/V1/UpdateFeatureRequest.php | 286 - .../Cloud/GkeHub/V1/UpdateFleetRequest.php | 147 - .../V1/UpdateMembershipBindingRequest.php | 136 - ...UpdateMembershipRBACRoleBindingRequest.php | 141 - .../GkeHub/V1/UpdateMembershipRequest.php | 287 - .../GkeHub/V1/UpdateScopeNamespaceRequest.php | 146 - .../V1/UpdateScopeRBACRoleBindingRequest.php | 141 - .../Cloud/GkeHub/V1/UpdateScopeRequest.php | 141 - .../V1/GkeHubClient/create_feature.php | 69 - .../V1/GkeHubClient/create_membership.php | 101 - .../V1/GkeHubClient/delete_feature.php | 66 - .../V1/GkeHubClient/delete_membership.php | 85 - .../generate_connect_manifest.php | 75 - .../samples/V1/GkeHubClient/get_feature.php | 57 - .../V1/GkeHubClient/get_membership.php | 72 - .../samples/V1/GkeHubClient/list_features.php | 62 - .../V1/GkeHubClient/list_memberships.php | 78 - .../V1/GkeHubClient/update_feature.php | 69 - .../V1/GkeHubClient/update_membership.php | 89 - .../GkeHub/v1/src/V1/Client/GkeHubClient.php | 1785 ------- .../GkeHub/v1/src/V1/gapic_metadata.json | 238 - .../V1/resources/gke_hub_client_config.json | 254 - .../resources/gke_hub_descriptor_config.php | 824 --- .../resources/gke_hub_rest_client_config.php | 709 --- .../tests/Unit/V1/Client/GkeHubClientTest.php | 4695 ----------------- 206 files changed, 6594 insertions(+), 32047 deletions(-) rename {owl-bot-staging/GkeHub/v1/proto/src/GPBMetadata/Google/Cloud/Gkehub => GkeHub/metadata}/V1/Fleet.php (100%) rename {owl-bot-staging/GkeHub/v1/proto/src/GPBMetadata/Google/Cloud/Gkehub => GkeHub/metadata}/V1/Rbacrolebindingactuation/Rbacrolebindingactuation.php (100%) rename {owl-bot-staging/GkeHub/v1 => GkeHub}/samples/V1/GkeHubClient/create_fleet.php (100%) rename {owl-bot-staging/GkeHub/v1 => GkeHub}/samples/V1/GkeHubClient/create_membership_binding.php (100%) rename {owl-bot-staging/GkeHub/v1 => GkeHub}/samples/V1/GkeHubClient/create_membership_rbac_role_binding.php (100%) rename {owl-bot-staging/GkeHub/v1 => GkeHub}/samples/V1/GkeHubClient/create_scope.php (100%) rename {owl-bot-staging/GkeHub/v1 => GkeHub}/samples/V1/GkeHubClient/create_scope_namespace.php (100%) rename {owl-bot-staging/GkeHub/v1 => GkeHub}/samples/V1/GkeHubClient/create_scope_rbac_role_binding.php (100%) rename {owl-bot-staging/GkeHub/v1 => GkeHub}/samples/V1/GkeHubClient/delete_fleet.php (100%) rename {owl-bot-staging/GkeHub/v1 => GkeHub}/samples/V1/GkeHubClient/delete_membership_binding.php (100%) rename {owl-bot-staging/GkeHub/v1 => GkeHub}/samples/V1/GkeHubClient/delete_membership_rbac_role_binding.php (100%) rename {owl-bot-staging/GkeHub/v1 => GkeHub}/samples/V1/GkeHubClient/delete_scope.php (100%) rename {owl-bot-staging/GkeHub/v1 => GkeHub}/samples/V1/GkeHubClient/delete_scope_namespace.php (100%) rename {owl-bot-staging/GkeHub/v1 => GkeHub}/samples/V1/GkeHubClient/delete_scope_rbac_role_binding.php (100%) rename {owl-bot-staging/GkeHub/v1 => GkeHub}/samples/V1/GkeHubClient/generate_membership_rbac_role_binding_yaml.php (100%) rename {owl-bot-staging/GkeHub/v1 => GkeHub}/samples/V1/GkeHubClient/get_fleet.php (100%) rename {owl-bot-staging/GkeHub/v1 => GkeHub}/samples/V1/GkeHubClient/get_membership_binding.php (100%) rename {owl-bot-staging/GkeHub/v1 => GkeHub}/samples/V1/GkeHubClient/get_membership_rbac_role_binding.php (100%) rename {owl-bot-staging/GkeHub/v1 => GkeHub}/samples/V1/GkeHubClient/get_scope.php (100%) rename {owl-bot-staging/GkeHub/v1 => GkeHub}/samples/V1/GkeHubClient/get_scope_namespace.php (100%) rename {owl-bot-staging/GkeHub/v1 => GkeHub}/samples/V1/GkeHubClient/get_scope_rbac_role_binding.php (100%) rename {owl-bot-staging/GkeHub/v1 => GkeHub}/samples/V1/GkeHubClient/list_bound_memberships.php (100%) rename {owl-bot-staging/GkeHub/v1 => GkeHub}/samples/V1/GkeHubClient/list_fleets.php (100%) rename {owl-bot-staging/GkeHub/v1 => GkeHub}/samples/V1/GkeHubClient/list_membership_bindings.php (100%) rename {owl-bot-staging/GkeHub/v1 => GkeHub}/samples/V1/GkeHubClient/list_membership_rbac_role_bindings.php (100%) rename {owl-bot-staging/GkeHub/v1 => GkeHub}/samples/V1/GkeHubClient/list_permitted_scopes.php (100%) rename {owl-bot-staging/GkeHub/v1 => GkeHub}/samples/V1/GkeHubClient/list_scope_namespaces.php (100%) rename {owl-bot-staging/GkeHub/v1 => GkeHub}/samples/V1/GkeHubClient/list_scope_rbac_role_bindings.php (100%) rename {owl-bot-staging/GkeHub/v1 => GkeHub}/samples/V1/GkeHubClient/list_scopes.php (100%) rename {owl-bot-staging/GkeHub/v1 => GkeHub}/samples/V1/GkeHubClient/update_fleet.php (100%) rename {owl-bot-staging/GkeHub/v1 => GkeHub}/samples/V1/GkeHubClient/update_membership_binding.php (100%) rename {owl-bot-staging/GkeHub/v1 => GkeHub}/samples/V1/GkeHubClient/update_membership_rbac_role_binding.php (100%) rename {owl-bot-staging/GkeHub/v1 => GkeHub}/samples/V1/GkeHubClient/update_scope.php (100%) rename {owl-bot-staging/GkeHub/v1 => GkeHub}/samples/V1/GkeHubClient/update_scope_namespace.php (100%) rename {owl-bot-staging/GkeHub/v1 => GkeHub}/samples/V1/GkeHubClient/update_scope_rbac_role_binding.php (100%) delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/GPBMetadata/Google/Cloud/Gkehub/V1/Configmanagement/Configmanagement.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/GPBMetadata/Google/Cloud/Gkehub/V1/Feature.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/GPBMetadata/Google/Cloud/Gkehub/V1/Membership.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/GPBMetadata/Google/Cloud/Gkehub/V1/Multiclusteringress/Multiclusteringress.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/GPBMetadata/Google/Cloud/Gkehub/V1/Service.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSync.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncDeploymentState.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncError.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncState.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncState/CRDState.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncState/State.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncVersion.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/DeploymentState.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ErrorResource.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/GatekeeperDeploymentState.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/GitConfig.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/GroupVersionKind.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/HierarchyControllerConfig.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/HierarchyControllerDeploymentState.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/HierarchyControllerState.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/HierarchyControllerVersion.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/InstallError.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/MembershipSpec.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/MembershipSpec/Management.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/MembershipState.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/OciConfig.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/OperatorState.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/PolicyController.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/PolicyControllerState.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/PolicyControllerVersion.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/SyncError.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/SyncState.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/SyncState/SyncCode.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/MultiClusterIngress/V1/FeatureSpec.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/RbacRoleBindingActuation/V1/FeatureSpec.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/RbacRoleBindingActuation/V1/FeatureState.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/Authority.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/BinaryAuthorizationConfig.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/BinaryAuthorizationConfig/EvaluationMode.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/BinaryAuthorizationConfig/PolicyBinding.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CommonFeatureSpec.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CommonFeatureState.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CompliancePostureConfig.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CompliancePostureConfig/ComplianceStandard.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CompliancePostureConfig/Mode.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ConnectAgentResource.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateFeatureRequest.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateFleetRequest.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateMembershipBindingRequest.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateMembershipRBACRoleBindingRequest.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateMembershipRequest.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateScopeNamespaceRequest.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateScopeRBACRoleBindingRequest.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateScopeRequest.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DefaultClusterConfig.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteFeatureRequest.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteFleetRequest.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteMembershipBindingRequest.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteMembershipRBACRoleBindingRequest.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteMembershipRequest.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteScopeNamespaceRequest.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteScopeRBACRoleBindingRequest.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteScopeRequest.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/Feature.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/FeatureResourceState.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/FeatureResourceState/State.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/FeatureState.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/FeatureState/Code.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/Fleet.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/FleetLifecycleState.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/FleetLifecycleState/Code.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GenerateConnectManifestRequest.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GenerateConnectManifestResponse.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GenerateMembershipRBACRoleBindingYAMLRequest.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GenerateMembershipRBACRoleBindingYAMLResponse.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetFeatureRequest.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetFleetRequest.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetMembershipBindingRequest.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetMembershipRBACRoleBindingRequest.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetMembershipRequest.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetScopeNamespaceRequest.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetScopeRBACRoleBindingRequest.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetScopeRequest.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GkeCluster.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/KubernetesMetadata.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/KubernetesResource.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListBoundMembershipsRequest.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListBoundMembershipsResponse.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListFeaturesRequest.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListFeaturesResponse.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListFleetsRequest.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListFleetsResponse.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListMembershipBindingsRequest.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListMembershipBindingsResponse.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListMembershipRBACRoleBindingsRequest.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListMembershipRBACRoleBindingsResponse.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListMembershipsRequest.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListMembershipsResponse.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListPermittedScopesRequest.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListPermittedScopesResponse.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListScopeNamespacesRequest.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListScopeNamespacesResponse.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListScopeRBACRoleBindingsRequest.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListScopeRBACRoleBindingsResponse.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListScopesRequest.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListScopesResponse.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/Membership.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipBinding.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipBindingLifecycleState.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipBindingLifecycleState/Code.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipEndpoint.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipFeatureSpec.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipFeatureState.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipState.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipState/Code.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MonitoringConfig.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/NamespaceLifecycleState.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/NamespaceLifecycleState/Code.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/OperationMetadata.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/PBNamespace.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/RBACRoleBinding.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/RBACRoleBinding/Role.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/RBACRoleBinding/Role/PredefinedRoles.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/RBACRoleBindingLifecycleState.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/RBACRoleBindingLifecycleState/Code.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ResourceManifest.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ResourceOptions.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/Scope.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ScopeFeatureSpec.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ScopeFeatureState.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ScopeLifecycleState.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ScopeLifecycleState/Code.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/SecurityPostureConfig.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/SecurityPostureConfig/Mode.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/SecurityPostureConfig/VulnerabilityMode.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/TypeMeta.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateFeatureRequest.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateFleetRequest.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateMembershipBindingRequest.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateMembershipRBACRoleBindingRequest.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateMembershipRequest.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateScopeNamespaceRequest.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateScopeRBACRoleBindingRequest.php delete mode 100644 owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateScopeRequest.php delete mode 100644 owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/create_feature.php delete mode 100644 owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/create_membership.php delete mode 100644 owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/delete_feature.php delete mode 100644 owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/delete_membership.php delete mode 100644 owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/generate_connect_manifest.php delete mode 100644 owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/get_feature.php delete mode 100644 owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/get_membership.php delete mode 100644 owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_features.php delete mode 100644 owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_memberships.php delete mode 100644 owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/update_feature.php delete mode 100644 owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/update_membership.php delete mode 100644 owl-bot-staging/GkeHub/v1/src/V1/Client/GkeHubClient.php delete mode 100644 owl-bot-staging/GkeHub/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/GkeHub/v1/src/V1/resources/gke_hub_client_config.json delete mode 100644 owl-bot-staging/GkeHub/v1/src/V1/resources/gke_hub_descriptor_config.php delete mode 100644 owl-bot-staging/GkeHub/v1/src/V1/resources/gke_hub_rest_client_config.php delete mode 100644 owl-bot-staging/GkeHub/v1/tests/Unit/V1/Client/GkeHubClientTest.php diff --git a/GkeHub/metadata/V1/Feature.php b/GkeHub/metadata/V1/Feature.php index d26e5f8ddeaadd0c4ceb709629d1f14b3de715f3..d9a3c50086134c8c3b01bd3d029d221460f6dd8c 100644 GIT binary patch delta 564 zcmZ1@xmJF|bEb)X{6;ZBNr}lt`8lacnRzLhdFhGCC8dcanfZA*B_=a6X-$646wb6u ze6j=c15dy7{QUHsRQ=?f{L&Qt^z77((j@&dL;WHg2IG{NEXkt5w3lnMGfM%JxR56o zcX4ulL27()L27cb1djr<2Dg#^F0Z4-uL<3kHu7g=ff{VK}uP8M!IU_MCCsl$UsDX3yIyM$YPN`@vez2a&AJ`-W z%(+<05_3vZC72W#fo{+M8Y$rbmUc@`EGaDlJH?90f>A1#O90&}A#N__?9@sLMxb6! zAq%)slRvV^v4RzEUc}zYWOayinternalAddGeneratedFile( ' -—) -$google/cloud/gkehub/v1/service.protogoogle.cloud.gkehub.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto$google/cloud/gkehub/v1/feature.proto\'google/cloud/gkehub/v1/membership.proto#google/longrunning/operations.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"¯ +‚ +$google/cloud/gkehub/v1/service.protogoogle.cloud.gkehub.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto$google/cloud/gkehub/v1/feature.proto"google/cloud/gkehub/v1/fleet.proto\'google/cloud/gkehub/v1/membership.proto#google/longrunning/operations.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"Q +GetScopeNamespaceRequest5 +name ( B\'àAúA! +gkehub.googleapis.com/Namespace"¸ +CreateScopeNamespaceRequest7 +parent ( B\'àAúA!gkehub.googleapis.com/Namespace +scope_namespace_id ( BàA? +scope_namespace ( 2!.google.cloud.gkehub.v1.NamespaceBàA"” +UpdateScopeNamespaceRequest? +scope_namespace ( 2!.google.cloud.gkehub.v1.NamespaceBàA4 + update_mask ( 2.google.protobuf.FieldMaskBàA"T +DeleteScopeNamespaceRequest5 +name ( B\'àAúA! +gkehub.googleapis.com/Namespace"† +ListScopeNamespacesRequest7 +parent ( B\'àAúA!gkehub.googleapis.com/Namespace + page_size (BàA + +page_token ( BàA"s +ListScopeNamespacesResponse; +scope_namespaces ( 2!.google.cloud.gkehub.v1.Namespace +next_page_token ( "] +GetScopeRBACRoleBindingRequest; +name ( B-àAúA\' +%gkehub.googleapis.com/RBACRoleBinding"Ê +!CreateScopeRBACRoleBindingRequest= +parent ( B-àAúA\'%gkehub.googleapis.com/RBACRoleBinding +rbacrolebinding_id ( BàAE +rbacrolebinding ( 2\'.google.cloud.gkehub.v1.RBACRoleBindingBàA"  +!UpdateScopeRBACRoleBindingRequestE +rbacrolebinding ( 2\'.google.cloud.gkehub.v1.RBACRoleBindingBàA4 + update_mask ( 2.google.protobuf.FieldMaskBàA"` +!DeleteScopeRBACRoleBindingRequest; +name ( B-àAúA\' +%gkehub.googleapis.com/RBACRoleBinding"’ + ListScopeRBACRoleBindingsRequest= +parent ( B-àAúA\'%gkehub.googleapis.com/RBACRoleBinding + page_size (BàA + +page_token ( BàA" +!ListScopeRBACRoleBindingsResponseA +rbacrolebindings ( 2\'.google.cloud.gkehub.v1.RBACRoleBinding +next_page_token ( "D +GetScopeRequest1 +name ( B#àAúA +gkehub.googleapis.com/Scope"“ +CreateScopeRequest3 +parent ( B#àAúAgkehub.googleapis.com/Scope +scope_id ( BàA1 +scope ( 2.google.cloud.gkehub.v1.ScopeBàA"} +UpdateScopeRequest1 +scope ( 2.google.cloud.gkehub.v1.ScopeBàA4 + update_mask ( 2.google.protobuf.FieldMaskBàA"G +DeleteScopeRequest1 +name ( B#àAúA +gkehub.googleapis.com/Scope"y +ListScopesRequest3 +parent ( B#àAúAgkehub.googleapis.com/Scope + page_size (BàA + +page_token ( BàA"\\ +ListScopesResponse- +scopes ( 2.google.cloud.gkehub.v1.Scope +next_page_token ( "‚ +ListPermittedScopesRequest3 +parent ( B#àAúAgkehub.googleapis.com/Scope + page_size (BàA + +page_token ( BàA"e +ListPermittedScopesResponse- +scopes ( 2.google.cloud.gkehub.v1.Scope +next_page_token ( "\\ +GetMembershipBindingRequest= +name ( B/àAúA) +\'gkehub.googleapis.com/MembershipBinding"Ñ +CreateMembershipBindingRequest? +parent ( B/àAúA)\'gkehub.googleapis.com/MembershipBindingJ +membership_binding ( 2).google.cloud.gkehub.v1.MembershipBindingBàA" +membership_binding_id ( BàA"¢ +UpdateMembershipBindingRequestJ +membership_binding ( 2).google.cloud.gkehub.v1.MembershipBindingBàA4 + update_mask ( 2.google.protobuf.FieldMaskBàA"_ +DeleteMembershipBindingRequest= +name ( B/àAúA) +\'gkehub.googleapis.com/MembershipBinding"¦ +ListMembershipBindingsRequest? +parent ( B/àAúA)\'gkehub.googleapis.com/MembershipBinding + page_size (BàA + +page_token ( BàA +filter ( BàA"– +ListMembershipBindingsResponseF +membership_bindings ( 2).google.cloud.gkehub.v1.MembershipBinding +next_page_token (  + unreachable ( "¯ ListMembershipsRequest8 parent ( B(àAúA" gkehub.googleapis.com/Membership page_size (BàA page_token ( BàA filter ( BàA -order_by ( BàA"~ +order_by ( BàA"b +#GetMembershipRBACRoleBindingRequest; +name ( B-àAúA\' +%gkehub.googleapis.com/RBACRoleBinding"Ï +&CreateMembershipRBACRoleBindingRequest= +parent ( B-àAúA\'%gkehub.googleapis.com/RBACRoleBinding +rbacrolebinding_id ( BàAE +rbacrolebinding ( 2\'.google.cloud.gkehub.v1.RBACRoleBindingBàA"¥ +&UpdateMembershipRBACRoleBindingRequestE +rbacrolebinding ( 2\'.google.cloud.gkehub.v1.RBACRoleBindingBàA4 + update_mask ( 2.google.protobuf.FieldMaskBàA"e +&DeleteMembershipRBACRoleBindingRequest; +name ( B-àAúA\' +%gkehub.googleapis.com/RBACRoleBinding"— +%ListMembershipRBACRoleBindingsRequest= +parent ( B-àAúA\'%gkehub.googleapis.com/RBACRoleBinding + page_size (BàA + +page_token ( BàA"™ +&ListMembershipRBACRoleBindingsResponseA +rbacrolebindings ( 2\'.google.cloud.gkehub.v1.RBACRoleBinding +next_page_token (  + unreachable ( "Ð +,GenerateMembershipRBACRoleBindingYAMLRequest8 +parent ( B(àAúA" + gkehub.googleapis.com/Membership +rbacrolebinding_id ( BàAE +rbacrolebinding ( 2\'.google.cloud.gkehub.v1.RBACRoleBindingBàA"K +-GenerateMembershipRBACRoleBindingYAMLResponse +role_bindings_yaml ( "~ ListMembershipsResponse5 resources ( 2".google.cloud.gkehub.v1.Membership next_page_token (  unreachable ( "N GetMembershipRequest6 name ( B(àAúA" - gkehub.googleapis.com/Membership"à + gkehub.googleapis.com/Membership"œ +ListBoundMembershipsRequest7 + +scope_name ( B#àAúA +gkehub.googleapis.com/Scope +filter ( BàA + page_size (BàA + +page_token ( BàA"… +ListBoundMembershipsResponse7 + memberships ( 2".google.cloud.gkehub.v1.Membership + unreachable (  +next_page_token ( "à CreateMembershipRequest8 parent ( B(àAúA" gkehub.googleapis.com/Membership membership_id ( BàA9 @@ -77,20 +213,22 @@ public static function initOnce() { manifest ( "- TypeMeta kind (  - api_version ( "’ + api_version ( "· ListFeaturesRequest2 parent ( B"úAgkehub.googleapis.com/Feature page_size ( page_token (  filter (  -order_by ( "c +order_by ( # +return_partial_success (BàA"c ListFeaturesResponse2 resources ( 2.google.cloud.gkehub.v1.Feature -next_page_token ( "E +next_page_token ( "j GetFeatureRequest0 name ( B"úA -gkehub.googleapis.com/Feature"¥ +gkehub.googleapis.com/Feature# +return_partial_success (BàA"¥ CreateFeatureRequest2 parent ( B"úAgkehub.googleapis.com/Feature @@ -110,7 +248,29 @@ public static function initOnce() { update_mask ( 2.google.protobuf.FieldMask1 resource ( 2.google.cloud.gkehub.v1.Feature -request_id ( "ù +request_id ( "‚ +CreateFleetRequest9 +parent ( B)àAúA# +!locations.googleapis.com/Location1 +fleet ( 2.google.cloud.gkehub.v1.FleetBàA"D +GetFleetRequest1 +name ( B#àAúA +gkehub.googleapis.com/Fleet"} +UpdateFleetRequest1 +fleet ( 2.google.cloud.gkehub.v1.FleetBàA4 + update_mask ( 2.google.protobuf.FieldMaskBàA"G +DeleteFleetRequest1 +name ( B#àAúA +gkehub.googleapis.com/Fleet" +ListFleetsRequest9 +parent ( B)àAúA# +!locations.googleapis.com/Location + +page_token ( BàA + page_size (BàA"\\ +ListFleetsResponse- +fleets ( 2.google.cloud.gkehub.v1.Fleet +next_page_token ( "ù OperationMetadata4 create_time ( 2.google.protobuf.TimestampBàA1 end_time ( 2.google.protobuf.TimestampBàA @@ -118,9 +278,11 @@ public static function initOnce() { verb ( BàA status_detail ( BàA cancel_requested (BàA - api_version ( BàA2ð + api_version ( BàA2–M GkeHub´ -ListMemberships..google.cloud.gkehub.v1.ListMembershipsRequest/.google.cloud.gkehub.v1.ListMembershipsResponse"@ÚAparent‚Óä“1//v1/{parent=projects/*/locations/*}/memberships¨ +ListMemberships..google.cloud.gkehub.v1.ListMembershipsRequest/.google.cloud.gkehub.v1.ListMembershipsResponse"@ÚAparent‚Óä“1//v1/{parent=projects/*/locations/*}/membershipsØ +ListBoundMemberships3.google.cloud.gkehub.v1.ListBoundMembershipsRequest4.google.cloud.gkehub.v1.ListBoundMembershipsResponse"UÚA +scope_name‚Óä“B@/v1/{scope_name=projects/*/locations/*/scopes/*}:listMemberships¨ ListFeatures+.google.cloud.gkehub.v1.ListFeaturesRequest,.google.cloud.gkehub.v1.ListFeaturesResponse"=ÚAparent‚Óä“.,/v1/{parent=projects/*/locations/*}/features¡ GetMembership,.google.cloud.gkehub.v1.GetMembershipRequest".google.cloud.gkehub.v1.Membership">ÚAname‚Óä“1//v1/{name=projects/*/locations/*/memberships/*}• @@ -139,7 +301,59 @@ public static function initOnce() { MembershipOperationMetadataÚAname,resource,update_mask‚Óä“;2//v1/{name=projects/*/locations/*/memberships/*}:resource× UpdateFeature,.google.cloud.gkehub.v1.UpdateFeatureRequest.google.longrunning.Operation"yÊA FeatureOperationMetadataÚAname,resource,update_mask‚Óä“82,/v1/{name=projects/*/locations/*/features/*}:resourceÛ -GenerateConnectManifest6.google.cloud.gkehub.v1.GenerateConnectManifestRequest7.google.cloud.gkehub.v1.GenerateConnectManifestResponse"O‚Óä“IG/v1/{name=projects/*/locations/*/memberships/*}:generateConnectManifestIÊAgkehub.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformB® +GenerateConnectManifest6.google.cloud.gkehub.v1.GenerateConnectManifestRequest7.google.cloud.gkehub.v1.GenerateConnectManifestResponse"O‚Óä“IG/v1/{name=projects/*/locations/*/memberships/*}:generateConnectManifest¿ + CreateFleet*.google.cloud.gkehub.v1.CreateFleetRequest.google.longrunning.Operation"eÊA +FleetOperationMetadataÚA parent,fleet‚Óä“3"*/v1/{parent=projects/*/locations/*}/fleets:fleet +GetFleet\'.google.cloud.gkehub.v1.GetFleetRequest.google.cloud.gkehub.v1.Fleet"9ÚAname‚Óä“,*/v1/{name=projects/*/locations/*/fleets/*}Ê + UpdateFleet*.google.cloud.gkehub.v1.UpdateFleetRequest.google.longrunning.Operation"pÊA +FleetOperationMetadataÚAfleet,update_mask‚Óä“920/v1/{fleet.name=projects/*/locations/*/fleets/*}:fleetÀ + DeleteFleet*.google.cloud.gkehub.v1.DeleteFleetRequest.google.longrunning.Operation"fÊA* +google.protobuf.EmptyOperationMetadataÚAname‚Óä“,**/v1/{name=projects/*/locations/*/fleets/*}Ó + +ListFleets).google.cloud.gkehub.v1.ListFleetsRequest*.google.cloud.gkehub.v1.ListFleetsResponse"nÚAparent‚Óä“_*/v1/{parent=projects/*/locations/*}/fleetsZ1//v1/{parent=organizations/*/locations/*}/fleets° +GetScopeNamespace0.google.cloud.gkehub.v1.GetScopeNamespaceRequest!.google.cloud.gkehub.v1.Namespace"FÚAname‚Óä“97/v1/{name=projects/*/locations/*/scopes/*/namespaces/*}Š +CreateScopeNamespace3.google.cloud.gkehub.v1.CreateScopeNamespaceRequest.google.longrunning.Operation"ÊA + NamespaceOperationMetadataÚA)parent,scope_namespace,scope_namespace_id‚Óä“J"7/v1/{parent=projects/*/locations/*/scopes/*}/namespaces:scope_namespaceŒ +UpdateScopeNamespace3.google.cloud.gkehub.v1.UpdateScopeNamespaceRequest.google.longrunning.Operation"ŸÊA + NamespaceOperationMetadataÚAscope_namespace,update_mask‚Óä“Z2G/v1/{scope_namespace.name=projects/*/locations/*/scopes/*/namespaces/*}:scope_namespaceß +DeleteScopeNamespace3.google.cloud.gkehub.v1.DeleteScopeNamespaceRequest.google.longrunning.Operation"sÊA* +google.protobuf.EmptyOperationMetadataÚAname‚Óä“9*7/v1/{name=projects/*/locations/*/scopes/*/namespaces/*}È +ListScopeNamespaces2.google.cloud.gkehub.v1.ListScopeNamespacesRequest3.google.cloud.gkehub.v1.ListScopeNamespacesResponse"HÚAparent‚Óä“97/v1/{parent=projects/*/locations/*/scopes/*}/namespacesÈ +GetScopeRBACRoleBinding6.google.cloud.gkehub.v1.GetScopeRBACRoleBindingRequest\'.google.cloud.gkehub.v1.RBACRoleBinding"LÚAname‚Óä“?=/v1/{name=projects/*/locations/*/scopes/*/rbacrolebindings/*}¢ +CreateScopeRBACRoleBinding9.google.cloud.gkehub.v1.CreateScopeRBACRoleBindingRequest.google.longrunning.Operation"©ÊA$ +RBACRoleBindingOperationMetadataÚA)parent,rbacrolebinding,rbacrolebinding_id‚Óä“P"=/v1/{parent=projects/*/locations/*/scopes/*}/rbacrolebindings:rbacrolebinding¤ +UpdateScopeRBACRoleBinding9.google.cloud.gkehub.v1.UpdateScopeRBACRoleBindingRequest.google.longrunning.Operation"«ÊA$ +RBACRoleBindingOperationMetadataÚArbacrolebinding,update_mask‚Óä“`2M/v1/{rbacrolebinding.name=projects/*/locations/*/scopes/*/rbacrolebindings/*}:rbacrolebindingñ +DeleteScopeRBACRoleBinding9.google.cloud.gkehub.v1.DeleteScopeRBACRoleBindingRequest.google.longrunning.Operation"yÊA* +google.protobuf.EmptyOperationMetadataÚAname‚Óä“?*=/v1/{name=projects/*/locations/*/scopes/*/rbacrolebindings/*}à +ListScopeRBACRoleBindings8.google.cloud.gkehub.v1.ListScopeRBACRoleBindingsRequest9.google.cloud.gkehub.v1.ListScopeRBACRoleBindingsResponse"NÚAparent‚Óä“?=/v1/{parent=projects/*/locations/*/scopes/*}/rbacrolebindings +GetScope\'.google.cloud.gkehub.v1.GetScopeRequest.google.cloud.gkehub.v1.Scope"9ÚAname‚Óä“,*/v1/{name=projects/*/locations/*/scopes/*}È + CreateScope*.google.cloud.gkehub.v1.CreateScopeRequest.google.longrunning.Operation"nÊA +ScopeOperationMetadataÚAparent,scope,scope_id‚Óä“3"*/v1/{parent=projects/*/locations/*}/scopes:scopeÊ + UpdateScope*.google.cloud.gkehub.v1.UpdateScopeRequest.google.longrunning.Operation"pÊA +ScopeOperationMetadataÚAscope,update_mask‚Óä“920/v1/{scope.name=projects/*/locations/*/scopes/*}:scopeÀ + DeleteScope*.google.cloud.gkehub.v1.DeleteScopeRequest.google.longrunning.Operation"fÊA* +google.protobuf.EmptyOperationMetadataÚAname‚Óä“,**/v1/{name=projects/*/locations/*/scopes/*}  + +ListScopes).google.cloud.gkehub.v1.ListScopesRequest*.google.cloud.gkehub.v1.ListScopesResponse";ÚAparent‚Óä“,*/v1/{parent=projects/*/locations/*}/scopesÉ +ListPermittedScopes2.google.cloud.gkehub.v1.ListPermittedScopesRequest3.google.cloud.gkehub.v1.ListPermittedScopesResponse"IÚAparent‚Óä“:8/v1/{parent=projects/*/locations/*}/scopes:listPermittedÁ +GetMembershipBinding3.google.cloud.gkehub.v1.GetMembershipBindingRequest).google.cloud.gkehub.v1.MembershipBinding"IÚAname‚Óä“<:/v1/{name=projects/*/locations/*/memberships/*/bindings/*}¤ +CreateMembershipBinding6.google.cloud.gkehub.v1.CreateMembershipBindingRequest.google.longrunning.Operation"±ÊA& +MembershipBindingOperationMetadataÚA/parent,membership_binding,membership_binding_id‚Óä“P":/v1/{parent=projects/*/locations/*/memberships/*}/bindings:membership_binding¦ +UpdateMembershipBinding6.google.cloud.gkehub.v1.UpdateMembershipBindingRequest.google.longrunning.Operation"³ÊA& +MembershipBindingOperationMetadataÚAmembership_binding,update_mask‚Óä“c2M/v1/{membership_binding.name=projects/*/locations/*/memberships/*/bindings/*}:membership_bindingè +DeleteMembershipBinding6.google.cloud.gkehub.v1.DeleteMembershipBindingRequest.google.longrunning.Operation"vÊA* +google.protobuf.EmptyOperationMetadataÚAname‚Óä“<*:/v1/{name=projects/*/locations/*/memberships/*/bindings/*}Ô +ListMembershipBindings5.google.cloud.gkehub.v1.ListMembershipBindingsRequest6.google.cloud.gkehub.v1.ListMembershipBindingsResponse"KÚAparent‚Óä“<:/v1/{parent=projects/*/locations/*/memberships/*}/bindings× +GetMembershipRBACRoleBinding;.google.cloud.gkehub.v1.GetMembershipRBACRoleBindingRequest\'.google.cloud.gkehub.v1.RBACRoleBinding"QÚAname‚Óä“DB/v1/{name=projects/*/locations/*/memberships/*/rbacrolebindings/*}± +CreateMembershipRBACRoleBinding>.google.cloud.gkehub.v1.CreateMembershipRBACRoleBindingRequest.google.longrunning.Operation"®ÊA$ +RBACRoleBindingOperationMetadataÚA)parent,rbacrolebinding,rbacrolebinding_id‚Óä“U"B/v1/{parent=projects/*/locations/*/memberships/*}/rbacrolebindings:rbacrolebinding³ +UpdateMembershipRBACRoleBinding>.google.cloud.gkehub.v1.UpdateMembershipRBACRoleBindingRequest.google.longrunning.Operation"°ÊA$ +RBACRoleBindingOperationMetadataÚArbacrolebinding,update_mask‚Óä“e2R/v1/{rbacrolebinding.name=projects/*/locations/*/memberships/*/rbacrolebindings/*}:rbacrolebinding€ +DeleteMembershipRBACRoleBinding>.google.cloud.gkehub.v1.DeleteMembershipRBACRoleBindingRequest.google.longrunning.Operation"~ÊA* +google.protobuf.EmptyOperationMetadataÚAname‚Óä“D*B/v1/{name=projects/*/locations/*/memberships/*/rbacrolebindings/*}ô +ListMembershipRBACRoleBindings=.google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsRequest>.google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsResponse"SÚAparent‚Óä“DB/v1/{parent=projects/*/locations/*/memberships/*}/rbacrolebindings¸ +%GenerateMembershipRBACRoleBindingYAMLD.google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLRequestE.google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLResponse"‚Óä“{"h/v1/{parent=projects/*/locations/*/memberships/*}/rbacrolebindings:generateMembershipRBACRoleBindingYAML:rbacrolebindingIÊAgkehub.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformB® com.google.cloud.gkehub.v1B ServiceProtoPZ2cloud.google.com/go/gkehub/apiv1/gkehubpb;gkehubpbªGoogle.Cloud.GkeHub.V1ÊGoogle\\Cloud\\GkeHub\\V1êGoogle::Cloud::GkeHub::V1bproto3' , true); diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/create_fleet.php b/GkeHub/samples/V1/GkeHubClient/create_fleet.php similarity index 100% rename from owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/create_fleet.php rename to GkeHub/samples/V1/GkeHubClient/create_fleet.php diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/create_membership_binding.php b/GkeHub/samples/V1/GkeHubClient/create_membership_binding.php similarity index 100% rename from owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/create_membership_binding.php rename to GkeHub/samples/V1/GkeHubClient/create_membership_binding.php diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/create_membership_rbac_role_binding.php b/GkeHub/samples/V1/GkeHubClient/create_membership_rbac_role_binding.php similarity index 100% rename from owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/create_membership_rbac_role_binding.php rename to GkeHub/samples/V1/GkeHubClient/create_membership_rbac_role_binding.php diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/create_scope.php b/GkeHub/samples/V1/GkeHubClient/create_scope.php similarity index 100% rename from owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/create_scope.php rename to GkeHub/samples/V1/GkeHubClient/create_scope.php diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/create_scope_namespace.php b/GkeHub/samples/V1/GkeHubClient/create_scope_namespace.php similarity index 100% rename from owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/create_scope_namespace.php rename to GkeHub/samples/V1/GkeHubClient/create_scope_namespace.php diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/create_scope_rbac_role_binding.php b/GkeHub/samples/V1/GkeHubClient/create_scope_rbac_role_binding.php similarity index 100% rename from owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/create_scope_rbac_role_binding.php rename to GkeHub/samples/V1/GkeHubClient/create_scope_rbac_role_binding.php diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/delete_fleet.php b/GkeHub/samples/V1/GkeHubClient/delete_fleet.php similarity index 100% rename from owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/delete_fleet.php rename to GkeHub/samples/V1/GkeHubClient/delete_fleet.php diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/delete_membership_binding.php b/GkeHub/samples/V1/GkeHubClient/delete_membership_binding.php similarity index 100% rename from owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/delete_membership_binding.php rename to GkeHub/samples/V1/GkeHubClient/delete_membership_binding.php diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/delete_membership_rbac_role_binding.php b/GkeHub/samples/V1/GkeHubClient/delete_membership_rbac_role_binding.php similarity index 100% rename from owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/delete_membership_rbac_role_binding.php rename to GkeHub/samples/V1/GkeHubClient/delete_membership_rbac_role_binding.php diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/delete_scope.php b/GkeHub/samples/V1/GkeHubClient/delete_scope.php similarity index 100% rename from owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/delete_scope.php rename to GkeHub/samples/V1/GkeHubClient/delete_scope.php diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/delete_scope_namespace.php b/GkeHub/samples/V1/GkeHubClient/delete_scope_namespace.php similarity index 100% rename from owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/delete_scope_namespace.php rename to GkeHub/samples/V1/GkeHubClient/delete_scope_namespace.php diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/delete_scope_rbac_role_binding.php b/GkeHub/samples/V1/GkeHubClient/delete_scope_rbac_role_binding.php similarity index 100% rename from owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/delete_scope_rbac_role_binding.php rename to GkeHub/samples/V1/GkeHubClient/delete_scope_rbac_role_binding.php diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/generate_membership_rbac_role_binding_yaml.php b/GkeHub/samples/V1/GkeHubClient/generate_membership_rbac_role_binding_yaml.php similarity index 100% rename from owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/generate_membership_rbac_role_binding_yaml.php rename to GkeHub/samples/V1/GkeHubClient/generate_membership_rbac_role_binding_yaml.php diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/get_fleet.php b/GkeHub/samples/V1/GkeHubClient/get_fleet.php similarity index 100% rename from owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/get_fleet.php rename to GkeHub/samples/V1/GkeHubClient/get_fleet.php diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/get_membership_binding.php b/GkeHub/samples/V1/GkeHubClient/get_membership_binding.php similarity index 100% rename from owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/get_membership_binding.php rename to GkeHub/samples/V1/GkeHubClient/get_membership_binding.php diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/get_membership_rbac_role_binding.php b/GkeHub/samples/V1/GkeHubClient/get_membership_rbac_role_binding.php similarity index 100% rename from owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/get_membership_rbac_role_binding.php rename to GkeHub/samples/V1/GkeHubClient/get_membership_rbac_role_binding.php diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/get_scope.php b/GkeHub/samples/V1/GkeHubClient/get_scope.php similarity index 100% rename from owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/get_scope.php rename to GkeHub/samples/V1/GkeHubClient/get_scope.php diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/get_scope_namespace.php b/GkeHub/samples/V1/GkeHubClient/get_scope_namespace.php similarity index 100% rename from owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/get_scope_namespace.php rename to GkeHub/samples/V1/GkeHubClient/get_scope_namespace.php diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/get_scope_rbac_role_binding.php b/GkeHub/samples/V1/GkeHubClient/get_scope_rbac_role_binding.php similarity index 100% rename from owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/get_scope_rbac_role_binding.php rename to GkeHub/samples/V1/GkeHubClient/get_scope_rbac_role_binding.php diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_bound_memberships.php b/GkeHub/samples/V1/GkeHubClient/list_bound_memberships.php similarity index 100% rename from owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_bound_memberships.php rename to GkeHub/samples/V1/GkeHubClient/list_bound_memberships.php diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_fleets.php b/GkeHub/samples/V1/GkeHubClient/list_fleets.php similarity index 100% rename from owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_fleets.php rename to GkeHub/samples/V1/GkeHubClient/list_fleets.php diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_membership_bindings.php b/GkeHub/samples/V1/GkeHubClient/list_membership_bindings.php similarity index 100% rename from owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_membership_bindings.php rename to GkeHub/samples/V1/GkeHubClient/list_membership_bindings.php diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_membership_rbac_role_bindings.php b/GkeHub/samples/V1/GkeHubClient/list_membership_rbac_role_bindings.php similarity index 100% rename from owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_membership_rbac_role_bindings.php rename to GkeHub/samples/V1/GkeHubClient/list_membership_rbac_role_bindings.php diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_permitted_scopes.php b/GkeHub/samples/V1/GkeHubClient/list_permitted_scopes.php similarity index 100% rename from owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_permitted_scopes.php rename to GkeHub/samples/V1/GkeHubClient/list_permitted_scopes.php diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_scope_namespaces.php b/GkeHub/samples/V1/GkeHubClient/list_scope_namespaces.php similarity index 100% rename from owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_scope_namespaces.php rename to GkeHub/samples/V1/GkeHubClient/list_scope_namespaces.php diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_scope_rbac_role_bindings.php b/GkeHub/samples/V1/GkeHubClient/list_scope_rbac_role_bindings.php similarity index 100% rename from owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_scope_rbac_role_bindings.php rename to GkeHub/samples/V1/GkeHubClient/list_scope_rbac_role_bindings.php diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_scopes.php b/GkeHub/samples/V1/GkeHubClient/list_scopes.php similarity index 100% rename from owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_scopes.php rename to GkeHub/samples/V1/GkeHubClient/list_scopes.php diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/update_fleet.php b/GkeHub/samples/V1/GkeHubClient/update_fleet.php similarity index 100% rename from owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/update_fleet.php rename to GkeHub/samples/V1/GkeHubClient/update_fleet.php diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/update_membership_binding.php b/GkeHub/samples/V1/GkeHubClient/update_membership_binding.php similarity index 100% rename from owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/update_membership_binding.php rename to GkeHub/samples/V1/GkeHubClient/update_membership_binding.php diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/update_membership_rbac_role_binding.php b/GkeHub/samples/V1/GkeHubClient/update_membership_rbac_role_binding.php similarity index 100% rename from owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/update_membership_rbac_role_binding.php rename to GkeHub/samples/V1/GkeHubClient/update_membership_rbac_role_binding.php diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/update_scope.php b/GkeHub/samples/V1/GkeHubClient/update_scope.php similarity index 100% rename from owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/update_scope.php rename to GkeHub/samples/V1/GkeHubClient/update_scope.php diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/update_scope_namespace.php b/GkeHub/samples/V1/GkeHubClient/update_scope_namespace.php similarity index 100% rename from owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/update_scope_namespace.php rename to GkeHub/samples/V1/GkeHubClient/update_scope_namespace.php diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/update_scope_rbac_role_binding.php b/GkeHub/samples/V1/GkeHubClient/update_scope_rbac_role_binding.php similarity index 100% rename from owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/update_scope_rbac_role_binding.php rename to GkeHub/samples/V1/GkeHubClient/update_scope_rbac_role_binding.php diff --git a/GkeHub/src/V1/Client/GkeHubClient.php b/GkeHub/src/V1/Client/GkeHubClient.php index 5e575732b03f..6c4ef1a8d8cc 100644 --- a/GkeHub/src/V1/Client/GkeHubClient.php +++ b/GkeHub/src/V1/Client/GkeHubClient.php @@ -36,19 +36,58 @@ use Google\ApiCore\ValidationException; use Google\Auth\FetchAuthTokenInterface; use Google\Cloud\GkeHub\V1\CreateFeatureRequest; +use Google\Cloud\GkeHub\V1\CreateFleetRequest; +use Google\Cloud\GkeHub\V1\CreateMembershipBindingRequest; +use Google\Cloud\GkeHub\V1\CreateMembershipRBACRoleBindingRequest; use Google\Cloud\GkeHub\V1\CreateMembershipRequest; +use Google\Cloud\GkeHub\V1\CreateScopeNamespaceRequest; +use Google\Cloud\GkeHub\V1\CreateScopeRBACRoleBindingRequest; +use Google\Cloud\GkeHub\V1\CreateScopeRequest; use Google\Cloud\GkeHub\V1\DeleteFeatureRequest; +use Google\Cloud\GkeHub\V1\DeleteFleetRequest; +use Google\Cloud\GkeHub\V1\DeleteMembershipBindingRequest; +use Google\Cloud\GkeHub\V1\DeleteMembershipRBACRoleBindingRequest; use Google\Cloud\GkeHub\V1\DeleteMembershipRequest; +use Google\Cloud\GkeHub\V1\DeleteScopeNamespaceRequest; +use Google\Cloud\GkeHub\V1\DeleteScopeRBACRoleBindingRequest; +use Google\Cloud\GkeHub\V1\DeleteScopeRequest; use Google\Cloud\GkeHub\V1\Feature; +use Google\Cloud\GkeHub\V1\Fleet; use Google\Cloud\GkeHub\V1\GenerateConnectManifestRequest; use Google\Cloud\GkeHub\V1\GenerateConnectManifestResponse; +use Google\Cloud\GkeHub\V1\GenerateMembershipRBACRoleBindingYAMLRequest; +use Google\Cloud\GkeHub\V1\GenerateMembershipRBACRoleBindingYAMLResponse; use Google\Cloud\GkeHub\V1\GetFeatureRequest; +use Google\Cloud\GkeHub\V1\GetFleetRequest; +use Google\Cloud\GkeHub\V1\GetMembershipBindingRequest; +use Google\Cloud\GkeHub\V1\GetMembershipRBACRoleBindingRequest; use Google\Cloud\GkeHub\V1\GetMembershipRequest; +use Google\Cloud\GkeHub\V1\GetScopeNamespaceRequest; +use Google\Cloud\GkeHub\V1\GetScopeRBACRoleBindingRequest; +use Google\Cloud\GkeHub\V1\GetScopeRequest; +use Google\Cloud\GkeHub\V1\ListBoundMembershipsRequest; use Google\Cloud\GkeHub\V1\ListFeaturesRequest; +use Google\Cloud\GkeHub\V1\ListFleetsRequest; +use Google\Cloud\GkeHub\V1\ListMembershipBindingsRequest; +use Google\Cloud\GkeHub\V1\ListMembershipRBACRoleBindingsRequest; use Google\Cloud\GkeHub\V1\ListMembershipsRequest; +use Google\Cloud\GkeHub\V1\ListPermittedScopesRequest; +use Google\Cloud\GkeHub\V1\ListScopeNamespacesRequest; +use Google\Cloud\GkeHub\V1\ListScopeRBACRoleBindingsRequest; +use Google\Cloud\GkeHub\V1\ListScopesRequest; use Google\Cloud\GkeHub\V1\Membership; +use Google\Cloud\GkeHub\V1\MembershipBinding; +use Google\Cloud\GkeHub\V1\PBNamespace; +use Google\Cloud\GkeHub\V1\RBACRoleBinding; +use Google\Cloud\GkeHub\V1\Scope; use Google\Cloud\GkeHub\V1\UpdateFeatureRequest; +use Google\Cloud\GkeHub\V1\UpdateFleetRequest; +use Google\Cloud\GkeHub\V1\UpdateMembershipBindingRequest; +use Google\Cloud\GkeHub\V1\UpdateMembershipRBACRoleBindingRequest; use Google\Cloud\GkeHub\V1\UpdateMembershipRequest; +use Google\Cloud\GkeHub\V1\UpdateScopeNamespaceRequest; +use Google\Cloud\GkeHub\V1\UpdateScopeRBACRoleBindingRequest; +use Google\Cloud\GkeHub\V1\UpdateScopeRequest; use Google\LongRunning\Client\OperationsClient; use Google\LongRunning\Operation; use GuzzleHttp\Promise\PromiseInterface; @@ -82,16 +121,49 @@ * contained within formatted names that are returned by the API. * * @method PromiseInterface createFeatureAsync(CreateFeatureRequest $request, array $optionalArgs = []) + * @method PromiseInterface createFleetAsync(CreateFleetRequest $request, array $optionalArgs = []) * @method PromiseInterface createMembershipAsync(CreateMembershipRequest $request, array $optionalArgs = []) + * @method PromiseInterface createMembershipBindingAsync(CreateMembershipBindingRequest $request, array $optionalArgs = []) + * @method PromiseInterface createMembershipRBACRoleBindingAsync(CreateMembershipRBACRoleBindingRequest $request, array $optionalArgs = []) + * @method PromiseInterface createScopeAsync(CreateScopeRequest $request, array $optionalArgs = []) + * @method PromiseInterface createScopeNamespaceAsync(CreateScopeNamespaceRequest $request, array $optionalArgs = []) + * @method PromiseInterface createScopeRBACRoleBindingAsync(CreateScopeRBACRoleBindingRequest $request, array $optionalArgs = []) * @method PromiseInterface deleteFeatureAsync(DeleteFeatureRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteFleetAsync(DeleteFleetRequest $request, array $optionalArgs = []) * @method PromiseInterface deleteMembershipAsync(DeleteMembershipRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteMembershipBindingAsync(DeleteMembershipBindingRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteMembershipRBACRoleBindingAsync(DeleteMembershipRBACRoleBindingRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteScopeAsync(DeleteScopeRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteScopeNamespaceAsync(DeleteScopeNamespaceRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteScopeRBACRoleBindingAsync(DeleteScopeRBACRoleBindingRequest $request, array $optionalArgs = []) * @method PromiseInterface generateConnectManifestAsync(GenerateConnectManifestRequest $request, array $optionalArgs = []) + * @method PromiseInterface generateMembershipRBACRoleBindingYAMLAsync(GenerateMembershipRBACRoleBindingYAMLRequest $request, array $optionalArgs = []) * @method PromiseInterface getFeatureAsync(GetFeatureRequest $request, array $optionalArgs = []) + * @method PromiseInterface getFleetAsync(GetFleetRequest $request, array $optionalArgs = []) * @method PromiseInterface getMembershipAsync(GetMembershipRequest $request, array $optionalArgs = []) + * @method PromiseInterface getMembershipBindingAsync(GetMembershipBindingRequest $request, array $optionalArgs = []) + * @method PromiseInterface getMembershipRBACRoleBindingAsync(GetMembershipRBACRoleBindingRequest $request, array $optionalArgs = []) + * @method PromiseInterface getScopeAsync(GetScopeRequest $request, array $optionalArgs = []) + * @method PromiseInterface getScopeNamespaceAsync(GetScopeNamespaceRequest $request, array $optionalArgs = []) + * @method PromiseInterface getScopeRBACRoleBindingAsync(GetScopeRBACRoleBindingRequest $request, array $optionalArgs = []) + * @method PromiseInterface listBoundMembershipsAsync(ListBoundMembershipsRequest $request, array $optionalArgs = []) * @method PromiseInterface listFeaturesAsync(ListFeaturesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listFleetsAsync(ListFleetsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listMembershipBindingsAsync(ListMembershipBindingsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listMembershipRBACRoleBindingsAsync(ListMembershipRBACRoleBindingsRequest $request, array $optionalArgs = []) * @method PromiseInterface listMembershipsAsync(ListMembershipsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listPermittedScopesAsync(ListPermittedScopesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listScopeNamespacesAsync(ListScopeNamespacesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listScopeRBACRoleBindingsAsync(ListScopeRBACRoleBindingsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listScopesAsync(ListScopesRequest $request, array $optionalArgs = []) * @method PromiseInterface updateFeatureAsync(UpdateFeatureRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateFleetAsync(UpdateFleetRequest $request, array $optionalArgs = []) * @method PromiseInterface updateMembershipAsync(UpdateMembershipRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateMembershipBindingAsync(UpdateMembershipBindingRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateMembershipRBACRoleBindingAsync(UpdateMembershipRBACRoleBindingRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateScopeAsync(UpdateScopeRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateScopeNamespaceAsync(UpdateScopeNamespaceRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateScopeRBACRoleBindingAsync(UpdateScopeRBACRoleBindingRequest $request, array $optionalArgs = []) */ final class GkeHubClient { @@ -208,6 +280,25 @@ public static function featureName(string $project, string $location, string $fe ]); } + /** + * Formats a string containing the fully-qualified path to represent a fleet + * resource. + * + * @param string $project + * @param string $location + * @param string $fleet + * + * @return string The formatted fleet resource. + */ + public static function fleetName(string $project, string $location, string $fleet): string + { + return self::getPathTemplate('fleet')->render([ + 'project' => $project, + 'location' => $location, + 'fleet' => $fleet, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a location * resource. @@ -244,13 +335,200 @@ public static function membershipName(string $project, string $location, string ]); } + /** + * Formats a string containing the fully-qualified path to represent a + * membership_binding resource. + * + * @param string $project + * @param string $location + * @param string $membership + * @param string $membershipbinding + * + * @return string The formatted membership_binding resource. + */ + public static function membershipBindingName( + string $project, + string $location, + string $membership, + string $membershipbinding + ): string { + return self::getPathTemplate('membershipBinding')->render([ + 'project' => $project, + 'location' => $location, + 'membership' => $membership, + 'membershipbinding' => $membershipbinding, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a namespace + * resource. + * + * @param string $project + * @param string $location + * @param string $scope + * @param string $namespace + * + * @return string The formatted namespace resource. + */ + public static function namespaceName(string $project, string $location, string $scope, string $namespace): string + { + return self::getPathTemplate('namespace')->render([ + 'project' => $project, + 'location' => $location, + 'scope' => $scope, + 'namespace' => $namespace, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_location_fleet resource. + * + * @param string $organization + * @param string $location + * @param string $fleet + * + * @return string The formatted organization_location_fleet resource. + */ + public static function organizationLocationFleetName(string $organization, string $location, string $fleet): string + { + return self::getPathTemplate('organizationLocationFleet')->render([ + 'organization' => $organization, + 'location' => $location, + 'fleet' => $fleet, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_fleet resource. + * + * @param string $project + * @param string $location + * @param string $fleet + * + * @return string The formatted project_location_fleet resource. + */ + public static function projectLocationFleetName(string $project, string $location, string $fleet): string + { + return self::getPathTemplate('projectLocationFleet')->render([ + 'project' => $project, + 'location' => $location, + 'fleet' => $fleet, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_membership_rbacrolebinding resource. + * + * @param string $project + * @param string $location + * @param string $membership + * @param string $rbacrolebinding + * + * @return string The formatted project_location_membership_rbacrolebinding resource. + */ + public static function projectLocationMembershipRbacrolebindingName( + string $project, + string $location, + string $membership, + string $rbacrolebinding + ): string { + return self::getPathTemplate('projectLocationMembershipRbacrolebinding')->render([ + 'project' => $project, + 'location' => $location, + 'membership' => $membership, + 'rbacrolebinding' => $rbacrolebinding, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_scope_rbacrolebinding resource. + * + * @param string $project + * @param string $location + * @param string $scope + * @param string $rbacrolebinding + * + * @return string The formatted project_location_scope_rbacrolebinding resource. + */ + public static function projectLocationScopeRbacrolebindingName( + string $project, + string $location, + string $scope, + string $rbacrolebinding + ): string { + return self::getPathTemplate('projectLocationScopeRbacrolebinding')->render([ + 'project' => $project, + 'location' => $location, + 'scope' => $scope, + 'rbacrolebinding' => $rbacrolebinding, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * rbac_role_binding resource. + * + * @param string $project + * @param string $location + * @param string $scope + * @param string $rbacrolebinding + * + * @return string The formatted rbac_role_binding resource. + */ + public static function rBACRoleBindingName( + string $project, + string $location, + string $scope, + string $rbacrolebinding + ): string { + return self::getPathTemplate('rBACRoleBinding')->render([ + 'project' => $project, + 'location' => $location, + 'scope' => $scope, + 'rbacrolebinding' => $rbacrolebinding, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a scope + * resource. + * + * @param string $project + * @param string $location + * @param string $scope + * + * @return string The formatted scope resource. + */ + public static function scopeName(string $project, string $location, string $scope): string + { + return self::getPathTemplate('scope')->render([ + 'project' => $project, + 'location' => $location, + 'scope' => $scope, + ]); + } + /** * Parses a formatted name string and returns an associative array of the components in the name. * The following name formats are supported: * Template: Pattern * - feature: projects/{project}/locations/{location}/features/{feature} + * - fleet: projects/{project}/locations/{location}/fleets/{fleet} * - location: projects/{project}/locations/{location} * - membership: projects/{project}/locations/{location}/memberships/{membership} + * - membershipBinding: projects/{project}/locations/{location}/memberships/{membership}/bindings/{membershipbinding} + * - namespace: projects/{project}/locations/{location}/scopes/{scope}/namespaces/{namespace} + * - organizationLocationFleet: organizations/{organization}/locations/{location}/fleets/{fleet} + * - projectLocationFleet: projects/{project}/locations/{location}/fleets/{fleet} + * - projectLocationMembershipRbacrolebinding: projects/{project}/locations/{location}/memberships/{membership}/rbacrolebindings/{rbacrolebinding} + * - projectLocationScopeRbacrolebinding: projects/{project}/locations/{location}/scopes/{scope}/rbacrolebindings/{rbacrolebinding} + * - rBACRoleBinding: projects/{project}/locations/{location}/scopes/{scope}/rbacrolebindings/{rbacrolebinding} + * - scope: projects/{project}/locations/{location}/scopes/{scope} * * 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 @@ -382,6 +660,32 @@ public function createFeature(CreateFeatureRequest $request, array $callOptions return $this->startApiCall('CreateFeature', $request, $callOptions)->wait(); } + /** + * Creates a fleet. + * + * The async variant is {@see GkeHubClient::createFleetAsync()} . + * + * @example samples/V1/GkeHubClient/create_fleet.php + * + * @param CreateFleetRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createFleet(CreateFleetRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateFleet', $request, $callOptions)->wait(); + } + /** * Creates a new Membership. * @@ -413,14 +717,14 @@ public function createMembership(CreateMembershipRequest $request, array $callOp } /** - * Removes a Feature. + * Creates a MembershipBinding. * - * The async variant is {@see GkeHubClient::deleteFeatureAsync()} . + * The async variant is {@see GkeHubClient::createMembershipBindingAsync()} . * - * @example samples/V1/GkeHubClient/delete_feature.php + * @example samples/V1/GkeHubClient/create_membership_binding.php * - * @param DeleteFeatureRequest $request A request to house fields associated with the call. - * @param array $callOptions { + * @param CreateMembershipBindingRequest $request A request to house fields associated with the call. + * @param array $callOptions { * Optional. * * @type RetrySettings|array $retrySettings @@ -429,28 +733,55 @@ public function createMembership(CreateMembershipRequest $request, array $callOp * {@see RetrySettings} for example usage. * } * - * @return OperationResponse + * @return OperationResponse * * @throws ApiException Thrown if the API call fails. */ - public function deleteFeature(DeleteFeatureRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteFeature', $request, $callOptions)->wait(); + public function createMembershipBinding( + CreateMembershipBindingRequest $request, + array $callOptions = [] + ): OperationResponse { + return $this->startApiCall('CreateMembershipBinding', $request, $callOptions)->wait(); } /** - * Removes a Membership. + * Creates a Membership RBACRoleBinding. * - * **This is currently only supported for GKE clusters on Google Cloud**. - * To unregister other clusters, follow the instructions at - * https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster. + * The async variant is {@see GkeHubClient::createMembershipRBACRoleBindingAsync()} + * . * - * The async variant is {@see GkeHubClient::deleteMembershipAsync()} . + * @example samples/V1/GkeHubClient/create_membership_rbac_role_binding.php * - * @example samples/V1/GkeHubClient/delete_membership.php + * @param CreateMembershipRBACRoleBindingRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. * - * @param DeleteMembershipRequest $request A request to house fields associated with the call. - * @param array $callOptions { + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createMembershipRBACRoleBinding( + CreateMembershipRBACRoleBindingRequest $request, + array $callOptions = [] + ): OperationResponse { + return $this->startApiCall('CreateMembershipRBACRoleBinding', $request, $callOptions)->wait(); + } + + /** + * Creates a Scope. + * + * The async variant is {@see GkeHubClient::createScopeAsync()} . + * + * @example samples/V1/GkeHubClient/create_scope.php + * + * @param CreateScopeRequest $request A request to house fields associated with the call. + * @param array $callOptions { * Optional. * * @type RetrySettings|array $retrySettings @@ -459,27 +790,24 @@ public function deleteFeature(DeleteFeatureRequest $request, array $callOptions * {@see RetrySettings} for example usage. * } * - * @return OperationResponse + * @return OperationResponse * * @throws ApiException Thrown if the API call fails. */ - public function deleteMembership(DeleteMembershipRequest $request, array $callOptions = []): OperationResponse + public function createScope(CreateScopeRequest $request, array $callOptions = []): OperationResponse { - return $this->startApiCall('DeleteMembership', $request, $callOptions)->wait(); + return $this->startApiCall('CreateScope', $request, $callOptions)->wait(); } /** - * Generates the manifest for deployment of the GKE connect agent. - * - * **This method is used internally by Google-provided libraries.** - * Most clients should not need to call this method directly. + * Creates a fleet namespace. * - * The async variant is {@see GkeHubClient::generateConnectManifestAsync()} . + * The async variant is {@see GkeHubClient::createScopeNamespaceAsync()} . * - * @example samples/V1/GkeHubClient/generate_connect_manifest.php + * @example samples/V1/GkeHubClient/create_scope_namespace.php * - * @param GenerateConnectManifestRequest $request A request to house fields associated with the call. - * @param array $callOptions { + * @param CreateScopeNamespaceRequest $request A request to house fields associated with the call. + * @param array $callOptions { * Optional. * * @type RetrySettings|array $retrySettings @@ -488,26 +816,26 @@ public function deleteMembership(DeleteMembershipRequest $request, array $callOp * {@see RetrySettings} for example usage. * } * - * @return GenerateConnectManifestResponse + * @return OperationResponse * * @throws ApiException Thrown if the API call fails. */ - public function generateConnectManifest( - GenerateConnectManifestRequest $request, + public function createScopeNamespace( + CreateScopeNamespaceRequest $request, array $callOptions = [] - ): GenerateConnectManifestResponse { - return $this->startApiCall('GenerateConnectManifest', $request, $callOptions)->wait(); + ): OperationResponse { + return $this->startApiCall('CreateScopeNamespace', $request, $callOptions)->wait(); } /** - * Gets details of a single Feature. + * Creates a Scope RBACRoleBinding. * - * The async variant is {@see GkeHubClient::getFeatureAsync()} . + * The async variant is {@see GkeHubClient::createScopeRBACRoleBindingAsync()} . * - * @example samples/V1/GkeHubClient/get_feature.php + * @example samples/V1/GkeHubClient/create_scope_rbac_role_binding.php * - * @param GetFeatureRequest $request A request to house fields associated with the call. - * @param array $callOptions { + * @param CreateScopeRBACRoleBindingRequest $request A request to house fields associated with the call. + * @param array $callOptions { * Optional. * * @type RetrySettings|array $retrySettings @@ -516,23 +844,25 @@ public function generateConnectManifest( * {@see RetrySettings} for example usage. * } * - * @return Feature + * @return OperationResponse * * @throws ApiException Thrown if the API call fails. */ - public function getFeature(GetFeatureRequest $request, array $callOptions = []): Feature - { - return $this->startApiCall('GetFeature', $request, $callOptions)->wait(); + public function createScopeRBACRoleBinding( + CreateScopeRBACRoleBindingRequest $request, + array $callOptions = [] + ): OperationResponse { + return $this->startApiCall('CreateScopeRBACRoleBinding', $request, $callOptions)->wait(); } /** - * Gets the details of a Membership. + * Removes a Feature. * - * The async variant is {@see GkeHubClient::getMembershipAsync()} . + * The async variant is {@see GkeHubClient::deleteFeatureAsync()} . * - * @example samples/V1/GkeHubClient/get_membership.php + * @example samples/V1/GkeHubClient/delete_feature.php * - * @param GetMembershipRequest $request A request to house fields associated with the call. + * @param DeleteFeatureRequest $request A request to house fields associated with the call. * @param array $callOptions { * Optional. * @@ -542,24 +872,24 @@ public function getFeature(GetFeatureRequest $request, array $callOptions = []): * {@see RetrySettings} for example usage. * } * - * @return Membership + * @return OperationResponse * * @throws ApiException Thrown if the API call fails. */ - public function getMembership(GetMembershipRequest $request, array $callOptions = []): Membership + public function deleteFeature(DeleteFeatureRequest $request, array $callOptions = []): OperationResponse { - return $this->startApiCall('GetMembership', $request, $callOptions)->wait(); + return $this->startApiCall('DeleteFeature', $request, $callOptions)->wait(); } /** - * Lists Features in a given project and location. + * Removes a Fleet. There must be no memberships remaining in the Fleet. * - * The async variant is {@see GkeHubClient::listFeaturesAsync()} . + * The async variant is {@see GkeHubClient::deleteFleetAsync()} . * - * @example samples/V1/GkeHubClient/list_features.php + * @example samples/V1/GkeHubClient/delete_fleet.php * - * @param ListFeaturesRequest $request A request to house fields associated with the call. - * @param array $callOptions { + * @param DeleteFleetRequest $request A request to house fields associated with the call. + * @param array $callOptions { * Optional. * * @type RetrySettings|array $retrySettings @@ -568,24 +898,28 @@ public function getMembership(GetMembershipRequest $request, array $callOptions * {@see RetrySettings} for example usage. * } * - * @return PagedListResponse + * @return OperationResponse * * @throws ApiException Thrown if the API call fails. */ - public function listFeatures(ListFeaturesRequest $request, array $callOptions = []): PagedListResponse + public function deleteFleet(DeleteFleetRequest $request, array $callOptions = []): OperationResponse { - return $this->startApiCall('ListFeatures', $request, $callOptions); + return $this->startApiCall('DeleteFleet', $request, $callOptions)->wait(); } /** - * Lists Memberships in a given project and location. + * Removes a Membership. * - * The async variant is {@see GkeHubClient::listMembershipsAsync()} . + * **This is currently only supported for GKE clusters on Google Cloud**. + * To unregister other clusters, follow the instructions at + * https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster. * - * @example samples/V1/GkeHubClient/list_memberships.php + * The async variant is {@see GkeHubClient::deleteMembershipAsync()} . * - * @param ListMembershipsRequest $request A request to house fields associated with the call. - * @param array $callOptions { + * @example samples/V1/GkeHubClient/delete_membership.php + * + * @param DeleteMembershipRequest $request A request to house fields associated with the call. + * @param array $callOptions { * Optional. * * @type RetrySettings|array $retrySettings @@ -594,24 +928,24 @@ public function listFeatures(ListFeaturesRequest $request, array $callOptions = * {@see RetrySettings} for example usage. * } * - * @return PagedListResponse + * @return OperationResponse * * @throws ApiException Thrown if the API call fails. */ - public function listMemberships(ListMembershipsRequest $request, array $callOptions = []): PagedListResponse + public function deleteMembership(DeleteMembershipRequest $request, array $callOptions = []): OperationResponse { - return $this->startApiCall('ListMemberships', $request, $callOptions); + return $this->startApiCall('DeleteMembership', $request, $callOptions)->wait(); } /** - * Updates an existing Feature. + * Deletes a MembershipBinding. * - * The async variant is {@see GkeHubClient::updateFeatureAsync()} . + * The async variant is {@see GkeHubClient::deleteMembershipBindingAsync()} . * - * @example samples/V1/GkeHubClient/update_feature.php + * @example samples/V1/GkeHubClient/delete_membership_binding.php * - * @param UpdateFeatureRequest $request A request to house fields associated with the call. - * @param array $callOptions { + * @param DeleteMembershipBindingRequest $request A request to house fields associated with the call. + * @param array $callOptions { * Optional. * * @type RetrySettings|array $retrySettings @@ -620,24 +954,27 @@ public function listMemberships(ListMembershipsRequest $request, array $callOpti * {@see RetrySettings} for example usage. * } * - * @return OperationResponse + * @return OperationResponse * * @throws ApiException Thrown if the API call fails. */ - public function updateFeature(UpdateFeatureRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateFeature', $request, $callOptions)->wait(); + public function deleteMembershipBinding( + DeleteMembershipBindingRequest $request, + array $callOptions = [] + ): OperationResponse { + return $this->startApiCall('DeleteMembershipBinding', $request, $callOptions)->wait(); } /** - * Updates an existing Membership. + * Deletes a Membership RBACRoleBinding. * - * The async variant is {@see GkeHubClient::updateMembershipAsync()} . + * The async variant is {@see GkeHubClient::deleteMembershipRBACRoleBindingAsync()} + * . * - * @example samples/V1/GkeHubClient/update_membership.php + * @example samples/V1/GkeHubClient/delete_membership_rbac_role_binding.php * - * @param UpdateMembershipRequest $request A request to house fields associated with the call. - * @param array $callOptions { + * @param DeleteMembershipRBACRoleBindingRequest $request A request to house fields associated with the call. + * @param array $callOptions { * Optional. * * @type RetrySettings|array $retrySettings @@ -646,12 +983,859 @@ public function updateFeature(UpdateFeatureRequest $request, array $callOptions * {@see RetrySettings} for example usage. * } * - * @return OperationResponse + * @return OperationResponse * * @throws ApiException Thrown if the API call fails. */ - public function updateMembership(UpdateMembershipRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateMembership', $request, $callOptions)->wait(); + public function deleteMembershipRBACRoleBinding( + DeleteMembershipRBACRoleBindingRequest $request, + array $callOptions = [] + ): OperationResponse { + return $this->startApiCall('DeleteMembershipRBACRoleBinding', $request, $callOptions)->wait(); + } + + /** + * Deletes a Scope. + * + * The async variant is {@see GkeHubClient::deleteScopeAsync()} . + * + * @example samples/V1/GkeHubClient/delete_scope.php + * + * @param DeleteScopeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteScope(DeleteScopeRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteScope', $request, $callOptions)->wait(); + } + + /** + * Deletes a fleet namespace. + * + * The async variant is {@see GkeHubClient::deleteScopeNamespaceAsync()} . + * + * @example samples/V1/GkeHubClient/delete_scope_namespace.php + * + * @param DeleteScopeNamespaceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteScopeNamespace( + DeleteScopeNamespaceRequest $request, + array $callOptions = [] + ): OperationResponse { + return $this->startApiCall('DeleteScopeNamespace', $request, $callOptions)->wait(); + } + + /** + * Deletes a Scope RBACRoleBinding. + * + * The async variant is {@see GkeHubClient::deleteScopeRBACRoleBindingAsync()} . + * + * @example samples/V1/GkeHubClient/delete_scope_rbac_role_binding.php + * + * @param DeleteScopeRBACRoleBindingRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteScopeRBACRoleBinding( + DeleteScopeRBACRoleBindingRequest $request, + array $callOptions = [] + ): OperationResponse { + return $this->startApiCall('DeleteScopeRBACRoleBinding', $request, $callOptions)->wait(); + } + + /** + * Generates the manifest for deployment of the GKE connect agent. + * + * **This method is used internally by Google-provided libraries.** + * Most clients should not need to call this method directly. + * + * The async variant is {@see GkeHubClient::generateConnectManifestAsync()} . + * + * @example samples/V1/GkeHubClient/generate_connect_manifest.php + * + * @param GenerateConnectManifestRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return GenerateConnectManifestResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function generateConnectManifest( + GenerateConnectManifestRequest $request, + array $callOptions = [] + ): GenerateConnectManifestResponse { + return $this->startApiCall('GenerateConnectManifest', $request, $callOptions)->wait(); + } + + /** + * Generates a YAML of the RBAC policies for the specified + * RoleBinding and its associated impersonation resources. + * + * The async variant is + * {@see GkeHubClient::generateMembershipRBACRoleBindingYAMLAsync()} . + * + * @example samples/V1/GkeHubClient/generate_membership_rbac_role_binding_yaml.php + * + * @param GenerateMembershipRBACRoleBindingYAMLRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return GenerateMembershipRBACRoleBindingYAMLResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function generateMembershipRBACRoleBindingYAML( + GenerateMembershipRBACRoleBindingYAMLRequest $request, + array $callOptions = [] + ): GenerateMembershipRBACRoleBindingYAMLResponse { + return $this->startApiCall('GenerateMembershipRBACRoleBindingYAML', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single Feature. + * + * The async variant is {@see GkeHubClient::getFeatureAsync()} . + * + * @example samples/V1/GkeHubClient/get_feature.php + * + * @param GetFeatureRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Feature + * + * @throws ApiException Thrown if the API call fails. + */ + public function getFeature(GetFeatureRequest $request, array $callOptions = []): Feature + { + return $this->startApiCall('GetFeature', $request, $callOptions)->wait(); + } + + /** + * Returns the details of a fleet. + * + * The async variant is {@see GkeHubClient::getFleetAsync()} . + * + * @example samples/V1/GkeHubClient/get_fleet.php + * + * @param GetFleetRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Fleet + * + * @throws ApiException Thrown if the API call fails. + */ + public function getFleet(GetFleetRequest $request, array $callOptions = []): Fleet + { + return $this->startApiCall('GetFleet', $request, $callOptions)->wait(); + } + + /** + * Gets the details of a Membership. + * + * The async variant is {@see GkeHubClient::getMembershipAsync()} . + * + * @example samples/V1/GkeHubClient/get_membership.php + * + * @param GetMembershipRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Membership + * + * @throws ApiException Thrown if the API call fails. + */ + public function getMembership(GetMembershipRequest $request, array $callOptions = []): Membership + { + return $this->startApiCall('GetMembership', $request, $callOptions)->wait(); + } + + /** + * Returns the details of a MembershipBinding. + * + * The async variant is {@see GkeHubClient::getMembershipBindingAsync()} . + * + * @example samples/V1/GkeHubClient/get_membership_binding.php + * + * @param GetMembershipBindingRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return MembershipBinding + * + * @throws ApiException Thrown if the API call fails. + */ + public function getMembershipBinding( + GetMembershipBindingRequest $request, + array $callOptions = [] + ): MembershipBinding { + return $this->startApiCall('GetMembershipBinding', $request, $callOptions)->wait(); + } + + /** + * Returns the details of a Membership RBACRoleBinding. + * + * The async variant is {@see GkeHubClient::getMembershipRBACRoleBindingAsync()} . + * + * @example samples/V1/GkeHubClient/get_membership_rbac_role_binding.php + * + * @param GetMembershipRBACRoleBindingRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return RBACRoleBinding + * + * @throws ApiException Thrown if the API call fails. + */ + public function getMembershipRBACRoleBinding( + GetMembershipRBACRoleBindingRequest $request, + array $callOptions = [] + ): RBACRoleBinding { + return $this->startApiCall('GetMembershipRBACRoleBinding', $request, $callOptions)->wait(); + } + + /** + * Returns the details of a Scope. + * + * The async variant is {@see GkeHubClient::getScopeAsync()} . + * + * @example samples/V1/GkeHubClient/get_scope.php + * + * @param GetScopeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Scope + * + * @throws ApiException Thrown if the API call fails. + */ + public function getScope(GetScopeRequest $request, array $callOptions = []): Scope + { + return $this->startApiCall('GetScope', $request, $callOptions)->wait(); + } + + /** + * Returns the details of a fleet namespace. + * + * The async variant is {@see GkeHubClient::getScopeNamespaceAsync()} . + * + * @example samples/V1/GkeHubClient/get_scope_namespace.php + * + * @param GetScopeNamespaceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 getScopeNamespace(GetScopeNamespaceRequest $request, array $callOptions = []): PBNamespace + { + return $this->startApiCall('GetScopeNamespace', $request, $callOptions)->wait(); + } + + /** + * Returns the details of a Scope RBACRoleBinding. + * + * The async variant is {@see GkeHubClient::getScopeRBACRoleBindingAsync()} . + * + * @example samples/V1/GkeHubClient/get_scope_rbac_role_binding.php + * + * @param GetScopeRBACRoleBindingRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return RBACRoleBinding + * + * @throws ApiException Thrown if the API call fails. + */ + public function getScopeRBACRoleBinding( + GetScopeRBACRoleBindingRequest $request, + array $callOptions = [] + ): RBACRoleBinding { + return $this->startApiCall('GetScopeRBACRoleBinding', $request, $callOptions)->wait(); + } + + /** + * Lists Memberships bound to a Scope. The response includes relevant + * Memberships from all regions. + * + * The async variant is {@see GkeHubClient::listBoundMembershipsAsync()} . + * + * @example samples/V1/GkeHubClient/list_bound_memberships.php + * + * @param ListBoundMembershipsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listBoundMemberships( + ListBoundMembershipsRequest $request, + array $callOptions = [] + ): PagedListResponse { + return $this->startApiCall('ListBoundMemberships', $request, $callOptions); + } + + /** + * Lists Features in a given project and location. + * + * The async variant is {@see GkeHubClient::listFeaturesAsync()} . + * + * @example samples/V1/GkeHubClient/list_features.php + * + * @param ListFeaturesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listFeatures(ListFeaturesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListFeatures', $request, $callOptions); + } + + /** + * Returns all fleets within an organization or a project that the caller has + * access to. + * + * The async variant is {@see GkeHubClient::listFleetsAsync()} . + * + * @example samples/V1/GkeHubClient/list_fleets.php + * + * @param ListFleetsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listFleets(ListFleetsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListFleets', $request, $callOptions); + } + + /** + * Lists MembershipBindings. + * + * The async variant is {@see GkeHubClient::listMembershipBindingsAsync()} . + * + * @example samples/V1/GkeHubClient/list_membership_bindings.php + * + * @param ListMembershipBindingsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listMembershipBindings( + ListMembershipBindingsRequest $request, + array $callOptions = [] + ): PagedListResponse { + return $this->startApiCall('ListMembershipBindings', $request, $callOptions); + } + + /** + * Lists all Membership RBACRoleBindings. + * + * The async variant is {@see GkeHubClient::listMembershipRBACRoleBindingsAsync()} + * . + * + * @example samples/V1/GkeHubClient/list_membership_rbac_role_bindings.php + * + * @param ListMembershipRBACRoleBindingsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listMembershipRBACRoleBindings( + ListMembershipRBACRoleBindingsRequest $request, + array $callOptions = [] + ): PagedListResponse { + return $this->startApiCall('ListMembershipRBACRoleBindings', $request, $callOptions); + } + + /** + * Lists Memberships in a given project and location. + * + * The async variant is {@see GkeHubClient::listMembershipsAsync()} . + * + * @example samples/V1/GkeHubClient/list_memberships.php + * + * @param ListMembershipsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listMemberships(ListMembershipsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListMemberships', $request, $callOptions); + } + + /** + * Lists permitted Scopes. + * + * The async variant is {@see GkeHubClient::listPermittedScopesAsync()} . + * + * @example samples/V1/GkeHubClient/list_permitted_scopes.php + * + * @param ListPermittedScopesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listPermittedScopes(ListPermittedScopesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListPermittedScopes', $request, $callOptions); + } + + /** + * Lists fleet namespaces. + * + * The async variant is {@see GkeHubClient::listScopeNamespacesAsync()} . + * + * @example samples/V1/GkeHubClient/list_scope_namespaces.php + * + * @param ListScopeNamespacesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listScopeNamespaces(ListScopeNamespacesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListScopeNamespaces', $request, $callOptions); + } + + /** + * Lists all Scope RBACRoleBindings. + * + * The async variant is {@see GkeHubClient::listScopeRBACRoleBindingsAsync()} . + * + * @example samples/V1/GkeHubClient/list_scope_rbac_role_bindings.php + * + * @param ListScopeRBACRoleBindingsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listScopeRBACRoleBindings( + ListScopeRBACRoleBindingsRequest $request, + array $callOptions = [] + ): PagedListResponse { + return $this->startApiCall('ListScopeRBACRoleBindings', $request, $callOptions); + } + + /** + * Lists Scopes. + * + * The async variant is {@see GkeHubClient::listScopesAsync()} . + * + * @example samples/V1/GkeHubClient/list_scopes.php + * + * @param ListScopesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listScopes(ListScopesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListScopes', $request, $callOptions); + } + + /** + * Updates an existing Feature. + * + * The async variant is {@see GkeHubClient::updateFeatureAsync()} . + * + * @example samples/V1/GkeHubClient/update_feature.php + * + * @param UpdateFeatureRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateFeature(UpdateFeatureRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateFeature', $request, $callOptions)->wait(); + } + + /** + * Updates a fleet. + * + * The async variant is {@see GkeHubClient::updateFleetAsync()} . + * + * @example samples/V1/GkeHubClient/update_fleet.php + * + * @param UpdateFleetRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateFleet(UpdateFleetRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateFleet', $request, $callOptions)->wait(); + } + + /** + * Updates an existing Membership. + * + * The async variant is {@see GkeHubClient::updateMembershipAsync()} . + * + * @example samples/V1/GkeHubClient/update_membership.php + * + * @param UpdateMembershipRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateMembership(UpdateMembershipRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateMembership', $request, $callOptions)->wait(); + } + + /** + * Updates a MembershipBinding. + * + * The async variant is {@see GkeHubClient::updateMembershipBindingAsync()} . + * + * @example samples/V1/GkeHubClient/update_membership_binding.php + * + * @param UpdateMembershipBindingRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateMembershipBinding( + UpdateMembershipBindingRequest $request, + array $callOptions = [] + ): OperationResponse { + return $this->startApiCall('UpdateMembershipBinding', $request, $callOptions)->wait(); + } + + /** + * Updates a Membership RBACRoleBinding. + * + * The async variant is {@see GkeHubClient::updateMembershipRBACRoleBindingAsync()} + * . + * + * @example samples/V1/GkeHubClient/update_membership_rbac_role_binding.php + * + * @param UpdateMembershipRBACRoleBindingRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateMembershipRBACRoleBinding( + UpdateMembershipRBACRoleBindingRequest $request, + array $callOptions = [] + ): OperationResponse { + return $this->startApiCall('UpdateMembershipRBACRoleBinding', $request, $callOptions)->wait(); + } + + /** + * Updates a scopes. + * + * The async variant is {@see GkeHubClient::updateScopeAsync()} . + * + * @example samples/V1/GkeHubClient/update_scope.php + * + * @param UpdateScopeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateScope(UpdateScopeRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateScope', $request, $callOptions)->wait(); + } + + /** + * Updates a fleet namespace. + * + * The async variant is {@see GkeHubClient::updateScopeNamespaceAsync()} . + * + * @example samples/V1/GkeHubClient/update_scope_namespace.php + * + * @param UpdateScopeNamespaceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateScopeNamespace( + UpdateScopeNamespaceRequest $request, + array $callOptions = [] + ): OperationResponse { + return $this->startApiCall('UpdateScopeNamespace', $request, $callOptions)->wait(); + } + + /** + * Updates a Scope RBACRoleBinding. + * + * The async variant is {@see GkeHubClient::updateScopeRBACRoleBindingAsync()} . + * + * @example samples/V1/GkeHubClient/update_scope_rbac_role_binding.php + * + * @param UpdateScopeRBACRoleBindingRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateScopeRBACRoleBinding( + UpdateScopeRBACRoleBindingRequest $request, + array $callOptions = [] + ): OperationResponse { + return $this->startApiCall('UpdateScopeRBACRoleBinding', $request, $callOptions)->wait(); } } diff --git a/GkeHub/src/V1/FeatureSpec.php b/GkeHub/src/V1/FeatureSpec.php index 1031f8479b15..009a3914d922 100644 --- a/GkeHub/src/V1/FeatureSpec.php +++ b/GkeHub/src/V1/FeatureSpec.php @@ -1,28 +1,29 @@ google.cloud.gkehub.multiclusteringress.v1.FeatureSpec + * Generated from protobuf message google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureSpec */ class FeatureSpec extends \Google\Protobuf\Internal\Message { /** - * Fully-qualified Membership name which hosts the MultiClusterIngress CRD. - * Example: `projects/foo-proj/locations/global/memberships/bar` + * The list of allowed custom roles (ClusterRoles). If a ClusterRole is not + * part of this list, it cannot be used in a Scope RBACRoleBinding. If a + * ClusterRole in this list is in use, it cannot be removed from the list. * - * Generated from protobuf field string config_membership = 1; + * Generated from protobuf field repeated string allowed_custom_roles = 2; */ - protected $config_membership = ''; + private $allowed_custom_roles; /** * Constructor. @@ -30,40 +31,43 @@ class FeatureSpec extends \Google\Protobuf\Internal\Message * @param array $data { * Optional. Data for populating the Message object. * - * @type string $config_membership - * Fully-qualified Membership name which hosts the MultiClusterIngress CRD. - * Example: `projects/foo-proj/locations/global/memberships/bar` + * @type array|\Google\Protobuf\Internal\RepeatedField $allowed_custom_roles + * The list of allowed custom roles (ClusterRoles). If a ClusterRole is not + * part of this list, it cannot be used in a Scope RBACRoleBinding. If a + * ClusterRole in this list is in use, it cannot be removed from the list. * } */ public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Multiclusteringress\Multiclusteringress::initOnce(); + \GPBMetadata\Google\Cloud\Gkehub\V1\Rbacrolebindingactuation\Rbacrolebindingactuation::initOnce(); parent::__construct($data); } /** - * Fully-qualified Membership name which hosts the MultiClusterIngress CRD. - * Example: `projects/foo-proj/locations/global/memberships/bar` + * The list of allowed custom roles (ClusterRoles). If a ClusterRole is not + * part of this list, it cannot be used in a Scope RBACRoleBinding. If a + * ClusterRole in this list is in use, it cannot be removed from the list. * - * Generated from protobuf field string config_membership = 1; - * @return string + * Generated from protobuf field repeated string allowed_custom_roles = 2; + * @return \Google\Protobuf\Internal\RepeatedField */ - public function getConfigMembership() + public function getAllowedCustomRoles() { - return $this->config_membership; + return $this->allowed_custom_roles; } /** - * Fully-qualified Membership name which hosts the MultiClusterIngress CRD. - * Example: `projects/foo-proj/locations/global/memberships/bar` + * The list of allowed custom roles (ClusterRoles). If a ClusterRole is not + * part of this list, it cannot be used in a Scope RBACRoleBinding. If a + * ClusterRole in this list is in use, it cannot be removed from the list. * - * Generated from protobuf field string config_membership = 1; - * @param string $var + * Generated from protobuf field repeated string allowed_custom_roles = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var * @return $this */ - public function setConfigMembership($var) + public function setAllowedCustomRoles($var) { - GPBUtil::checkString($var, True); - $this->config_membership = $var; + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->allowed_custom_roles = $arr; return $this; } diff --git a/GkeHub/src/V1/FeatureState.php b/GkeHub/src/V1/FeatureState.php index d2188bb9360d..fc27f23f8ee3 100644 --- a/GkeHub/src/V1/FeatureState.php +++ b/GkeHub/src/V1/FeatureState.php @@ -1,40 +1,21 @@ google.cloud.gkehub.v1.FeatureState + * Generated from protobuf message google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureState */ class FeatureState extends \Google\Protobuf\Internal\Message { - /** - * The high-level, machine-readable status of this Feature. - * - * Generated from protobuf field .google.cloud.gkehub.v1.FeatureState.Code code = 1; - */ - protected $code = 0; - /** - * A human-readable description of the current status. - * - * Generated from protobuf field string description = 2; - */ - protected $description = ''; - /** - * The time this status and any related Feature-specific details were updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; - */ - protected $update_time = null; /** * Constructor. @@ -42,106 +23,12 @@ class FeatureState extends \Google\Protobuf\Internal\Message * @param array $data { * Optional. Data for populating the Message object. * - * @type int $code - * The high-level, machine-readable status of this Feature. - * @type string $description - * A human-readable description of the current status. - * @type \Google\Protobuf\Timestamp $update_time - * The time this status and any related Feature-specific details were updated. * } */ public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Feature::initOnce(); + \GPBMetadata\Google\Cloud\Gkehub\V1\Rbacrolebindingactuation\Rbacrolebindingactuation::initOnce(); parent::__construct($data); } - /** - * The high-level, machine-readable status of this Feature. - * - * Generated from protobuf field .google.cloud.gkehub.v1.FeatureState.Code code = 1; - * @return int - */ - public function getCode() - { - return $this->code; - } - - /** - * The high-level, machine-readable status of this Feature. - * - * Generated from protobuf field .google.cloud.gkehub.v1.FeatureState.Code code = 1; - * @param int $var - * @return $this - */ - public function setCode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\V1\FeatureState\Code::class); - $this->code = $var; - - return $this; - } - - /** - * A human-readable description of the current status. - * - * Generated from protobuf field string description = 2; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * A human-readable description of the current status. - * - * Generated from protobuf field string description = 2; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * The time this status and any related Feature-specific details were updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * The time this status and any related Feature-specific details were updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - } diff --git a/GkeHub/src/V1/gapic_metadata.json b/GkeHub/src/V1/gapic_metadata.json index 7b0047620c7f..b97f2929ef6b 100644 --- a/GkeHub/src/V1/gapic_metadata.json +++ b/GkeHub/src/V1/gapic_metadata.json @@ -15,55 +15,220 @@ "createFeature" ] }, + "CreateFleet": { + "methods": [ + "createFleet" + ] + }, "CreateMembership": { "methods": [ "createMembership" ] }, + "CreateMembershipBinding": { + "methods": [ + "createMembershipBinding" + ] + }, + "CreateMembershipRBACRoleBinding": { + "methods": [ + "createMembershipRBACRoleBinding" + ] + }, + "CreateScope": { + "methods": [ + "createScope" + ] + }, + "CreateScopeNamespace": { + "methods": [ + "createScopeNamespace" + ] + }, + "CreateScopeRBACRoleBinding": { + "methods": [ + "createScopeRBACRoleBinding" + ] + }, "DeleteFeature": { "methods": [ "deleteFeature" ] }, + "DeleteFleet": { + "methods": [ + "deleteFleet" + ] + }, "DeleteMembership": { "methods": [ "deleteMembership" ] }, + "DeleteMembershipBinding": { + "methods": [ + "deleteMembershipBinding" + ] + }, + "DeleteMembershipRBACRoleBinding": { + "methods": [ + "deleteMembershipRBACRoleBinding" + ] + }, + "DeleteScope": { + "methods": [ + "deleteScope" + ] + }, + "DeleteScopeNamespace": { + "methods": [ + "deleteScopeNamespace" + ] + }, + "DeleteScopeRBACRoleBinding": { + "methods": [ + "deleteScopeRBACRoleBinding" + ] + }, "GenerateConnectManifest": { "methods": [ "generateConnectManifest" ] }, + "GenerateMembershipRBACRoleBindingYAML": { + "methods": [ + "generateMembershipRBACRoleBindingYAML" + ] + }, "GetFeature": { "methods": [ "getFeature" ] }, + "GetFleet": { + "methods": [ + "getFleet" + ] + }, "GetMembership": { "methods": [ "getMembership" ] }, + "GetMembershipBinding": { + "methods": [ + "getMembershipBinding" + ] + }, + "GetMembershipRBACRoleBinding": { + "methods": [ + "getMembershipRBACRoleBinding" + ] + }, + "GetScope": { + "methods": [ + "getScope" + ] + }, + "GetScopeNamespace": { + "methods": [ + "getScopeNamespace" + ] + }, + "GetScopeRBACRoleBinding": { + "methods": [ + "getScopeRBACRoleBinding" + ] + }, + "ListBoundMemberships": { + "methods": [ + "listBoundMemberships" + ] + }, "ListFeatures": { "methods": [ "listFeatures" ] }, + "ListFleets": { + "methods": [ + "listFleets" + ] + }, + "ListMembershipBindings": { + "methods": [ + "listMembershipBindings" + ] + }, + "ListMembershipRBACRoleBindings": { + "methods": [ + "listMembershipRBACRoleBindings" + ] + }, "ListMemberships": { "methods": [ "listMemberships" ] }, + "ListPermittedScopes": { + "methods": [ + "listPermittedScopes" + ] + }, + "ListScopeNamespaces": { + "methods": [ + "listScopeNamespaces" + ] + }, + "ListScopeRBACRoleBindings": { + "methods": [ + "listScopeRBACRoleBindings" + ] + }, + "ListScopes": { + "methods": [ + "listScopes" + ] + }, "UpdateFeature": { "methods": [ "updateFeature" ] }, + "UpdateFleet": { + "methods": [ + "updateFleet" + ] + }, "UpdateMembership": { "methods": [ "updateMembership" ] + }, + "UpdateMembershipBinding": { + "methods": [ + "updateMembershipBinding" + ] + }, + "UpdateMembershipRBACRoleBinding": { + "methods": [ + "updateMembershipRBACRoleBinding" + ] + }, + "UpdateScope": { + "methods": [ + "updateScope" + ] + }, + "UpdateScopeNamespace": { + "methods": [ + "updateScopeNamespace" + ] + }, + "UpdateScopeRBACRoleBinding": { + "methods": [ + "updateScopeRBACRoleBinding" + ] } } } diff --git a/GkeHub/src/V1/resources/gke_hub_client_config.json b/GkeHub/src/V1/resources/gke_hub_client_config.json index f361405e676f..71f5c1b998c6 100644 --- a/GkeHub/src/V1/resources/gke_hub_client_config.json +++ b/GkeHub/src/V1/resources/gke_hub_client_config.json @@ -33,55 +33,220 @@ "retry_codes_name": "retry_policy_1_codes", "retry_params_name": "retry_policy_1_params" }, + "CreateFleet": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, "CreateMembership": { "timeout_millis": 60000, "retry_codes_name": "retry_policy_1_codes", "retry_params_name": "retry_policy_1_params" }, + "CreateMembershipBinding": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreateMembershipRBACRoleBinding": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreateScope": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreateScopeNamespace": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreateScopeRBACRoleBinding": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, "DeleteFeature": { "timeout_millis": 60000, "retry_codes_name": "retry_policy_1_codes", "retry_params_name": "retry_policy_1_params" }, + "DeleteFleet": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, "DeleteMembership": { "timeout_millis": 60000, "retry_codes_name": "retry_policy_1_codes", "retry_params_name": "retry_policy_1_params" }, + "DeleteMembershipBinding": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteMembershipRBACRoleBinding": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteScope": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteScopeNamespace": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteScopeRBACRoleBinding": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, "GenerateConnectManifest": { "timeout_millis": 60000, "retry_codes_name": "retry_policy_1_codes", "retry_params_name": "retry_policy_1_params" }, + "GenerateMembershipRBACRoleBindingYAML": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, "GetFeature": { "timeout_millis": 60000, "retry_codes_name": "retry_policy_1_codes", "retry_params_name": "retry_policy_1_params" }, + "GetFleet": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, "GetMembership": { "timeout_millis": 60000, "retry_codes_name": "retry_policy_1_codes", "retry_params_name": "retry_policy_1_params" }, + "GetMembershipBinding": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetMembershipRBACRoleBinding": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetScope": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetScopeNamespace": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetScopeRBACRoleBinding": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListBoundMemberships": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, "ListFeatures": { "timeout_millis": 60000, "retry_codes_name": "retry_policy_1_codes", "retry_params_name": "retry_policy_1_params" }, + "ListFleets": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListMembershipBindings": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListMembershipRBACRoleBindings": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, "ListMemberships": { "timeout_millis": 60000, "retry_codes_name": "retry_policy_1_codes", "retry_params_name": "retry_policy_1_params" }, + "ListPermittedScopes": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListScopeNamespaces": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListScopeRBACRoleBindings": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListScopes": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, "UpdateFeature": { "timeout_millis": 60000, "retry_codes_name": "retry_policy_1_codes", "retry_params_name": "retry_policy_1_params" }, + "UpdateFleet": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, "UpdateMembership": { "timeout_millis": 60000, "retry_codes_name": "retry_policy_1_codes", "retry_params_name": "retry_policy_1_params" + }, + "UpdateMembershipBinding": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateMembershipRBACRoleBinding": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateScope": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateScopeNamespace": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateScopeRBACRoleBinding": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" } } } diff --git a/GkeHub/src/V1/resources/gke_hub_descriptor_config.php b/GkeHub/src/V1/resources/gke_hub_descriptor_config.php index 490753e5428b..041197f34244 100644 --- a/GkeHub/src/V1/resources/gke_hub_descriptor_config.php +++ b/GkeHub/src/V1/resources/gke_hub_descriptor_config.php @@ -42,6 +42,25 @@ ], ], ], + 'CreateFleet' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\GkeHub\V1\Fleet', + 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], 'CreateMembership' => [ 'longRunning' => [ 'operationReturnType' => '\Google\Cloud\GkeHub\V1\Membership', @@ -61,6 +80,101 @@ ], ], ], + 'CreateMembershipBinding' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\GkeHub\V1\MembershipBinding', + 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateMembershipRBACRoleBinding' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\GkeHub\V1\RBACRoleBinding', + 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateScope' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\GkeHub\V1\Scope', + 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateScopeNamespace' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\GkeHub\V1\PBNamespace', + 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateScopeRBACRoleBinding' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\GkeHub\V1\RBACRoleBinding', + 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], 'DeleteFeature' => [ 'longRunning' => [ 'operationReturnType' => '\Google\Protobuf\GPBEmpty', @@ -80,6 +194,25 @@ ], ], ], + 'DeleteFleet' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], 'DeleteMembership' => [ 'longRunning' => [ 'operationReturnType' => '\Google\Protobuf\GPBEmpty', @@ -99,6 +232,101 @@ ], ], ], + 'DeleteMembershipBinding' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteMembershipRBACRoleBinding' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteScope' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteScopeNamespace' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteScopeRBACRoleBinding' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], 'UpdateFeature' => [ 'longRunning' => [ 'operationReturnType' => '\Google\Cloud\GkeHub\V1\Feature', @@ -118,6 +346,26 @@ ], ], ], + 'UpdateFleet' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\GkeHub\V1\Fleet', + 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'fleet.name', + 'fieldAccessors' => [ + 'getFleet', + 'getName', + ], + ], + ], + ], 'UpdateMembership' => [ 'longRunning' => [ 'operationReturnType' => '\Google\Cloud\GkeHub\V1\Membership', @@ -137,6 +385,106 @@ ], ], ], + 'UpdateMembershipBinding' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\GkeHub\V1\MembershipBinding', + 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'membership_binding.name', + 'fieldAccessors' => [ + 'getMembershipBinding', + 'getName', + ], + ], + ], + ], + 'UpdateMembershipRBACRoleBinding' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\GkeHub\V1\RBACRoleBinding', + 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'rbacrolebinding.name', + 'fieldAccessors' => [ + 'getRbacrolebinding', + 'getName', + ], + ], + ], + ], + 'UpdateScope' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\GkeHub\V1\Scope', + 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'scope.name', + 'fieldAccessors' => [ + 'getScope', + 'getName', + ], + ], + ], + ], + 'UpdateScopeNamespace' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\GkeHub\V1\PBNamespace', + 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'scope_namespace.name', + 'fieldAccessors' => [ + 'getScopeNamespace', + 'getName', + ], + ], + ], + ], + 'UpdateScopeRBACRoleBinding' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\GkeHub\V1\RBACRoleBinding', + 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'rbacrolebinding.name', + 'fieldAccessors' => [ + 'getRbacrolebinding', + 'getName', + ], + ], + ], + ], 'GenerateConnectManifest' => [ 'callType' => \Google\ApiCore\Call::UNARY_CALL, 'responseType' => 'Google\Cloud\GkeHub\V1\GenerateConnectManifestResponse', @@ -149,6 +497,18 @@ ], ], ], + 'GenerateMembershipRBACRoleBindingYAML' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\GkeHub\V1\GenerateMembershipRBACRoleBindingYAMLResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], 'GetFeature' => [ 'callType' => \Google\ApiCore\Call::UNARY_CALL, 'responseType' => 'Google\Cloud\GkeHub\V1\Feature', @@ -161,6 +521,18 @@ ], ], ], + 'GetFleet' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\GkeHub\V1\Fleet', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], 'GetMembership' => [ 'callType' => \Google\ApiCore\Call::UNARY_CALL, 'responseType' => 'Google\Cloud\GkeHub\V1\Membership', @@ -173,6 +545,86 @@ ], ], ], + 'GetMembershipBinding' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\GkeHub\V1\MembershipBinding', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetMembershipRBACRoleBinding' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\GkeHub\V1\RBACRoleBinding', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetScope' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\GkeHub\V1\Scope', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetScopeNamespace' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\GkeHub\V1\PBNamespace', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetScopeRBACRoleBinding' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\GkeHub\V1\RBACRoleBinding', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListBoundMemberships' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getMemberships', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\GkeHub\V1\ListBoundMembershipsResponse', + 'headerParams' => [ + [ + 'keyName' => 'scope_name', + 'fieldAccessors' => [ + 'getScopeName', + ], + ], + ], + ], 'ListFeatures' => [ 'pageStreaming' => [ 'requestPageTokenGetMethod' => 'getPageToken', @@ -193,6 +645,66 @@ ], ], ], + 'ListFleets' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getFleets', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\GkeHub\V1\ListFleetsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListMembershipBindings' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getMembershipBindings', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\GkeHub\V1\ListMembershipBindingsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListMembershipRBACRoleBindings' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getRbacrolebindings', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\GkeHub\V1\ListMembershipRBACRoleBindingsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], 'ListMemberships' => [ 'pageStreaming' => [ 'requestPageTokenGetMethod' => 'getPageToken', @@ -213,10 +725,99 @@ ], ], ], + 'ListPermittedScopes' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getScopes', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\GkeHub\V1\ListPermittedScopesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListScopeNamespaces' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getScopeNamespaces', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\GkeHub\V1\ListScopeNamespacesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListScopeRBACRoleBindings' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getRbacrolebindings', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\GkeHub\V1\ListScopeRBACRoleBindingsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListScopes' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getScopes', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\GkeHub\V1\ListScopesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], 'templateMap' => [ 'feature' => 'projects/{project}/locations/{location}/features/{feature}', + 'fleet' => 'projects/{project}/locations/{location}/fleets/{fleet}', 'location' => 'projects/{project}/locations/{location}', 'membership' => 'projects/{project}/locations/{location}/memberships/{membership}', + 'membershipBinding' => 'projects/{project}/locations/{location}/memberships/{membership}/bindings/{membershipbinding}', + 'namespace' => 'projects/{project}/locations/{location}/scopes/{scope}/namespaces/{namespace}', + 'organizationLocationFleet' => 'organizations/{organization}/locations/{location}/fleets/{fleet}', + 'projectLocationFleet' => 'projects/{project}/locations/{location}/fleets/{fleet}', + 'projectLocationMembershipRbacrolebinding' => 'projects/{project}/locations/{location}/memberships/{membership}/rbacrolebindings/{rbacrolebinding}', + 'projectLocationScopeRbacrolebinding' => 'projects/{project}/locations/{location}/scopes/{scope}/rbacrolebindings/{rbacrolebinding}', + 'rBACRoleBinding' => 'projects/{project}/locations/{location}/scopes/{scope}/rbacrolebindings/{rbacrolebinding}', + 'scope' => 'projects/{project}/locations/{location}/scopes/{scope}', ], ], ], diff --git a/GkeHub/src/V1/resources/gke_hub_rest_client_config.php b/GkeHub/src/V1/resources/gke_hub_rest_client_config.php index 3b91c2de285d..b534146a0787 100644 --- a/GkeHub/src/V1/resources/gke_hub_rest_client_config.php +++ b/GkeHub/src/V1/resources/gke_hub_rest_client_config.php @@ -35,6 +35,18 @@ ], ], ], + 'CreateFleet' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/fleets', + 'body' => 'fleet', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], 'CreateMembership' => [ 'method' => 'post', 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/memberships', @@ -50,6 +62,81 @@ 'membership_id', ], ], + 'CreateMembershipBinding' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/memberships/*}/bindings', + 'body' => 'membership_binding', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'membership_binding_id', + ], + ], + 'CreateMembershipRBACRoleBinding' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/memberships/*}/rbacrolebindings', + 'body' => 'rbacrolebinding', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'rbacrolebinding_id', + ], + ], + 'CreateScope' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/scopes', + 'body' => 'scope', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'scope_id', + ], + ], + 'CreateScopeNamespace' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/scopes/*}/namespaces', + 'body' => 'scope_namespace', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'scope_namespace_id', + ], + ], + 'CreateScopeRBACRoleBinding' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/scopes/*}/rbacrolebindings', + 'body' => 'rbacrolebinding', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'rbacrolebinding_id', + ], + ], 'DeleteFeature' => [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/features/*}', @@ -61,6 +148,17 @@ ], ], ], + 'DeleteFleet' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/fleets/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], 'DeleteMembership' => [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/memberships/*}', @@ -72,6 +170,61 @@ ], ], ], + 'DeleteMembershipBinding' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/memberships/*/bindings/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteMembershipRBACRoleBinding' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/memberships/*/rbacrolebindings/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteScope' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/scopes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteScopeNamespace' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/scopes/*/namespaces/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteScopeRBACRoleBinding' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/scopes/*/rbacrolebindings/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], 'GenerateConnectManifest' => [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/memberships/*}:generateConnectManifest', @@ -83,6 +236,18 @@ ], ], ], + 'GenerateMembershipRBACRoleBindingYAML' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/memberships/*}/rbacrolebindings:generateMembershipRBACRoleBindingYAML', + 'body' => 'rbacrolebinding', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], 'GetFeature' => [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/features/*}', @@ -94,6 +259,17 @@ ], ], ], + 'GetFleet' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/fleets/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], 'GetMembership' => [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/memberships/*}', @@ -105,6 +281,72 @@ ], ], ], + 'GetMembershipBinding' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/memberships/*/bindings/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetMembershipRBACRoleBinding' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/memberships/*/rbacrolebindings/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetScope' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/scopes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetScopeNamespace' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/scopes/*/namespaces/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetScopeRBACRoleBinding' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/scopes/*/rbacrolebindings/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListBoundMemberships' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{scope_name=projects/*/locations/*/scopes/*}:listMemberships', + 'placeholders' => [ + 'scope_name' => [ + 'getters' => [ + 'getScopeName', + ], + ], + ], + ], 'ListFeatures' => [ 'method' => 'get', 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/features', @@ -116,6 +358,45 @@ ], ], ], + 'ListFleets' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/fleets', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=organizations/*/locations/*}/fleets', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListMembershipBindings' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/memberships/*}/bindings', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListMembershipRBACRoleBindings' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/memberships/*}/rbacrolebindings', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], 'ListMemberships' => [ 'method' => 'get', 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/memberships', @@ -127,6 +408,50 @@ ], ], ], + 'ListPermittedScopes' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/scopes:listPermitted', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListScopeNamespaces' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/scopes/*}/namespaces', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListScopeRBACRoleBindings' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/scopes/*}/rbacrolebindings', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListScopes' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/scopes', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], 'UpdateFeature' => [ 'method' => 'patch', 'uriTemplate' => '/v1/{name=projects/*/locations/*/features/*}', @@ -139,6 +464,22 @@ ], ], ], + 'UpdateFleet' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{fleet.name=projects/*/locations/*/fleets/*}', + 'body' => 'fleet', + 'placeholders' => [ + 'fleet.name' => [ + 'getters' => [ + 'getFleet', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], 'UpdateMembership' => [ 'method' => 'patch', 'uriTemplate' => '/v1/{name=projects/*/locations/*/memberships/*}', @@ -154,6 +495,86 @@ 'update_mask', ], ], + 'UpdateMembershipBinding' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{membership_binding.name=projects/*/locations/*/memberships/*/bindings/*}', + 'body' => 'membership_binding', + 'placeholders' => [ + 'membership_binding.name' => [ + 'getters' => [ + 'getMembershipBinding', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateMembershipRBACRoleBinding' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{rbacrolebinding.name=projects/*/locations/*/memberships/*/rbacrolebindings/*}', + 'body' => 'rbacrolebinding', + 'placeholders' => [ + 'rbacrolebinding.name' => [ + 'getters' => [ + 'getRbacrolebinding', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateScope' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{scope.name=projects/*/locations/*/scopes/*}', + 'body' => 'scope', + 'placeholders' => [ + 'scope.name' => [ + 'getters' => [ + 'getScope', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateScopeNamespace' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{scope_namespace.name=projects/*/locations/*/scopes/*/namespaces/*}', + 'body' => 'scope_namespace', + 'placeholders' => [ + 'scope_namespace.name' => [ + 'getters' => [ + 'getScopeNamespace', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateScopeRBACRoleBinding' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{rbacrolebinding.name=projects/*/locations/*/scopes/*/rbacrolebindings/*}', + 'body' => 'rbacrolebinding', + 'placeholders' => [ + 'rbacrolebinding.name' => [ + 'getters' => [ + 'getRbacrolebinding', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], ], 'google.cloud.location.Locations' => [ 'GetLocation' => [ diff --git a/GkeHub/tests/Unit/V1/Client/GkeHubClientTest.php b/GkeHub/tests/Unit/V1/Client/GkeHubClientTest.php index 799b50276e35..0d7d7967744b 100644 --- a/GkeHub/tests/Unit/V1/Client/GkeHubClientTest.php +++ b/GkeHub/tests/Unit/V1/Client/GkeHubClientTest.php @@ -28,21 +28,69 @@ use Google\ApiCore\Testing\MockTransport; use Google\Cloud\GkeHub\V1\Client\GkeHubClient; use Google\Cloud\GkeHub\V1\CreateFeatureRequest; +use Google\Cloud\GkeHub\V1\CreateFleetRequest; +use Google\Cloud\GkeHub\V1\CreateMembershipBindingRequest; +use Google\Cloud\GkeHub\V1\CreateMembershipRBACRoleBindingRequest; use Google\Cloud\GkeHub\V1\CreateMembershipRequest; +use Google\Cloud\GkeHub\V1\CreateScopeNamespaceRequest; +use Google\Cloud\GkeHub\V1\CreateScopeRBACRoleBindingRequest; +use Google\Cloud\GkeHub\V1\CreateScopeRequest; use Google\Cloud\GkeHub\V1\DeleteFeatureRequest; +use Google\Cloud\GkeHub\V1\DeleteFleetRequest; +use Google\Cloud\GkeHub\V1\DeleteMembershipBindingRequest; +use Google\Cloud\GkeHub\V1\DeleteMembershipRBACRoleBindingRequest; use Google\Cloud\GkeHub\V1\DeleteMembershipRequest; +use Google\Cloud\GkeHub\V1\DeleteScopeNamespaceRequest; +use Google\Cloud\GkeHub\V1\DeleteScopeRBACRoleBindingRequest; +use Google\Cloud\GkeHub\V1\DeleteScopeRequest; use Google\Cloud\GkeHub\V1\Feature; +use Google\Cloud\GkeHub\V1\Fleet; use Google\Cloud\GkeHub\V1\GenerateConnectManifestRequest; use Google\Cloud\GkeHub\V1\GenerateConnectManifestResponse; +use Google\Cloud\GkeHub\V1\GenerateMembershipRBACRoleBindingYAMLRequest; +use Google\Cloud\GkeHub\V1\GenerateMembershipRBACRoleBindingYAMLResponse; use Google\Cloud\GkeHub\V1\GetFeatureRequest; +use Google\Cloud\GkeHub\V1\GetFleetRequest; +use Google\Cloud\GkeHub\V1\GetMembershipBindingRequest; +use Google\Cloud\GkeHub\V1\GetMembershipRBACRoleBindingRequest; use Google\Cloud\GkeHub\V1\GetMembershipRequest; +use Google\Cloud\GkeHub\V1\GetScopeNamespaceRequest; +use Google\Cloud\GkeHub\V1\GetScopeRBACRoleBindingRequest; +use Google\Cloud\GkeHub\V1\GetScopeRequest; +use Google\Cloud\GkeHub\V1\ListBoundMembershipsRequest; +use Google\Cloud\GkeHub\V1\ListBoundMembershipsResponse; use Google\Cloud\GkeHub\V1\ListFeaturesRequest; use Google\Cloud\GkeHub\V1\ListFeaturesResponse; +use Google\Cloud\GkeHub\V1\ListFleetsRequest; +use Google\Cloud\GkeHub\V1\ListFleetsResponse; +use Google\Cloud\GkeHub\V1\ListMembershipBindingsRequest; +use Google\Cloud\GkeHub\V1\ListMembershipBindingsResponse; +use Google\Cloud\GkeHub\V1\ListMembershipRBACRoleBindingsRequest; +use Google\Cloud\GkeHub\V1\ListMembershipRBACRoleBindingsResponse; use Google\Cloud\GkeHub\V1\ListMembershipsRequest; use Google\Cloud\GkeHub\V1\ListMembershipsResponse; +use Google\Cloud\GkeHub\V1\ListPermittedScopesRequest; +use Google\Cloud\GkeHub\V1\ListPermittedScopesResponse; +use Google\Cloud\GkeHub\V1\ListScopeNamespacesRequest; +use Google\Cloud\GkeHub\V1\ListScopeNamespacesResponse; +use Google\Cloud\GkeHub\V1\ListScopeRBACRoleBindingsRequest; +use Google\Cloud\GkeHub\V1\ListScopeRBACRoleBindingsResponse; +use Google\Cloud\GkeHub\V1\ListScopesRequest; +use Google\Cloud\GkeHub\V1\ListScopesResponse; use Google\Cloud\GkeHub\V1\Membership; +use Google\Cloud\GkeHub\V1\MembershipBinding; +use Google\Cloud\GkeHub\V1\PBNamespace; +use Google\Cloud\GkeHub\V1\RBACRoleBinding; +use Google\Cloud\GkeHub\V1\RBACRoleBinding\Role; +use Google\Cloud\GkeHub\V1\Scope; use Google\Cloud\GkeHub\V1\UpdateFeatureRequest; +use Google\Cloud\GkeHub\V1\UpdateFleetRequest; +use Google\Cloud\GkeHub\V1\UpdateMembershipBindingRequest; +use Google\Cloud\GkeHub\V1\UpdateMembershipRBACRoleBindingRequest; use Google\Cloud\GkeHub\V1\UpdateMembershipRequest; +use Google\Cloud\GkeHub\V1\UpdateScopeNamespaceRequest; +use Google\Cloud\GkeHub\V1\UpdateScopeRBACRoleBindingRequest; +use Google\Cloud\GkeHub\V1\UpdateScopeRequest; use Google\LongRunning\Client\OperationsClient; use Google\LongRunning\GetOperationRequest; use Google\LongRunning\Operation; @@ -200,6 +248,138 @@ public function createFeatureExceptionTest() $this->assertTrue($operationsTransport->isExhausted()); } + /** @test */ + public function createFleetTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createFleetTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $uid = 'uid115792'; + $expectedResponse = new Fleet(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createFleetTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $fleet = new Fleet(); + $request = (new CreateFleetRequest())->setParent($formattedParent)->setFleet($fleet); + $response = $gapicClient->createFleet($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/CreateFleet', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getFleet(); + $this->assertProtobufEquals($fleet, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createFleetTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createFleetExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createFleetTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $fleet = new Fleet(); + $request = (new CreateFleetRequest())->setParent($formattedParent)->setFleet($fleet); + $response = $gapicClient->createFleet($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createFleetTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + /** @test */ public function createMembershipTest() { @@ -345,7 +525,7 @@ public function createMembershipExceptionTest() } /** @test */ - public function deleteFeatureTest() + public function createMembershipBindingTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ @@ -362,19 +542,32 @@ public function deleteFeatureTest() $this->assertTrue($operationsTransport->isExhausted()); // Mock response $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteFeatureTest'); + $incompleteOperation->setName('operations/createMembershipBindingTest'); $incompleteOperation->setDone(false); $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); + $scope = 'scope109264468'; + $name = 'name3373707'; + $uid = 'uid115792'; + $expectedResponse = new MembershipBinding(); + $expectedResponse->setScope($scope); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); $anyResponse = new Any(); $anyResponse->setValue($expectedResponse->serializeToString()); $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteFeatureTest'); + $completeOperation->setName('operations/createMembershipBindingTest'); $completeOperation->setDone(true); $completeOperation->setResponse($anyResponse); $operationsTransport->addResponse($completeOperation); - $request = new DeleteFeatureRequest(); - $response = $gapicClient->deleteFeature($request); + // Mock request + $formattedParent = $gapicClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); + $membershipBinding = new MembershipBinding(); + $membershipBindingId = 'membershipBindingId-1012849378'; + $request = (new CreateMembershipBindingRequest()) + ->setParent($formattedParent) + ->setMembershipBinding($membershipBinding) + ->setMembershipBindingId($membershipBindingId); + $response = $gapicClient->createMembershipBinding($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); $apiRequests = $transport->popReceivedCalls(); @@ -383,9 +576,15 @@ public function deleteFeatureTest() $this->assertSame(0, count($operationsRequestsEmpty)); $actualApiFuncCall = $apiRequests[0]->getFuncCall(); $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkehub.v1.GkeHub/DeleteFeature', $actualApiFuncCall); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/CreateMembershipBinding', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getMembershipBinding(); + $this->assertProtobufEquals($membershipBinding, $actualValue); + $actualValue = $actualApiRequestObject->getMembershipBindingId(); + $this->assertProtobufEquals($membershipBindingId, $actualValue); $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteFeatureTest'); + $expectedOperationsRequestObject->setName('operations/createMembershipBindingTest'); $response->pollUntilComplete([ 'initialPollDelayMillis' => 1, ]); @@ -404,7 +603,7 @@ public function deleteFeatureTest() } /** @test */ - public function deleteFeatureExceptionTest() + public function createMembershipBindingExceptionTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ @@ -421,7 +620,7 @@ public function deleteFeatureExceptionTest() $this->assertTrue($operationsTransport->isExhausted()); // Mock response $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteFeatureTest'); + $incompleteOperation->setName('operations/createMembershipBindingTest'); $incompleteOperation->setDone(false); $transport->addResponse($incompleteOperation); $status = new stdClass(); @@ -437,12 +636,19 @@ public function deleteFeatureExceptionTest() JSON_PRETTY_PRINT ); $operationsTransport->addResponse(null, $status); - $request = new DeleteFeatureRequest(); - $response = $gapicClient->deleteFeature($request); + // Mock request + $formattedParent = $gapicClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); + $membershipBinding = new MembershipBinding(); + $membershipBindingId = 'membershipBindingId-1012849378'; + $request = (new CreateMembershipBindingRequest()) + ->setParent($formattedParent) + ->setMembershipBinding($membershipBinding) + ->setMembershipBindingId($membershipBindingId); + $response = $gapicClient->createMembershipBinding($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteFeatureTest'); + $expectedOperationsRequestObject->setName('operations/createMembershipBindingTest'); try { $response->pollUntilComplete([ 'initialPollDelayMillis' => 1, @@ -461,7 +667,7 @@ public function deleteFeatureExceptionTest() } /** @test */ - public function deleteMembershipTest() + public function createMembershipRBACRoleBindingTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ @@ -478,21 +684,34 @@ public function deleteMembershipTest() $this->assertTrue($operationsTransport->isExhausted()); // Mock response $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteMembershipTest'); + $incompleteOperation->setName('operations/createMembershipRBACRoleBindingTest'); $incompleteOperation->setDone(false); $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); + $user = 'user3599307'; + $name = 'name3373707'; + $uid = 'uid115792'; + $expectedResponse = new RBACRoleBinding(); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); $anyResponse = new Any(); $anyResponse->setValue($expectedResponse->serializeToString()); $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteMembershipTest'); + $completeOperation->setName('operations/createMembershipRBACRoleBindingTest'); $completeOperation->setDone(true); $completeOperation->setResponse($anyResponse); $operationsTransport->addResponse($completeOperation); // Mock request - $formattedName = $gapicClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); - $request = (new DeleteMembershipRequest())->setName($formattedName); - $response = $gapicClient->deleteMembership($request); + $formattedParent = $gapicClient->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); + $rbacrolebindingId = 'rbacrolebindingId-114871075'; + $rbacrolebinding = new RBACRoleBinding(); + $rbacrolebindingRole = new Role(); + $rbacrolebinding->setRole($rbacrolebindingRole); + $request = (new CreateMembershipRBACRoleBindingRequest()) + ->setParent($formattedParent) + ->setRbacrolebindingId($rbacrolebindingId) + ->setRbacrolebinding($rbacrolebinding); + $response = $gapicClient->createMembershipRBACRoleBinding($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); $apiRequests = $transport->popReceivedCalls(); @@ -501,11 +720,15 @@ public function deleteMembershipTest() $this->assertSame(0, count($operationsRequestsEmpty)); $actualApiFuncCall = $apiRequests[0]->getFuncCall(); $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkehub.v1.GkeHub/DeleteMembership', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/CreateMembershipRBACRoleBinding', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getRbacrolebindingId(); + $this->assertProtobufEquals($rbacrolebindingId, $actualValue); + $actualValue = $actualApiRequestObject->getRbacrolebinding(); + $this->assertProtobufEquals($rbacrolebinding, $actualValue); $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteMembershipTest'); + $expectedOperationsRequestObject->setName('operations/createMembershipRBACRoleBindingTest'); $response->pollUntilComplete([ 'initialPollDelayMillis' => 1, ]); @@ -524,7 +747,7 @@ public function deleteMembershipTest() } /** @test */ - public function deleteMembershipExceptionTest() + public function createMembershipRBACRoleBindingExceptionTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ @@ -541,7 +764,7 @@ public function deleteMembershipExceptionTest() $this->assertTrue($operationsTransport->isExhausted()); // Mock response $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteMembershipTest'); + $incompleteOperation->setName('operations/createMembershipRBACRoleBindingTest'); $incompleteOperation->setDone(false); $transport->addResponse($incompleteOperation); $status = new stdClass(); @@ -558,13 +781,20 @@ public function deleteMembershipExceptionTest() ); $operationsTransport->addResponse(null, $status); // Mock request - $formattedName = $gapicClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); - $request = (new DeleteMembershipRequest())->setName($formattedName); - $response = $gapicClient->deleteMembership($request); + $formattedParent = $gapicClient->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); + $rbacrolebindingId = 'rbacrolebindingId-114871075'; + $rbacrolebinding = new RBACRoleBinding(); + $rbacrolebindingRole = new Role(); + $rbacrolebinding->setRole($rbacrolebindingRole); + $request = (new CreateMembershipRBACRoleBindingRequest()) + ->setParent($formattedParent) + ->setRbacrolebindingId($rbacrolebindingId) + ->setRbacrolebinding($rbacrolebinding); + $response = $gapicClient->createMembershipRBACRoleBinding($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteMembershipTest'); + $expectedOperationsRequestObject->setName('operations/createMembershipRBACRoleBindingTest'); try { $response->pollUntilComplete([ 'initialPollDelayMillis' => 1, @@ -583,39 +813,102 @@ public function deleteMembershipExceptionTest() } /** @test */ - public function generateConnectManifestTest() + public function createScopeTest() { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); $transport = $this->createTransport(); $gapicClient = $this->createClient([ 'transport' => $transport, + 'operationsClient' => $operationsClient, ]); $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); // Mock response - $expectedResponse = new GenerateConnectManifestResponse(); - $transport->addResponse($expectedResponse); + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createScopeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uid = 'uid115792'; + $expectedResponse = new Scope(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createScopeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); // Mock request - $formattedName = $gapicClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); - $request = (new GenerateConnectManifestRequest())->setName($formattedName); - $response = $gapicClient->generateConnectManifest($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.gkehub.v1.GkeHub/GenerateConnectManifest', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $scopeId = 'scopeId-487349530'; + $scope = new Scope(); + $request = (new CreateScopeRequest()) + ->setParent($formattedParent) + ->setScopeId($scopeId) + ->setScope($scope); + $response = $gapicClient->createScope($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/CreateScope', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getScopeId(); + $this->assertProtobufEquals($scopeId, $actualValue); + $actualValue = $actualApiRequestObject->getScope(); + $this->assertProtobufEquals($scope, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createScopeTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); } /** @test */ - public function generateConnectManifestExceptionTest() + public function createScopeExceptionTest() { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); $transport = $this->createTransport(); $gapicClient = $this->createClient([ 'transport' => $transport, + 'operationsClient' => $operationsClient, ]); $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createScopeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; @@ -628,55 +921,2922 @@ public function generateConnectManifestExceptionTest() ], JSON_PRETTY_PRINT ); - $transport->addResponse(null, $status); + $operationsTransport->addResponse(null, $status); // Mock request - $formattedName = $gapicClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); - $request = (new GenerateConnectManifestRequest())->setName($formattedName); + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $scopeId = 'scopeId-487349530'; + $scope = new Scope(); + $request = (new CreateScopeRequest()) + ->setParent($formattedParent) + ->setScopeId($scopeId) + ->setScope($scope); + $response = $gapicClient->createScope($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createScopeTest'); try { - $gapicClient->generateConnectManifest($request); - // If the $gapicClient method call did not throw, fail the test + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test $this->fail('Expected an ApiException, but no exception was thrown.'); } catch (ApiException $ex) { $this->assertEquals($status->code, $ex->getCode()); $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); } - // Call popReceivedCalls to ensure the stub is exhausted + // Call popReceivedCalls to ensure the stubs are exhausted $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); } /** @test */ - public function getFeatureTest() + public function createScopeNamespaceTest() { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); $transport = $this->createTransport(); $gapicClient = $this->createClient([ 'transport' => $transport, + 'operationsClient' => $operationsClient, ]); $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createScopeNamespaceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uid = 'uid115792'; + $scope = 'scope109264468'; + $expectedResponse = new PBNamespace(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setScope($scope); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createScopeNamespaceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); + $scopeNamespaceId = 'scopeNamespaceId-236818806'; + $scopeNamespace = new PBNamespace(); + $scopeNamespaceScope = $gapicClient->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); + $scopeNamespace->setScope($scopeNamespaceScope); + $request = (new CreateScopeNamespaceRequest()) + ->setParent($formattedParent) + ->setScopeNamespaceId($scopeNamespaceId) + ->setScopeNamespace($scopeNamespace); + $response = $gapicClient->createScopeNamespace($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/CreateScopeNamespace', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getScopeNamespaceId(); + $this->assertProtobufEquals($scopeNamespaceId, $actualValue); + $actualValue = $actualApiRequestObject->getScopeNamespace(); + $this->assertProtobufEquals($scopeNamespace, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createScopeNamespaceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createScopeNamespaceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createScopeNamespaceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); + $scopeNamespaceId = 'scopeNamespaceId-236818806'; + $scopeNamespace = new PBNamespace(); + $scopeNamespaceScope = $gapicClient->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); + $scopeNamespace->setScope($scopeNamespaceScope); + $request = (new CreateScopeNamespaceRequest()) + ->setParent($formattedParent) + ->setScopeNamespaceId($scopeNamespaceId) + ->setScopeNamespace($scopeNamespace); + $response = $gapicClient->createScopeNamespace($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createScopeNamespaceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createScopeRBACRoleBindingTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createScopeRBACRoleBindingTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $user = 'user3599307'; + $name = 'name3373707'; + $uid = 'uid115792'; + $expectedResponse = new RBACRoleBinding(); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createScopeRBACRoleBindingTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); + $rbacrolebindingId = 'rbacrolebindingId-114871075'; + $rbacrolebinding = new RBACRoleBinding(); + $rbacrolebindingRole = new Role(); + $rbacrolebinding->setRole($rbacrolebindingRole); + $request = (new CreateScopeRBACRoleBindingRequest()) + ->setParent($formattedParent) + ->setRbacrolebindingId($rbacrolebindingId) + ->setRbacrolebinding($rbacrolebinding); + $response = $gapicClient->createScopeRBACRoleBinding($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/CreateScopeRBACRoleBinding', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getRbacrolebindingId(); + $this->assertProtobufEquals($rbacrolebindingId, $actualValue); + $actualValue = $actualApiRequestObject->getRbacrolebinding(); + $this->assertProtobufEquals($rbacrolebinding, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createScopeRBACRoleBindingTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createScopeRBACRoleBindingExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createScopeRBACRoleBindingTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); + $rbacrolebindingId = 'rbacrolebindingId-114871075'; + $rbacrolebinding = new RBACRoleBinding(); + $rbacrolebindingRole = new Role(); + $rbacrolebinding->setRole($rbacrolebindingRole); + $request = (new CreateScopeRBACRoleBindingRequest()) + ->setParent($formattedParent) + ->setRbacrolebindingId($rbacrolebindingId) + ->setRbacrolebinding($rbacrolebinding); + $response = $gapicClient->createScopeRBACRoleBinding($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createScopeRBACRoleBindingTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteFeatureTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteFeatureTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteFeatureTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + $request = new DeleteFeatureRequest(); + $response = $gapicClient->deleteFeature($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/DeleteFeature', $actualApiFuncCall); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteFeatureTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteFeatureExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteFeatureTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $operationsTransport->addResponse(null, $status); + $request = new DeleteFeatureRequest(); + $response = $gapicClient->deleteFeature($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteFeatureTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteFleetTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteFleetTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteFleetTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->fleetName('[PROJECT]', '[LOCATION]', '[FLEET]'); + $request = (new DeleteFleetRequest())->setName($formattedName); + $response = $gapicClient->deleteFleet($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/DeleteFleet', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteFleetTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteFleetExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteFleetTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->fleetName('[PROJECT]', '[LOCATION]', '[FLEET]'); + $request = (new DeleteFleetRequest())->setName($formattedName); + $response = $gapicClient->deleteFleet($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteFleetTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteMembershipTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteMembershipTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteMembershipTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); + $request = (new DeleteMembershipRequest())->setName($formattedName); + $response = $gapicClient->deleteMembership($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/DeleteMembership', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteMembershipTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteMembershipExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteMembershipTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); + $request = (new DeleteMembershipRequest())->setName($formattedName); + $response = $gapicClient->deleteMembership($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteMembershipTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteMembershipBindingTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteMembershipBindingTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteMembershipBindingTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->membershipBindingName( + '[PROJECT]', + '[LOCATION]', + '[MEMBERSHIP]', + '[MEMBERSHIPBINDING]' + ); + $request = (new DeleteMembershipBindingRequest())->setName($formattedName); + $response = $gapicClient->deleteMembershipBinding($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/DeleteMembershipBinding', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteMembershipBindingTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteMembershipBindingExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteMembershipBindingTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->membershipBindingName( + '[PROJECT]', + '[LOCATION]', + '[MEMBERSHIP]', + '[MEMBERSHIPBINDING]' + ); + $request = (new DeleteMembershipBindingRequest())->setName($formattedName); + $response = $gapicClient->deleteMembershipBinding($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteMembershipBindingTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteMembershipRBACRoleBindingTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteMembershipRBACRoleBindingTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteMembershipRBACRoleBindingTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->rBACRoleBindingName('[PROJECT]', '[LOCATION]', '[SCOPE]', '[RBACROLEBINDING]'); + $request = (new DeleteMembershipRBACRoleBindingRequest())->setName($formattedName); + $response = $gapicClient->deleteMembershipRBACRoleBinding($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/DeleteMembershipRBACRoleBinding', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteMembershipRBACRoleBindingTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteMembershipRBACRoleBindingExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteMembershipRBACRoleBindingTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->rBACRoleBindingName('[PROJECT]', '[LOCATION]', '[SCOPE]', '[RBACROLEBINDING]'); + $request = (new DeleteMembershipRBACRoleBindingRequest())->setName($formattedName); + $response = $gapicClient->deleteMembershipRBACRoleBinding($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteMembershipRBACRoleBindingTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteScopeTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteScopeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteScopeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); + $request = (new DeleteScopeRequest())->setName($formattedName); + $response = $gapicClient->deleteScope($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/DeleteScope', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteScopeTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteScopeExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteScopeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); + $request = (new DeleteScopeRequest())->setName($formattedName); + $response = $gapicClient->deleteScope($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteScopeTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteScopeNamespaceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteScopeNamespaceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteScopeNamespaceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->namespaceName('[PROJECT]', '[LOCATION]', '[SCOPE]', '[NAMESPACE]'); + $request = (new DeleteScopeNamespaceRequest())->setName($formattedName); + $response = $gapicClient->deleteScopeNamespace($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/DeleteScopeNamespace', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteScopeNamespaceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteScopeNamespaceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteScopeNamespaceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->namespaceName('[PROJECT]', '[LOCATION]', '[SCOPE]', '[NAMESPACE]'); + $request = (new DeleteScopeNamespaceRequest())->setName($formattedName); + $response = $gapicClient->deleteScopeNamespace($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteScopeNamespaceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteScopeRBACRoleBindingTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteScopeRBACRoleBindingTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteScopeRBACRoleBindingTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->rBACRoleBindingName('[PROJECT]', '[LOCATION]', '[SCOPE]', '[RBACROLEBINDING]'); + $request = (new DeleteScopeRBACRoleBindingRequest())->setName($formattedName); + $response = $gapicClient->deleteScopeRBACRoleBinding($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/DeleteScopeRBACRoleBinding', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteScopeRBACRoleBindingTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteScopeRBACRoleBindingExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteScopeRBACRoleBindingTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->rBACRoleBindingName('[PROJECT]', '[LOCATION]', '[SCOPE]', '[RBACROLEBINDING]'); + $request = (new DeleteScopeRBACRoleBindingRequest())->setName($formattedName); + $response = $gapicClient->deleteScopeRBACRoleBinding($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteScopeRBACRoleBindingTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function generateConnectManifestTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GenerateConnectManifestResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); + $request = (new GenerateConnectManifestRequest())->setName($formattedName); + $response = $gapicClient->generateConnectManifest($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.gkehub.v1.GkeHub/GenerateConnectManifest', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function generateConnectManifestExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); + $request = (new GenerateConnectManifestRequest())->setName($formattedName); + try { + $gapicClient->generateConnectManifest($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 generateMembershipRBACRoleBindingYAMLTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $roleBindingsYaml = 'roleBindingsYaml1394984367'; + $expectedResponse = new GenerateMembershipRBACRoleBindingYAMLResponse(); + $expectedResponse->setRoleBindingsYaml($roleBindingsYaml); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); + $rbacrolebindingId = 'rbacrolebindingId-114871075'; + $rbacrolebinding = new RBACRoleBinding(); + $rbacrolebindingRole = new Role(); + $rbacrolebinding->setRole($rbacrolebindingRole); + $request = (new GenerateMembershipRBACRoleBindingYAMLRequest()) + ->setParent($formattedParent) + ->setRbacrolebindingId($rbacrolebindingId) + ->setRbacrolebinding($rbacrolebinding); + $response = $gapicClient->generateMembershipRBACRoleBindingYAML($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.gkehub.v1.GkeHub/GenerateMembershipRBACRoleBindingYAML', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getRbacrolebindingId(); + $this->assertProtobufEquals($rbacrolebindingId, $actualValue); + $actualValue = $actualRequestObject->getRbacrolebinding(); + $this->assertProtobufEquals($rbacrolebinding, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function generateMembershipRBACRoleBindingYAMLExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); + $rbacrolebindingId = 'rbacrolebindingId-114871075'; + $rbacrolebinding = new RBACRoleBinding(); + $rbacrolebindingRole = new Role(); + $rbacrolebinding->setRole($rbacrolebindingRole); + $request = (new GenerateMembershipRBACRoleBindingYAMLRequest()) + ->setParent($formattedParent) + ->setRbacrolebindingId($rbacrolebindingId) + ->setRbacrolebinding($rbacrolebinding); + try { + $gapicClient->generateMembershipRBACRoleBindingYAML($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 getFeatureTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new Feature(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + $request = new GetFeatureRequest(); + $response = $gapicClient->getFeature($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.gkehub.v1.GkeHub/GetFeature', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getFeatureExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 GetFeatureRequest(); + try { + $gapicClient->getFeature($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 getFleetTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $uid = 'uid115792'; + $expectedResponse = new Fleet(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setUid($uid); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->fleetName('[PROJECT]', '[LOCATION]', '[FLEET]'); + $request = (new GetFleetRequest())->setName($formattedName); + $response = $gapicClient->getFleet($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.gkehub.v1.GkeHub/GetFleet', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getFleetExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->fleetName('[PROJECT]', '[LOCATION]', '[FLEET]'); + $request = (new GetFleetRequest())->setName($formattedName); + try { + $gapicClient->getFleet($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 getMembershipTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $externalId = 'externalId-1153075697'; + $uniqueId = 'uniqueId-538310583'; + $expectedResponse = new Membership(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setExternalId($externalId); + $expectedResponse->setUniqueId($uniqueId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); + $request = (new GetMembershipRequest())->setName($formattedName); + $response = $gapicClient->getMembership($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.gkehub.v1.GkeHub/GetMembership', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getMembershipExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); + $request = (new GetMembershipRequest())->setName($formattedName); + try { + $gapicClient->getMembership($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 getMembershipBindingTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $scope = 'scope109264468'; + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $expectedResponse = new MembershipBinding(); + $expectedResponse->setScope($scope); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->membershipBindingName( + '[PROJECT]', + '[LOCATION]', + '[MEMBERSHIP]', + '[MEMBERSHIPBINDING]' + ); + $request = (new GetMembershipBindingRequest())->setName($formattedName); + $response = $gapicClient->getMembershipBinding($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.gkehub.v1.GkeHub/GetMembershipBinding', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getMembershipBindingExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->membershipBindingName( + '[PROJECT]', + '[LOCATION]', + '[MEMBERSHIP]', + '[MEMBERSHIPBINDING]' + ); + $request = (new GetMembershipBindingRequest())->setName($formattedName); + try { + $gapicClient->getMembershipBinding($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 getMembershipRBACRoleBindingTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $user = 'user3599307'; $name2 = 'name2-1052831874'; - $expectedResponse = new Feature(); + $uid = 'uid115792'; + $expectedResponse = new RBACRoleBinding(); + $expectedResponse->setUser($user); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->rBACRoleBindingName('[PROJECT]', '[LOCATION]', '[SCOPE]', '[RBACROLEBINDING]'); + $request = (new GetMembershipRBACRoleBindingRequest())->setName($formattedName); + $response = $gapicClient->getMembershipRBACRoleBinding($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.gkehub.v1.GkeHub/GetMembershipRBACRoleBinding', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getMembershipRBACRoleBindingExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->rBACRoleBindingName('[PROJECT]', '[LOCATION]', '[SCOPE]', '[RBACROLEBINDING]'); + $request = (new GetMembershipRBACRoleBindingRequest())->setName($formattedName); + try { + $gapicClient->getMembershipRBACRoleBinding($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 getScopeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $expectedResponse = new Scope(); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); + $request = (new GetScopeRequest())->setName($formattedName); + $response = $gapicClient->getScope($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.gkehub.v1.GkeHub/GetScope', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getScopeExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); + $request = (new GetScopeRequest())->setName($formattedName); + try { + $gapicClient->getScope($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 getScopeNamespaceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $scope = 'scope109264468'; + $expectedResponse = new PBNamespace(); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $expectedResponse->setScope($scope); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->namespaceName('[PROJECT]', '[LOCATION]', '[SCOPE]', '[NAMESPACE]'); + $request = (new GetScopeNamespaceRequest())->setName($formattedName); + $response = $gapicClient->getScopeNamespace($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.gkehub.v1.GkeHub/GetScopeNamespace', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getScopeNamespaceExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]', '[SCOPE]', '[NAMESPACE]'); + $request = (new GetScopeNamespaceRequest())->setName($formattedName); + try { + $gapicClient->getScopeNamespace($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 getScopeRBACRoleBindingTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $user = 'user3599307'; + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $expectedResponse = new RBACRoleBinding(); + $expectedResponse->setUser($user); $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->rBACRoleBindingName('[PROJECT]', '[LOCATION]', '[SCOPE]', '[RBACROLEBINDING]'); + $request = (new GetScopeRBACRoleBindingRequest())->setName($formattedName); + $response = $gapicClient->getScopeRBACRoleBinding($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.gkehub.v1.GkeHub/GetScopeRBACRoleBinding', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getScopeRBACRoleBindingExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->rBACRoleBindingName('[PROJECT]', '[LOCATION]', '[SCOPE]', '[RBACROLEBINDING]'); + $request = (new GetScopeRBACRoleBindingRequest())->setName($formattedName); + try { + $gapicClient->getScopeRBACRoleBinding($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 listBoundMembershipsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $membershipsElement = new Membership(); + $memberships = [$membershipsElement]; + $expectedResponse = new ListBoundMembershipsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setMemberships($memberships); + $transport->addResponse($expectedResponse); + // Mock request + $formattedScopeName = $gapicClient->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); + $request = (new ListBoundMembershipsRequest())->setScopeName($formattedScopeName); + $response = $gapicClient->listBoundMemberships($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getMemberships()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/ListBoundMemberships', $actualFuncCall); + $actualValue = $actualRequestObject->getScopeName(); + $this->assertProtobufEquals($formattedScopeName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listBoundMembershipsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedScopeName = $gapicClient->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); + $request = (new ListBoundMembershipsRequest())->setScopeName($formattedScopeName); + try { + $gapicClient->listBoundMemberships($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 listFeaturesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $resourcesElement = new Feature(); + $resources = [$resourcesElement]; + $expectedResponse = new ListFeaturesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setResources($resources); + $transport->addResponse($expectedResponse); + $request = new ListFeaturesRequest(); + $response = $gapicClient->listFeatures($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getResources()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/ListFeatures', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listFeaturesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 ListFeaturesRequest(); + try { + $gapicClient->listFeatures($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 listFleetsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $fleetsElement = new Fleet(); + $fleets = [$fleetsElement]; + $expectedResponse = new ListFleetsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setFleets($fleets); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListFleetsRequest())->setParent($formattedParent); + $response = $gapicClient->listFleets($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getFleets()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/ListFleets', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listFleetsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListFleetsRequest())->setParent($formattedParent); + try { + $gapicClient->listFleets($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 listMembershipBindingsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $membershipBindingsElement = new MembershipBinding(); + $membershipBindings = [$membershipBindingsElement]; + $expectedResponse = new ListMembershipBindingsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setMembershipBindings($membershipBindings); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); + $request = (new ListMembershipBindingsRequest())->setParent($formattedParent); + $response = $gapicClient->listMembershipBindings($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getMembershipBindings()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/ListMembershipBindings', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listMembershipBindingsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); + $request = (new ListMembershipBindingsRequest())->setParent($formattedParent); + try { + $gapicClient->listMembershipBindings($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 listMembershipRBACRoleBindingsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $rbacrolebindingsElement = new RBACRoleBinding(); + $rbacrolebindings = [$rbacrolebindingsElement]; + $expectedResponse = new ListMembershipRBACRoleBindingsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setRbacrolebindings($rbacrolebindings); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); + $request = (new ListMembershipRBACRoleBindingsRequest())->setParent($formattedParent); + $response = $gapicClient->listMembershipRBACRoleBindings($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getRbacrolebindings()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/ListMembershipRBACRoleBindings', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listMembershipRBACRoleBindingsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); + $request = (new ListMembershipRBACRoleBindingsRequest())->setParent($formattedParent); + try { + $gapicClient->listMembershipRBACRoleBindings($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 listMembershipsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $resourcesElement = new Membership(); + $resources = [$resourcesElement]; + $expectedResponse = new ListMembershipsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setResources($resources); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListMembershipsRequest())->setParent($formattedParent); + $response = $gapicClient->listMemberships($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getResources()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/ListMemberships', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listMembershipsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListMembershipsRequest())->setParent($formattedParent); + try { + $gapicClient->listMemberships($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 listPermittedScopesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $scopesElement = new Scope(); + $scopes = [$scopesElement]; + $expectedResponse = new ListPermittedScopesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setScopes($scopes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListPermittedScopesRequest())->setParent($formattedParent); + $response = $gapicClient->listPermittedScopes($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getScopes()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/ListPermittedScopes', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listPermittedScopesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListPermittedScopesRequest())->setParent($formattedParent); + try { + $gapicClient->listPermittedScopes($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 listScopeNamespacesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $scopeNamespacesElement = new PBNamespace(); + $scopeNamespaces = [$scopeNamespacesElement]; + $expectedResponse = new ListScopeNamespacesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setScopeNamespaces($scopeNamespaces); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); + $request = (new ListScopeNamespacesRequest())->setParent($formattedParent); + $response = $gapicClient->listScopeNamespaces($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getScopeNamespaces()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/ListScopeNamespaces', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listScopeNamespacesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); + $request = (new ListScopeNamespacesRequest())->setParent($formattedParent); + try { + $gapicClient->listScopeNamespaces($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 listScopeRBACRoleBindingsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $rbacrolebindingsElement = new RBACRoleBinding(); + $rbacrolebindings = [$rbacrolebindingsElement]; + $expectedResponse = new ListScopeRBACRoleBindingsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setRbacrolebindings($rbacrolebindings); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); + $request = (new ListScopeRBACRoleBindingsRequest())->setParent($formattedParent); + $response = $gapicClient->listScopeRBACRoleBindings($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getRbacrolebindings()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/ListScopeRBACRoleBindings', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listScopeRBACRoleBindingsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); + $request = (new ListScopeRBACRoleBindingsRequest())->setParent($formattedParent); + try { + $gapicClient->listScopeRBACRoleBindings($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 listScopesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $scopesElement = new Scope(); + $scopes = [$scopesElement]; + $expectedResponse = new ListScopesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setScopes($scopes); $transport->addResponse($expectedResponse); - $request = new GetFeatureRequest(); - $response = $gapicClient->getFeature($request); - $this->assertEquals($expectedResponse, $response); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListScopesRequest())->setParent($formattedParent); + $response = $gapicClient->listScopes($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getScopes()[0], $resources[0]); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkehub.v1.GkeHub/GetFeature', $actualFuncCall); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/ListScopes', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listScopesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListScopesRequest())->setParent($formattedParent); + try { + $gapicClient->listScopes($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 updateFeatureTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateFeatureTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $expectedResponse = new Feature(); + $expectedResponse->setName($name2); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateFeatureTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + $request = new UpdateFeatureRequest(); + $response = $gapicClient->updateFeature($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/UpdateFeature', $actualApiFuncCall); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateFeatureTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateFeatureExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateFeatureTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $operationsTransport->addResponse(null, $status); + $request = new UpdateFeatureRequest(); + $response = $gapicClient->updateFeature($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateFeatureTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateFleetTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateFleetTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $uid = 'uid115792'; + $expectedResponse = new Fleet(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateFleetTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $fleet = new Fleet(); + $updateMask = new FieldMask(); + $request = (new UpdateFleetRequest())->setFleet($fleet)->setUpdateMask($updateMask); + $response = $gapicClient->updateFleet($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/UpdateFleet', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getFleet(); + $this->assertProtobufEquals($fleet, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateFleetTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); } /** @test */ - public function getFeatureExceptionTest() + public function updateFleetExceptionTest() { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); $transport = $this->createTransport(); $gapicClient = $this->createClient([ 'transport' => $transport, + 'operationsClient' => $operationsClient, ]); $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateFleetTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; @@ -689,30 +3849,54 @@ public function getFeatureExceptionTest() ], JSON_PRETTY_PRINT ); - $transport->addResponse(null, $status); - $request = new GetFeatureRequest(); + $operationsTransport->addResponse(null, $status); + // Mock request + $fleet = new Fleet(); + $updateMask = new FieldMask(); + $request = (new UpdateFleetRequest())->setFleet($fleet)->setUpdateMask($updateMask); + $response = $gapicClient->updateFleet($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateFleetTest'); try { - $gapicClient->getFeature($request); - // If the $gapicClient method call did not throw, fail the test + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test $this->fail('Expected an ApiException, but no exception was thrown.'); } catch (ApiException $ex) { $this->assertEquals($status->code, $ex->getCode()); $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); } - // Call popReceivedCalls to ensure the stub is exhausted + // Call popReceivedCalls to ensure the stubs are exhausted $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); } /** @test */ - public function getMembershipTest() + public function updateMembershipTest() { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); $transport = $this->createTransport(); $gapicClient = $this->createClient([ 'transport' => $transport, + 'operationsClient' => $operationsClient, ]); $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateMembershipTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); $name2 = 'name2-1052831874'; $description = 'description-1724546052'; $externalId = 'externalId-1153075697'; @@ -722,30 +3906,77 @@ public function getMembershipTest() $expectedResponse->setDescription($description); $expectedResponse->setExternalId($externalId); $expectedResponse->setUniqueId($uniqueId); - $transport->addResponse($expectedResponse); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateMembershipTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); // Mock request $formattedName = $gapicClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); - $request = (new GetMembershipRequest())->setName($formattedName); - $response = $gapicClient->getMembership($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.gkehub.v1.GkeHub/GetMembership', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); + $updateMask = new FieldMask(); + $resource = new Membership(); + $request = (new UpdateMembershipRequest()) + ->setName($formattedName) + ->setUpdateMask($updateMask) + ->setResource($resource); + $response = $gapicClient->updateMembership($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/UpdateMembership', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateMembershipTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); } /** @test */ - public function getMembershipExceptionTest() + public function updateMembershipExceptionTest() { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); $transport = $this->createTransport(); $gapicClient = $this->createClient([ 'transport' => $transport, + 'operationsClient' => $operationsClient, ]); $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateMembershipTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; @@ -758,61 +3989,270 @@ public function getMembershipExceptionTest() ], JSON_PRETTY_PRINT ); - $transport->addResponse(null, $status); + $operationsTransport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); - $request = (new GetMembershipRequest())->setName($formattedName); + $updateMask = new FieldMask(); + $resource = new Membership(); + $request = (new UpdateMembershipRequest()) + ->setName($formattedName) + ->setUpdateMask($updateMask) + ->setResource($resource); + $response = $gapicClient->updateMembership($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateMembershipTest'); try { - $gapicClient->getMembership($request); - // If the $gapicClient method call did not throw, fail the test + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test $this->fail('Expected an ApiException, but no exception was thrown.'); } catch (ApiException $ex) { $this->assertEquals($status->code, $ex->getCode()); $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); } - // Call popReceivedCalls to ensure the stub is exhausted + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateMembershipBindingTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateMembershipBindingTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $scope = 'scope109264468'; + $name = 'name3373707'; + $uid = 'uid115792'; + $expectedResponse = new MembershipBinding(); + $expectedResponse->setScope($scope); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateMembershipBindingTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $membershipBinding = new MembershipBinding(); + $updateMask = new FieldMask(); + $request = (new UpdateMembershipBindingRequest()) + ->setMembershipBinding($membershipBinding) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateMembershipBinding($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/UpdateMembershipBinding', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getMembershipBinding(); + $this->assertProtobufEquals($membershipBinding, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateMembershipBindingTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateMembershipBindingExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateMembershipBindingTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $operationsTransport->addResponse(null, $status); + // Mock request + $membershipBinding = new MembershipBinding(); + $updateMask = new FieldMask(); + $request = (new UpdateMembershipBindingRequest()) + ->setMembershipBinding($membershipBinding) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateMembershipBinding($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateMembershipBindingTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); } /** @test */ - public function listFeaturesTest() + public function updateMembershipRBACRoleBindingTest() { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); $transport = $this->createTransport(); $gapicClient = $this->createClient([ 'transport' => $transport, + 'operationsClient' => $operationsClient, ]); $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); // Mock response - $nextPageToken = ''; - $resourcesElement = new Feature(); - $resources = [$resourcesElement]; - $expectedResponse = new ListFeaturesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setResources($resources); - $transport->addResponse($expectedResponse); - $request = new ListFeaturesRequest(); - $response = $gapicClient->listFeatures($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getResources()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkehub.v1.GkeHub/ListFeatures', $actualFuncCall); + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateMembershipRBACRoleBindingTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $user = 'user3599307'; + $name = 'name3373707'; + $uid = 'uid115792'; + $expectedResponse = new RBACRoleBinding(); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateMembershipRBACRoleBindingTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $rbacrolebinding = new RBACRoleBinding(); + $rbacrolebindingRole = new Role(); + $rbacrolebinding->setRole($rbacrolebindingRole); + $updateMask = new FieldMask(); + $request = (new UpdateMembershipRBACRoleBindingRequest()) + ->setRbacrolebinding($rbacrolebinding) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateMembershipRBACRoleBinding($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/UpdateMembershipRBACRoleBinding', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getRbacrolebinding(); + $this->assertProtobufEquals($rbacrolebinding, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateMembershipRBACRoleBindingTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); } /** @test */ - public function listFeaturesExceptionTest() + public function updateMembershipRBACRoleBindingExceptionTest() { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); $transport = $this->createTransport(); $gapicClient = $this->createClient([ 'transport' => $transport, + 'operationsClient' => $operationsClient, ]); $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateMembershipRBACRoleBindingTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; @@ -825,63 +4265,128 @@ public function listFeaturesExceptionTest() ], JSON_PRETTY_PRINT ); - $transport->addResponse(null, $status); - $request = new ListFeaturesRequest(); + $operationsTransport->addResponse(null, $status); + // Mock request + $rbacrolebinding = new RBACRoleBinding(); + $rbacrolebindingRole = new Role(); + $rbacrolebinding->setRole($rbacrolebindingRole); + $updateMask = new FieldMask(); + $request = (new UpdateMembershipRBACRoleBindingRequest()) + ->setRbacrolebinding($rbacrolebinding) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateMembershipRBACRoleBinding($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateMembershipRBACRoleBindingTest'); try { - $gapicClient->listFeatures($request); - // If the $gapicClient method call did not throw, fail the test + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test $this->fail('Expected an ApiException, but no exception was thrown.'); } catch (ApiException $ex) { $this->assertEquals($status->code, $ex->getCode()); $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); } - // Call popReceivedCalls to ensure the stub is exhausted + // Call popReceivedCalls to ensure the stubs are exhausted $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); } /** @test */ - public function listMembershipsTest() + public function updateScopeTest() { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); $transport = $this->createTransport(); $gapicClient = $this->createClient([ 'transport' => $transport, + 'operationsClient' => $operationsClient, ]); $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); // Mock response - $nextPageToken = ''; - $resourcesElement = new Membership(); - $resources = [$resourcesElement]; - $expectedResponse = new ListMembershipsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setResources($resources); - $transport->addResponse($expectedResponse); + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateScopeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uid = 'uid115792'; + $expectedResponse = new Scope(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateScopeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListMembershipsRequest())->setParent($formattedParent); - $response = $gapicClient->listMemberships($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getResources()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkehub.v1.GkeHub/ListMemberships', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); + $scope = new Scope(); + $updateMask = new FieldMask(); + $request = (new UpdateScopeRequest())->setScope($scope)->setUpdateMask($updateMask); + $response = $gapicClient->updateScope($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/UpdateScope', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getScope(); + $this->assertProtobufEquals($scope, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateScopeTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); } /** @test */ - public function listMembershipsExceptionTest() + public function updateScopeExceptionTest() { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); $transport = $this->createTransport(); $gapicClient = $this->createClient([ 'transport' => $transport, + 'operationsClient' => $operationsClient, ]); $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateScopeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; @@ -894,25 +4399,35 @@ public function listMembershipsExceptionTest() ], JSON_PRETTY_PRINT ); - $transport->addResponse(null, $status); + $operationsTransport->addResponse(null, $status); // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListMembershipsRequest())->setParent($formattedParent); + $scope = new Scope(); + $updateMask = new FieldMask(); + $request = (new UpdateScopeRequest())->setScope($scope)->setUpdateMask($updateMask); + $response = $gapicClient->updateScope($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateScopeTest'); try { - $gapicClient->listMemberships($request); - // If the $gapicClient method call did not throw, fail the test + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test $this->fail('Expected an ApiException, but no exception was thrown.'); } catch (ApiException $ex) { $this->assertEquals($status->code, $ex->getCode()); $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); } - // Call popReceivedCalls to ensure the stub is exhausted + // Call popReceivedCalls to ensure the stubs are exhausted $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); } /** @test */ - public function updateFeatureTest() + public function updateScopeNamespaceTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ @@ -929,21 +4444,30 @@ public function updateFeatureTest() $this->assertTrue($operationsTransport->isExhausted()); // Mock response $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateFeatureTest'); + $incompleteOperation->setName('operations/updateScopeNamespaceTest'); $incompleteOperation->setDone(false); $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $expectedResponse = new Feature(); - $expectedResponse->setName($name2); + $name = 'name3373707'; + $uid = 'uid115792'; + $scope = 'scope109264468'; + $expectedResponse = new PBNamespace(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setScope($scope); $anyResponse = new Any(); $anyResponse->setValue($expectedResponse->serializeToString()); $completeOperation = new Operation(); - $completeOperation->setName('operations/updateFeatureTest'); + $completeOperation->setName('operations/updateScopeNamespaceTest'); $completeOperation->setDone(true); $completeOperation->setResponse($anyResponse); $operationsTransport->addResponse($completeOperation); - $request = new UpdateFeatureRequest(); - $response = $gapicClient->updateFeature($request); + // Mock request + $scopeNamespace = new PBNamespace(); + $scopeNamespaceScope = $gapicClient->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); + $scopeNamespace->setScope($scopeNamespaceScope); + $updateMask = new FieldMask(); + $request = (new UpdateScopeNamespaceRequest())->setScopeNamespace($scopeNamespace)->setUpdateMask($updateMask); + $response = $gapicClient->updateScopeNamespace($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); $apiRequests = $transport->popReceivedCalls(); @@ -952,9 +4476,13 @@ public function updateFeatureTest() $this->assertSame(0, count($operationsRequestsEmpty)); $actualApiFuncCall = $apiRequests[0]->getFuncCall(); $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkehub.v1.GkeHub/UpdateFeature', $actualApiFuncCall); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/UpdateScopeNamespace', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getScopeNamespace(); + $this->assertProtobufEquals($scopeNamespace, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateFeatureTest'); + $expectedOperationsRequestObject->setName('operations/updateScopeNamespaceTest'); $response->pollUntilComplete([ 'initialPollDelayMillis' => 1, ]); @@ -973,7 +4501,7 @@ public function updateFeatureTest() } /** @test */ - public function updateFeatureExceptionTest() + public function updateScopeNamespaceExceptionTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ @@ -990,7 +4518,7 @@ public function updateFeatureExceptionTest() $this->assertTrue($operationsTransport->isExhausted()); // Mock response $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateFeatureTest'); + $incompleteOperation->setName('operations/updateScopeNamespaceTest'); $incompleteOperation->setDone(false); $transport->addResponse($incompleteOperation); $status = new stdClass(); @@ -1006,12 +4534,17 @@ public function updateFeatureExceptionTest() JSON_PRETTY_PRINT ); $operationsTransport->addResponse(null, $status); - $request = new UpdateFeatureRequest(); - $response = $gapicClient->updateFeature($request); + // Mock request + $scopeNamespace = new PBNamespace(); + $scopeNamespaceScope = $gapicClient->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); + $scopeNamespace->setScope($scopeNamespaceScope); + $updateMask = new FieldMask(); + $request = (new UpdateScopeNamespaceRequest())->setScopeNamespace($scopeNamespace)->setUpdateMask($updateMask); + $response = $gapicClient->updateScopeNamespace($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateFeatureTest'); + $expectedOperationsRequestObject->setName('operations/updateScopeNamespaceTest'); try { $response->pollUntilComplete([ 'initialPollDelayMillis' => 1, @@ -1030,7 +4563,7 @@ public function updateFeatureExceptionTest() } /** @test */ - public function updateMembershipTest() + public function updateScopeRBACRoleBindingTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ @@ -1047,34 +4580,32 @@ public function updateMembershipTest() $this->assertTrue($operationsTransport->isExhausted()); // Mock response $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateMembershipTest'); + $incompleteOperation->setName('operations/updateScopeRBACRoleBindingTest'); $incompleteOperation->setDone(false); $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $externalId = 'externalId-1153075697'; - $uniqueId = 'uniqueId-538310583'; - $expectedResponse = new Membership(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setExternalId($externalId); - $expectedResponse->setUniqueId($uniqueId); + $user = 'user3599307'; + $name = 'name3373707'; + $uid = 'uid115792'; + $expectedResponse = new RBACRoleBinding(); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); $anyResponse = new Any(); $anyResponse->setValue($expectedResponse->serializeToString()); $completeOperation = new Operation(); - $completeOperation->setName('operations/updateMembershipTest'); + $completeOperation->setName('operations/updateScopeRBACRoleBindingTest'); $completeOperation->setDone(true); $completeOperation->setResponse($anyResponse); $operationsTransport->addResponse($completeOperation); // Mock request - $formattedName = $gapicClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); + $rbacrolebinding = new RBACRoleBinding(); + $rbacrolebindingRole = new Role(); + $rbacrolebinding->setRole($rbacrolebindingRole); $updateMask = new FieldMask(); - $resource = new Membership(); - $request = (new UpdateMembershipRequest()) - ->setName($formattedName) - ->setUpdateMask($updateMask) - ->setResource($resource); - $response = $gapicClient->updateMembership($request); + $request = (new UpdateScopeRBACRoleBindingRequest()) + ->setRbacrolebinding($rbacrolebinding) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateScopeRBACRoleBinding($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); $apiRequests = $transport->popReceivedCalls(); @@ -1083,15 +4614,13 @@ public function updateMembershipTest() $this->assertSame(0, count($operationsRequestsEmpty)); $actualApiFuncCall = $apiRequests[0]->getFuncCall(); $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkehub.v1.GkeHub/UpdateMembership', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertSame('/google.cloud.gkehub.v1.GkeHub/UpdateScopeRBACRoleBinding', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getRbacrolebinding(); + $this->assertProtobufEquals($rbacrolebinding, $actualValue); $actualValue = $actualApiRequestObject->getUpdateMask(); $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateMembershipTest'); + $expectedOperationsRequestObject->setName('operations/updateScopeRBACRoleBindingTest'); $response->pollUntilComplete([ 'initialPollDelayMillis' => 1, ]); @@ -1110,7 +4639,7 @@ public function updateMembershipTest() } /** @test */ - public function updateMembershipExceptionTest() + public function updateScopeRBACRoleBindingExceptionTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ @@ -1127,7 +4656,7 @@ public function updateMembershipExceptionTest() $this->assertTrue($operationsTransport->isExhausted()); // Mock response $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateMembershipTest'); + $incompleteOperation->setName('operations/updateScopeRBACRoleBindingTest'); $incompleteOperation->setDone(false); $transport->addResponse($incompleteOperation); $status = new stdClass(); @@ -1144,18 +4673,18 @@ public function updateMembershipExceptionTest() ); $operationsTransport->addResponse(null, $status); // Mock request - $formattedName = $gapicClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); + $rbacrolebinding = new RBACRoleBinding(); + $rbacrolebindingRole = new Role(); + $rbacrolebinding->setRole($rbacrolebindingRole); $updateMask = new FieldMask(); - $resource = new Membership(); - $request = (new UpdateMembershipRequest()) - ->setName($formattedName) - ->setUpdateMask($updateMask) - ->setResource($resource); - $response = $gapicClient->updateMembership($request); + $request = (new UpdateScopeRBACRoleBindingRequest()) + ->setRbacrolebinding($rbacrolebinding) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateScopeRBACRoleBinding($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateMembershipTest'); + $expectedOperationsRequestObject->setName('operations/updateScopeRBACRoleBindingTest'); try { $response->pollUntilComplete([ 'initialPollDelayMillis' => 1, diff --git a/owl-bot-staging/GkeHub/v1/proto/src/GPBMetadata/Google/Cloud/Gkehub/V1/Configmanagement/Configmanagement.php b/owl-bot-staging/GkeHub/v1/proto/src/GPBMetadata/Google/Cloud/Gkehub/V1/Configmanagement/Configmanagement.php deleted file mode 100644 index 871dfa00a5ed9d3dd228d2e8c5eb8c738291b342..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6742 zcmb_h-EQN?6^<lS;_UZvN4g5DKIq<8;ir?cg}os=A3V4 zKKj@hIPgHO5sSE*PkM6qO7;gtc3j)Hb=#D?qw{m(%DO#t43oHdS>A8Tjb>Y}?$_J* z@l($pxjHGzecSGvWLG!sQE#_@K?bAl?&aRDZd>O@f2dhnpA3oR-)P7)QvjAWB%Y(` zM6Ml|kBG1JG+*n~7;2|NQ9Ct;+Bw_nR3fNP0CZFHJURLTehV`GIis#==(6W)KK^^p z@KnPxd_yyh-{6>^%IBKt5d^u}_k3jOzF}K3{h(>-Wap90F=^lT92+@$Dv$jpL{fS@|Szczmu?fM221BdIQ5b!3ibO9az@Qk%x?{G>UQwIkA(L zj$w5ebW}Zu=(#z3ktzHmvYz+1*6|sHSHgVMo=miG-EH?Bp!$AWAh8rNTJur|3 zS07BVvBYeYV%ss^7+-9fGldUhn?eitEoDk-!}<-9M0ETz zHeQq->2tUO&dh$=Q6C}3}BLMbIaJ4EyTBc zo$&lokhYbV0Fx(a8}1&J8l_tGsM=_&r;U^2YNh_XUfo}NN6NvS(7V!UyLnV<*DGrY zX#>_nZ}8`7>2PgM`NJGQXl_1+WZ&>}Jdg^pNvj#YAZY_ucu`W%ZFi{oxfEmO4lEH% z>zbs;xJwG<2eBx^9oq78z=WnOmifl>t(!@J#tz0@9O_tV5b*2A4Rt$ZGFGhBb9v&C&-f zX48@cAi}w4xGX89rMr-29ly{FAI<9?3&W(e1}TAgnWG6IEm26KV<}PnD~IG3$BhHu zcRUr#^Xn@%8)@l2Y~4N>#2W@!$DoM!<5Xwp zbT~vTxnGZLUt_eSl)olGnPPgMIHr9?#UL*zRY(pjoyB*y5Wnz6VO~I*y!MI3vLlVF z8Nif}V0((^XFT^xnTf|~31j@a-L&%01mvcC&WGEcJS%OEm-RX(<#HxI=2&-bgGK6U6??PXQ<{6zB|w^)!9-x%@IXRz$rw$HrM-5yJF*+P72IKgAHk*~D& z`Ls}AtcU?H&5+*<@X>e?QSp&2#8=8uSDBy608)X^Td;w@)suFqU5yB)by&d-wOViB z%fmy|Pzh-T(v!zIRC$?pwRKc)ppa_R){;^dK)k2V^U9YASm4~C#+qj19&A;bjpy~6 zdh)VSQKR;#ccIr|+XxtbRc*DJE%aa$-VHY&R~!4>m7VZ1;(>6>iu-c{p#x1mUM8qd zjG<$@xSJD_Cku;os_~ht1?+(Wk?#R$oHG?Xv~hoKyG-PyX(e@Oh1Thrg~|o7E9A~5 ztkST=k~QuiB+nMCYrUc2(E_4=LAnFmzTm<~`F0-p3tWvZycx)S@R%we90W;q znAhzd5lQ;VxaW7B$K->-uwNB~kjg;?S!5OD?Wzzj+J8(yib69$%uXz8Rhs+J+zGHq zU$LZ_fu(U8nv>G7FiuqxWNE(R>FTtFedkfMMRM)}Zj6>s8@OFPXtwIFu+t(D0h#udSk=+|fe0dWC(z{VP>j375~GN@;KWtz7@M@Lig*3X3vp}_|2(AT+9OA#@fU{G zQ$B&UXd70xg+A>k+zbgx?jVwSf!}hMl)oonBf62}b?(!sH2WlW$VLIjmFIgAXf@Q} z7lhzBU!+PXk74sR%OMt6Fe(2^z}Bru5`hQ(z)bjBJYilk>17P*%)r1cp d250*};nxkJ+X;`|o=mx!U_JTu!5er3@ITr4c#Qx6 diff --git a/owl-bot-staging/GkeHub/v1/proto/src/GPBMetadata/Google/Cloud/Gkehub/V1/Feature.php b/owl-bot-staging/GkeHub/v1/proto/src/GPBMetadata/Google/Cloud/Gkehub/V1/Feature.php deleted file mode 100644 index d9a3c50086134c8c3b01bd3d029d221460f6dd8c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4013 zcmbVP%Wm676pbX?iLV^TW}H+pP?S{-L}_EPR#GIO;}m*X5fa;iq_{w%)}W}7%$Onx zK8&WRf2fPDx+>637hSYJ(RIF}cV*-Z&9#$Vl-Se0zOyRQ?YUnZyOxo$a%GVy9ck_2s$ zAa8S{BFX7iEOVd_N2;j~$%vTVrG@zoic%l=2By~VU5vYK4jtmU-I%qHSJ3LInqwKH zr<;9LplY6v#blY?q>cGijjN`kW2JlQ$d1RdYTJIQ2enn|_s6BQkBwFsC!dzWUHIb@ z*qW!qgxg$7Vtpv_K9tUPHtz&z)z)PUC~I2Yl$%czh_y(D<>*3yuO{F}m(wW6tOYEG z2`o-RuH>YRfbX+_j}0DdW7!K6!Ughw0$dFyi?9w0bTZ{qVyduQ&iq%(2)nRks6Ar1 zxwM!mWQ$)(oG=<$Dd3P^FzK4wzLsI(J7$~Ya=r15yw5%?GsAm<`$Vh50jWee-6etO6M}iIO$VZ zWPC-^NoYKrPRW>Jx*6D3}k`fUK)oHVG23!d#X^3nMK%F03|%M04;QRst#> zzUz$Z>-o5%k;`EWObnfNs`d<$yMbK13pTeQJ6+dV$efWkyiJ7buz0Q-KEVdTu2IsD zQ=0@f;>t#t!9AJAWsBQMHcyzQ%9^Pe!mY_B>lI#}vwHSs^+@yUq48mgUcrq>^k-E( znpIIqQo%@~Ui<)SoP3gwS@y@X?1{ZU!yekM{P?c)3O)@^06x2L_`4Eb<>bH=LBXzg zO*GGy-v(b7vSDfLFvPX+^CG;);o5*-#xC-Ir(h%CnHgI`DI5=Unywa$NkNGNODvoD zGgxFF!Yx>DcS@bw$;-obvsP*BH)_?jE5Zs~s~wigFB*sSwUhv`RH}3u$F;RI7Ugoa z(GIpURPbf9TIx{21z`gtUTYmUD##bEF6RGD!Af8YSNaGRG^@`~gVkbU*rzd41p&fM z$o7LfBHku=UkLK-fZ+$hd&W{8Cq83CYb!_9sOw9RK6;K$XW{C1rPd*JEG;adDf70WkeKb2(%K=}q-ANxR8^Fq*< zVSdro`~lV>9mC-o75sRe`Cq07Sjb5eh39qjmX&+`o-9R$X=J8GV|bpP^g}{ z)JfF;I5wgm&`&urIS)Q2Inlh7e@nq84zE}{&UeaT4>#$%t(p417@Vi zI0*4=%4eh9+YLW{P2a9_arPvU>SyGc-;<7a{s}j_!6TKvQgN$`&(wG6I~=4a45cW1 nPf?C{dQ0ru@!;xhWx?LJ-wm%4%OG91LntR&Qy#uY)+&Ngp(8y0hn;Kfr_j@j_ z+peED_1+QfC!P9mr9Pm84h^F|3v_`A;8_D21(r>k_Bcy`Qu zPvZf5o=ul;YZ8;sy%qRa^}41K+UGS#Huir2UVZ)c&sbU_7? zIXO`mQq!f>^x?|Fdoe&rc3PMq* zXDgpYB>`^XH0tt&qa5l|6*YOWD6E{mmfO%|PIU^S1hECO4zuVJv1$9BN5%G*MZm>? z=U^)F*pCV2uw?~XB;UZ4mBf8NWbtuzT3{_ILQcs~-%u0fDm{X010Nj*W4#{FtIK-T z83D0;9>i`I&=B(l(!xC`k7$6Dp?E}(rK-pkC=D$)p{OV1!Wg?>FnaGc9MIBjAw`Qj zBGS>q>$zCTcetQ0k*cWvCcQeTyS|Nf>U;Q1U7n0MI6fX^K76t{0psy;Kx@B@0m*^Y zE+7w}j7gZbn?$%|BH!|A?Yz>_@*8rdr0)q_KT5E3c&L%c9HebRl=&Z<@o^TS8jBR^ z`)JA>#MZeGnleh6+h;H%c{K-?XZ5I4<@%izud4lqY~*REKynl2a_&q!8`$}G;6je5y$3Mp$w0j9gb%#n)1cK#>Q7E~01=?6j}sVkoEFe;}#IbRT0 z`?&yDPYsaI;i^h=hzAAkXqjOaxYrF=I=K2P$eAOSU+^qOj_yaMipgBCz!CXKkHy(2 z_i*VHwFgj9DJZ^31t#BL4l)Nbsc_B6_5)mEzQHDITL8II$pT!-h;f;BlxJQNbxA>+ z0~SSS0(thu+S|gYN|ad19k?-~dfc{VL_;hwDrDnsk&59|JPhe6xPF_Tb%)({mAK3zz$Rf;-u!PA$U_*nkt~tX%n>#)=sNgxkRR6vhl37aj^4ryHX%iP{Nz$_mwd|&}=st85e&L7Jv`>ojy=X!`Uwt2-!0{77 zwyL1BrY?RTo7^Mez!&p4%vner@s0w)0f0%0{EoB#j- diff --git a/owl-bot-staging/GkeHub/v1/proto/src/GPBMetadata/Google/Cloud/Gkehub/V1/Multiclusteringress/Multiclusteringress.php b/owl-bot-staging/GkeHub/v1/proto/src/GPBMetadata/Google/Cloud/Gkehub/V1/Multiclusteringress/Multiclusteringress.php deleted file mode 100644 index e48863d0ce20..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/GPBMetadata/Google/Cloud/Gkehub/V1/Multiclusteringress/Multiclusteringress.php +++ /dev/null @@ -1,29 +0,0 @@ -internalAddGeneratedFile( - ' -à -Dgoogle/cloud/gkehub/v1/multiclusteringress/multiclusteringress.proto*google.cloud.gkehub.multiclusteringress.v1"( - FeatureSpec -config_membership ( B¹ -.com.google.cloud.gkehub.multiclusteringress.v1BMultiClusterIngressProtoPZ`cloud.google.com/go/gkehub/multiclusteringress/apiv1/multiclusteringresspb;multiclusteringresspbª*Google.Cloud.GkeHub.MultiClusterIngress.V1Ê*Google\\Cloud\\GkeHub\\MultiClusterIngress\\V1ê.Google::Cloud::GkeHub::MultiClusterIngress::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/GPBMetadata/Google/Cloud/Gkehub/V1/Service.php b/owl-bot-staging/GkeHub/v1/proto/src/GPBMetadata/Google/Cloud/Gkehub/V1/Service.php deleted file mode 100644 index 4ea182879931..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/GPBMetadata/Google/Cloud/Gkehub/V1/Service.php +++ /dev/null @@ -1,363 +0,0 @@ -internalAddGeneratedFile( - ' -‚ -$google/cloud/gkehub/v1/service.protogoogle.cloud.gkehub.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto$google/cloud/gkehub/v1/feature.proto"google/cloud/gkehub/v1/fleet.proto\'google/cloud/gkehub/v1/membership.proto#google/longrunning/operations.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"Q -GetScopeNamespaceRequest5 -name ( B\'àAúA! -gkehub.googleapis.com/Namespace"¸ -CreateScopeNamespaceRequest7 -parent ( B\'àAúA!gkehub.googleapis.com/Namespace -scope_namespace_id ( BàA? -scope_namespace ( 2!.google.cloud.gkehub.v1.NamespaceBàA"” -UpdateScopeNamespaceRequest? -scope_namespace ( 2!.google.cloud.gkehub.v1.NamespaceBàA4 - update_mask ( 2.google.protobuf.FieldMaskBàA"T -DeleteScopeNamespaceRequest5 -name ( B\'àAúA! -gkehub.googleapis.com/Namespace"† -ListScopeNamespacesRequest7 -parent ( B\'àAúA!gkehub.googleapis.com/Namespace - page_size (BàA - -page_token ( BàA"s -ListScopeNamespacesResponse; -scope_namespaces ( 2!.google.cloud.gkehub.v1.Namespace -next_page_token ( "] -GetScopeRBACRoleBindingRequest; -name ( B-àAúA\' -%gkehub.googleapis.com/RBACRoleBinding"Ê -!CreateScopeRBACRoleBindingRequest= -parent ( B-àAúA\'%gkehub.googleapis.com/RBACRoleBinding -rbacrolebinding_id ( BàAE -rbacrolebinding ( 2\'.google.cloud.gkehub.v1.RBACRoleBindingBàA"  -!UpdateScopeRBACRoleBindingRequestE -rbacrolebinding ( 2\'.google.cloud.gkehub.v1.RBACRoleBindingBàA4 - update_mask ( 2.google.protobuf.FieldMaskBàA"` -!DeleteScopeRBACRoleBindingRequest; -name ( B-àAúA\' -%gkehub.googleapis.com/RBACRoleBinding"’ - ListScopeRBACRoleBindingsRequest= -parent ( B-àAúA\'%gkehub.googleapis.com/RBACRoleBinding - page_size (BàA - -page_token ( BàA" -!ListScopeRBACRoleBindingsResponseA -rbacrolebindings ( 2\'.google.cloud.gkehub.v1.RBACRoleBinding -next_page_token ( "D -GetScopeRequest1 -name ( B#àAúA -gkehub.googleapis.com/Scope"“ -CreateScopeRequest3 -parent ( B#àAúAgkehub.googleapis.com/Scope -scope_id ( BàA1 -scope ( 2.google.cloud.gkehub.v1.ScopeBàA"} -UpdateScopeRequest1 -scope ( 2.google.cloud.gkehub.v1.ScopeBàA4 - update_mask ( 2.google.protobuf.FieldMaskBàA"G -DeleteScopeRequest1 -name ( B#àAúA -gkehub.googleapis.com/Scope"y -ListScopesRequest3 -parent ( B#àAúAgkehub.googleapis.com/Scope - page_size (BàA - -page_token ( BàA"\\ -ListScopesResponse- -scopes ( 2.google.cloud.gkehub.v1.Scope -next_page_token ( "‚ -ListPermittedScopesRequest3 -parent ( B#àAúAgkehub.googleapis.com/Scope - page_size (BàA - -page_token ( BàA"e -ListPermittedScopesResponse- -scopes ( 2.google.cloud.gkehub.v1.Scope -next_page_token ( "\\ -GetMembershipBindingRequest= -name ( B/àAúA) -\'gkehub.googleapis.com/MembershipBinding"Ñ -CreateMembershipBindingRequest? -parent ( B/àAúA)\'gkehub.googleapis.com/MembershipBindingJ -membership_binding ( 2).google.cloud.gkehub.v1.MembershipBindingBàA" -membership_binding_id ( BàA"¢ -UpdateMembershipBindingRequestJ -membership_binding ( 2).google.cloud.gkehub.v1.MembershipBindingBàA4 - update_mask ( 2.google.protobuf.FieldMaskBàA"_ -DeleteMembershipBindingRequest= -name ( B/àAúA) -\'gkehub.googleapis.com/MembershipBinding"¦ -ListMembershipBindingsRequest? -parent ( B/àAúA)\'gkehub.googleapis.com/MembershipBinding - page_size (BàA - -page_token ( BàA -filter ( BàA"– -ListMembershipBindingsResponseF -membership_bindings ( 2).google.cloud.gkehub.v1.MembershipBinding -next_page_token (  - unreachable ( "¯ -ListMembershipsRequest8 -parent ( B(àAúA" gkehub.googleapis.com/Membership - page_size (BàA - -page_token ( BàA -filter ( BàA -order_by ( BàA"b -#GetMembershipRBACRoleBindingRequest; -name ( B-àAúA\' -%gkehub.googleapis.com/RBACRoleBinding"Ï -&CreateMembershipRBACRoleBindingRequest= -parent ( B-àAúA\'%gkehub.googleapis.com/RBACRoleBinding -rbacrolebinding_id ( BàAE -rbacrolebinding ( 2\'.google.cloud.gkehub.v1.RBACRoleBindingBàA"¥ -&UpdateMembershipRBACRoleBindingRequestE -rbacrolebinding ( 2\'.google.cloud.gkehub.v1.RBACRoleBindingBàA4 - update_mask ( 2.google.protobuf.FieldMaskBàA"e -&DeleteMembershipRBACRoleBindingRequest; -name ( B-àAúA\' -%gkehub.googleapis.com/RBACRoleBinding"— -%ListMembershipRBACRoleBindingsRequest= -parent ( B-àAúA\'%gkehub.googleapis.com/RBACRoleBinding - page_size (BàA - -page_token ( BàA"™ -&ListMembershipRBACRoleBindingsResponseA -rbacrolebindings ( 2\'.google.cloud.gkehub.v1.RBACRoleBinding -next_page_token (  - unreachable ( "Ð -,GenerateMembershipRBACRoleBindingYAMLRequest8 -parent ( B(àAúA" - gkehub.googleapis.com/Membership -rbacrolebinding_id ( BàAE -rbacrolebinding ( 2\'.google.cloud.gkehub.v1.RBACRoleBindingBàA"K --GenerateMembershipRBACRoleBindingYAMLResponse -role_bindings_yaml ( "~ -ListMembershipsResponse5 - resources ( 2".google.cloud.gkehub.v1.Membership -next_page_token (  - unreachable ( "N -GetMembershipRequest6 -name ( B(àAúA" - gkehub.googleapis.com/Membership"œ -ListBoundMembershipsRequest7 - -scope_name ( B#àAúA -gkehub.googleapis.com/Scope -filter ( BàA - page_size (BàA - -page_token ( BàA"… -ListBoundMembershipsResponse7 - memberships ( 2".google.cloud.gkehub.v1.Membership - unreachable (  -next_page_token ( "à -CreateMembershipRequest8 -parent ( B(àAúA" gkehub.googleapis.com/Membership - membership_id ( BàA9 -resource ( 2".google.cloud.gkehub.v1.MembershipBàA - -request_id ( BàA"~ -DeleteMembershipRequest6 -name ( B(àAúA" - gkehub.googleapis.com/Membership - -request_id ( BàA -force (BàA"Û -UpdateMembershipRequest6 -name ( B(àAúA" - gkehub.googleapis.com/Membership4 - update_mask ( 2.google.protobuf.FieldMaskBàA9 -resource ( 2".google.cloud.gkehub.v1.MembershipBàA - -request_id ( BàA"ò -GenerateConnectManifestRequest6 -name ( B(àAúA" - gkehub.googleapis.com/Membership - namespace ( BàA -proxy ( BàA -version ( BàA - -is_upgrade (BàA -registry ( BàA& -image_pull_secret_content ( BàA"a -GenerateConnectManifestResponse> -manifest ( 2,.google.cloud.gkehub.v1.ConnectAgentResource"X -ConnectAgentResource. -type ( 2 .google.cloud.gkehub.v1.TypeMeta -manifest ( "- -TypeMeta -kind (  - api_version ( "· -ListFeaturesRequest2 -parent ( B"úAgkehub.googleapis.com/Feature - page_size ( - -page_token (  -filter (  -order_by ( # -return_partial_success (BàA"c -ListFeaturesResponse2 - resources ( 2.google.cloud.gkehub.v1.Feature -next_page_token ( "j -GetFeatureRequest0 -name ( B"úA -gkehub.googleapis.com/Feature# -return_partial_success (BàA"¥ -CreateFeatureRequest2 -parent ( B"úAgkehub.googleapis.com/Feature - -feature_id ( 1 -resource ( 2.google.cloud.gkehub.v1.Feature - -request_id ( "p -DeleteFeatureRequest0 -name ( B"úA -gkehub.googleapis.com/Feature -force ( - -request_id ( BàA"À -UpdateFeatureRequest0 -name ( B"úA -gkehub.googleapis.com/Feature/ - update_mask ( 2.google.protobuf.FieldMask1 -resource ( 2.google.cloud.gkehub.v1.Feature - -request_id ( "‚ -CreateFleetRequest9 -parent ( B)àAúA# -!locations.googleapis.com/Location1 -fleet ( 2.google.cloud.gkehub.v1.FleetBàA"D -GetFleetRequest1 -name ( B#àAúA -gkehub.googleapis.com/Fleet"} -UpdateFleetRequest1 -fleet ( 2.google.cloud.gkehub.v1.FleetBàA4 - update_mask ( 2.google.protobuf.FieldMaskBàA"G -DeleteFleetRequest1 -name ( B#àAúA -gkehub.googleapis.com/Fleet" -ListFleetsRequest9 -parent ( B)àAúA# -!locations.googleapis.com/Location - -page_token ( BàA - page_size (BàA"\\ -ListFleetsResponse- -fleets ( 2.google.cloud.gkehub.v1.Fleet -next_page_token ( "ù -OperationMetadata4 - create_time ( 2.google.protobuf.TimestampBàA1 -end_time ( 2.google.protobuf.TimestampBàA -target ( BàA -verb ( BàA - status_detail ( BàA -cancel_requested (BàA - api_version ( BàA2–M -GkeHub´ -ListMemberships..google.cloud.gkehub.v1.ListMembershipsRequest/.google.cloud.gkehub.v1.ListMembershipsResponse"@ÚAparent‚Óä“1//v1/{parent=projects/*/locations/*}/membershipsØ -ListBoundMemberships3.google.cloud.gkehub.v1.ListBoundMembershipsRequest4.google.cloud.gkehub.v1.ListBoundMembershipsResponse"UÚA -scope_name‚Óä“B@/v1/{scope_name=projects/*/locations/*/scopes/*}:listMemberships¨ - ListFeatures+.google.cloud.gkehub.v1.ListFeaturesRequest,.google.cloud.gkehub.v1.ListFeaturesResponse"=ÚAparent‚Óä“.,/v1/{parent=projects/*/locations/*}/features¡ - GetMembership,.google.cloud.gkehub.v1.GetMembershipRequest".google.cloud.gkehub.v1.Membership">ÚAname‚Óä“1//v1/{name=projects/*/locations/*/memberships/*}• - -GetFeature).google.cloud.gkehub.v1.GetFeatureRequest.google.cloud.gkehub.v1.Feature";ÚAname‚Óä“.,/v1/{name=projects/*/locations/*/features/*}è -CreateMembership/.google.cloud.gkehub.v1.CreateMembershipRequest.google.longrunning.Operation"ƒÊA - -MembershipOperationMetadataÚAparent,resource,membership_id‚Óä“;"//v1/{parent=projects/*/locations/*}/memberships:resourceØ - CreateFeature,.google.cloud.gkehub.v1.CreateFeatureRequest.google.longrunning.Operation"zÊA -FeatureOperationMetadataÚAparent,resource,feature_id‚Óä“8",/v1/{parent=projects/*/locations/*}/features:resourceÏ -DeleteMembership/.google.cloud.gkehub.v1.DeleteMembershipRequest.google.longrunning.Operation"kÊA* -google.protobuf.EmptyOperationMetadataÚAname‚Óä“1*//v1/{name=projects/*/locations/*/memberships/*}Æ - DeleteFeature,.google.cloud.gkehub.v1.DeleteFeatureRequest.google.longrunning.Operation"hÊA* -google.protobuf.EmptyOperationMetadataÚAname‚Óä“.*,/v1/{name=projects/*/locations/*/features/*}ã -UpdateMembership/.google.cloud.gkehub.v1.UpdateMembershipRequest.google.longrunning.Operation"ÊA - -MembershipOperationMetadataÚAname,resource,update_mask‚Óä“;2//v1/{name=projects/*/locations/*/memberships/*}:resource× - UpdateFeature,.google.cloud.gkehub.v1.UpdateFeatureRequest.google.longrunning.Operation"yÊA -FeatureOperationMetadataÚAname,resource,update_mask‚Óä“82,/v1/{name=projects/*/locations/*/features/*}:resourceÛ -GenerateConnectManifest6.google.cloud.gkehub.v1.GenerateConnectManifestRequest7.google.cloud.gkehub.v1.GenerateConnectManifestResponse"O‚Óä“IG/v1/{name=projects/*/locations/*/memberships/*}:generateConnectManifest¿ - CreateFleet*.google.cloud.gkehub.v1.CreateFleetRequest.google.longrunning.Operation"eÊA -FleetOperationMetadataÚA parent,fleet‚Óä“3"*/v1/{parent=projects/*/locations/*}/fleets:fleet -GetFleet\'.google.cloud.gkehub.v1.GetFleetRequest.google.cloud.gkehub.v1.Fleet"9ÚAname‚Óä“,*/v1/{name=projects/*/locations/*/fleets/*}Ê - UpdateFleet*.google.cloud.gkehub.v1.UpdateFleetRequest.google.longrunning.Operation"pÊA -FleetOperationMetadataÚAfleet,update_mask‚Óä“920/v1/{fleet.name=projects/*/locations/*/fleets/*}:fleetÀ - DeleteFleet*.google.cloud.gkehub.v1.DeleteFleetRequest.google.longrunning.Operation"fÊA* -google.protobuf.EmptyOperationMetadataÚAname‚Óä“,**/v1/{name=projects/*/locations/*/fleets/*}Ó - -ListFleets).google.cloud.gkehub.v1.ListFleetsRequest*.google.cloud.gkehub.v1.ListFleetsResponse"nÚAparent‚Óä“_*/v1/{parent=projects/*/locations/*}/fleetsZ1//v1/{parent=organizations/*/locations/*}/fleets° -GetScopeNamespace0.google.cloud.gkehub.v1.GetScopeNamespaceRequest!.google.cloud.gkehub.v1.Namespace"FÚAname‚Óä“97/v1/{name=projects/*/locations/*/scopes/*/namespaces/*}Š -CreateScopeNamespace3.google.cloud.gkehub.v1.CreateScopeNamespaceRequest.google.longrunning.Operation"ÊA - NamespaceOperationMetadataÚA)parent,scope_namespace,scope_namespace_id‚Óä“J"7/v1/{parent=projects/*/locations/*/scopes/*}/namespaces:scope_namespaceŒ -UpdateScopeNamespace3.google.cloud.gkehub.v1.UpdateScopeNamespaceRequest.google.longrunning.Operation"ŸÊA - NamespaceOperationMetadataÚAscope_namespace,update_mask‚Óä“Z2G/v1/{scope_namespace.name=projects/*/locations/*/scopes/*/namespaces/*}:scope_namespaceß -DeleteScopeNamespace3.google.cloud.gkehub.v1.DeleteScopeNamespaceRequest.google.longrunning.Operation"sÊA* -google.protobuf.EmptyOperationMetadataÚAname‚Óä“9*7/v1/{name=projects/*/locations/*/scopes/*/namespaces/*}È -ListScopeNamespaces2.google.cloud.gkehub.v1.ListScopeNamespacesRequest3.google.cloud.gkehub.v1.ListScopeNamespacesResponse"HÚAparent‚Óä“97/v1/{parent=projects/*/locations/*/scopes/*}/namespacesÈ -GetScopeRBACRoleBinding6.google.cloud.gkehub.v1.GetScopeRBACRoleBindingRequest\'.google.cloud.gkehub.v1.RBACRoleBinding"LÚAname‚Óä“?=/v1/{name=projects/*/locations/*/scopes/*/rbacrolebindings/*}¢ -CreateScopeRBACRoleBinding9.google.cloud.gkehub.v1.CreateScopeRBACRoleBindingRequest.google.longrunning.Operation"©ÊA$ -RBACRoleBindingOperationMetadataÚA)parent,rbacrolebinding,rbacrolebinding_id‚Óä“P"=/v1/{parent=projects/*/locations/*/scopes/*}/rbacrolebindings:rbacrolebinding¤ -UpdateScopeRBACRoleBinding9.google.cloud.gkehub.v1.UpdateScopeRBACRoleBindingRequest.google.longrunning.Operation"«ÊA$ -RBACRoleBindingOperationMetadataÚArbacrolebinding,update_mask‚Óä“`2M/v1/{rbacrolebinding.name=projects/*/locations/*/scopes/*/rbacrolebindings/*}:rbacrolebindingñ -DeleteScopeRBACRoleBinding9.google.cloud.gkehub.v1.DeleteScopeRBACRoleBindingRequest.google.longrunning.Operation"yÊA* -google.protobuf.EmptyOperationMetadataÚAname‚Óä“?*=/v1/{name=projects/*/locations/*/scopes/*/rbacrolebindings/*}à -ListScopeRBACRoleBindings8.google.cloud.gkehub.v1.ListScopeRBACRoleBindingsRequest9.google.cloud.gkehub.v1.ListScopeRBACRoleBindingsResponse"NÚAparent‚Óä“?=/v1/{parent=projects/*/locations/*/scopes/*}/rbacrolebindings -GetScope\'.google.cloud.gkehub.v1.GetScopeRequest.google.cloud.gkehub.v1.Scope"9ÚAname‚Óä“,*/v1/{name=projects/*/locations/*/scopes/*}È - CreateScope*.google.cloud.gkehub.v1.CreateScopeRequest.google.longrunning.Operation"nÊA -ScopeOperationMetadataÚAparent,scope,scope_id‚Óä“3"*/v1/{parent=projects/*/locations/*}/scopes:scopeÊ - UpdateScope*.google.cloud.gkehub.v1.UpdateScopeRequest.google.longrunning.Operation"pÊA -ScopeOperationMetadataÚAscope,update_mask‚Óä“920/v1/{scope.name=projects/*/locations/*/scopes/*}:scopeÀ - DeleteScope*.google.cloud.gkehub.v1.DeleteScopeRequest.google.longrunning.Operation"fÊA* -google.protobuf.EmptyOperationMetadataÚAname‚Óä“,**/v1/{name=projects/*/locations/*/scopes/*}  - -ListScopes).google.cloud.gkehub.v1.ListScopesRequest*.google.cloud.gkehub.v1.ListScopesResponse";ÚAparent‚Óä“,*/v1/{parent=projects/*/locations/*}/scopesÉ -ListPermittedScopes2.google.cloud.gkehub.v1.ListPermittedScopesRequest3.google.cloud.gkehub.v1.ListPermittedScopesResponse"IÚAparent‚Óä“:8/v1/{parent=projects/*/locations/*}/scopes:listPermittedÁ -GetMembershipBinding3.google.cloud.gkehub.v1.GetMembershipBindingRequest).google.cloud.gkehub.v1.MembershipBinding"IÚAname‚Óä“<:/v1/{name=projects/*/locations/*/memberships/*/bindings/*}¤ -CreateMembershipBinding6.google.cloud.gkehub.v1.CreateMembershipBindingRequest.google.longrunning.Operation"±ÊA& -MembershipBindingOperationMetadataÚA/parent,membership_binding,membership_binding_id‚Óä“P":/v1/{parent=projects/*/locations/*/memberships/*}/bindings:membership_binding¦ -UpdateMembershipBinding6.google.cloud.gkehub.v1.UpdateMembershipBindingRequest.google.longrunning.Operation"³ÊA& -MembershipBindingOperationMetadataÚAmembership_binding,update_mask‚Óä“c2M/v1/{membership_binding.name=projects/*/locations/*/memberships/*/bindings/*}:membership_bindingè -DeleteMembershipBinding6.google.cloud.gkehub.v1.DeleteMembershipBindingRequest.google.longrunning.Operation"vÊA* -google.protobuf.EmptyOperationMetadataÚAname‚Óä“<*:/v1/{name=projects/*/locations/*/memberships/*/bindings/*}Ô -ListMembershipBindings5.google.cloud.gkehub.v1.ListMembershipBindingsRequest6.google.cloud.gkehub.v1.ListMembershipBindingsResponse"KÚAparent‚Óä“<:/v1/{parent=projects/*/locations/*/memberships/*}/bindings× -GetMembershipRBACRoleBinding;.google.cloud.gkehub.v1.GetMembershipRBACRoleBindingRequest\'.google.cloud.gkehub.v1.RBACRoleBinding"QÚAname‚Óä“DB/v1/{name=projects/*/locations/*/memberships/*/rbacrolebindings/*}± -CreateMembershipRBACRoleBinding>.google.cloud.gkehub.v1.CreateMembershipRBACRoleBindingRequest.google.longrunning.Operation"®ÊA$ -RBACRoleBindingOperationMetadataÚA)parent,rbacrolebinding,rbacrolebinding_id‚Óä“U"B/v1/{parent=projects/*/locations/*/memberships/*}/rbacrolebindings:rbacrolebinding³ -UpdateMembershipRBACRoleBinding>.google.cloud.gkehub.v1.UpdateMembershipRBACRoleBindingRequest.google.longrunning.Operation"°ÊA$ -RBACRoleBindingOperationMetadataÚArbacrolebinding,update_mask‚Óä“e2R/v1/{rbacrolebinding.name=projects/*/locations/*/memberships/*/rbacrolebindings/*}:rbacrolebinding€ -DeleteMembershipRBACRoleBinding>.google.cloud.gkehub.v1.DeleteMembershipRBACRoleBindingRequest.google.longrunning.Operation"~ÊA* -google.protobuf.EmptyOperationMetadataÚAname‚Óä“D*B/v1/{name=projects/*/locations/*/memberships/*/rbacrolebindings/*}ô -ListMembershipRBACRoleBindings=.google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsRequest>.google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsResponse"SÚAparent‚Óä“DB/v1/{parent=projects/*/locations/*/memberships/*}/rbacrolebindings¸ -%GenerateMembershipRBACRoleBindingYAMLD.google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLRequestE.google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLResponse"‚Óä“{"h/v1/{parent=projects/*/locations/*/memberships/*}/rbacrolebindings:generateMembershipRBACRoleBindingYAML:rbacrolebindingIÊAgkehub.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformB® -com.google.cloud.gkehub.v1B ServiceProtoPZ2cloud.google.com/go/gkehub/apiv1/gkehubpb;gkehubpbªGoogle.Cloud.GkeHub.V1ÊGoogle\\Cloud\\GkeHub\\V1êGoogle::Cloud::GkeHub::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSync.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSync.php deleted file mode 100644 index eba4ae705143..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSync.php +++ /dev/null @@ -1,323 +0,0 @@ -google.cloud.gkehub.configmanagement.v1.ConfigSync - */ -class ConfigSync extends \Google\Protobuf\Internal\Message -{ - /** - * Git repo configuration for the cluster. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.GitConfig git = 7; - */ - protected $git = null; - /** - * Specifies whether the Config Sync Repo is - * in "hierarchical" or "unstructured" mode. - * - * Generated from protobuf field string source_format = 8; - */ - protected $source_format = ''; - /** - * Enables the installation of ConfigSync. - * If set to true, ConfigSync resources will be created and the other - * ConfigSync fields will be applied if exist. - * If set to false, all other ConfigSync fields will be ignored, ConfigSync - * resources will be deleted. - * If omitted, ConfigSync resources will be managed depends on the presence - * of the git or oci field. - * - * Generated from protobuf field optional bool enabled = 10; - */ - protected $enabled = null; - /** - * Set to true to enable the Config Sync admission webhook to prevent drifts. - * If set to `false`, disables the Config Sync admission webhook and does not - * prevent drifts. - * - * Generated from protobuf field bool prevent_drift = 11; - */ - protected $prevent_drift = false; - /** - * OCI repo configuration for the cluster - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.OciConfig oci = 12; - */ - protected $oci = null; - /** - * The Email of the Google Cloud Service Account (GSA) used for exporting - * Config Sync metrics to Cloud Monitoring when Workload Identity is enabled. - * The GSA should have the Monitoring Metric Writer - * (roles/monitoring.metricWriter) IAM role. - * The Kubernetes ServiceAccount `default` in the namespace - * `config-management-monitoring` should be bound to the GSA. - * - * Generated from protobuf field string metrics_gcp_service_account_email = 15; - */ - protected $metrics_gcp_service_account_email = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GkeHub\ConfigManagement\V1\GitConfig $git - * Git repo configuration for the cluster. - * @type string $source_format - * Specifies whether the Config Sync Repo is - * in "hierarchical" or "unstructured" mode. - * @type bool $enabled - * Enables the installation of ConfigSync. - * If set to true, ConfigSync resources will be created and the other - * ConfigSync fields will be applied if exist. - * If set to false, all other ConfigSync fields will be ignored, ConfigSync - * resources will be deleted. - * If omitted, ConfigSync resources will be managed depends on the presence - * of the git or oci field. - * @type bool $prevent_drift - * Set to true to enable the Config Sync admission webhook to prevent drifts. - * If set to `false`, disables the Config Sync admission webhook and does not - * prevent drifts. - * @type \Google\Cloud\GkeHub\ConfigManagement\V1\OciConfig $oci - * OCI repo configuration for the cluster - * @type string $metrics_gcp_service_account_email - * The Email of the Google Cloud Service Account (GSA) used for exporting - * Config Sync metrics to Cloud Monitoring when Workload Identity is enabled. - * The GSA should have the Monitoring Metric Writer - * (roles/monitoring.metricWriter) IAM role. - * The Kubernetes ServiceAccount `default` in the namespace - * `config-management-monitoring` should be bound to the GSA. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); - parent::__construct($data); - } - - /** - * Git repo configuration for the cluster. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.GitConfig git = 7; - * @return \Google\Cloud\GkeHub\ConfigManagement\V1\GitConfig|null - */ - public function getGit() - { - return $this->git; - } - - public function hasGit() - { - return isset($this->git); - } - - public function clearGit() - { - unset($this->git); - } - - /** - * Git repo configuration for the cluster. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.GitConfig git = 7; - * @param \Google\Cloud\GkeHub\ConfigManagement\V1\GitConfig $var - * @return $this - */ - public function setGit($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\ConfigManagement\V1\GitConfig::class); - $this->git = $var; - - return $this; - } - - /** - * Specifies whether the Config Sync Repo is - * in "hierarchical" or "unstructured" mode. - * - * Generated from protobuf field string source_format = 8; - * @return string - */ - public function getSourceFormat() - { - return $this->source_format; - } - - /** - * Specifies whether the Config Sync Repo is - * in "hierarchical" or "unstructured" mode. - * - * Generated from protobuf field string source_format = 8; - * @param string $var - * @return $this - */ - public function setSourceFormat($var) - { - GPBUtil::checkString($var, True); - $this->source_format = $var; - - return $this; - } - - /** - * Enables the installation of ConfigSync. - * If set to true, ConfigSync resources will be created and the other - * ConfigSync fields will be applied if exist. - * If set to false, all other ConfigSync fields will be ignored, ConfigSync - * resources will be deleted. - * If omitted, ConfigSync resources will be managed depends on the presence - * of the git or oci field. - * - * Generated from protobuf field optional bool enabled = 10; - * @return bool - */ - public function getEnabled() - { - return isset($this->enabled) ? $this->enabled : false; - } - - public function hasEnabled() - { - return isset($this->enabled); - } - - public function clearEnabled() - { - unset($this->enabled); - } - - /** - * Enables the installation of ConfigSync. - * If set to true, ConfigSync resources will be created and the other - * ConfigSync fields will be applied if exist. - * If set to false, all other ConfigSync fields will be ignored, ConfigSync - * resources will be deleted. - * If omitted, ConfigSync resources will be managed depends on the presence - * of the git or oci field. - * - * Generated from protobuf field optional bool enabled = 10; - * @param bool $var - * @return $this - */ - public function setEnabled($var) - { - GPBUtil::checkBool($var); - $this->enabled = $var; - - return $this; - } - - /** - * Set to true to enable the Config Sync admission webhook to prevent drifts. - * If set to `false`, disables the Config Sync admission webhook and does not - * prevent drifts. - * - * Generated from protobuf field bool prevent_drift = 11; - * @return bool - */ - public function getPreventDrift() - { - return $this->prevent_drift; - } - - /** - * Set to true to enable the Config Sync admission webhook to prevent drifts. - * If set to `false`, disables the Config Sync admission webhook and does not - * prevent drifts. - * - * Generated from protobuf field bool prevent_drift = 11; - * @param bool $var - * @return $this - */ - public function setPreventDrift($var) - { - GPBUtil::checkBool($var); - $this->prevent_drift = $var; - - return $this; - } - - /** - * OCI repo configuration for the cluster - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.OciConfig oci = 12; - * @return \Google\Cloud\GkeHub\ConfigManagement\V1\OciConfig|null - */ - public function getOci() - { - return $this->oci; - } - - public function hasOci() - { - return isset($this->oci); - } - - public function clearOci() - { - unset($this->oci); - } - - /** - * OCI repo configuration for the cluster - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.OciConfig oci = 12; - * @param \Google\Cloud\GkeHub\ConfigManagement\V1\OciConfig $var - * @return $this - */ - public function setOci($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\ConfigManagement\V1\OciConfig::class); - $this->oci = $var; - - return $this; - } - - /** - * The Email of the Google Cloud Service Account (GSA) used for exporting - * Config Sync metrics to Cloud Monitoring when Workload Identity is enabled. - * The GSA should have the Monitoring Metric Writer - * (roles/monitoring.metricWriter) IAM role. - * The Kubernetes ServiceAccount `default` in the namespace - * `config-management-monitoring` should be bound to the GSA. - * - * Generated from protobuf field string metrics_gcp_service_account_email = 15; - * @return string - */ - public function getMetricsGcpServiceAccountEmail() - { - return $this->metrics_gcp_service_account_email; - } - - /** - * The Email of the Google Cloud Service Account (GSA) used for exporting - * Config Sync metrics to Cloud Monitoring when Workload Identity is enabled. - * The GSA should have the Monitoring Metric Writer - * (roles/monitoring.metricWriter) IAM role. - * The Kubernetes ServiceAccount `default` in the namespace - * `config-management-monitoring` should be bound to the GSA. - * - * Generated from protobuf field string metrics_gcp_service_account_email = 15; - * @param string $var - * @return $this - */ - public function setMetricsGcpServiceAccountEmail($var) - { - GPBUtil::checkString($var, True); - $this->metrics_gcp_service_account_email = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncDeploymentState.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncDeploymentState.php deleted file mode 100644 index 828c82a203d3..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncDeploymentState.php +++ /dev/null @@ -1,271 +0,0 @@ -google.cloud.gkehub.configmanagement.v1.ConfigSyncDeploymentState - */ -class ConfigSyncDeploymentState extends \Google\Protobuf\Internal\Message -{ - /** - * Deployment state of the importer pod - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState importer = 1; - */ - protected $importer = 0; - /** - * Deployment state of the syncer pod - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState syncer = 2; - */ - protected $syncer = 0; - /** - * Deployment state of the git-sync pod - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState git_sync = 3; - */ - protected $git_sync = 0; - /** - * Deployment state of the monitor pod - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState monitor = 4; - */ - protected $monitor = 0; - /** - * Deployment state of reconciler-manager pod - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState reconciler_manager = 5; - */ - protected $reconciler_manager = 0; - /** - * Deployment state of root-reconciler - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState root_reconciler = 6; - */ - protected $root_reconciler = 0; - /** - * Deployment state of admission-webhook - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState admission_webhook = 7; - */ - protected $admission_webhook = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $importer - * Deployment state of the importer pod - * @type int $syncer - * Deployment state of the syncer pod - * @type int $git_sync - * Deployment state of the git-sync pod - * @type int $monitor - * Deployment state of the monitor pod - * @type int $reconciler_manager - * Deployment state of reconciler-manager pod - * @type int $root_reconciler - * Deployment state of root-reconciler - * @type int $admission_webhook - * Deployment state of admission-webhook - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); - parent::__construct($data); - } - - /** - * Deployment state of the importer pod - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState importer = 1; - * @return int - */ - public function getImporter() - { - return $this->importer; - } - - /** - * Deployment state of the importer pod - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState importer = 1; - * @param int $var - * @return $this - */ - public function setImporter($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\ConfigManagement\V1\DeploymentState::class); - $this->importer = $var; - - return $this; - } - - /** - * Deployment state of the syncer pod - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState syncer = 2; - * @return int - */ - public function getSyncer() - { - return $this->syncer; - } - - /** - * Deployment state of the syncer pod - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState syncer = 2; - * @param int $var - * @return $this - */ - public function setSyncer($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\ConfigManagement\V1\DeploymentState::class); - $this->syncer = $var; - - return $this; - } - - /** - * Deployment state of the git-sync pod - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState git_sync = 3; - * @return int - */ - public function getGitSync() - { - return $this->git_sync; - } - - /** - * Deployment state of the git-sync pod - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState git_sync = 3; - * @param int $var - * @return $this - */ - public function setGitSync($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\ConfigManagement\V1\DeploymentState::class); - $this->git_sync = $var; - - return $this; - } - - /** - * Deployment state of the monitor pod - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState monitor = 4; - * @return int - */ - public function getMonitor() - { - return $this->monitor; - } - - /** - * Deployment state of the monitor pod - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState monitor = 4; - * @param int $var - * @return $this - */ - public function setMonitor($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\ConfigManagement\V1\DeploymentState::class); - $this->monitor = $var; - - return $this; - } - - /** - * Deployment state of reconciler-manager pod - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState reconciler_manager = 5; - * @return int - */ - public function getReconcilerManager() - { - return $this->reconciler_manager; - } - - /** - * Deployment state of reconciler-manager pod - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState reconciler_manager = 5; - * @param int $var - * @return $this - */ - public function setReconcilerManager($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\ConfigManagement\V1\DeploymentState::class); - $this->reconciler_manager = $var; - - return $this; - } - - /** - * Deployment state of root-reconciler - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState root_reconciler = 6; - * @return int - */ - public function getRootReconciler() - { - return $this->root_reconciler; - } - - /** - * Deployment state of root-reconciler - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState root_reconciler = 6; - * @param int $var - * @return $this - */ - public function setRootReconciler($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\ConfigManagement\V1\DeploymentState::class); - $this->root_reconciler = $var; - - return $this; - } - - /** - * Deployment state of admission-webhook - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState admission_webhook = 7; - * @return int - */ - public function getAdmissionWebhook() - { - return $this->admission_webhook; - } - - /** - * Deployment state of admission-webhook - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState admission_webhook = 7; - * @param int $var - * @return $this - */ - public function setAdmissionWebhook($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\ConfigManagement\V1\DeploymentState::class); - $this->admission_webhook = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncError.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncError.php deleted file mode 100644 index 2aefa6086d1e..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncError.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.gkehub.configmanagement.v1.ConfigSyncError - */ -class ConfigSyncError extends \Google\Protobuf\Internal\Message -{ - /** - * A string representing the user facing error message - * - * Generated from protobuf field string error_message = 1; - */ - protected $error_message = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $error_message - * A string representing the user facing error message - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); - parent::__construct($data); - } - - /** - * A string representing the user facing error message - * - * Generated from protobuf field string error_message = 1; - * @return string - */ - public function getErrorMessage() - { - return $this->error_message; - } - - /** - * A string representing the user facing error message - * - * Generated from protobuf field string error_message = 1; - * @param string $var - * @return $this - */ - public function setErrorMessage($var) - { - GPBUtil::checkString($var, True); - $this->error_message = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncState.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncState.php deleted file mode 100644 index d2fb6690daf1..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncState.php +++ /dev/null @@ -1,309 +0,0 @@ -google.cloud.gkehub.configmanagement.v1.ConfigSyncState - */ -class ConfigSyncState extends \Google\Protobuf\Internal\Message -{ - /** - * The version of ConfigSync deployed - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSyncVersion version = 1; - */ - protected $version = null; - /** - * Information about the deployment of ConfigSync, including the version - * of the various Pods deployed - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSyncDeploymentState deployment_state = 2; - */ - protected $deployment_state = null; - /** - * The state of ConfigSync's process to sync configs to a cluster - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.SyncState sync_state = 3; - */ - protected $sync_state = null; - /** - * Errors pertaining to the installation of Config Sync. - * - * Generated from protobuf field repeated .google.cloud.gkehub.configmanagement.v1.ConfigSyncError errors = 4; - */ - private $errors; - /** - * The state of the RootSync CRD - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSyncState.CRDState rootsync_crd = 5; - */ - protected $rootsync_crd = 0; - /** - * The state of the Reposync CRD - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSyncState.CRDState reposync_crd = 6; - */ - protected $reposync_crd = 0; - /** - * The state of CS - * This field summarizes the other fields in this message. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSyncState.State state = 7; - */ - protected $state = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSyncVersion $version - * The version of ConfigSync deployed - * @type \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSyncDeploymentState $deployment_state - * Information about the deployment of ConfigSync, including the version - * of the various Pods deployed - * @type \Google\Cloud\GkeHub\ConfigManagement\V1\SyncState $sync_state - * The state of ConfigSync's process to sync configs to a cluster - * @type array<\Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSyncError>|\Google\Protobuf\Internal\RepeatedField $errors - * Errors pertaining to the installation of Config Sync. - * @type int $rootsync_crd - * The state of the RootSync CRD - * @type int $reposync_crd - * The state of the Reposync CRD - * @type int $state - * The state of CS - * This field summarizes the other fields in this message. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); - parent::__construct($data); - } - - /** - * The version of ConfigSync deployed - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSyncVersion version = 1; - * @return \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSyncVersion|null - */ - public function getVersion() - { - return $this->version; - } - - public function hasVersion() - { - return isset($this->version); - } - - public function clearVersion() - { - unset($this->version); - } - - /** - * The version of ConfigSync deployed - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSyncVersion version = 1; - * @param \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSyncVersion $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSyncVersion::class); - $this->version = $var; - - return $this; - } - - /** - * Information about the deployment of ConfigSync, including the version - * of the various Pods deployed - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSyncDeploymentState deployment_state = 2; - * @return \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSyncDeploymentState|null - */ - public function getDeploymentState() - { - return $this->deployment_state; - } - - public function hasDeploymentState() - { - return isset($this->deployment_state); - } - - public function clearDeploymentState() - { - unset($this->deployment_state); - } - - /** - * Information about the deployment of ConfigSync, including the version - * of the various Pods deployed - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSyncDeploymentState deployment_state = 2; - * @param \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSyncDeploymentState $var - * @return $this - */ - public function setDeploymentState($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSyncDeploymentState::class); - $this->deployment_state = $var; - - return $this; - } - - /** - * The state of ConfigSync's process to sync configs to a cluster - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.SyncState sync_state = 3; - * @return \Google\Cloud\GkeHub\ConfigManagement\V1\SyncState|null - */ - public function getSyncState() - { - return $this->sync_state; - } - - public function hasSyncState() - { - return isset($this->sync_state); - } - - public function clearSyncState() - { - unset($this->sync_state); - } - - /** - * The state of ConfigSync's process to sync configs to a cluster - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.SyncState sync_state = 3; - * @param \Google\Cloud\GkeHub\ConfigManagement\V1\SyncState $var - * @return $this - */ - public function setSyncState($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\ConfigManagement\V1\SyncState::class); - $this->sync_state = $var; - - return $this; - } - - /** - * Errors pertaining to the installation of Config Sync. - * - * Generated from protobuf field repeated .google.cloud.gkehub.configmanagement.v1.ConfigSyncError errors = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getErrors() - { - return $this->errors; - } - - /** - * Errors pertaining to the installation of Config Sync. - * - * Generated from protobuf field repeated .google.cloud.gkehub.configmanagement.v1.ConfigSyncError errors = 4; - * @param array<\Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSyncError>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setErrors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSyncError::class); - $this->errors = $arr; - - return $this; - } - - /** - * The state of the RootSync CRD - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSyncState.CRDState rootsync_crd = 5; - * @return int - */ - public function getRootsyncCrd() - { - return $this->rootsync_crd; - } - - /** - * The state of the RootSync CRD - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSyncState.CRDState rootsync_crd = 5; - * @param int $var - * @return $this - */ - public function setRootsyncCrd($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSyncState\CRDState::class); - $this->rootsync_crd = $var; - - return $this; - } - - /** - * The state of the Reposync CRD - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSyncState.CRDState reposync_crd = 6; - * @return int - */ - public function getReposyncCrd() - { - return $this->reposync_crd; - } - - /** - * The state of the Reposync CRD - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSyncState.CRDState reposync_crd = 6; - * @param int $var - * @return $this - */ - public function setReposyncCrd($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSyncState\CRDState::class); - $this->reposync_crd = $var; - - return $this; - } - - /** - * The state of CS - * This field summarizes the other fields in this message. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSyncState.State state = 7; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The state of CS - * This field summarizes the other fields in this message. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSyncState.State state = 7; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSyncState\State::class); - $this->state = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncState/CRDState.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncState/CRDState.php deleted file mode 100644 index 2876176a286e..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncState/CRDState.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.gkehub.configmanagement.v1.ConfigSyncState.CRDState - */ -class CRDState -{ - /** - * CRD's state cannot be determined - * - * Generated from protobuf enum CRD_STATE_UNSPECIFIED = 0; - */ - const CRD_STATE_UNSPECIFIED = 0; - /** - * CRD is not installed - * - * Generated from protobuf enum NOT_INSTALLED = 1; - */ - const NOT_INSTALLED = 1; - /** - * CRD is installed - * - * Generated from protobuf enum INSTALLED = 2; - */ - const INSTALLED = 2; - /** - * CRD is terminating (i.e., it has been deleted and is cleaning up) - * - * Generated from protobuf enum TERMINATING = 3; - */ - const TERMINATING = 3; - /** - * CRD is installing - * - * Generated from protobuf enum INSTALLING = 4; - */ - const INSTALLING = 4; - - private static $valueToName = [ - self::CRD_STATE_UNSPECIFIED => 'CRD_STATE_UNSPECIFIED', - self::NOT_INSTALLED => 'NOT_INSTALLED', - self::INSTALLED => 'INSTALLED', - self::TERMINATING => 'TERMINATING', - self::INSTALLING => 'INSTALLING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CRDState::class, \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSyncState_CRDState::class); - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncState/State.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncState/State.php deleted file mode 100644 index 090be33ad0df..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncState/State.php +++ /dev/null @@ -1,76 +0,0 @@ -google.cloud.gkehub.configmanagement.v1.ConfigSyncState.State - */ -class State -{ - /** - * CS's state cannot be determined. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * CS is not installed. - * - * Generated from protobuf enum CONFIG_SYNC_NOT_INSTALLED = 1; - */ - const CONFIG_SYNC_NOT_INSTALLED = 1; - /** - * The expected CS version is installed successfully. - * - * Generated from protobuf enum CONFIG_SYNC_INSTALLED = 2; - */ - const CONFIG_SYNC_INSTALLED = 2; - /** - * CS encounters errors. - * - * Generated from protobuf enum CONFIG_SYNC_ERROR = 3; - */ - const CONFIG_SYNC_ERROR = 3; - /** - * CS is installing or terminating. - * - * Generated from protobuf enum CONFIG_SYNC_PENDING = 4; - */ - const CONFIG_SYNC_PENDING = 4; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CONFIG_SYNC_NOT_INSTALLED => 'CONFIG_SYNC_NOT_INSTALLED', - self::CONFIG_SYNC_INSTALLED => 'CONFIG_SYNC_INSTALLED', - self::CONFIG_SYNC_ERROR => 'CONFIG_SYNC_ERROR', - self::CONFIG_SYNC_PENDING => 'CONFIG_SYNC_PENDING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSyncState_State::class); - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncVersion.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncVersion.php deleted file mode 100644 index b89d0a14f997..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ConfigSyncVersion.php +++ /dev/null @@ -1,271 +0,0 @@ -google.cloud.gkehub.configmanagement.v1.ConfigSyncVersion - */ -class ConfigSyncVersion extends \Google\Protobuf\Internal\Message -{ - /** - * Version of the deployed importer pod - * - * Generated from protobuf field string importer = 1; - */ - protected $importer = ''; - /** - * Version of the deployed syncer pod - * - * Generated from protobuf field string syncer = 2; - */ - protected $syncer = ''; - /** - * Version of the deployed git-sync pod - * - * Generated from protobuf field string git_sync = 3; - */ - protected $git_sync = ''; - /** - * Version of the deployed monitor pod - * - * Generated from protobuf field string monitor = 4; - */ - protected $monitor = ''; - /** - * Version of the deployed reconciler-manager pod - * - * Generated from protobuf field string reconciler_manager = 5; - */ - protected $reconciler_manager = ''; - /** - * Version of the deployed reconciler container in root-reconciler pod - * - * Generated from protobuf field string root_reconciler = 6; - */ - protected $root_reconciler = ''; - /** - * Version of the deployed admission_webhook pod - * - * Generated from protobuf field string admission_webhook = 7; - */ - protected $admission_webhook = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $importer - * Version of the deployed importer pod - * @type string $syncer - * Version of the deployed syncer pod - * @type string $git_sync - * Version of the deployed git-sync pod - * @type string $monitor - * Version of the deployed monitor pod - * @type string $reconciler_manager - * Version of the deployed reconciler-manager pod - * @type string $root_reconciler - * Version of the deployed reconciler container in root-reconciler pod - * @type string $admission_webhook - * Version of the deployed admission_webhook pod - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); - parent::__construct($data); - } - - /** - * Version of the deployed importer pod - * - * Generated from protobuf field string importer = 1; - * @return string - */ - public function getImporter() - { - return $this->importer; - } - - /** - * Version of the deployed importer pod - * - * Generated from protobuf field string importer = 1; - * @param string $var - * @return $this - */ - public function setImporter($var) - { - GPBUtil::checkString($var, True); - $this->importer = $var; - - return $this; - } - - /** - * Version of the deployed syncer pod - * - * Generated from protobuf field string syncer = 2; - * @return string - */ - public function getSyncer() - { - return $this->syncer; - } - - /** - * Version of the deployed syncer pod - * - * Generated from protobuf field string syncer = 2; - * @param string $var - * @return $this - */ - public function setSyncer($var) - { - GPBUtil::checkString($var, True); - $this->syncer = $var; - - return $this; - } - - /** - * Version of the deployed git-sync pod - * - * Generated from protobuf field string git_sync = 3; - * @return string - */ - public function getGitSync() - { - return $this->git_sync; - } - - /** - * Version of the deployed git-sync pod - * - * Generated from protobuf field string git_sync = 3; - * @param string $var - * @return $this - */ - public function setGitSync($var) - { - GPBUtil::checkString($var, True); - $this->git_sync = $var; - - return $this; - } - - /** - * Version of the deployed monitor pod - * - * Generated from protobuf field string monitor = 4; - * @return string - */ - public function getMonitor() - { - return $this->monitor; - } - - /** - * Version of the deployed monitor pod - * - * Generated from protobuf field string monitor = 4; - * @param string $var - * @return $this - */ - public function setMonitor($var) - { - GPBUtil::checkString($var, True); - $this->monitor = $var; - - return $this; - } - - /** - * Version of the deployed reconciler-manager pod - * - * Generated from protobuf field string reconciler_manager = 5; - * @return string - */ - public function getReconcilerManager() - { - return $this->reconciler_manager; - } - - /** - * Version of the deployed reconciler-manager pod - * - * Generated from protobuf field string reconciler_manager = 5; - * @param string $var - * @return $this - */ - public function setReconcilerManager($var) - { - GPBUtil::checkString($var, True); - $this->reconciler_manager = $var; - - return $this; - } - - /** - * Version of the deployed reconciler container in root-reconciler pod - * - * Generated from protobuf field string root_reconciler = 6; - * @return string - */ - public function getRootReconciler() - { - return $this->root_reconciler; - } - - /** - * Version of the deployed reconciler container in root-reconciler pod - * - * Generated from protobuf field string root_reconciler = 6; - * @param string $var - * @return $this - */ - public function setRootReconciler($var) - { - GPBUtil::checkString($var, True); - $this->root_reconciler = $var; - - return $this; - } - - /** - * Version of the deployed admission_webhook pod - * - * Generated from protobuf field string admission_webhook = 7; - * @return string - */ - public function getAdmissionWebhook() - { - return $this->admission_webhook; - } - - /** - * Version of the deployed admission_webhook pod - * - * Generated from protobuf field string admission_webhook = 7; - * @param string $var - * @return $this - */ - public function setAdmissionWebhook($var) - { - GPBUtil::checkString($var, True); - $this->admission_webhook = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/DeploymentState.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/DeploymentState.php deleted file mode 100644 index 802546aeafdd..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/DeploymentState.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.gkehub.configmanagement.v1.DeploymentState - */ -class DeploymentState -{ - /** - * Deployment's state cannot be determined - * - * Generated from protobuf enum DEPLOYMENT_STATE_UNSPECIFIED = 0; - */ - const DEPLOYMENT_STATE_UNSPECIFIED = 0; - /** - * Deployment is not installed - * - * Generated from protobuf enum NOT_INSTALLED = 1; - */ - const NOT_INSTALLED = 1; - /** - * Deployment is installed - * - * Generated from protobuf enum INSTALLED = 2; - */ - const INSTALLED = 2; - /** - * Deployment was attempted to be installed, but has errors - * - * Generated from protobuf enum ERROR = 3; - */ - const ERROR = 3; - /** - * Deployment is installing or terminating - * - * Generated from protobuf enum PENDING = 4; - */ - const PENDING = 4; - - private static $valueToName = [ - self::DEPLOYMENT_STATE_UNSPECIFIED => 'DEPLOYMENT_STATE_UNSPECIFIED', - self::NOT_INSTALLED => 'NOT_INSTALLED', - self::INSTALLED => 'INSTALLED', - self::ERROR => 'ERROR', - self::PENDING => 'PENDING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ErrorResource.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ErrorResource.php deleted file mode 100644 index 2eccf955ae58..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/ErrorResource.php +++ /dev/null @@ -1,179 +0,0 @@ -google.cloud.gkehub.configmanagement.v1.ErrorResource - */ -class ErrorResource extends \Google\Protobuf\Internal\Message -{ - /** - * Path in the git repo of the erroneous config - * - * Generated from protobuf field string source_path = 1; - */ - protected $source_path = ''; - /** - * Metadata name of the resource that is causing an error - * - * Generated from protobuf field string resource_name = 2; - */ - protected $resource_name = ''; - /** - * Namespace of the resource that is causing an error - * - * Generated from protobuf field string resource_namespace = 3; - */ - protected $resource_namespace = ''; - /** - * Group/version/kind of the resource that is causing an error - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.GroupVersionKind resource_gvk = 4; - */ - protected $resource_gvk = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $source_path - * Path in the git repo of the erroneous config - * @type string $resource_name - * Metadata name of the resource that is causing an error - * @type string $resource_namespace - * Namespace of the resource that is causing an error - * @type \Google\Cloud\GkeHub\ConfigManagement\V1\GroupVersionKind $resource_gvk - * Group/version/kind of the resource that is causing an error - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); - parent::__construct($data); - } - - /** - * Path in the git repo of the erroneous config - * - * Generated from protobuf field string source_path = 1; - * @return string - */ - public function getSourcePath() - { - return $this->source_path; - } - - /** - * Path in the git repo of the erroneous config - * - * Generated from protobuf field string source_path = 1; - * @param string $var - * @return $this - */ - public function setSourcePath($var) - { - GPBUtil::checkString($var, True); - $this->source_path = $var; - - return $this; - } - - /** - * Metadata name of the resource that is causing an error - * - * Generated from protobuf field string resource_name = 2; - * @return string - */ - public function getResourceName() - { - return $this->resource_name; - } - - /** - * Metadata name of the resource that is causing an error - * - * Generated from protobuf field string resource_name = 2; - * @param string $var - * @return $this - */ - public function setResourceName($var) - { - GPBUtil::checkString($var, True); - $this->resource_name = $var; - - return $this; - } - - /** - * Namespace of the resource that is causing an error - * - * Generated from protobuf field string resource_namespace = 3; - * @return string - */ - public function getResourceNamespace() - { - return $this->resource_namespace; - } - - /** - * Namespace of the resource that is causing an error - * - * Generated from protobuf field string resource_namespace = 3; - * @param string $var - * @return $this - */ - public function setResourceNamespace($var) - { - GPBUtil::checkString($var, True); - $this->resource_namespace = $var; - - return $this; - } - - /** - * Group/version/kind of the resource that is causing an error - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.GroupVersionKind resource_gvk = 4; - * @return \Google\Cloud\GkeHub\ConfigManagement\V1\GroupVersionKind|null - */ - public function getResourceGvk() - { - return $this->resource_gvk; - } - - public function hasResourceGvk() - { - return isset($this->resource_gvk); - } - - public function clearResourceGvk() - { - unset($this->resource_gvk); - } - - /** - * Group/version/kind of the resource that is causing an error - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.GroupVersionKind resource_gvk = 4; - * @param \Google\Cloud\GkeHub\ConfigManagement\V1\GroupVersionKind $var - * @return $this - */ - public function setResourceGvk($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\ConfigManagement\V1\GroupVersionKind::class); - $this->resource_gvk = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/GatekeeperDeploymentState.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/GatekeeperDeploymentState.php deleted file mode 100644 index 711ded4041be..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/GatekeeperDeploymentState.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.gkehub.configmanagement.v1.GatekeeperDeploymentState - */ -class GatekeeperDeploymentState extends \Google\Protobuf\Internal\Message -{ - /** - * Status of gatekeeper-controller-manager pod. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState gatekeeper_controller_manager_state = 1; - */ - protected $gatekeeper_controller_manager_state = 0; - /** - * Status of gatekeeper-audit deployment. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState gatekeeper_audit = 2; - */ - protected $gatekeeper_audit = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $gatekeeper_controller_manager_state - * Status of gatekeeper-controller-manager pod. - * @type int $gatekeeper_audit - * Status of gatekeeper-audit deployment. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); - parent::__construct($data); - } - - /** - * Status of gatekeeper-controller-manager pod. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState gatekeeper_controller_manager_state = 1; - * @return int - */ - public function getGatekeeperControllerManagerState() - { - return $this->gatekeeper_controller_manager_state; - } - - /** - * Status of gatekeeper-controller-manager pod. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState gatekeeper_controller_manager_state = 1; - * @param int $var - * @return $this - */ - public function setGatekeeperControllerManagerState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\ConfigManagement\V1\DeploymentState::class); - $this->gatekeeper_controller_manager_state = $var; - - return $this; - } - - /** - * Status of gatekeeper-audit deployment. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState gatekeeper_audit = 2; - * @return int - */ - public function getGatekeeperAudit() - { - return $this->gatekeeper_audit; - } - - /** - * Status of gatekeeper-audit deployment. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState gatekeeper_audit = 2; - * @param int $var - * @return $this - */ - public function setGatekeeperAudit($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\ConfigManagement\V1\DeploymentState::class); - $this->gatekeeper_audit = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/GitConfig.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/GitConfig.php deleted file mode 100644 index e31ce65e990b..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/GitConfig.php +++ /dev/null @@ -1,321 +0,0 @@ -google.cloud.gkehub.configmanagement.v1.GitConfig - */ -class GitConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The URL of the Git repository to use as the source of truth. - * - * Generated from protobuf field string sync_repo = 1; - */ - protected $sync_repo = ''; - /** - * The branch of the repository to sync from. Default: master. - * - * Generated from protobuf field string sync_branch = 2; - */ - protected $sync_branch = ''; - /** - * The path within the Git repository that represents the top level of the - * repo to sync. Default: the root directory of the repository. - * - * Generated from protobuf field string policy_dir = 3; - */ - protected $policy_dir = ''; - /** - * Period in seconds between consecutive syncs. Default: 15. - * - * Generated from protobuf field int64 sync_wait_secs = 4; - */ - protected $sync_wait_secs = 0; - /** - * Git revision (tag or hash) to check out. Default HEAD. - * - * Generated from protobuf field string sync_rev = 5; - */ - protected $sync_rev = ''; - /** - * Type of secret configured for access to the Git repo. Must be one of ssh, - * cookiefile, gcenode, token, gcpserviceaccount or none. The - * validation of this is case-sensitive. Required. - * - * Generated from protobuf field string secret_type = 6; - */ - protected $secret_type = ''; - /** - * URL for the HTTPS proxy to be used when communicating with the Git repo. - * - * Generated from protobuf field string https_proxy = 7; - */ - protected $https_proxy = ''; - /** - * The Google Cloud Service Account Email used for auth when secret_type is - * gcpServiceAccount. - * - * Generated from protobuf field string gcp_service_account_email = 8; - */ - protected $gcp_service_account_email = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $sync_repo - * The URL of the Git repository to use as the source of truth. - * @type string $sync_branch - * The branch of the repository to sync from. Default: master. - * @type string $policy_dir - * The path within the Git repository that represents the top level of the - * repo to sync. Default: the root directory of the repository. - * @type int|string $sync_wait_secs - * Period in seconds between consecutive syncs. Default: 15. - * @type string $sync_rev - * Git revision (tag or hash) to check out. Default HEAD. - * @type string $secret_type - * Type of secret configured for access to the Git repo. Must be one of ssh, - * cookiefile, gcenode, token, gcpserviceaccount or none. The - * validation of this is case-sensitive. Required. - * @type string $https_proxy - * URL for the HTTPS proxy to be used when communicating with the Git repo. - * @type string $gcp_service_account_email - * The Google Cloud Service Account Email used for auth when secret_type is - * gcpServiceAccount. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); - parent::__construct($data); - } - - /** - * The URL of the Git repository to use as the source of truth. - * - * Generated from protobuf field string sync_repo = 1; - * @return string - */ - public function getSyncRepo() - { - return $this->sync_repo; - } - - /** - * The URL of the Git repository to use as the source of truth. - * - * Generated from protobuf field string sync_repo = 1; - * @param string $var - * @return $this - */ - public function setSyncRepo($var) - { - GPBUtil::checkString($var, True); - $this->sync_repo = $var; - - return $this; - } - - /** - * The branch of the repository to sync from. Default: master. - * - * Generated from protobuf field string sync_branch = 2; - * @return string - */ - public function getSyncBranch() - { - return $this->sync_branch; - } - - /** - * The branch of the repository to sync from. Default: master. - * - * Generated from protobuf field string sync_branch = 2; - * @param string $var - * @return $this - */ - public function setSyncBranch($var) - { - GPBUtil::checkString($var, True); - $this->sync_branch = $var; - - return $this; - } - - /** - * The path within the Git repository that represents the top level of the - * repo to sync. Default: the root directory of the repository. - * - * Generated from protobuf field string policy_dir = 3; - * @return string - */ - public function getPolicyDir() - { - return $this->policy_dir; - } - - /** - * The path within the Git repository that represents the top level of the - * repo to sync. Default: the root directory of the repository. - * - * Generated from protobuf field string policy_dir = 3; - * @param string $var - * @return $this - */ - public function setPolicyDir($var) - { - GPBUtil::checkString($var, True); - $this->policy_dir = $var; - - return $this; - } - - /** - * Period in seconds between consecutive syncs. Default: 15. - * - * Generated from protobuf field int64 sync_wait_secs = 4; - * @return int|string - */ - public function getSyncWaitSecs() - { - return $this->sync_wait_secs; - } - - /** - * Period in seconds between consecutive syncs. Default: 15. - * - * Generated from protobuf field int64 sync_wait_secs = 4; - * @param int|string $var - * @return $this - */ - public function setSyncWaitSecs($var) - { - GPBUtil::checkInt64($var); - $this->sync_wait_secs = $var; - - return $this; - } - - /** - * Git revision (tag or hash) to check out. Default HEAD. - * - * Generated from protobuf field string sync_rev = 5; - * @return string - */ - public function getSyncRev() - { - return $this->sync_rev; - } - - /** - * Git revision (tag or hash) to check out. Default HEAD. - * - * Generated from protobuf field string sync_rev = 5; - * @param string $var - * @return $this - */ - public function setSyncRev($var) - { - GPBUtil::checkString($var, True); - $this->sync_rev = $var; - - return $this; - } - - /** - * Type of secret configured for access to the Git repo. Must be one of ssh, - * cookiefile, gcenode, token, gcpserviceaccount or none. The - * validation of this is case-sensitive. Required. - * - * Generated from protobuf field string secret_type = 6; - * @return string - */ - public function getSecretType() - { - return $this->secret_type; - } - - /** - * Type of secret configured for access to the Git repo. Must be one of ssh, - * cookiefile, gcenode, token, gcpserviceaccount or none. The - * validation of this is case-sensitive. Required. - * - * Generated from protobuf field string secret_type = 6; - * @param string $var - * @return $this - */ - public function setSecretType($var) - { - GPBUtil::checkString($var, True); - $this->secret_type = $var; - - return $this; - } - - /** - * URL for the HTTPS proxy to be used when communicating with the Git repo. - * - * Generated from protobuf field string https_proxy = 7; - * @return string - */ - public function getHttpsProxy() - { - return $this->https_proxy; - } - - /** - * URL for the HTTPS proxy to be used when communicating with the Git repo. - * - * Generated from protobuf field string https_proxy = 7; - * @param string $var - * @return $this - */ - public function setHttpsProxy($var) - { - GPBUtil::checkString($var, True); - $this->https_proxy = $var; - - return $this; - } - - /** - * The Google Cloud Service Account Email used for auth when secret_type is - * gcpServiceAccount. - * - * Generated from protobuf field string gcp_service_account_email = 8; - * @return string - */ - public function getGcpServiceAccountEmail() - { - return $this->gcp_service_account_email; - } - - /** - * The Google Cloud Service Account Email used for auth when secret_type is - * gcpServiceAccount. - * - * Generated from protobuf field string gcp_service_account_email = 8; - * @param string $var - * @return $this - */ - public function setGcpServiceAccountEmail($var) - { - GPBUtil::checkString($var, True); - $this->gcp_service_account_email = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/GroupVersionKind.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/GroupVersionKind.php deleted file mode 100644 index bea54d39e71d..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/GroupVersionKind.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.gkehub.configmanagement.v1.GroupVersionKind - */ -class GroupVersionKind extends \Google\Protobuf\Internal\Message -{ - /** - * Kubernetes Group - * - * Generated from protobuf field string group = 1; - */ - protected $group = ''; - /** - * Kubernetes Version - * - * Generated from protobuf field string version = 2; - */ - protected $version = ''; - /** - * Kubernetes Kind - * - * Generated from protobuf field string kind = 3; - */ - protected $kind = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $group - * Kubernetes Group - * @type string $version - * Kubernetes Version - * @type string $kind - * Kubernetes Kind - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); - parent::__construct($data); - } - - /** - * Kubernetes Group - * - * Generated from protobuf field string group = 1; - * @return string - */ - public function getGroup() - { - return $this->group; - } - - /** - * Kubernetes Group - * - * Generated from protobuf field string group = 1; - * @param string $var - * @return $this - */ - public function setGroup($var) - { - GPBUtil::checkString($var, True); - $this->group = $var; - - return $this; - } - - /** - * Kubernetes Version - * - * Generated from protobuf field string version = 2; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Kubernetes Version - * - * Generated from protobuf field string version = 2; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * Kubernetes Kind - * - * Generated from protobuf field string kind = 3; - * @return string - */ - public function getKind() - { - return $this->kind; - } - - /** - * Kubernetes Kind - * - * Generated from protobuf field string kind = 3; - * @param string $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkString($var, True); - $this->kind = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/HierarchyControllerConfig.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/HierarchyControllerConfig.php deleted file mode 100644 index 0f5c352c5b10..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/HierarchyControllerConfig.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.gkehub.configmanagement.v1.HierarchyControllerConfig - */ -class HierarchyControllerConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Whether Hierarchy Controller is enabled in this cluster. - * - * Generated from protobuf field bool enabled = 1; - */ - protected $enabled = false; - /** - * Whether pod tree labels are enabled in this cluster. - * - * Generated from protobuf field bool enable_pod_tree_labels = 2; - */ - protected $enable_pod_tree_labels = false; - /** - * Whether hierarchical resource quota is enabled in this cluster. - * - * Generated from protobuf field bool enable_hierarchical_resource_quota = 3; - */ - protected $enable_hierarchical_resource_quota = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $enabled - * Whether Hierarchy Controller is enabled in this cluster. - * @type bool $enable_pod_tree_labels - * Whether pod tree labels are enabled in this cluster. - * @type bool $enable_hierarchical_resource_quota - * Whether hierarchical resource quota is enabled in this cluster. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); - parent::__construct($data); - } - - /** - * Whether Hierarchy Controller is enabled in this cluster. - * - * Generated from protobuf field bool enabled = 1; - * @return bool - */ - public function getEnabled() - { - return $this->enabled; - } - - /** - * Whether Hierarchy Controller is enabled in this cluster. - * - * Generated from protobuf field bool enabled = 1; - * @param bool $var - * @return $this - */ - public function setEnabled($var) - { - GPBUtil::checkBool($var); - $this->enabled = $var; - - return $this; - } - - /** - * Whether pod tree labels are enabled in this cluster. - * - * Generated from protobuf field bool enable_pod_tree_labels = 2; - * @return bool - */ - public function getEnablePodTreeLabels() - { - return $this->enable_pod_tree_labels; - } - - /** - * Whether pod tree labels are enabled in this cluster. - * - * Generated from protobuf field bool enable_pod_tree_labels = 2; - * @param bool $var - * @return $this - */ - public function setEnablePodTreeLabels($var) - { - GPBUtil::checkBool($var); - $this->enable_pod_tree_labels = $var; - - return $this; - } - - /** - * Whether hierarchical resource quota is enabled in this cluster. - * - * Generated from protobuf field bool enable_hierarchical_resource_quota = 3; - * @return bool - */ - public function getEnableHierarchicalResourceQuota() - { - return $this->enable_hierarchical_resource_quota; - } - - /** - * Whether hierarchical resource quota is enabled in this cluster. - * - * Generated from protobuf field bool enable_hierarchical_resource_quota = 3; - * @param bool $var - * @return $this - */ - public function setEnableHierarchicalResourceQuota($var) - { - GPBUtil::checkBool($var); - $this->enable_hierarchical_resource_quota = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/HierarchyControllerDeploymentState.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/HierarchyControllerDeploymentState.php deleted file mode 100644 index d348a6ff5617..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/HierarchyControllerDeploymentState.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.gkehub.configmanagement.v1.HierarchyControllerDeploymentState - */ -class HierarchyControllerDeploymentState extends \Google\Protobuf\Internal\Message -{ - /** - * The deployment state for open source HNC (e.g. v0.7.0-hc.0) - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState hnc = 1; - */ - protected $hnc = 0; - /** - * The deployment state for Hierarchy Controller extension (e.g. v0.7.0-hc.1) - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState extension = 2; - */ - protected $extension = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $hnc - * The deployment state for open source HNC (e.g. v0.7.0-hc.0) - * @type int $extension - * The deployment state for Hierarchy Controller extension (e.g. v0.7.0-hc.1) - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); - parent::__construct($data); - } - - /** - * The deployment state for open source HNC (e.g. v0.7.0-hc.0) - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState hnc = 1; - * @return int - */ - public function getHnc() - { - return $this->hnc; - } - - /** - * The deployment state for open source HNC (e.g. v0.7.0-hc.0) - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState hnc = 1; - * @param int $var - * @return $this - */ - public function setHnc($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\ConfigManagement\V1\DeploymentState::class); - $this->hnc = $var; - - return $this; - } - - /** - * The deployment state for Hierarchy Controller extension (e.g. v0.7.0-hc.1) - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState extension = 2; - * @return int - */ - public function getExtension() - { - return $this->extension; - } - - /** - * The deployment state for Hierarchy Controller extension (e.g. v0.7.0-hc.1) - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState extension = 2; - * @param int $var - * @return $this - */ - public function setExtension($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\ConfigManagement\V1\DeploymentState::class); - $this->extension = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/HierarchyControllerState.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/HierarchyControllerState.php deleted file mode 100644 index 0fa804532730..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/HierarchyControllerState.php +++ /dev/null @@ -1,121 +0,0 @@ -google.cloud.gkehub.configmanagement.v1.HierarchyControllerState - */ -class HierarchyControllerState extends \Google\Protobuf\Internal\Message -{ - /** - * The version for Hierarchy Controller - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.HierarchyControllerVersion version = 1; - */ - protected $version = null; - /** - * The deployment state for Hierarchy Controller - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.HierarchyControllerDeploymentState state = 2; - */ - protected $state = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GkeHub\ConfigManagement\V1\HierarchyControllerVersion $version - * The version for Hierarchy Controller - * @type \Google\Cloud\GkeHub\ConfigManagement\V1\HierarchyControllerDeploymentState $state - * The deployment state for Hierarchy Controller - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); - parent::__construct($data); - } - - /** - * The version for Hierarchy Controller - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.HierarchyControllerVersion version = 1; - * @return \Google\Cloud\GkeHub\ConfigManagement\V1\HierarchyControllerVersion|null - */ - public function getVersion() - { - return $this->version; - } - - public function hasVersion() - { - return isset($this->version); - } - - public function clearVersion() - { - unset($this->version); - } - - /** - * The version for Hierarchy Controller - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.HierarchyControllerVersion version = 1; - * @param \Google\Cloud\GkeHub\ConfigManagement\V1\HierarchyControllerVersion $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\ConfigManagement\V1\HierarchyControllerVersion::class); - $this->version = $var; - - return $this; - } - - /** - * The deployment state for Hierarchy Controller - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.HierarchyControllerDeploymentState state = 2; - * @return \Google\Cloud\GkeHub\ConfigManagement\V1\HierarchyControllerDeploymentState|null - */ - public function getState() - { - return $this->state; - } - - public function hasState() - { - return isset($this->state); - } - - public function clearState() - { - unset($this->state); - } - - /** - * The deployment state for Hierarchy Controller - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.HierarchyControllerDeploymentState state = 2; - * @param \Google\Cloud\GkeHub\ConfigManagement\V1\HierarchyControllerDeploymentState $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\ConfigManagement\V1\HierarchyControllerDeploymentState::class); - $this->state = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/HierarchyControllerVersion.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/HierarchyControllerVersion.php deleted file mode 100644 index 7a29821ab300..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/HierarchyControllerVersion.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.gkehub.configmanagement.v1.HierarchyControllerVersion - */ -class HierarchyControllerVersion extends \Google\Protobuf\Internal\Message -{ - /** - * Version for open source HNC - * - * Generated from protobuf field string hnc = 1; - */ - protected $hnc = ''; - /** - * Version for Hierarchy Controller extension - * - * Generated from protobuf field string extension = 2; - */ - protected $extension = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $hnc - * Version for open source HNC - * @type string $extension - * Version for Hierarchy Controller extension - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); - parent::__construct($data); - } - - /** - * Version for open source HNC - * - * Generated from protobuf field string hnc = 1; - * @return string - */ - public function getHnc() - { - return $this->hnc; - } - - /** - * Version for open source HNC - * - * Generated from protobuf field string hnc = 1; - * @param string $var - * @return $this - */ - public function setHnc($var) - { - GPBUtil::checkString($var, True); - $this->hnc = $var; - - return $this; - } - - /** - * Version for Hierarchy Controller extension - * - * Generated from protobuf field string extension = 2; - * @return string - */ - public function getExtension() - { - return $this->extension; - } - - /** - * Version for Hierarchy Controller extension - * - * Generated from protobuf field string extension = 2; - * @param string $var - * @return $this - */ - public function setExtension($var) - { - GPBUtil::checkString($var, True); - $this->extension = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/InstallError.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/InstallError.php deleted file mode 100644 index 5616df50e468..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/InstallError.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.gkehub.configmanagement.v1.InstallError - */ -class InstallError extends \Google\Protobuf\Internal\Message -{ - /** - * A string representing the user facing error message - * - * Generated from protobuf field string error_message = 1; - */ - protected $error_message = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $error_message - * A string representing the user facing error message - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); - parent::__construct($data); - } - - /** - * A string representing the user facing error message - * - * Generated from protobuf field string error_message = 1; - * @return string - */ - public function getErrorMessage() - { - return $this->error_message; - } - - /** - * A string representing the user facing error message - * - * Generated from protobuf field string error_message = 1; - * @param string $var - * @return $this - */ - public function setErrorMessage($var) - { - GPBUtil::checkString($var, True); - $this->error_message = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/MembershipSpec.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/MembershipSpec.php deleted file mode 100644 index e785153b26a9..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/MembershipSpec.php +++ /dev/null @@ -1,292 +0,0 @@ -google.cloud.gkehub.configmanagement.v1.MembershipSpec - */ -class MembershipSpec extends \Google\Protobuf\Internal\Message -{ - /** - * Config Sync configuration for the cluster. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSync config_sync = 1; - */ - protected $config_sync = null; - /** - * Policy Controller configuration for the cluster. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.PolicyController policy_controller = 2; - */ - protected $policy_controller = null; - /** - * Hierarchy Controller configuration for the cluster. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.HierarchyControllerConfig hierarchy_controller = 4; - */ - protected $hierarchy_controller = null; - /** - * Version of ACM installed. - * - * Generated from protobuf field string version = 10; - */ - protected $version = ''; - /** - * The user-specified cluster name used by Config Sync cluster-name-selector - * annotation or ClusterSelector, for applying configs to only a subset - * of clusters. - * Omit this field if the cluster's fleet membership name is used by Config - * Sync cluster-name-selector annotation or ClusterSelector. - * Set this field if a name different from the cluster's fleet membership name - * is used by Config Sync cluster-name-selector annotation or ClusterSelector. - * - * Generated from protobuf field string cluster = 11; - */ - protected $cluster = ''; - /** - * Enables automatic Feature management. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.MembershipSpec.Management management = 12; - */ - protected $management = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSync $config_sync - * Config Sync configuration for the cluster. - * @type \Google\Cloud\GkeHub\ConfigManagement\V1\PolicyController $policy_controller - * Policy Controller configuration for the cluster. - * @type \Google\Cloud\GkeHub\ConfigManagement\V1\HierarchyControllerConfig $hierarchy_controller - * Hierarchy Controller configuration for the cluster. - * @type string $version - * Version of ACM installed. - * @type string $cluster - * The user-specified cluster name used by Config Sync cluster-name-selector - * annotation or ClusterSelector, for applying configs to only a subset - * of clusters. - * Omit this field if the cluster's fleet membership name is used by Config - * Sync cluster-name-selector annotation or ClusterSelector. - * Set this field if a name different from the cluster's fleet membership name - * is used by Config Sync cluster-name-selector annotation or ClusterSelector. - * @type int $management - * Enables automatic Feature management. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); - parent::__construct($data); - } - - /** - * Config Sync configuration for the cluster. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSync config_sync = 1; - * @return \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSync|null - */ - public function getConfigSync() - { - return $this->config_sync; - } - - public function hasConfigSync() - { - return isset($this->config_sync); - } - - public function clearConfigSync() - { - unset($this->config_sync); - } - - /** - * Config Sync configuration for the cluster. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSync config_sync = 1; - * @param \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSync $var - * @return $this - */ - public function setConfigSync($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSync::class); - $this->config_sync = $var; - - return $this; - } - - /** - * Policy Controller configuration for the cluster. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.PolicyController policy_controller = 2; - * @return \Google\Cloud\GkeHub\ConfigManagement\V1\PolicyController|null - */ - public function getPolicyController() - { - return $this->policy_controller; - } - - public function hasPolicyController() - { - return isset($this->policy_controller); - } - - public function clearPolicyController() - { - unset($this->policy_controller); - } - - /** - * Policy Controller configuration for the cluster. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.PolicyController policy_controller = 2; - * @param \Google\Cloud\GkeHub\ConfigManagement\V1\PolicyController $var - * @return $this - */ - public function setPolicyController($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\ConfigManagement\V1\PolicyController::class); - $this->policy_controller = $var; - - return $this; - } - - /** - * Hierarchy Controller configuration for the cluster. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.HierarchyControllerConfig hierarchy_controller = 4; - * @return \Google\Cloud\GkeHub\ConfigManagement\V1\HierarchyControllerConfig|null - */ - public function getHierarchyController() - { - return $this->hierarchy_controller; - } - - public function hasHierarchyController() - { - return isset($this->hierarchy_controller); - } - - public function clearHierarchyController() - { - unset($this->hierarchy_controller); - } - - /** - * Hierarchy Controller configuration for the cluster. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.HierarchyControllerConfig hierarchy_controller = 4; - * @param \Google\Cloud\GkeHub\ConfigManagement\V1\HierarchyControllerConfig $var - * @return $this - */ - public function setHierarchyController($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\ConfigManagement\V1\HierarchyControllerConfig::class); - $this->hierarchy_controller = $var; - - return $this; - } - - /** - * Version of ACM installed. - * - * Generated from protobuf field string version = 10; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Version of ACM installed. - * - * Generated from protobuf field string version = 10; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * The user-specified cluster name used by Config Sync cluster-name-selector - * annotation or ClusterSelector, for applying configs to only a subset - * of clusters. - * Omit this field if the cluster's fleet membership name is used by Config - * Sync cluster-name-selector annotation or ClusterSelector. - * Set this field if a name different from the cluster's fleet membership name - * is used by Config Sync cluster-name-selector annotation or ClusterSelector. - * - * Generated from protobuf field string cluster = 11; - * @return string - */ - public function getCluster() - { - return $this->cluster; - } - - /** - * The user-specified cluster name used by Config Sync cluster-name-selector - * annotation or ClusterSelector, for applying configs to only a subset - * of clusters. - * Omit this field if the cluster's fleet membership name is used by Config - * Sync cluster-name-selector annotation or ClusterSelector. - * Set this field if a name different from the cluster's fleet membership name - * is used by Config Sync cluster-name-selector annotation or ClusterSelector. - * - * Generated from protobuf field string cluster = 11; - * @param string $var - * @return $this - */ - public function setCluster($var) - { - GPBUtil::checkString($var, True); - $this->cluster = $var; - - return $this; - } - - /** - * Enables automatic Feature management. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.MembershipSpec.Management management = 12; - * @return int - */ - public function getManagement() - { - return $this->management; - } - - /** - * Enables automatic Feature management. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.MembershipSpec.Management management = 12; - * @param int $var - * @return $this - */ - public function setManagement($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\ConfigManagement\V1\MembershipSpec\Management::class); - $this->management = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/MembershipSpec/Management.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/MembershipSpec/Management.php deleted file mode 100644 index a7e4823ee480..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/MembershipSpec/Management.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.gkehub.configmanagement.v1.MembershipSpec.Management - */ -class Management -{ - /** - * Unspecified - * - * Generated from protobuf enum MANAGEMENT_UNSPECIFIED = 0; - */ - const MANAGEMENT_UNSPECIFIED = 0; - /** - * Google will manage the Feature for the cluster. - * - * Generated from protobuf enum MANAGEMENT_AUTOMATIC = 1; - */ - const MANAGEMENT_AUTOMATIC = 1; - /** - * User will manually manage the Feature for the cluster. - * - * Generated from protobuf enum MANAGEMENT_MANUAL = 2; - */ - const MANAGEMENT_MANUAL = 2; - - private static $valueToName = [ - self::MANAGEMENT_UNSPECIFIED => 'MANAGEMENT_UNSPECIFIED', - self::MANAGEMENT_AUTOMATIC => 'MANAGEMENT_AUTOMATIC', - self::MANAGEMENT_MANUAL => 'MANAGEMENT_MANUAL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Management::class, \Google\Cloud\GkeHub\ConfigManagement\V1\MembershipSpec_Management::class); - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/MembershipState.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/MembershipState.php deleted file mode 100644 index f9539fae394b..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/MembershipState.php +++ /dev/null @@ -1,299 +0,0 @@ -google.cloud.gkehub.configmanagement.v1.MembershipState - */ -class MembershipState extends \Google\Protobuf\Internal\Message -{ - /** - * This field is set to the `cluster_name` field of the Membership Spec if it - * is not empty. Otherwise, it is set to the cluster's fleet membership name. - * - * Generated from protobuf field string cluster_name = 1; - */ - protected $cluster_name = ''; - /** - * Membership configuration in the cluster. This represents the actual state - * in the cluster, while the MembershipSpec in the FeatureSpec represents - * the intended state - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.MembershipSpec membership_spec = 2; - */ - protected $membership_spec = null; - /** - * Current install status of ACM's Operator - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.OperatorState operator_state = 3; - */ - protected $operator_state = null; - /** - * Current sync status - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSyncState config_sync_state = 4; - */ - protected $config_sync_state = null; - /** - * PolicyController status - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.PolicyControllerState policy_controller_state = 5; - */ - protected $policy_controller_state = null; - /** - * Hierarchy Controller status - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.HierarchyControllerState hierarchy_controller_state = 7; - */ - protected $hierarchy_controller_state = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $cluster_name - * This field is set to the `cluster_name` field of the Membership Spec if it - * is not empty. Otherwise, it is set to the cluster's fleet membership name. - * @type \Google\Cloud\GkeHub\ConfigManagement\V1\MembershipSpec $membership_spec - * Membership configuration in the cluster. This represents the actual state - * in the cluster, while the MembershipSpec in the FeatureSpec represents - * the intended state - * @type \Google\Cloud\GkeHub\ConfigManagement\V1\OperatorState $operator_state - * Current install status of ACM's Operator - * @type \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSyncState $config_sync_state - * Current sync status - * @type \Google\Cloud\GkeHub\ConfigManagement\V1\PolicyControllerState $policy_controller_state - * PolicyController status - * @type \Google\Cloud\GkeHub\ConfigManagement\V1\HierarchyControllerState $hierarchy_controller_state - * Hierarchy Controller status - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); - parent::__construct($data); - } - - /** - * This field is set to the `cluster_name` field of the Membership Spec if it - * is not empty. Otherwise, it is set to the cluster's fleet membership name. - * - * Generated from protobuf field string cluster_name = 1; - * @return string - */ - public function getClusterName() - { - return $this->cluster_name; - } - - /** - * This field is set to the `cluster_name` field of the Membership Spec if it - * is not empty. Otherwise, it is set to the cluster's fleet membership name. - * - * Generated from protobuf field string cluster_name = 1; - * @param string $var - * @return $this - */ - public function setClusterName($var) - { - GPBUtil::checkString($var, True); - $this->cluster_name = $var; - - return $this; - } - - /** - * Membership configuration in the cluster. This represents the actual state - * in the cluster, while the MembershipSpec in the FeatureSpec represents - * the intended state - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.MembershipSpec membership_spec = 2; - * @return \Google\Cloud\GkeHub\ConfigManagement\V1\MembershipSpec|null - */ - public function getMembershipSpec() - { - return $this->membership_spec; - } - - public function hasMembershipSpec() - { - return isset($this->membership_spec); - } - - public function clearMembershipSpec() - { - unset($this->membership_spec); - } - - /** - * Membership configuration in the cluster. This represents the actual state - * in the cluster, while the MembershipSpec in the FeatureSpec represents - * the intended state - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.MembershipSpec membership_spec = 2; - * @param \Google\Cloud\GkeHub\ConfigManagement\V1\MembershipSpec $var - * @return $this - */ - public function setMembershipSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\ConfigManagement\V1\MembershipSpec::class); - $this->membership_spec = $var; - - return $this; - } - - /** - * Current install status of ACM's Operator - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.OperatorState operator_state = 3; - * @return \Google\Cloud\GkeHub\ConfigManagement\V1\OperatorState|null - */ - public function getOperatorState() - { - return $this->operator_state; - } - - public function hasOperatorState() - { - return isset($this->operator_state); - } - - public function clearOperatorState() - { - unset($this->operator_state); - } - - /** - * Current install status of ACM's Operator - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.OperatorState operator_state = 3; - * @param \Google\Cloud\GkeHub\ConfigManagement\V1\OperatorState $var - * @return $this - */ - public function setOperatorState($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\ConfigManagement\V1\OperatorState::class); - $this->operator_state = $var; - - return $this; - } - - /** - * Current sync status - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSyncState config_sync_state = 4; - * @return \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSyncState|null - */ - public function getConfigSyncState() - { - return $this->config_sync_state; - } - - public function hasConfigSyncState() - { - return isset($this->config_sync_state); - } - - public function clearConfigSyncState() - { - unset($this->config_sync_state); - } - - /** - * Current sync status - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.ConfigSyncState config_sync_state = 4; - * @param \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSyncState $var - * @return $this - */ - public function setConfigSyncState($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\ConfigManagement\V1\ConfigSyncState::class); - $this->config_sync_state = $var; - - return $this; - } - - /** - * PolicyController status - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.PolicyControllerState policy_controller_state = 5; - * @return \Google\Cloud\GkeHub\ConfigManagement\V1\PolicyControllerState|null - */ - public function getPolicyControllerState() - { - return $this->policy_controller_state; - } - - public function hasPolicyControllerState() - { - return isset($this->policy_controller_state); - } - - public function clearPolicyControllerState() - { - unset($this->policy_controller_state); - } - - /** - * PolicyController status - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.PolicyControllerState policy_controller_state = 5; - * @param \Google\Cloud\GkeHub\ConfigManagement\V1\PolicyControllerState $var - * @return $this - */ - public function setPolicyControllerState($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\ConfigManagement\V1\PolicyControllerState::class); - $this->policy_controller_state = $var; - - return $this; - } - - /** - * Hierarchy Controller status - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.HierarchyControllerState hierarchy_controller_state = 7; - * @return \Google\Cloud\GkeHub\ConfigManagement\V1\HierarchyControllerState|null - */ - public function getHierarchyControllerState() - { - return $this->hierarchy_controller_state; - } - - public function hasHierarchyControllerState() - { - return isset($this->hierarchy_controller_state); - } - - public function clearHierarchyControllerState() - { - unset($this->hierarchy_controller_state); - } - - /** - * Hierarchy Controller status - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.HierarchyControllerState hierarchy_controller_state = 7; - * @param \Google\Cloud\GkeHub\ConfigManagement\V1\HierarchyControllerState $var - * @return $this - */ - public function setHierarchyControllerState($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\ConfigManagement\V1\HierarchyControllerState::class); - $this->hierarchy_controller_state = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/OciConfig.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/OciConfig.php deleted file mode 100644 index b2b91e6ea01b..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/OciConfig.php +++ /dev/null @@ -1,215 +0,0 @@ -google.cloud.gkehub.configmanagement.v1.OciConfig - */ -class OciConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The OCI image repository URL for the package to sync from. - * e.g. `LOCATION-docker.pkg.dev/PROJECT_ID/REPOSITORY_NAME/PACKAGE_NAME`. - * - * Generated from protobuf field string sync_repo = 1; - */ - protected $sync_repo = ''; - /** - * The absolute path of the directory that contains - * the local resources. Default: the root directory of the image. - * - * Generated from protobuf field string policy_dir = 2; - */ - protected $policy_dir = ''; - /** - * Period in seconds between consecutive syncs. Default: 15. - * - * Generated from protobuf field int64 sync_wait_secs = 3; - */ - protected $sync_wait_secs = 0; - /** - * Type of secret configured for access to the Git repo. - * - * Generated from protobuf field string secret_type = 4; - */ - protected $secret_type = ''; - /** - * The Google Cloud Service Account Email used for auth when secret_type is - * gcpServiceAccount. - * - * Generated from protobuf field string gcp_service_account_email = 5; - */ - protected $gcp_service_account_email = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $sync_repo - * The OCI image repository URL for the package to sync from. - * e.g. `LOCATION-docker.pkg.dev/PROJECT_ID/REPOSITORY_NAME/PACKAGE_NAME`. - * @type string $policy_dir - * The absolute path of the directory that contains - * the local resources. Default: the root directory of the image. - * @type int|string $sync_wait_secs - * Period in seconds between consecutive syncs. Default: 15. - * @type string $secret_type - * Type of secret configured for access to the Git repo. - * @type string $gcp_service_account_email - * The Google Cloud Service Account Email used for auth when secret_type is - * gcpServiceAccount. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); - parent::__construct($data); - } - - /** - * The OCI image repository URL for the package to sync from. - * e.g. `LOCATION-docker.pkg.dev/PROJECT_ID/REPOSITORY_NAME/PACKAGE_NAME`. - * - * Generated from protobuf field string sync_repo = 1; - * @return string - */ - public function getSyncRepo() - { - return $this->sync_repo; - } - - /** - * The OCI image repository URL for the package to sync from. - * e.g. `LOCATION-docker.pkg.dev/PROJECT_ID/REPOSITORY_NAME/PACKAGE_NAME`. - * - * Generated from protobuf field string sync_repo = 1; - * @param string $var - * @return $this - */ - public function setSyncRepo($var) - { - GPBUtil::checkString($var, True); - $this->sync_repo = $var; - - return $this; - } - - /** - * The absolute path of the directory that contains - * the local resources. Default: the root directory of the image. - * - * Generated from protobuf field string policy_dir = 2; - * @return string - */ - public function getPolicyDir() - { - return $this->policy_dir; - } - - /** - * The absolute path of the directory that contains - * the local resources. Default: the root directory of the image. - * - * Generated from protobuf field string policy_dir = 2; - * @param string $var - * @return $this - */ - public function setPolicyDir($var) - { - GPBUtil::checkString($var, True); - $this->policy_dir = $var; - - return $this; - } - - /** - * Period in seconds between consecutive syncs. Default: 15. - * - * Generated from protobuf field int64 sync_wait_secs = 3; - * @return int|string - */ - public function getSyncWaitSecs() - { - return $this->sync_wait_secs; - } - - /** - * Period in seconds between consecutive syncs. Default: 15. - * - * Generated from protobuf field int64 sync_wait_secs = 3; - * @param int|string $var - * @return $this - */ - public function setSyncWaitSecs($var) - { - GPBUtil::checkInt64($var); - $this->sync_wait_secs = $var; - - return $this; - } - - /** - * Type of secret configured for access to the Git repo. - * - * Generated from protobuf field string secret_type = 4; - * @return string - */ - public function getSecretType() - { - return $this->secret_type; - } - - /** - * Type of secret configured for access to the Git repo. - * - * Generated from protobuf field string secret_type = 4; - * @param string $var - * @return $this - */ - public function setSecretType($var) - { - GPBUtil::checkString($var, True); - $this->secret_type = $var; - - return $this; - } - - /** - * The Google Cloud Service Account Email used for auth when secret_type is - * gcpServiceAccount. - * - * Generated from protobuf field string gcp_service_account_email = 5; - * @return string - */ - public function getGcpServiceAccountEmail() - { - return $this->gcp_service_account_email; - } - - /** - * The Google Cloud Service Account Email used for auth when secret_type is - * gcpServiceAccount. - * - * Generated from protobuf field string gcp_service_account_email = 5; - * @param string $var - * @return $this - */ - public function setGcpServiceAccountEmail($var) - { - GPBUtil::checkString($var, True); - $this->gcp_service_account_email = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/OperatorState.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/OperatorState.php deleted file mode 100644 index 8b91ffdf0006..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/OperatorState.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.gkehub.configmanagement.v1.OperatorState - */ -class OperatorState extends \Google\Protobuf\Internal\Message -{ - /** - * The semenatic version number of the operator - * - * Generated from protobuf field string version = 1; - */ - protected $version = ''; - /** - * The state of the Operator's deployment - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState deployment_state = 2; - */ - protected $deployment_state = 0; - /** - * Install errors. - * - * Generated from protobuf field repeated .google.cloud.gkehub.configmanagement.v1.InstallError errors = 3; - */ - private $errors; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $version - * The semenatic version number of the operator - * @type int $deployment_state - * The state of the Operator's deployment - * @type array<\Google\Cloud\GkeHub\ConfigManagement\V1\InstallError>|\Google\Protobuf\Internal\RepeatedField $errors - * Install errors. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); - parent::__construct($data); - } - - /** - * The semenatic version number of the operator - * - * Generated from protobuf field string version = 1; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * The semenatic version number of the operator - * - * Generated from protobuf field string version = 1; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * The state of the Operator's deployment - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState deployment_state = 2; - * @return int - */ - public function getDeploymentState() - { - return $this->deployment_state; - } - - /** - * The state of the Operator's deployment - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.DeploymentState deployment_state = 2; - * @param int $var - * @return $this - */ - public function setDeploymentState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\ConfigManagement\V1\DeploymentState::class); - $this->deployment_state = $var; - - return $this; - } - - /** - * Install errors. - * - * Generated from protobuf field repeated .google.cloud.gkehub.configmanagement.v1.InstallError errors = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getErrors() - { - return $this->errors; - } - - /** - * Install errors. - * - * Generated from protobuf field repeated .google.cloud.gkehub.configmanagement.v1.InstallError errors = 3; - * @param array<\Google\Cloud\GkeHub\ConfigManagement\V1\InstallError>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setErrors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\ConfigManagement\V1\InstallError::class); - $this->errors = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/PolicyController.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/PolicyController.php deleted file mode 100644 index eafd7df91446..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/PolicyController.php +++ /dev/null @@ -1,277 +0,0 @@ -google.cloud.gkehub.configmanagement.v1.PolicyController - */ -class PolicyController extends \Google\Protobuf\Internal\Message -{ - /** - * Enables the installation of Policy Controller. - * If false, the rest of PolicyController fields take no - * effect. - * - * Generated from protobuf field bool enabled = 1; - */ - protected $enabled = false; - /** - * Installs the default template library along with Policy Controller. - * - * Generated from protobuf field optional bool template_library_installed = 2; - */ - protected $template_library_installed = null; - /** - * Sets the interval for Policy Controller Audit Scans (in seconds). - * When set to 0, this disables audit functionality altogether. - * - * Generated from protobuf field optional int64 audit_interval_seconds = 3; - */ - protected $audit_interval_seconds = null; - /** - * The set of namespaces that are excluded from Policy Controller checks. - * Namespaces do not need to currently exist on the cluster. - * - * Generated from protobuf field repeated string exemptable_namespaces = 4; - */ - private $exemptable_namespaces; - /** - * Enables the ability to use Constraint Templates that reference to objects - * other than the object currently being evaluated. - * - * Generated from protobuf field bool referential_rules_enabled = 5; - */ - protected $referential_rules_enabled = false; - /** - * Logs all denies and dry run failures. - * - * Generated from protobuf field bool log_denies_enabled = 6; - */ - protected $log_denies_enabled = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $enabled - * Enables the installation of Policy Controller. - * If false, the rest of PolicyController fields take no - * effect. - * @type bool $template_library_installed - * Installs the default template library along with Policy Controller. - * @type int|string $audit_interval_seconds - * Sets the interval for Policy Controller Audit Scans (in seconds). - * When set to 0, this disables audit functionality altogether. - * @type array|\Google\Protobuf\Internal\RepeatedField $exemptable_namespaces - * The set of namespaces that are excluded from Policy Controller checks. - * Namespaces do not need to currently exist on the cluster. - * @type bool $referential_rules_enabled - * Enables the ability to use Constraint Templates that reference to objects - * other than the object currently being evaluated. - * @type bool $log_denies_enabled - * Logs all denies and dry run failures. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); - parent::__construct($data); - } - - /** - * Enables the installation of Policy Controller. - * If false, the rest of PolicyController fields take no - * effect. - * - * Generated from protobuf field bool enabled = 1; - * @return bool - */ - public function getEnabled() - { - return $this->enabled; - } - - /** - * Enables the installation of Policy Controller. - * If false, the rest of PolicyController fields take no - * effect. - * - * Generated from protobuf field bool enabled = 1; - * @param bool $var - * @return $this - */ - public function setEnabled($var) - { - GPBUtil::checkBool($var); - $this->enabled = $var; - - return $this; - } - - /** - * Installs the default template library along with Policy Controller. - * - * Generated from protobuf field optional bool template_library_installed = 2; - * @return bool - */ - public function getTemplateLibraryInstalled() - { - return isset($this->template_library_installed) ? $this->template_library_installed : false; - } - - public function hasTemplateLibraryInstalled() - { - return isset($this->template_library_installed); - } - - public function clearTemplateLibraryInstalled() - { - unset($this->template_library_installed); - } - - /** - * Installs the default template library along with Policy Controller. - * - * Generated from protobuf field optional bool template_library_installed = 2; - * @param bool $var - * @return $this - */ - public function setTemplateLibraryInstalled($var) - { - GPBUtil::checkBool($var); - $this->template_library_installed = $var; - - return $this; - } - - /** - * Sets the interval for Policy Controller Audit Scans (in seconds). - * When set to 0, this disables audit functionality altogether. - * - * Generated from protobuf field optional int64 audit_interval_seconds = 3; - * @return int|string - */ - public function getAuditIntervalSeconds() - { - return isset($this->audit_interval_seconds) ? $this->audit_interval_seconds : 0; - } - - public function hasAuditIntervalSeconds() - { - return isset($this->audit_interval_seconds); - } - - public function clearAuditIntervalSeconds() - { - unset($this->audit_interval_seconds); - } - - /** - * Sets the interval for Policy Controller Audit Scans (in seconds). - * When set to 0, this disables audit functionality altogether. - * - * Generated from protobuf field optional int64 audit_interval_seconds = 3; - * @param int|string $var - * @return $this - */ - public function setAuditIntervalSeconds($var) - { - GPBUtil::checkInt64($var); - $this->audit_interval_seconds = $var; - - return $this; - } - - /** - * The set of namespaces that are excluded from Policy Controller checks. - * Namespaces do not need to currently exist on the cluster. - * - * Generated from protobuf field repeated string exemptable_namespaces = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getExemptableNamespaces() - { - return $this->exemptable_namespaces; - } - - /** - * The set of namespaces that are excluded from Policy Controller checks. - * Namespaces do not need to currently exist on the cluster. - * - * Generated from protobuf field repeated string exemptable_namespaces = 4; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setExemptableNamespaces($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->exemptable_namespaces = $arr; - - return $this; - } - - /** - * Enables the ability to use Constraint Templates that reference to objects - * other than the object currently being evaluated. - * - * Generated from protobuf field bool referential_rules_enabled = 5; - * @return bool - */ - public function getReferentialRulesEnabled() - { - return $this->referential_rules_enabled; - } - - /** - * Enables the ability to use Constraint Templates that reference to objects - * other than the object currently being evaluated. - * - * Generated from protobuf field bool referential_rules_enabled = 5; - * @param bool $var - * @return $this - */ - public function setReferentialRulesEnabled($var) - { - GPBUtil::checkBool($var); - $this->referential_rules_enabled = $var; - - return $this; - } - - /** - * Logs all denies and dry run failures. - * - * Generated from protobuf field bool log_denies_enabled = 6; - * @return bool - */ - public function getLogDeniesEnabled() - { - return $this->log_denies_enabled; - } - - /** - * Logs all denies and dry run failures. - * - * Generated from protobuf field bool log_denies_enabled = 6; - * @param bool $var - * @return $this - */ - public function setLogDeniesEnabled($var) - { - GPBUtil::checkBool($var); - $this->log_denies_enabled = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/PolicyControllerState.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/PolicyControllerState.php deleted file mode 100644 index e0ba94d19999..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/PolicyControllerState.php +++ /dev/null @@ -1,121 +0,0 @@ -google.cloud.gkehub.configmanagement.v1.PolicyControllerState - */ -class PolicyControllerState extends \Google\Protobuf\Internal\Message -{ - /** - * The version of Gatekeeper Policy Controller deployed. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.PolicyControllerVersion version = 1; - */ - protected $version = null; - /** - * The state about the policy controller installation. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.GatekeeperDeploymentState deployment_state = 2; - */ - protected $deployment_state = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GkeHub\ConfigManagement\V1\PolicyControllerVersion $version - * The version of Gatekeeper Policy Controller deployed. - * @type \Google\Cloud\GkeHub\ConfigManagement\V1\GatekeeperDeploymentState $deployment_state - * The state about the policy controller installation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); - parent::__construct($data); - } - - /** - * The version of Gatekeeper Policy Controller deployed. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.PolicyControllerVersion version = 1; - * @return \Google\Cloud\GkeHub\ConfigManagement\V1\PolicyControllerVersion|null - */ - public function getVersion() - { - return $this->version; - } - - public function hasVersion() - { - return isset($this->version); - } - - public function clearVersion() - { - unset($this->version); - } - - /** - * The version of Gatekeeper Policy Controller deployed. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.PolicyControllerVersion version = 1; - * @param \Google\Cloud\GkeHub\ConfigManagement\V1\PolicyControllerVersion $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\ConfigManagement\V1\PolicyControllerVersion::class); - $this->version = $var; - - return $this; - } - - /** - * The state about the policy controller installation. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.GatekeeperDeploymentState deployment_state = 2; - * @return \Google\Cloud\GkeHub\ConfigManagement\V1\GatekeeperDeploymentState|null - */ - public function getDeploymentState() - { - return $this->deployment_state; - } - - public function hasDeploymentState() - { - return isset($this->deployment_state); - } - - public function clearDeploymentState() - { - unset($this->deployment_state); - } - - /** - * The state about the policy controller installation. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.GatekeeperDeploymentState deployment_state = 2; - * @param \Google\Cloud\GkeHub\ConfigManagement\V1\GatekeeperDeploymentState $var - * @return $this - */ - public function setDeploymentState($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\ConfigManagement\V1\GatekeeperDeploymentState::class); - $this->deployment_state = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/PolicyControllerVersion.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/PolicyControllerVersion.php deleted file mode 100644 index fb70a7bffb04..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/PolicyControllerVersion.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.gkehub.configmanagement.v1.PolicyControllerVersion - */ -class PolicyControllerVersion extends \Google\Protobuf\Internal\Message -{ - /** - * The gatekeeper image tag that is composed of ACM version, git tag, build - * number. - * - * Generated from protobuf field string version = 1; - */ - protected $version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $version - * The gatekeeper image tag that is composed of ACM version, git tag, build - * number. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); - parent::__construct($data); - } - - /** - * The gatekeeper image tag that is composed of ACM version, git tag, build - * number. - * - * Generated from protobuf field string version = 1; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * The gatekeeper image tag that is composed of ACM version, git tag, build - * number. - * - * Generated from protobuf field string version = 1; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/SyncError.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/SyncError.php deleted file mode 100644 index f9a32a75047d..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/SyncError.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.gkehub.configmanagement.v1.SyncError - */ -class SyncError extends \Google\Protobuf\Internal\Message -{ - /** - * An ACM defined error code - * - * Generated from protobuf field string code = 1; - */ - protected $code = ''; - /** - * A description of the error - * - * Generated from protobuf field string error_message = 2; - */ - protected $error_message = ''; - /** - * A list of config(s) associated with the error, if any - * - * Generated from protobuf field repeated .google.cloud.gkehub.configmanagement.v1.ErrorResource error_resources = 3; - */ - private $error_resources; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $code - * An ACM defined error code - * @type string $error_message - * A description of the error - * @type array<\Google\Cloud\GkeHub\ConfigManagement\V1\ErrorResource>|\Google\Protobuf\Internal\RepeatedField $error_resources - * A list of config(s) associated with the error, if any - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); - parent::__construct($data); - } - - /** - * An ACM defined error code - * - * Generated from protobuf field string code = 1; - * @return string - */ - public function getCode() - { - return $this->code; - } - - /** - * An ACM defined error code - * - * Generated from protobuf field string code = 1; - * @param string $var - * @return $this - */ - public function setCode($var) - { - GPBUtil::checkString($var, True); - $this->code = $var; - - return $this; - } - - /** - * A description of the error - * - * Generated from protobuf field string error_message = 2; - * @return string - */ - public function getErrorMessage() - { - return $this->error_message; - } - - /** - * A description of the error - * - * Generated from protobuf field string error_message = 2; - * @param string $var - * @return $this - */ - public function setErrorMessage($var) - { - GPBUtil::checkString($var, True); - $this->error_message = $var; - - return $this; - } - - /** - * A list of config(s) associated with the error, if any - * - * Generated from protobuf field repeated .google.cloud.gkehub.configmanagement.v1.ErrorResource error_resources = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getErrorResources() - { - return $this->error_resources; - } - - /** - * A list of config(s) associated with the error, if any - * - * Generated from protobuf field repeated .google.cloud.gkehub.configmanagement.v1.ErrorResource error_resources = 3; - * @param array<\Google\Cloud\GkeHub\ConfigManagement\V1\ErrorResource>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setErrorResources($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\ConfigManagement\V1\ErrorResource::class); - $this->error_resources = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/SyncState.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/SyncState.php deleted file mode 100644 index 66d52b10ce17..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/SyncState.php +++ /dev/null @@ -1,304 +0,0 @@ -google.cloud.gkehub.configmanagement.v1.SyncState - */ -class SyncState extends \Google\Protobuf\Internal\Message -{ - /** - * Token indicating the state of the repo. - * - * Generated from protobuf field string source_token = 1; - */ - protected $source_token = ''; - /** - * Token indicating the state of the importer. - * - * Generated from protobuf field string import_token = 2; - */ - protected $import_token = ''; - /** - * Token indicating the state of the syncer. - * - * Generated from protobuf field string sync_token = 3; - */ - protected $sync_token = ''; - /** - * Deprecated: use last_sync_time instead. - * Timestamp of when ACM last successfully synced the repo - * The time format is specified in https://golang.org/pkg/time/#Time.String - * - * Generated from protobuf field string last_sync = 4 [deprecated = true]; - * @deprecated - */ - protected $last_sync = ''; - /** - * Timestamp type of when ACM last successfully synced the repo - * - * Generated from protobuf field .google.protobuf.Timestamp last_sync_time = 7; - */ - protected $last_sync_time = null; - /** - * Sync status code - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.SyncState.SyncCode code = 5; - */ - protected $code = 0; - /** - * A list of errors resulting from problematic configs. - * This list will be truncated after 100 errors, although it is - * unlikely for that many errors to simultaneously exist. - * - * Generated from protobuf field repeated .google.cloud.gkehub.configmanagement.v1.SyncError errors = 6; - */ - private $errors; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $source_token - * Token indicating the state of the repo. - * @type string $import_token - * Token indicating the state of the importer. - * @type string $sync_token - * Token indicating the state of the syncer. - * @type string $last_sync - * Deprecated: use last_sync_time instead. - * Timestamp of when ACM last successfully synced the repo - * The time format is specified in https://golang.org/pkg/time/#Time.String - * @type \Google\Protobuf\Timestamp $last_sync_time - * Timestamp type of when ACM last successfully synced the repo - * @type int $code - * Sync status code - * @type array<\Google\Cloud\GkeHub\ConfigManagement\V1\SyncError>|\Google\Protobuf\Internal\RepeatedField $errors - * A list of errors resulting from problematic configs. - * This list will be truncated after 100 errors, although it is - * unlikely for that many errors to simultaneously exist. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Configmanagement\Configmanagement::initOnce(); - parent::__construct($data); - } - - /** - * Token indicating the state of the repo. - * - * Generated from protobuf field string source_token = 1; - * @return string - */ - public function getSourceToken() - { - return $this->source_token; - } - - /** - * Token indicating the state of the repo. - * - * Generated from protobuf field string source_token = 1; - * @param string $var - * @return $this - */ - public function setSourceToken($var) - { - GPBUtil::checkString($var, True); - $this->source_token = $var; - - return $this; - } - - /** - * Token indicating the state of the importer. - * - * Generated from protobuf field string import_token = 2; - * @return string - */ - public function getImportToken() - { - return $this->import_token; - } - - /** - * Token indicating the state of the importer. - * - * Generated from protobuf field string import_token = 2; - * @param string $var - * @return $this - */ - public function setImportToken($var) - { - GPBUtil::checkString($var, True); - $this->import_token = $var; - - return $this; - } - - /** - * Token indicating the state of the syncer. - * - * Generated from protobuf field string sync_token = 3; - * @return string - */ - public function getSyncToken() - { - return $this->sync_token; - } - - /** - * Token indicating the state of the syncer. - * - * Generated from protobuf field string sync_token = 3; - * @param string $var - * @return $this - */ - public function setSyncToken($var) - { - GPBUtil::checkString($var, True); - $this->sync_token = $var; - - return $this; - } - - /** - * Deprecated: use last_sync_time instead. - * Timestamp of when ACM last successfully synced the repo - * The time format is specified in https://golang.org/pkg/time/#Time.String - * - * Generated from protobuf field string last_sync = 4 [deprecated = true]; - * @return string - * @deprecated - */ - public function getLastSync() - { - if ($this->last_sync !== '') { - @trigger_error('last_sync is deprecated.', E_USER_DEPRECATED); - } - return $this->last_sync; - } - - /** - * Deprecated: use last_sync_time instead. - * Timestamp of when ACM last successfully synced the repo - * The time format is specified in https://golang.org/pkg/time/#Time.String - * - * Generated from protobuf field string last_sync = 4 [deprecated = true]; - * @param string $var - * @return $this - * @deprecated - */ - public function setLastSync($var) - { - @trigger_error('last_sync is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->last_sync = $var; - - return $this; - } - - /** - * Timestamp type of when ACM last successfully synced the repo - * - * Generated from protobuf field .google.protobuf.Timestamp last_sync_time = 7; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLastSyncTime() - { - return $this->last_sync_time; - } - - public function hasLastSyncTime() - { - return isset($this->last_sync_time); - } - - public function clearLastSyncTime() - { - unset($this->last_sync_time); - } - - /** - * Timestamp type of when ACM last successfully synced the repo - * - * Generated from protobuf field .google.protobuf.Timestamp last_sync_time = 7; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLastSyncTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->last_sync_time = $var; - - return $this; - } - - /** - * Sync status code - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.SyncState.SyncCode code = 5; - * @return int - */ - public function getCode() - { - return $this->code; - } - - /** - * Sync status code - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.SyncState.SyncCode code = 5; - * @param int $var - * @return $this - */ - public function setCode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\ConfigManagement\V1\SyncState\SyncCode::class); - $this->code = $var; - - return $this; - } - - /** - * A list of errors resulting from problematic configs. - * This list will be truncated after 100 errors, although it is - * unlikely for that many errors to simultaneously exist. - * - * Generated from protobuf field repeated .google.cloud.gkehub.configmanagement.v1.SyncError errors = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getErrors() - { - return $this->errors; - } - - /** - * A list of errors resulting from problematic configs. - * This list will be truncated after 100 errors, although it is - * unlikely for that many errors to simultaneously exist. - * - * Generated from protobuf field repeated .google.cloud.gkehub.configmanagement.v1.SyncError errors = 6; - * @param array<\Google\Cloud\GkeHub\ConfigManagement\V1\SyncError>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setErrors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\ConfigManagement\V1\SyncError::class); - $this->errors = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/SyncState/SyncCode.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/SyncState/SyncCode.php deleted file mode 100644 index 79c8f38a8fd7..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/ConfigManagement/V1/SyncState/SyncCode.php +++ /dev/null @@ -1,99 +0,0 @@ -google.cloud.gkehub.configmanagement.v1.SyncState.SyncCode - */ -class SyncCode -{ - /** - * Config Sync cannot determine a sync code - * - * Generated from protobuf enum SYNC_CODE_UNSPECIFIED = 0; - */ - const SYNC_CODE_UNSPECIFIED = 0; - /** - * Config Sync successfully synced the git Repo with the cluster - * - * Generated from protobuf enum SYNCED = 1; - */ - const SYNCED = 1; - /** - * Config Sync is in the progress of syncing a new change - * - * Generated from protobuf enum PENDING = 2; - */ - const PENDING = 2; - /** - * Indicates an error configuring Config Sync, and user action is required - * - * Generated from protobuf enum ERROR = 3; - */ - const ERROR = 3; - /** - * Config Sync has been installed but not configured - * - * Generated from protobuf enum NOT_CONFIGURED = 4; - */ - const NOT_CONFIGURED = 4; - /** - * Config Sync has not been installed - * - * Generated from protobuf enum NOT_INSTALLED = 5; - */ - const NOT_INSTALLED = 5; - /** - * Error authorizing with the cluster - * - * Generated from protobuf enum UNAUTHORIZED = 6; - */ - const UNAUTHORIZED = 6; - /** - * Cluster could not be reached - * - * Generated from protobuf enum UNREACHABLE = 7; - */ - const UNREACHABLE = 7; - - private static $valueToName = [ - self::SYNC_CODE_UNSPECIFIED => 'SYNC_CODE_UNSPECIFIED', - self::SYNCED => 'SYNCED', - self::PENDING => 'PENDING', - self::ERROR => 'ERROR', - self::NOT_CONFIGURED => 'NOT_CONFIGURED', - self::NOT_INSTALLED => 'NOT_INSTALLED', - self::UNAUTHORIZED => 'UNAUTHORIZED', - self::UNREACHABLE => 'UNREACHABLE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SyncCode::class, \Google\Cloud\GkeHub\ConfigManagement\V1\SyncState_SyncCode::class); - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/MultiClusterIngress/V1/FeatureSpec.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/MultiClusterIngress/V1/FeatureSpec.php deleted file mode 100644 index 1031f8479b15..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/MultiClusterIngress/V1/FeatureSpec.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.gkehub.multiclusteringress.v1.FeatureSpec - */ -class FeatureSpec extends \Google\Protobuf\Internal\Message -{ - /** - * Fully-qualified Membership name which hosts the MultiClusterIngress CRD. - * Example: `projects/foo-proj/locations/global/memberships/bar` - * - * Generated from protobuf field string config_membership = 1; - */ - protected $config_membership = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $config_membership - * Fully-qualified Membership name which hosts the MultiClusterIngress CRD. - * Example: `projects/foo-proj/locations/global/memberships/bar` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Multiclusteringress\Multiclusteringress::initOnce(); - parent::__construct($data); - } - - /** - * Fully-qualified Membership name which hosts the MultiClusterIngress CRD. - * Example: `projects/foo-proj/locations/global/memberships/bar` - * - * Generated from protobuf field string config_membership = 1; - * @return string - */ - public function getConfigMembership() - { - return $this->config_membership; - } - - /** - * Fully-qualified Membership name which hosts the MultiClusterIngress CRD. - * Example: `projects/foo-proj/locations/global/memberships/bar` - * - * Generated from protobuf field string config_membership = 1; - * @param string $var - * @return $this - */ - public function setConfigMembership($var) - { - GPBUtil::checkString($var, True); - $this->config_membership = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/RbacRoleBindingActuation/V1/FeatureSpec.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/RbacRoleBindingActuation/V1/FeatureSpec.php deleted file mode 100644 index 009a3914d922..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/RbacRoleBindingActuation/V1/FeatureSpec.php +++ /dev/null @@ -1,76 +0,0 @@ -google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureSpec - */ -class FeatureSpec extends \Google\Protobuf\Internal\Message -{ - /** - * The list of allowed custom roles (ClusterRoles). If a ClusterRole is not - * part of this list, it cannot be used in a Scope RBACRoleBinding. If a - * ClusterRole in this list is in use, it cannot be removed from the list. - * - * Generated from protobuf field repeated string allowed_custom_roles = 2; - */ - private $allowed_custom_roles; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $allowed_custom_roles - * The list of allowed custom roles (ClusterRoles). If a ClusterRole is not - * part of this list, it cannot be used in a Scope RBACRoleBinding. If a - * ClusterRole in this list is in use, it cannot be removed from the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Rbacrolebindingactuation\Rbacrolebindingactuation::initOnce(); - parent::__construct($data); - } - - /** - * The list of allowed custom roles (ClusterRoles). If a ClusterRole is not - * part of this list, it cannot be used in a Scope RBACRoleBinding. If a - * ClusterRole in this list is in use, it cannot be removed from the list. - * - * Generated from protobuf field repeated string allowed_custom_roles = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAllowedCustomRoles() - { - return $this->allowed_custom_roles; - } - - /** - * The list of allowed custom roles (ClusterRoles). If a ClusterRole is not - * part of this list, it cannot be used in a Scope RBACRoleBinding. If a - * ClusterRole in this list is in use, it cannot be removed from the list. - * - * Generated from protobuf field repeated string allowed_custom_roles = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAllowedCustomRoles($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->allowed_custom_roles = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/RbacRoleBindingActuation/V1/FeatureState.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/RbacRoleBindingActuation/V1/FeatureState.php deleted file mode 100644 index fc27f23f8ee3..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/RbacRoleBindingActuation/V1/FeatureState.php +++ /dev/null @@ -1,34 +0,0 @@ -google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureState - */ -class FeatureState extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Rbacrolebindingactuation\Rbacrolebindingactuation::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/Authority.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/Authority.php deleted file mode 100644 index 7a7413afa5cd..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/Authority.php +++ /dev/null @@ -1,235 +0,0 @@ -google.cloud.gkehub.v1.Authority - */ -class Authority extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. A JSON Web Token (JWT) issuer URI. `issuer` must start with - * `https://` and be a valid URL with length <2000 characters. - * If set, then Google will allow valid OIDC tokens from this issuer to - * authenticate within the workload_identity_pool. OIDC discovery will be - * performed on this URI to validate tokens from the issuer. - * Clearing `issuer` disables Workload Identity. `issuer` cannot be directly - * modified; it must be cleared (and Workload Identity disabled) before using - * a new issuer (and re-enabling Workload Identity). - * - * Generated from protobuf field string issuer = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $issuer = ''; - /** - * Output only. The name of the workload identity pool in which `issuer` will - * be recognized. - * There is a single Workload Identity Pool per Hub that is shared - * between all Memberships that belong to that Hub. For a Hub hosted in - * {PROJECT_ID}, the workload pool format is `{PROJECT_ID}.hub.id.goog`, - * although this is subject to change in newer versions of this API. - * - * Generated from protobuf field string workload_identity_pool = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $workload_identity_pool = ''; - /** - * Output only. An identity provider that reflects the `issuer` in the - * workload identity pool. - * - * Generated from protobuf field string identity_provider = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $identity_provider = ''; - /** - * Optional. OIDC verification keys for this Membership in JWKS format (RFC - * 7517). - * When this field is set, OIDC discovery will NOT be performed on `issuer`, - * and instead OIDC tokens will be validated using this field. - * - * Generated from protobuf field bytes oidc_jwks = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $oidc_jwks = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $issuer - * Optional. A JSON Web Token (JWT) issuer URI. `issuer` must start with - * `https://` and be a valid URL with length <2000 characters. - * If set, then Google will allow valid OIDC tokens from this issuer to - * authenticate within the workload_identity_pool. OIDC discovery will be - * performed on this URI to validate tokens from the issuer. - * Clearing `issuer` disables Workload Identity. `issuer` cannot be directly - * modified; it must be cleared (and Workload Identity disabled) before using - * a new issuer (and re-enabling Workload Identity). - * @type string $workload_identity_pool - * Output only. The name of the workload identity pool in which `issuer` will - * be recognized. - * There is a single Workload Identity Pool per Hub that is shared - * between all Memberships that belong to that Hub. For a Hub hosted in - * {PROJECT_ID}, the workload pool format is `{PROJECT_ID}.hub.id.goog`, - * although this is subject to change in newer versions of this API. - * @type string $identity_provider - * Output only. An identity provider that reflects the `issuer` in the - * workload identity pool. - * @type string $oidc_jwks - * Optional. OIDC verification keys for this Membership in JWKS format (RFC - * 7517). - * When this field is set, OIDC discovery will NOT be performed on `issuer`, - * and instead OIDC tokens will be validated using this field. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Membership::initOnce(); - parent::__construct($data); - } - - /** - * Optional. A JSON Web Token (JWT) issuer URI. `issuer` must start with - * `https://` and be a valid URL with length <2000 characters. - * If set, then Google will allow valid OIDC tokens from this issuer to - * authenticate within the workload_identity_pool. OIDC discovery will be - * performed on this URI to validate tokens from the issuer. - * Clearing `issuer` disables Workload Identity. `issuer` cannot be directly - * modified; it must be cleared (and Workload Identity disabled) before using - * a new issuer (and re-enabling Workload Identity). - * - * Generated from protobuf field string issuer = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getIssuer() - { - return $this->issuer; - } - - /** - * Optional. A JSON Web Token (JWT) issuer URI. `issuer` must start with - * `https://` and be a valid URL with length <2000 characters. - * If set, then Google will allow valid OIDC tokens from this issuer to - * authenticate within the workload_identity_pool. OIDC discovery will be - * performed on this URI to validate tokens from the issuer. - * Clearing `issuer` disables Workload Identity. `issuer` cannot be directly - * modified; it must be cleared (and Workload Identity disabled) before using - * a new issuer (and re-enabling Workload Identity). - * - * Generated from protobuf field string issuer = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setIssuer($var) - { - GPBUtil::checkString($var, True); - $this->issuer = $var; - - return $this; - } - - /** - * Output only. The name of the workload identity pool in which `issuer` will - * be recognized. - * There is a single Workload Identity Pool per Hub that is shared - * between all Memberships that belong to that Hub. For a Hub hosted in - * {PROJECT_ID}, the workload pool format is `{PROJECT_ID}.hub.id.goog`, - * although this is subject to change in newer versions of this API. - * - * Generated from protobuf field string workload_identity_pool = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getWorkloadIdentityPool() - { - return $this->workload_identity_pool; - } - - /** - * Output only. The name of the workload identity pool in which `issuer` will - * be recognized. - * There is a single Workload Identity Pool per Hub that is shared - * between all Memberships that belong to that Hub. For a Hub hosted in - * {PROJECT_ID}, the workload pool format is `{PROJECT_ID}.hub.id.goog`, - * although this is subject to change in newer versions of this API. - * - * Generated from protobuf field string workload_identity_pool = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setWorkloadIdentityPool($var) - { - GPBUtil::checkString($var, True); - $this->workload_identity_pool = $var; - - return $this; - } - - /** - * Output only. An identity provider that reflects the `issuer` in the - * workload identity pool. - * - * Generated from protobuf field string identity_provider = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getIdentityProvider() - { - return $this->identity_provider; - } - - /** - * Output only. An identity provider that reflects the `issuer` in the - * workload identity pool. - * - * Generated from protobuf field string identity_provider = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setIdentityProvider($var) - { - GPBUtil::checkString($var, True); - $this->identity_provider = $var; - - return $this; - } - - /** - * Optional. OIDC verification keys for this Membership in JWKS format (RFC - * 7517). - * When this field is set, OIDC discovery will NOT be performed on `issuer`, - * and instead OIDC tokens will be validated using this field. - * - * Generated from protobuf field bytes oidc_jwks = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOidcJwks() - { - return $this->oidc_jwks; - } - - /** - * Optional. OIDC verification keys for this Membership in JWKS format (RFC - * 7517). - * When this field is set, OIDC discovery will NOT be performed on `issuer`, - * and instead OIDC tokens will be validated using this field. - * - * Generated from protobuf field bytes oidc_jwks = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOidcJwks($var) - { - GPBUtil::checkString($var, False); - $this->oidc_jwks = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/BinaryAuthorizationConfig.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/BinaryAuthorizationConfig.php deleted file mode 100644 index 25e27fcaeb8f..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/BinaryAuthorizationConfig.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.gkehub.v1.BinaryAuthorizationConfig - */ -class BinaryAuthorizationConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Mode of operation for binauthz policy evaluation. - * - * Generated from protobuf field .google.cloud.gkehub.v1.BinaryAuthorizationConfig.EvaluationMode evaluation_mode = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $evaluation_mode = 0; - /** - * Optional. Binauthz policies that apply to this cluster. - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1.BinaryAuthorizationConfig.PolicyBinding policy_bindings = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $policy_bindings; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $evaluation_mode - * Optional. Mode of operation for binauthz policy evaluation. - * @type array<\Google\Cloud\GkeHub\V1\BinaryAuthorizationConfig\PolicyBinding>|\Google\Protobuf\Internal\RepeatedField $policy_bindings - * Optional. Binauthz policies that apply to this cluster. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Fleet::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Mode of operation for binauthz policy evaluation. - * - * Generated from protobuf field .google.cloud.gkehub.v1.BinaryAuthorizationConfig.EvaluationMode evaluation_mode = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getEvaluationMode() - { - return $this->evaluation_mode; - } - - /** - * Optional. Mode of operation for binauthz policy evaluation. - * - * Generated from protobuf field .google.cloud.gkehub.v1.BinaryAuthorizationConfig.EvaluationMode evaluation_mode = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setEvaluationMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\V1\BinaryAuthorizationConfig\EvaluationMode::class); - $this->evaluation_mode = $var; - - return $this; - } - - /** - * Optional. Binauthz policies that apply to this cluster. - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1.BinaryAuthorizationConfig.PolicyBinding policy_bindings = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPolicyBindings() - { - return $this->policy_bindings; - } - - /** - * Optional. Binauthz policies that apply to this cluster. - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1.BinaryAuthorizationConfig.PolicyBinding policy_bindings = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\GkeHub\V1\BinaryAuthorizationConfig\PolicyBinding>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPolicyBindings($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\V1\BinaryAuthorizationConfig\PolicyBinding::class); - $this->policy_bindings = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/BinaryAuthorizationConfig/EvaluationMode.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/BinaryAuthorizationConfig/EvaluationMode.php deleted file mode 100644 index 8aaca2a41b58..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/BinaryAuthorizationConfig/EvaluationMode.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.gkehub.v1.BinaryAuthorizationConfig.EvaluationMode - */ -class EvaluationMode -{ - /** - * Default value - * - * Generated from protobuf enum EVALUATION_MODE_UNSPECIFIED = 0; - */ - const EVALUATION_MODE_UNSPECIFIED = 0; - /** - * Disable BinaryAuthorization - * - * Generated from protobuf enum DISABLED = 1; - */ - const DISABLED = 1; - /** - * Use Binary Authorization with the policies specified in policy_bindings. - * - * Generated from protobuf enum POLICY_BINDINGS = 2; - */ - const POLICY_BINDINGS = 2; - - private static $valueToName = [ - self::EVALUATION_MODE_UNSPECIFIED => 'EVALUATION_MODE_UNSPECIFIED', - self::DISABLED => 'DISABLED', - self::POLICY_BINDINGS => 'POLICY_BINDINGS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(EvaluationMode::class, \Google\Cloud\GkeHub\V1\BinaryAuthorizationConfig_EvaluationMode::class); - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/BinaryAuthorizationConfig/PolicyBinding.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/BinaryAuthorizationConfig/PolicyBinding.php deleted file mode 100644 index a8af1337d415..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/BinaryAuthorizationConfig/PolicyBinding.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.gkehub.v1.BinaryAuthorizationConfig.PolicyBinding - */ -class PolicyBinding extends \Google\Protobuf\Internal\Message -{ - /** - * The relative resource name of the binauthz platform policy to audit. GKE - * platform policies have the following format: - * `projects/{project_number}/platforms/gke/policies/{policy_id}`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The relative resource name of the binauthz platform policy to audit. GKE - * platform policies have the following format: - * `projects/{project_number}/platforms/gke/policies/{policy_id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Fleet::initOnce(); - parent::__construct($data); - } - - /** - * The relative resource name of the binauthz platform policy to audit. GKE - * platform policies have the following format: - * `projects/{project_number}/platforms/gke/policies/{policy_id}`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The relative resource name of the binauthz platform policy to audit. GKE - * platform policies have the following format: - * `projects/{project_number}/platforms/gke/policies/{policy_id}`. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PolicyBinding::class, \Google\Cloud\GkeHub\V1\BinaryAuthorizationConfig_PolicyBinding::class); - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CommonFeatureSpec.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CommonFeatureSpec.php deleted file mode 100644 index 7f7c7a4ded08..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CommonFeatureSpec.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.gkehub.v1.CommonFeatureSpec - */ -class CommonFeatureSpec extends \Google\Protobuf\Internal\Message -{ - protected $feature_spec; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GkeHub\MultiClusterIngress\V1\FeatureSpec $multiclusteringress - * Multicluster Ingress-specific spec. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Feature::initOnce(); - parent::__construct($data); - } - - /** - * Multicluster Ingress-specific spec. - * - * Generated from protobuf field .google.cloud.gkehub.multiclusteringress.v1.FeatureSpec multiclusteringress = 102; - * @return \Google\Cloud\GkeHub\MultiClusterIngress\V1\FeatureSpec|null - */ - public function getMulticlusteringress() - { - return $this->readOneof(102); - } - - public function hasMulticlusteringress() - { - return $this->hasOneof(102); - } - - /** - * Multicluster Ingress-specific spec. - * - * Generated from protobuf field .google.cloud.gkehub.multiclusteringress.v1.FeatureSpec multiclusteringress = 102; - * @param \Google\Cloud\GkeHub\MultiClusterIngress\V1\FeatureSpec $var - * @return $this - */ - public function setMulticlusteringress($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\MultiClusterIngress\V1\FeatureSpec::class); - $this->writeOneof(102, $var); - - return $this; - } - - /** - * @return string - */ - public function getFeatureSpec() - { - return $this->whichOneof("feature_spec"); - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CommonFeatureState.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CommonFeatureState.php deleted file mode 100644 index 735109ce2381..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CommonFeatureState.php +++ /dev/null @@ -1,119 +0,0 @@ -google.cloud.gkehub.v1.CommonFeatureState - */ -class CommonFeatureState extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The "running state" of the Feature in this Fleet. - * - * Generated from protobuf field .google.cloud.gkehub.v1.FeatureState state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = null; - protected $feature_state; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GkeHub\RbacRoleBindingActuation\V1\FeatureState $rbacrolebindingactuation - * RBAC Role Binding Actuation feature state - * @type \Google\Cloud\GkeHub\V1\FeatureState $state - * Output only. The "running state" of the Feature in this Fleet. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Feature::initOnce(); - parent::__construct($data); - } - - /** - * RBAC Role Binding Actuation feature state - * - * Generated from protobuf field .google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureState rbacrolebindingactuation = 120; - * @return \Google\Cloud\GkeHub\RbacRoleBindingActuation\V1\FeatureState|null - */ - public function getRbacrolebindingactuation() - { - return $this->readOneof(120); - } - - public function hasRbacrolebindingactuation() - { - return $this->hasOneof(120); - } - - /** - * RBAC Role Binding Actuation feature state - * - * Generated from protobuf field .google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureState rbacrolebindingactuation = 120; - * @param \Google\Cloud\GkeHub\RbacRoleBindingActuation\V1\FeatureState $var - * @return $this - */ - public function setRbacrolebindingactuation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\RbacRoleBindingActuation\V1\FeatureState::class); - $this->writeOneof(120, $var); - - return $this; - } - - /** - * Output only. The "running state" of the Feature in this Fleet. - * - * Generated from protobuf field .google.cloud.gkehub.v1.FeatureState state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\GkeHub\V1\FeatureState|null - */ - public function getState() - { - return $this->state; - } - - public function hasState() - { - return isset($this->state); - } - - public function clearState() - { - unset($this->state); - } - - /** - * Output only. The "running state" of the Feature in this Fleet. - * - * Generated from protobuf field .google.cloud.gkehub.v1.FeatureState state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\GkeHub\V1\FeatureState $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\FeatureState::class); - $this->state = $var; - - return $this; - } - - /** - * @return string - */ - public function getFeatureState() - { - return $this->whichOneof("feature_state"); - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CompliancePostureConfig.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CompliancePostureConfig.php deleted file mode 100644 index 97ff18dc2f63..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CompliancePostureConfig.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.gkehub.v1.CompliancePostureConfig - */ -class CompliancePostureConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Defines the enablement mode for Compliance Posture. - * - * Generated from protobuf field .google.cloud.gkehub.v1.CompliancePostureConfig.Mode mode = 1; - */ - protected $mode = 0; - /** - * List of enabled compliance standards. - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1.CompliancePostureConfig.ComplianceStandard compliance_standards = 2; - */ - private $compliance_standards; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $mode - * Defines the enablement mode for Compliance Posture. - * @type array<\Google\Cloud\GkeHub\V1\CompliancePostureConfig\ComplianceStandard>|\Google\Protobuf\Internal\RepeatedField $compliance_standards - * List of enabled compliance standards. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Fleet::initOnce(); - parent::__construct($data); - } - - /** - * Defines the enablement mode for Compliance Posture. - * - * Generated from protobuf field .google.cloud.gkehub.v1.CompliancePostureConfig.Mode mode = 1; - * @return int - */ - public function getMode() - { - return $this->mode; - } - - /** - * Defines the enablement mode for Compliance Posture. - * - * Generated from protobuf field .google.cloud.gkehub.v1.CompliancePostureConfig.Mode mode = 1; - * @param int $var - * @return $this - */ - public function setMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\V1\CompliancePostureConfig\Mode::class); - $this->mode = $var; - - return $this; - } - - /** - * List of enabled compliance standards. - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1.CompliancePostureConfig.ComplianceStandard compliance_standards = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getComplianceStandards() - { - return $this->compliance_standards; - } - - /** - * List of enabled compliance standards. - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1.CompliancePostureConfig.ComplianceStandard compliance_standards = 2; - * @param array<\Google\Cloud\GkeHub\V1\CompliancePostureConfig\ComplianceStandard>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setComplianceStandards($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\V1\CompliancePostureConfig\ComplianceStandard::class); - $this->compliance_standards = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CompliancePostureConfig/ComplianceStandard.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CompliancePostureConfig/ComplianceStandard.php deleted file mode 100644 index 8ea368f23cc6..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CompliancePostureConfig/ComplianceStandard.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.gkehub.v1.CompliancePostureConfig.ComplianceStandard - */ -class ComplianceStandard extends \Google\Protobuf\Internal\Message -{ - /** - * Name of the compliance standard. - * - * Generated from protobuf field string standard = 1; - */ - protected $standard = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $standard - * Name of the compliance standard. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Fleet::initOnce(); - parent::__construct($data); - } - - /** - * Name of the compliance standard. - * - * Generated from protobuf field string standard = 1; - * @return string - */ - public function getStandard() - { - return $this->standard; - } - - /** - * Name of the compliance standard. - * - * Generated from protobuf field string standard = 1; - * @param string $var - * @return $this - */ - public function setStandard($var) - { - GPBUtil::checkString($var, True); - $this->standard = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ComplianceStandard::class, \Google\Cloud\GkeHub\V1\CompliancePostureConfig_ComplianceStandard::class); - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CompliancePostureConfig/Mode.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CompliancePostureConfig/Mode.php deleted file mode 100644 index 34f9319ab412..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CompliancePostureConfig/Mode.php +++ /dev/null @@ -1,62 +0,0 @@ -google.cloud.gkehub.v1.CompliancePostureConfig.Mode - */ -class Mode -{ - /** - * Default value not specified. - * - * Generated from protobuf enum MODE_UNSPECIFIED = 0; - */ - const MODE_UNSPECIFIED = 0; - /** - * Disables Compliance Posture features on the cluster. - * - * Generated from protobuf enum DISABLED = 1; - */ - const DISABLED = 1; - /** - * Enables Compliance Posture features on the cluster. - * - * Generated from protobuf enum ENABLED = 2; - */ - const ENABLED = 2; - - private static $valueToName = [ - self::MODE_UNSPECIFIED => 'MODE_UNSPECIFIED', - self::DISABLED => 'DISABLED', - self::ENABLED => 'ENABLED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Mode::class, \Google\Cloud\GkeHub\V1\CompliancePostureConfig_Mode::class); - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ConnectAgentResource.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ConnectAgentResource.php deleted file mode 100644 index 4514fd3f1b41..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ConnectAgentResource.php +++ /dev/null @@ -1,112 +0,0 @@ -google.cloud.gkehub.v1.ConnectAgentResource - */ -class ConnectAgentResource extends \Google\Protobuf\Internal\Message -{ - /** - * Kubernetes type of the resource. - * - * Generated from protobuf field .google.cloud.gkehub.v1.TypeMeta type = 1; - */ - protected $type = null; - /** - * YAML manifest of the resource. - * - * Generated from protobuf field string manifest = 2; - */ - protected $manifest = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GkeHub\V1\TypeMeta $type - * Kubernetes type of the resource. - * @type string $manifest - * YAML manifest of the resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Kubernetes type of the resource. - * - * Generated from protobuf field .google.cloud.gkehub.v1.TypeMeta type = 1; - * @return \Google\Cloud\GkeHub\V1\TypeMeta|null - */ - public function getType() - { - return $this->type; - } - - public function hasType() - { - return isset($this->type); - } - - public function clearType() - { - unset($this->type); - } - - /** - * Kubernetes type of the resource. - * - * Generated from protobuf field .google.cloud.gkehub.v1.TypeMeta type = 1; - * @param \Google\Cloud\GkeHub\V1\TypeMeta $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\TypeMeta::class); - $this->type = $var; - - return $this; - } - - /** - * YAML manifest of the resource. - * - * Generated from protobuf field string manifest = 2; - * @return string - */ - public function getManifest() - { - return $this->manifest; - } - - /** - * YAML manifest of the resource. - * - * Generated from protobuf field string manifest = 2; - * @param string $var - * @return $this - */ - public function setManifest($var) - { - GPBUtil::checkString($var, True); - $this->manifest = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateFeatureRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateFeatureRequest.php deleted file mode 100644 index 695f638751c3..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateFeatureRequest.php +++ /dev/null @@ -1,241 +0,0 @@ -google.cloud.gkehub.v1.CreateFeatureRequest - */ -class CreateFeatureRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent (project and location) where the Feature will be - * created. Specified in the format `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The ID of the feature to create. - * - * Generated from protobuf field string feature_id = 2; - */ - protected $feature_id = ''; - /** - * The Feature resource to create. - * - * Generated from protobuf field .google.cloud.gkehub.v1.Feature resource = 3; - */ - protected $resource = null; - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. The parent (project and location) where the Feature will be - * created. Specified in the format `projects/*/locations/*`. - * @param \Google\Cloud\GkeHub\V1\Feature $resource The Feature resource to create. - * @param string $featureId The ID of the feature to create. - * - * @return \Google\Cloud\GkeHub\V1\CreateFeatureRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\GkeHub\V1\Feature $resource, string $featureId): self - { - return (new self()) - ->setParent($parent) - ->setResource($resource) - ->setFeatureId($featureId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent (project and location) where the Feature will be - * created. Specified in the format `projects/*/locations/*`. - * @type string $feature_id - * The ID of the feature to create. - * @type \Google\Cloud\GkeHub\V1\Feature $resource - * The Feature resource to create. - * @type string $request_id - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent (project and location) where the Feature will be - * created. Specified in the format `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent (project and location) where the Feature will be - * created. Specified in the format `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The ID of the feature to create. - * - * Generated from protobuf field string feature_id = 2; - * @return string - */ - public function getFeatureId() - { - return $this->feature_id; - } - - /** - * The ID of the feature to create. - * - * Generated from protobuf field string feature_id = 2; - * @param string $var - * @return $this - */ - public function setFeatureId($var) - { - GPBUtil::checkString($var, True); - $this->feature_id = $var; - - return $this; - } - - /** - * The Feature resource to create. - * - * Generated from protobuf field .google.cloud.gkehub.v1.Feature resource = 3; - * @return \Google\Cloud\GkeHub\V1\Feature|null - */ - public function getResource() - { - return $this->resource; - } - - public function hasResource() - { - return isset($this->resource); - } - - public function clearResource() - { - unset($this->resource); - } - - /** - * The Feature resource to create. - * - * Generated from protobuf field .google.cloud.gkehub.v1.Feature resource = 3; - * @param \Google\Cloud\GkeHub\V1\Feature $var - * @return $this - */ - public function setResource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\Feature::class); - $this->resource = $var; - - return $this; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateFleetRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateFleetRequest.php deleted file mode 100644 index 42b09741456d..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateFleetRequest.php +++ /dev/null @@ -1,132 +0,0 @@ -google.cloud.gkehub.v1.CreateFleetRequest - */ -class CreateFleetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent (project and location) where the Fleet will be - * created. Specified in the format `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The fleet to create. - * - * Generated from protobuf field .google.cloud.gkehub.v1.Fleet fleet = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $fleet = null; - - /** - * @param string $parent Required. The parent (project and location) where the Fleet will be - * created. Specified in the format `projects/*/locations/*`. Please see - * {@see GkeHubClient::locationName()} for help formatting this field. - * @param \Google\Cloud\GkeHub\V1\Fleet $fleet Required. The fleet to create. - * - * @return \Google\Cloud\GkeHub\V1\CreateFleetRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\GkeHub\V1\Fleet $fleet): self - { - return (new self()) - ->setParent($parent) - ->setFleet($fleet); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent (project and location) where the Fleet will be - * created. Specified in the format `projects/*/locations/*`. - * @type \Google\Cloud\GkeHub\V1\Fleet $fleet - * Required. The fleet to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent (project and location) where the Fleet will be - * created. Specified in the format `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent (project and location) where the Fleet will be - * created. Specified in the format `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The fleet to create. - * - * Generated from protobuf field .google.cloud.gkehub.v1.Fleet fleet = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeHub\V1\Fleet|null - */ - public function getFleet() - { - return $this->fleet; - } - - public function hasFleet() - { - return isset($this->fleet); - } - - public function clearFleet() - { - unset($this->fleet); - } - - /** - * Required. The fleet to create. - * - * Generated from protobuf field .google.cloud.gkehub.v1.Fleet fleet = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeHub\V1\Fleet $var - * @return $this - */ - public function setFleet($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\Fleet::class); - $this->fleet = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateMembershipBindingRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateMembershipBindingRequest.php deleted file mode 100644 index b198ff4157f8..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateMembershipBindingRequest.php +++ /dev/null @@ -1,173 +0,0 @@ -google.cloud.gkehub.v1.CreateMembershipBindingRequest - */ -class CreateMembershipBindingRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent (project and location) where the MembershipBinding - * will be created. Specified in the format - * `projects/*/locations/*/memberships/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The MembershipBinding to create. - * - * Generated from protobuf field .google.cloud.gkehub.v1.MembershipBinding membership_binding = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $membership_binding = null; - /** - * Required. The ID to use for the MembershipBinding. - * - * Generated from protobuf field string membership_binding_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $membership_binding_id = ''; - - /** - * @param string $parent Required. The parent (project and location) where the MembershipBinding - * will be created. Specified in the format - * `projects/*/locations/*/memberships/*`. Please see - * {@see GkeHubClient::membershipName()} for help formatting this field. - * @param \Google\Cloud\GkeHub\V1\MembershipBinding $membershipBinding Required. The MembershipBinding to create. - * @param string $membershipBindingId Required. The ID to use for the MembershipBinding. - * - * @return \Google\Cloud\GkeHub\V1\CreateMembershipBindingRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\GkeHub\V1\MembershipBinding $membershipBinding, string $membershipBindingId): self - { - return (new self()) - ->setParent($parent) - ->setMembershipBinding($membershipBinding) - ->setMembershipBindingId($membershipBindingId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent (project and location) where the MembershipBinding - * will be created. Specified in the format - * `projects/*/locations/*/memberships/*`. - * @type \Google\Cloud\GkeHub\V1\MembershipBinding $membership_binding - * Required. The MembershipBinding to create. - * @type string $membership_binding_id - * Required. The ID to use for the MembershipBinding. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent (project and location) where the MembershipBinding - * will be created. Specified in the format - * `projects/*/locations/*/memberships/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent (project and location) where the MembershipBinding - * will be created. Specified in the format - * `projects/*/locations/*/memberships/*`. - * - * 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 MembershipBinding to create. - * - * Generated from protobuf field .google.cloud.gkehub.v1.MembershipBinding membership_binding = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeHub\V1\MembershipBinding|null - */ - public function getMembershipBinding() - { - return $this->membership_binding; - } - - public function hasMembershipBinding() - { - return isset($this->membership_binding); - } - - public function clearMembershipBinding() - { - unset($this->membership_binding); - } - - /** - * Required. The MembershipBinding to create. - * - * Generated from protobuf field .google.cloud.gkehub.v1.MembershipBinding membership_binding = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeHub\V1\MembershipBinding $var - * @return $this - */ - public function setMembershipBinding($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\MembershipBinding::class); - $this->membership_binding = $var; - - return $this; - } - - /** - * Required. The ID to use for the MembershipBinding. - * - * Generated from protobuf field string membership_binding_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getMembershipBindingId() - { - return $this->membership_binding_id; - } - - /** - * Required. The ID to use for the MembershipBinding. - * - * Generated from protobuf field string membership_binding_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setMembershipBindingId($var) - { - GPBUtil::checkString($var, True); - $this->membership_binding_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateMembershipRBACRoleBindingRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateMembershipRBACRoleBindingRequest.php deleted file mode 100644 index 1a6aaf3c5ca7..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateMembershipRBACRoleBindingRequest.php +++ /dev/null @@ -1,200 +0,0 @@ -google.cloud.gkehub.v1.CreateMembershipRBACRoleBindingRequest - */ -class CreateMembershipRBACRoleBindingRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent (project and location) where the RBACRoleBinding will - * be created. Specified in the format `projects/*/locations/*/memberships/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` - * must be a valid RFC 1123 compliant DNS label: - * 1. At most 63 characters in length - * 2. It must consist of lower case alphanumeric characters or `-` - * 3. It must start and end with an alphanumeric character - * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - * with a maximum length of 63 characters. - * - * Generated from protobuf field string rbacrolebinding_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $rbacrolebinding_id = ''; - /** - * Required. The rbacrolebindings to create. - * - * Generated from protobuf field .google.cloud.gkehub.v1.RBACRoleBinding rbacrolebinding = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $rbacrolebinding = null; - - /** - * @param string $parent Required. The parent (project and location) where the RBACRoleBinding will - * be created. Specified in the format `projects/*/locations/*/memberships/*`. Please see - * {@see GkeHubClient::scopeName()} for help formatting this field. - * @param \Google\Cloud\GkeHub\V1\RBACRoleBinding $rbacrolebinding Required. The rbacrolebindings to create. - * @param string $rbacrolebindingId Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` - * must be a valid RFC 1123 compliant DNS label: - * - * 1. At most 63 characters in length - * 2. It must consist of lower case alphanumeric characters or `-` - * 3. It must start and end with an alphanumeric character - * - * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - * with a maximum length of 63 characters. - * - * @return \Google\Cloud\GkeHub\V1\CreateMembershipRBACRoleBindingRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\GkeHub\V1\RBACRoleBinding $rbacrolebinding, string $rbacrolebindingId): self - { - return (new self()) - ->setParent($parent) - ->setRbacrolebinding($rbacrolebinding) - ->setRbacrolebindingId($rbacrolebindingId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent (project and location) where the RBACRoleBinding will - * be created. Specified in the format `projects/*/locations/*/memberships/*`. - * @type string $rbacrolebinding_id - * Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` - * must be a valid RFC 1123 compliant DNS label: - * 1. At most 63 characters in length - * 2. It must consist of lower case alphanumeric characters or `-` - * 3. It must start and end with an alphanumeric character - * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - * with a maximum length of 63 characters. - * @type \Google\Cloud\GkeHub\V1\RBACRoleBinding $rbacrolebinding - * Required. The rbacrolebindings to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent (project and location) where the RBACRoleBinding will - * be created. Specified in the format `projects/*/locations/*/memberships/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent (project and location) where the RBACRoleBinding will - * be created. Specified in the format `projects/*/locations/*/memberships/*`. - * - * 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. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` - * must be a valid RFC 1123 compliant DNS label: - * 1. At most 63 characters in length - * 2. It must consist of lower case alphanumeric characters or `-` - * 3. It must start and end with an alphanumeric character - * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - * with a maximum length of 63 characters. - * - * Generated from protobuf field string rbacrolebinding_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getRbacrolebindingId() - { - return $this->rbacrolebinding_id; - } - - /** - * Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` - * must be a valid RFC 1123 compliant DNS label: - * 1. At most 63 characters in length - * 2. It must consist of lower case alphanumeric characters or `-` - * 3. It must start and end with an alphanumeric character - * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - * with a maximum length of 63 characters. - * - * Generated from protobuf field string rbacrolebinding_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setRbacrolebindingId($var) - { - GPBUtil::checkString($var, True); - $this->rbacrolebinding_id = $var; - - return $this; - } - - /** - * Required. The rbacrolebindings to create. - * - * Generated from protobuf field .google.cloud.gkehub.v1.RBACRoleBinding rbacrolebinding = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeHub\V1\RBACRoleBinding|null - */ - public function getRbacrolebinding() - { - return $this->rbacrolebinding; - } - - public function hasRbacrolebinding() - { - return isset($this->rbacrolebinding); - } - - public function clearRbacrolebinding() - { - unset($this->rbacrolebinding); - } - - /** - * Required. The rbacrolebindings to create. - * - * Generated from protobuf field .google.cloud.gkehub.v1.RBACRoleBinding rbacrolebinding = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeHub\V1\RBACRoleBinding $var - * @return $this - */ - public function setRbacrolebinding($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\RBACRoleBinding::class); - $this->rbacrolebinding = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateMembershipRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateMembershipRequest.php deleted file mode 100644 index 7ed12c498291..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateMembershipRequest.php +++ /dev/null @@ -1,274 +0,0 @@ -google.cloud.gkehub.v1.CreateMembershipRequest - */ -class CreateMembershipRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent (project and location) where the Memberships will be - * created. Specified in the format `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Client chosen ID for the membership. `membership_id` must be a - * valid RFC 1123 compliant DNS label: - * 1. At most 63 characters in length - * 2. It must consist of lower case alphanumeric characters or `-` - * 3. It must start and end with an alphanumeric character - * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - * with a maximum length of 63 characters. - * - * Generated from protobuf field string membership_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $membership_id = ''; - /** - * Required. The membership to create. - * - * Generated from protobuf field .google.cloud.gkehub.v1.Membership resource = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $resource = null; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. The parent (project and location) where the Memberships will be - * created. Specified in the format `projects/*/locations/*`. Please see - * {@see GkeHubClient::locationName()} for help formatting this field. - * @param \Google\Cloud\GkeHub\V1\Membership $resource Required. The membership to create. - * @param string $membershipId Required. Client chosen ID for the membership. `membership_id` must be a - * valid RFC 1123 compliant DNS label: - * - * 1. At most 63 characters in length - * 2. It must consist of lower case alphanumeric characters or `-` - * 3. It must start and end with an alphanumeric character - * - * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - * with a maximum length of 63 characters. - * - * @return \Google\Cloud\GkeHub\V1\CreateMembershipRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\GkeHub\V1\Membership $resource, string $membershipId): self - { - return (new self()) - ->setParent($parent) - ->setResource($resource) - ->setMembershipId($membershipId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent (project and location) where the Memberships will be - * created. Specified in the format `projects/*/locations/*`. - * @type string $membership_id - * Required. Client chosen ID for the membership. `membership_id` must be a - * valid RFC 1123 compliant DNS label: - * 1. At most 63 characters in length - * 2. It must consist of lower case alphanumeric characters or `-` - * 3. It must start and end with an alphanumeric character - * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - * with a maximum length of 63 characters. - * @type \Google\Cloud\GkeHub\V1\Membership $resource - * Required. The membership to create. - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent (project and location) where the Memberships will be - * created. Specified in the format `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent (project and location) where the Memberships will be - * created. Specified in the format `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. Client chosen ID for the membership. `membership_id` must be a - * valid RFC 1123 compliant DNS label: - * 1. At most 63 characters in length - * 2. It must consist of lower case alphanumeric characters or `-` - * 3. It must start and end with an alphanumeric character - * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - * with a maximum length of 63 characters. - * - * Generated from protobuf field string membership_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getMembershipId() - { - return $this->membership_id; - } - - /** - * Required. Client chosen ID for the membership. `membership_id` must be a - * valid RFC 1123 compliant DNS label: - * 1. At most 63 characters in length - * 2. It must consist of lower case alphanumeric characters or `-` - * 3. It must start and end with an alphanumeric character - * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - * with a maximum length of 63 characters. - * - * Generated from protobuf field string membership_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setMembershipId($var) - { - GPBUtil::checkString($var, True); - $this->membership_id = $var; - - return $this; - } - - /** - * Required. The membership to create. - * - * Generated from protobuf field .google.cloud.gkehub.v1.Membership resource = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeHub\V1\Membership|null - */ - public function getResource() - { - return $this->resource; - } - - public function hasResource() - { - return isset($this->resource); - } - - public function clearResource() - { - unset($this->resource); - } - - /** - * Required. The membership to create. - * - * Generated from protobuf field .google.cloud.gkehub.v1.Membership resource = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeHub\V1\Membership $var - * @return $this - */ - public function setResource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\Membership::class); - $this->resource = $var; - - return $this; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateScopeNamespaceRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateScopeNamespaceRequest.php deleted file mode 100644 index 7cee2fb195a1..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateScopeNamespaceRequest.php +++ /dev/null @@ -1,200 +0,0 @@ -google.cloud.gkehub.v1.CreateScopeNamespaceRequest - */ -class CreateScopeNamespaceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent (project and location) where the Namespace will be - * created. Specified in the format `projects/*/locations/*/scopes/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Client chosen ID for the Namespace. `namespace_id` must be a - * valid RFC 1123 compliant DNS label: - * 1. At most 63 characters in length - * 2. It must consist of lower case alphanumeric characters or `-` - * 3. It must start and end with an alphanumeric character - * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - * with a maximum length of 63 characters. - * - * Generated from protobuf field string scope_namespace_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $scope_namespace_id = ''; - /** - * Required. The fleet namespace to create. - * - * Generated from protobuf field .google.cloud.gkehub.v1.Namespace scope_namespace = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $scope_namespace = null; - - /** - * @param string $parent Required. The parent (project and location) where the Namespace will be - * created. Specified in the format `projects/*/locations/*/scopes/*`. Please see - * {@see GkeHubClient::scopeName()} for help formatting this field. - * @param \Google\Cloud\GkeHub\V1\PBNamespace $scopeNamespace Required. The fleet namespace to create. - * @param string $scopeNamespaceId Required. Client chosen ID for the Namespace. `namespace_id` must be a - * valid RFC 1123 compliant DNS label: - * - * 1. At most 63 characters in length - * 2. It must consist of lower case alphanumeric characters or `-` - * 3. It must start and end with an alphanumeric character - * - * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - * with a maximum length of 63 characters. - * - * @return \Google\Cloud\GkeHub\V1\CreateScopeNamespaceRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\GkeHub\V1\PBNamespace $scopeNamespace, string $scopeNamespaceId): self - { - return (new self()) - ->setParent($parent) - ->setScopeNamespace($scopeNamespace) - ->setScopeNamespaceId($scopeNamespaceId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent (project and location) where the Namespace will be - * created. Specified in the format `projects/*/locations/*/scopes/*`. - * @type string $scope_namespace_id - * Required. Client chosen ID for the Namespace. `namespace_id` must be a - * valid RFC 1123 compliant DNS label: - * 1. At most 63 characters in length - * 2. It must consist of lower case alphanumeric characters or `-` - * 3. It must start and end with an alphanumeric character - * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - * with a maximum length of 63 characters. - * @type \Google\Cloud\GkeHub\V1\PBNamespace $scope_namespace - * Required. The fleet namespace to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent (project and location) where the Namespace will be - * created. Specified in the format `projects/*/locations/*/scopes/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent (project and location) where the Namespace will be - * created. Specified in the format `projects/*/locations/*/scopes/*`. - * - * 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. Client chosen ID for the Namespace. `namespace_id` must be a - * valid RFC 1123 compliant DNS label: - * 1. At most 63 characters in length - * 2. It must consist of lower case alphanumeric characters or `-` - * 3. It must start and end with an alphanumeric character - * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - * with a maximum length of 63 characters. - * - * Generated from protobuf field string scope_namespace_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getScopeNamespaceId() - { - return $this->scope_namespace_id; - } - - /** - * Required. Client chosen ID for the Namespace. `namespace_id` must be a - * valid RFC 1123 compliant DNS label: - * 1. At most 63 characters in length - * 2. It must consist of lower case alphanumeric characters or `-` - * 3. It must start and end with an alphanumeric character - * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - * with a maximum length of 63 characters. - * - * Generated from protobuf field string scope_namespace_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setScopeNamespaceId($var) - { - GPBUtil::checkString($var, True); - $this->scope_namespace_id = $var; - - return $this; - } - - /** - * Required. The fleet namespace to create. - * - * Generated from protobuf field .google.cloud.gkehub.v1.Namespace scope_namespace = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeHub\V1\PBNamespace|null - */ - public function getScopeNamespace() - { - return $this->scope_namespace; - } - - public function hasScopeNamespace() - { - return isset($this->scope_namespace); - } - - public function clearScopeNamespace() - { - unset($this->scope_namespace); - } - - /** - * Required. The fleet namespace to create. - * - * Generated from protobuf field .google.cloud.gkehub.v1.Namespace scope_namespace = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeHub\V1\PBNamespace $var - * @return $this - */ - public function setScopeNamespace($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\PBNamespace::class); - $this->scope_namespace = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateScopeRBACRoleBindingRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateScopeRBACRoleBindingRequest.php deleted file mode 100644 index 86ecf8a65955..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateScopeRBACRoleBindingRequest.php +++ /dev/null @@ -1,200 +0,0 @@ -google.cloud.gkehub.v1.CreateScopeRBACRoleBindingRequest - */ -class CreateScopeRBACRoleBindingRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent (project and location) where the RBACRoleBinding will - * be created. Specified in the format `projects/*/locations/*/scopes/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` - * must be a valid RFC 1123 compliant DNS label: - * 1. At most 63 characters in length - * 2. It must consist of lower case alphanumeric characters or `-` - * 3. It must start and end with an alphanumeric character - * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - * with a maximum length of 63 characters. - * - * Generated from protobuf field string rbacrolebinding_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $rbacrolebinding_id = ''; - /** - * Required. The rbacrolebindings to create. - * - * Generated from protobuf field .google.cloud.gkehub.v1.RBACRoleBinding rbacrolebinding = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $rbacrolebinding = null; - - /** - * @param string $parent Required. The parent (project and location) where the RBACRoleBinding will - * be created. Specified in the format `projects/*/locations/*/scopes/*`. Please see - * {@see GkeHubClient::scopeName()} for help formatting this field. - * @param \Google\Cloud\GkeHub\V1\RBACRoleBinding $rbacrolebinding Required. The rbacrolebindings to create. - * @param string $rbacrolebindingId Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` - * must be a valid RFC 1123 compliant DNS label: - * - * 1. At most 63 characters in length - * 2. It must consist of lower case alphanumeric characters or `-` - * 3. It must start and end with an alphanumeric character - * - * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - * with a maximum length of 63 characters. - * - * @return \Google\Cloud\GkeHub\V1\CreateScopeRBACRoleBindingRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\GkeHub\V1\RBACRoleBinding $rbacrolebinding, string $rbacrolebindingId): self - { - return (new self()) - ->setParent($parent) - ->setRbacrolebinding($rbacrolebinding) - ->setRbacrolebindingId($rbacrolebindingId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent (project and location) where the RBACRoleBinding will - * be created. Specified in the format `projects/*/locations/*/scopes/*`. - * @type string $rbacrolebinding_id - * Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` - * must be a valid RFC 1123 compliant DNS label: - * 1. At most 63 characters in length - * 2. It must consist of lower case alphanumeric characters or `-` - * 3. It must start and end with an alphanumeric character - * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - * with a maximum length of 63 characters. - * @type \Google\Cloud\GkeHub\V1\RBACRoleBinding $rbacrolebinding - * Required. The rbacrolebindings to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent (project and location) where the RBACRoleBinding will - * be created. Specified in the format `projects/*/locations/*/scopes/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent (project and location) where the RBACRoleBinding will - * be created. Specified in the format `projects/*/locations/*/scopes/*`. - * - * 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. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` - * must be a valid RFC 1123 compliant DNS label: - * 1. At most 63 characters in length - * 2. It must consist of lower case alphanumeric characters or `-` - * 3. It must start and end with an alphanumeric character - * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - * with a maximum length of 63 characters. - * - * Generated from protobuf field string rbacrolebinding_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getRbacrolebindingId() - { - return $this->rbacrolebinding_id; - } - - /** - * Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` - * must be a valid RFC 1123 compliant DNS label: - * 1. At most 63 characters in length - * 2. It must consist of lower case alphanumeric characters or `-` - * 3. It must start and end with an alphanumeric character - * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - * with a maximum length of 63 characters. - * - * Generated from protobuf field string rbacrolebinding_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setRbacrolebindingId($var) - { - GPBUtil::checkString($var, True); - $this->rbacrolebinding_id = $var; - - return $this; - } - - /** - * Required. The rbacrolebindings to create. - * - * Generated from protobuf field .google.cloud.gkehub.v1.RBACRoleBinding rbacrolebinding = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeHub\V1\RBACRoleBinding|null - */ - public function getRbacrolebinding() - { - return $this->rbacrolebinding; - } - - public function hasRbacrolebinding() - { - return isset($this->rbacrolebinding); - } - - public function clearRbacrolebinding() - { - unset($this->rbacrolebinding); - } - - /** - * Required. The rbacrolebindings to create. - * - * Generated from protobuf field .google.cloud.gkehub.v1.RBACRoleBinding rbacrolebinding = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeHub\V1\RBACRoleBinding $var - * @return $this - */ - public function setRbacrolebinding($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\RBACRoleBinding::class); - $this->rbacrolebinding = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateScopeRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateScopeRequest.php deleted file mode 100644 index f43515f00b0f..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/CreateScopeRequest.php +++ /dev/null @@ -1,173 +0,0 @@ -google.cloud.gkehub.v1.CreateScopeRequest - */ -class CreateScopeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent (project and location) where the Scope will be - * created. Specified in the format `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Client chosen ID for the Scope. `scope_id` must be a - * ???? - * - * Generated from protobuf field string scope_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $scope_id = ''; - /** - * Required. The Scope to create. - * - * Generated from protobuf field .google.cloud.gkehub.v1.Scope scope = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $scope = null; - - /** - * @param string $parent Required. The parent (project and location) where the Scope will be - * created. Specified in the format `projects/*/locations/*`. Please see - * {@see GkeHubClient::locationName()} for help formatting this field. - * @param \Google\Cloud\GkeHub\V1\Scope $scope Required. The Scope to create. - * @param string $scopeId Required. Client chosen ID for the Scope. `scope_id` must be a - * ???? - * - * @return \Google\Cloud\GkeHub\V1\CreateScopeRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\GkeHub\V1\Scope $scope, string $scopeId): self - { - return (new self()) - ->setParent($parent) - ->setScope($scope) - ->setScopeId($scopeId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent (project and location) where the Scope will be - * created. Specified in the format `projects/*/locations/*`. - * @type string $scope_id - * Required. Client chosen ID for the Scope. `scope_id` must be a - * ???? - * @type \Google\Cloud\GkeHub\V1\Scope $scope - * Required. The Scope to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent (project and location) where the Scope will be - * created. Specified in the format `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent (project and location) where the Scope will be - * created. Specified in the format `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. Client chosen ID for the Scope. `scope_id` must be a - * ???? - * - * Generated from protobuf field string scope_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getScopeId() - { - return $this->scope_id; - } - - /** - * Required. Client chosen ID for the Scope. `scope_id` must be a - * ???? - * - * Generated from protobuf field string scope_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setScopeId($var) - { - GPBUtil::checkString($var, True); - $this->scope_id = $var; - - return $this; - } - - /** - * Required. The Scope to create. - * - * Generated from protobuf field .google.cloud.gkehub.v1.Scope scope = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeHub\V1\Scope|null - */ - public function getScope() - { - return $this->scope; - } - - public function hasScope() - { - return isset($this->scope); - } - - public function clearScope() - { - unset($this->scope); - } - - /** - * Required. The Scope to create. - * - * Generated from protobuf field .google.cloud.gkehub.v1.Scope scope = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeHub\V1\Scope $var - * @return $this - */ - public function setScope($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\Scope::class); - $this->scope = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DefaultClusterConfig.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DefaultClusterConfig.php deleted file mode 100644 index 4bceba2aca0e..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DefaultClusterConfig.php +++ /dev/null @@ -1,174 +0,0 @@ -google.cloud.gkehub.v1.DefaultClusterConfig - */ -class DefaultClusterConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Enable/Disable Security Posture features for the cluster. - * - * Generated from protobuf field .google.cloud.gkehub.v1.SecurityPostureConfig security_posture_config = 1; - */ - protected $security_posture_config = null; - /** - * Optional. Enable/Disable binary authorization features for the cluster. - * - * Generated from protobuf field .google.cloud.gkehub.v1.BinaryAuthorizationConfig binary_authorization_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $binary_authorization_config = null; - /** - * Optional. Enable/Disable Compliance Posture features for the cluster. - * Note that on UpdateFleet, only full replacement of this field is allowed. - * Users are not allowed for partial updates through field mask. - * - * Generated from protobuf field .google.cloud.gkehub.v1.CompliancePostureConfig compliance_posture_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $compliance_posture_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GkeHub\V1\SecurityPostureConfig $security_posture_config - * Enable/Disable Security Posture features for the cluster. - * @type \Google\Cloud\GkeHub\V1\BinaryAuthorizationConfig $binary_authorization_config - * Optional. Enable/Disable binary authorization features for the cluster. - * @type \Google\Cloud\GkeHub\V1\CompliancePostureConfig $compliance_posture_config - * Optional. Enable/Disable Compliance Posture features for the cluster. - * Note that on UpdateFleet, only full replacement of this field is allowed. - * Users are not allowed for partial updates through field mask. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Fleet::initOnce(); - parent::__construct($data); - } - - /** - * Enable/Disable Security Posture features for the cluster. - * - * Generated from protobuf field .google.cloud.gkehub.v1.SecurityPostureConfig security_posture_config = 1; - * @return \Google\Cloud\GkeHub\V1\SecurityPostureConfig|null - */ - public function getSecurityPostureConfig() - { - return $this->security_posture_config; - } - - public function hasSecurityPostureConfig() - { - return isset($this->security_posture_config); - } - - public function clearSecurityPostureConfig() - { - unset($this->security_posture_config); - } - - /** - * Enable/Disable Security Posture features for the cluster. - * - * Generated from protobuf field .google.cloud.gkehub.v1.SecurityPostureConfig security_posture_config = 1; - * @param \Google\Cloud\GkeHub\V1\SecurityPostureConfig $var - * @return $this - */ - public function setSecurityPostureConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\SecurityPostureConfig::class); - $this->security_posture_config = $var; - - return $this; - } - - /** - * Optional. Enable/Disable binary authorization features for the cluster. - * - * Generated from protobuf field .google.cloud.gkehub.v1.BinaryAuthorizationConfig binary_authorization_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeHub\V1\BinaryAuthorizationConfig|null - */ - public function getBinaryAuthorizationConfig() - { - return $this->binary_authorization_config; - } - - public function hasBinaryAuthorizationConfig() - { - return isset($this->binary_authorization_config); - } - - public function clearBinaryAuthorizationConfig() - { - unset($this->binary_authorization_config); - } - - /** - * Optional. Enable/Disable binary authorization features for the cluster. - * - * Generated from protobuf field .google.cloud.gkehub.v1.BinaryAuthorizationConfig binary_authorization_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeHub\V1\BinaryAuthorizationConfig $var - * @return $this - */ - public function setBinaryAuthorizationConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\BinaryAuthorizationConfig::class); - $this->binary_authorization_config = $var; - - return $this; - } - - /** - * Optional. Enable/Disable Compliance Posture features for the cluster. - * Note that on UpdateFleet, only full replacement of this field is allowed. - * Users are not allowed for partial updates through field mask. - * - * Generated from protobuf field .google.cloud.gkehub.v1.CompliancePostureConfig compliance_posture_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeHub\V1\CompliancePostureConfig|null - */ - public function getCompliancePostureConfig() - { - return $this->compliance_posture_config; - } - - public function hasCompliancePostureConfig() - { - return isset($this->compliance_posture_config); - } - - public function clearCompliancePostureConfig() - { - unset($this->compliance_posture_config); - } - - /** - * Optional. Enable/Disable Compliance Posture features for the cluster. - * Note that on UpdateFleet, only full replacement of this field is allowed. - * Users are not allowed for partial updates through field mask. - * - * Generated from protobuf field .google.cloud.gkehub.v1.CompliancePostureConfig compliance_posture_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeHub\V1\CompliancePostureConfig $var - * @return $this - */ - public function setCompliancePostureConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\CompliancePostureConfig::class); - $this->compliance_posture_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteFeatureRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteFeatureRequest.php deleted file mode 100644 index e4859d9f53cb..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteFeatureRequest.php +++ /dev/null @@ -1,201 +0,0 @@ -google.cloud.gkehub.v1.DeleteFeatureRequest - */ -class DeleteFeatureRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Feature resource name in the format - * `projects/*/locations/*/features/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * If set to true, the delete will ignore any outstanding resources for - * this Feature (that is, `FeatureState.has_resources` is set to true). These - * resources will NOT be cleaned up or modified in any way. - * - * Generated from protobuf field bool force = 2; - */ - protected $force = false; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $name Required. The Feature resource name in the format - * `projects/*/locations/*/features/*`. - * - * @return \Google\Cloud\GkeHub\V1\DeleteFeatureRequest - * - * @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 Feature resource name in the format - * `projects/*/locations/*/features/*`. - * @type bool $force - * If set to true, the delete will ignore any outstanding resources for - * this Feature (that is, `FeatureState.has_resources` is set to true). These - * resources will NOT be cleaned up or modified in any way. - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Feature resource name in the format - * `projects/*/locations/*/features/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The Feature resource name in the format - * `projects/*/locations/*/features/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * If set to true, the delete will ignore any outstanding resources for - * this Feature (that is, `FeatureState.has_resources` is set to true). These - * resources will NOT be cleaned up or modified in any way. - * - * Generated from protobuf field bool force = 2; - * @return bool - */ - public function getForce() - { - return $this->force; - } - - /** - * If set to true, the delete will ignore any outstanding resources for - * this Feature (that is, `FeatureState.has_resources` is set to true). These - * resources will NOT be cleaned up or modified in any way. - * - * Generated from protobuf field bool force = 2; - * @param bool $var - * @return $this - */ - public function setForce($var) - { - GPBUtil::checkBool($var); - $this->force = $var; - - return $this; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteFleetRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteFleetRequest.php deleted file mode 100644 index 1168f4e80769..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteFleetRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.gkehub.v1.DeleteFleetRequest - */ -class DeleteFleetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Fleet resource name in the format - * `projects/*/locations/*/fleets/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The Fleet resource name in the format - * `projects/*/locations/*/fleets/*`. Please see - * {@see GkeHubClient::fleetName()} for help formatting this field. - * - * @return \Google\Cloud\GkeHub\V1\DeleteFleetRequest - * - * @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 Fleet resource name in the format - * `projects/*/locations/*/fleets/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Fleet resource name in the format - * `projects/*/locations/*/fleets/*`. - * - * 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 Fleet resource name in the format - * `projects/*/locations/*/fleets/*`. - * - * 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/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteMembershipBindingRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteMembershipBindingRequest.php deleted file mode 100644 index 59e9d5387ef6..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteMembershipBindingRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.gkehub.v1.DeleteMembershipBindingRequest - */ -class DeleteMembershipBindingRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The MembershipBinding resource name in the format - * `projects/*/locations/*/memberships/*/bindings/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The MembershipBinding resource name in the format - * `projects/*/locations/*/memberships/*/bindings/*`. Please see - * {@see GkeHubClient::membershipBindingName()} for help formatting this field. - * - * @return \Google\Cloud\GkeHub\V1\DeleteMembershipBindingRequest - * - * @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 MembershipBinding resource name in the format - * `projects/*/locations/*/memberships/*/bindings/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The MembershipBinding resource name in the format - * `projects/*/locations/*/memberships/*/bindings/*`. - * - * 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 MembershipBinding resource name in the format - * `projects/*/locations/*/memberships/*/bindings/*`. - * - * 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/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteMembershipRBACRoleBindingRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteMembershipRBACRoleBindingRequest.php deleted file mode 100644 index 6e2ce93d3178..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteMembershipRBACRoleBindingRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.gkehub.v1.DeleteMembershipRBACRoleBindingRequest - */ -class DeleteMembershipRBACRoleBindingRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The RBACRoleBinding resource name in the format - * `projects/*/locations/*/memberships/*/rbacrolebindings/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The RBACRoleBinding resource name in the format - * `projects/*/locations/*/memberships/*/rbacrolebindings/*`. Please see - * {@see GkeHubClient::rBACRoleBindingName()} for help formatting this field. - * - * @return \Google\Cloud\GkeHub\V1\DeleteMembershipRBACRoleBindingRequest - * - * @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 RBACRoleBinding resource name in the format - * `projects/*/locations/*/memberships/*/rbacrolebindings/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The RBACRoleBinding resource name in the format - * `projects/*/locations/*/memberships/*/rbacrolebindings/*`. - * - * 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 RBACRoleBinding resource name in the format - * `projects/*/locations/*/memberships/*/rbacrolebindings/*`. - * - * 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/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteMembershipRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteMembershipRequest.php deleted file mode 100644 index cf246161bdbe..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteMembershipRequest.php +++ /dev/null @@ -1,202 +0,0 @@ -google.cloud.gkehub.v1.DeleteMembershipRequest - */ -class DeleteMembershipRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Membership resource name in the format - * `projects/*/locations/*/memberships/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - /** - * Optional. If set to true, any subresource from this Membership will also be - * deleted. Otherwise, the request will only work if the Membership has no - * subresource. - * - * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $force = false; - - /** - * @param string $name Required. The Membership resource name in the format - * `projects/*/locations/*/memberships/*`. Please see - * {@see GkeHubClient::membershipName()} for help formatting this field. - * - * @return \Google\Cloud\GkeHub\V1\DeleteMembershipRequest - * - * @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 Membership resource name in the format - * `projects/*/locations/*/memberships/*`. - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type bool $force - * Optional. If set to true, any subresource from this Membership will also be - * deleted. Otherwise, the request will only work if the Membership has no - * subresource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Membership resource name in the format - * `projects/*/locations/*/memberships/*`. - * - * 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 Membership resource name in the format - * `projects/*/locations/*/memberships/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - - /** - * Optional. If set to true, any subresource from this Membership will also be - * deleted. Otherwise, the request will only work if the Membership has no - * subresource. - * - * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getForce() - { - return $this->force; - } - - /** - * Optional. If set to true, any subresource from this Membership will also be - * deleted. Otherwise, the request will only work if the Membership has no - * subresource. - * - * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setForce($var) - { - GPBUtil::checkBool($var); - $this->force = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteScopeNamespaceRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteScopeNamespaceRequest.php deleted file mode 100644 index da4a45ddeccf..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteScopeNamespaceRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.gkehub.v1.DeleteScopeNamespaceRequest - */ -class DeleteScopeNamespaceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Namespace resource name in the format - * `projects/*/locations/*/scopes/*/namespaces/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The Namespace resource name in the format - * `projects/*/locations/*/scopes/*/namespaces/*`. Please see - * {@see GkeHubClient::namespaceName()} for help formatting this field. - * - * @return \Google\Cloud\GkeHub\V1\DeleteScopeNamespaceRequest - * - * @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 Namespace resource name in the format - * `projects/*/locations/*/scopes/*/namespaces/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Namespace resource name in the format - * `projects/*/locations/*/scopes/*/namespaces/*`. - * - * 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 Namespace resource name in the format - * `projects/*/locations/*/scopes/*/namespaces/*`. - * - * 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/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteScopeRBACRoleBindingRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteScopeRBACRoleBindingRequest.php deleted file mode 100644 index f7cb6755ae90..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteScopeRBACRoleBindingRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.gkehub.v1.DeleteScopeRBACRoleBindingRequest - */ -class DeleteScopeRBACRoleBindingRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The RBACRoleBinding resource name in the format - * `projects/*/locations/*/scopes/*/rbacrolebindings/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The RBACRoleBinding resource name in the format - * `projects/*/locations/*/scopes/*/rbacrolebindings/*`. Please see - * {@see GkeHubClient::rBACRoleBindingName()} for help formatting this field. - * - * @return \Google\Cloud\GkeHub\V1\DeleteScopeRBACRoleBindingRequest - * - * @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 RBACRoleBinding resource name in the format - * `projects/*/locations/*/scopes/*/rbacrolebindings/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The RBACRoleBinding resource name in the format - * `projects/*/locations/*/scopes/*/rbacrolebindings/*`. - * - * 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 RBACRoleBinding resource name in the format - * `projects/*/locations/*/scopes/*/rbacrolebindings/*`. - * - * 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/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteScopeRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteScopeRequest.php deleted file mode 100644 index 5f41f3d6f5eb..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/DeleteScopeRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.gkehub.v1.DeleteScopeRequest - */ -class DeleteScopeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Scope resource name in the format - * `projects/*/locations/*/scopes/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The Scope resource name in the format - * `projects/*/locations/*/scopes/*`. Please see - * {@see GkeHubClient::scopeName()} for help formatting this field. - * - * @return \Google\Cloud\GkeHub\V1\DeleteScopeRequest - * - * @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 Scope resource name in the format - * `projects/*/locations/*/scopes/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Scope resource name in the format - * `projects/*/locations/*/scopes/*`. - * - * 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 Scope resource name in the format - * `projects/*/locations/*/scopes/*`. - * - * 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/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/Feature.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/Feature.php deleted file mode 100644 index 72d52cfe3f02..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/Feature.php +++ /dev/null @@ -1,687 +0,0 @@ -google.cloud.gkehub.v1.Feature - */ -class Feature extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The full, unique name of this Feature resource in the format - * `projects/*/locations/*/features/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Labels for this Feature. - * - * Generated from protobuf field map labels = 2; - */ - private $labels; - /** - * Output only. State of the Feature resource itself. - * - * Generated from protobuf field .google.cloud.gkehub.v1.FeatureResourceState resource_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $resource_state = null; - /** - * Optional. Fleet-wide Feature configuration. If this Feature does not - * support any Fleet-wide configuration, this field may be unused. - * - * Generated from protobuf field .google.cloud.gkehub.v1.CommonFeatureSpec spec = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $spec = null; - /** - * Optional. Membership-specific configuration for this Feature. If this - * Feature does not support any per-Membership configuration, this field may - * be unused. - * The keys indicate which Membership the configuration is for, in the form: - * `projects/{p}/locations/{l}/memberships/{m}` - * Where {p} is the project, {l} is a valid location and {m} is a valid - * Membership in this project at that location. {p} WILL match the Feature's - * project. - * {p} will always be returned as the project number, but the project ID is - * also accepted during input. If the same Membership is specified in the map - * twice (using the project ID form, and the project number form), exactly - * ONE of the entries will be saved, with no guarantees as to which. For this - * reason, it is recommended the same format be used for all entries when - * mutating a Feature. - * - * Generated from protobuf field map membership_specs = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $membership_specs; - /** - * Output only. The Fleet-wide Feature state. - * - * Generated from protobuf field .google.cloud.gkehub.v1.CommonFeatureState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = null; - /** - * Output only. Membership-specific Feature status. If this Feature does - * report any per-Membership status, this field may be unused. - * The keys indicate which Membership the state is for, in the form: - * `projects/{p}/locations/{l}/memberships/{m}` - * Where {p} is the project number, {l} is a valid location and {m} is a valid - * Membership in this project at that location. {p} MUST match the Feature's - * project number. - * - * Generated from protobuf field map membership_states = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $membership_states; - /** - * Output only. When the Feature resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. When the Feature resource was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. When the Feature resource was deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $delete_time = null; - /** - * Optional. Scope-specific configuration for this Feature. If this Feature - * does not support any per-Scope configuration, this field may be unused. - * The keys indicate which Scope the configuration is for, in the form: - * `projects/{p}/locations/global/scopes/{s}` - * Where {p} is the project, {s} is a valid Scope in this project. - * {p} WILL match the Feature's project. - * {p} will always be returned as the project number, but the project ID is - * also accepted during input. If the same Scope is specified in the map - * twice (using the project ID form, and the project number form), exactly - * ONE of the entries will be saved, with no guarantees as to which. For this - * reason, it is recommended the same format be used for all entries when - * mutating a Feature. - * - * Generated from protobuf field map scope_specs = 12 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $scope_specs; - /** - * Output only. Scope-specific Feature status. If this Feature does - * report any per-Scope status, this field may be unused. - * The keys indicate which Scope the state is for, in the form: - * `projects/{p}/locations/global/scopes/{s}` - * Where {p} is the project, {s} is a valid Scope in this project. - * {p} WILL match the Feature's project. - * - * Generated from protobuf field map scope_states = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $scope_states; - /** - * Output only. List of locations that could not be reached while fetching - * this feature. - * - * Generated from protobuf field repeated string unreachable = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The full, unique name of this Feature resource in the format - * `projects/*/locations/*/features/*`. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels for this Feature. - * @type \Google\Cloud\GkeHub\V1\FeatureResourceState $resource_state - * Output only. State of the Feature resource itself. - * @type \Google\Cloud\GkeHub\V1\CommonFeatureSpec $spec - * Optional. Fleet-wide Feature configuration. If this Feature does not - * support any Fleet-wide configuration, this field may be unused. - * @type array|\Google\Protobuf\Internal\MapField $membership_specs - * Optional. Membership-specific configuration for this Feature. If this - * Feature does not support any per-Membership configuration, this field may - * be unused. - * The keys indicate which Membership the configuration is for, in the form: - * `projects/{p}/locations/{l}/memberships/{m}` - * Where {p} is the project, {l} is a valid location and {m} is a valid - * Membership in this project at that location. {p} WILL match the Feature's - * project. - * {p} will always be returned as the project number, but the project ID is - * also accepted during input. If the same Membership is specified in the map - * twice (using the project ID form, and the project number form), exactly - * ONE of the entries will be saved, with no guarantees as to which. For this - * reason, it is recommended the same format be used for all entries when - * mutating a Feature. - * @type \Google\Cloud\GkeHub\V1\CommonFeatureState $state - * Output only. The Fleet-wide Feature state. - * @type array|\Google\Protobuf\Internal\MapField $membership_states - * Output only. Membership-specific Feature status. If this Feature does - * report any per-Membership status, this field may be unused. - * The keys indicate which Membership the state is for, in the form: - * `projects/{p}/locations/{l}/memberships/{m}` - * Where {p} is the project number, {l} is a valid location and {m} is a valid - * Membership in this project at that location. {p} MUST match the Feature's - * project number. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. When the Feature resource was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. When the Feature resource was last updated. - * @type \Google\Protobuf\Timestamp $delete_time - * Output only. When the Feature resource was deleted. - * @type array|\Google\Protobuf\Internal\MapField $scope_specs - * Optional. Scope-specific configuration for this Feature. If this Feature - * does not support any per-Scope configuration, this field may be unused. - * The keys indicate which Scope the configuration is for, in the form: - * `projects/{p}/locations/global/scopes/{s}` - * Where {p} is the project, {s} is a valid Scope in this project. - * {p} WILL match the Feature's project. - * {p} will always be returned as the project number, but the project ID is - * also accepted during input. If the same Scope is specified in the map - * twice (using the project ID form, and the project number form), exactly - * ONE of the entries will be saved, with no guarantees as to which. For this - * reason, it is recommended the same format be used for all entries when - * mutating a Feature. - * @type array|\Google\Protobuf\Internal\MapField $scope_states - * Output only. Scope-specific Feature status. If this Feature does - * report any per-Scope status, this field may be unused. - * The keys indicate which Scope the state is for, in the form: - * `projects/{p}/locations/global/scopes/{s}` - * Where {p} is the project, {s} is a valid Scope in this project. - * {p} WILL match the Feature's project. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Output only. List of locations that could not be reached while fetching - * this feature. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Feature::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The full, unique name of this Feature resource in the format - * `projects/*/locations/*/features/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The full, unique name of this Feature resource in the format - * `projects/*/locations/*/features/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Labels for this Feature. - * - * Generated from protobuf field map labels = 2; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels for this Feature. - * - * Generated from protobuf field map labels = 2; - * @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. State of the Feature resource itself. - * - * Generated from protobuf field .google.cloud.gkehub.v1.FeatureResourceState resource_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\GkeHub\V1\FeatureResourceState|null - */ - public function getResourceState() - { - return $this->resource_state; - } - - public function hasResourceState() - { - return isset($this->resource_state); - } - - public function clearResourceState() - { - unset($this->resource_state); - } - - /** - * Output only. State of the Feature resource itself. - * - * Generated from protobuf field .google.cloud.gkehub.v1.FeatureResourceState resource_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\GkeHub\V1\FeatureResourceState $var - * @return $this - */ - public function setResourceState($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\FeatureResourceState::class); - $this->resource_state = $var; - - return $this; - } - - /** - * Optional. Fleet-wide Feature configuration. If this Feature does not - * support any Fleet-wide configuration, this field may be unused. - * - * Generated from protobuf field .google.cloud.gkehub.v1.CommonFeatureSpec spec = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeHub\V1\CommonFeatureSpec|null - */ - public function getSpec() - { - return $this->spec; - } - - public function hasSpec() - { - return isset($this->spec); - } - - public function clearSpec() - { - unset($this->spec); - } - - /** - * Optional. Fleet-wide Feature configuration. If this Feature does not - * support any Fleet-wide configuration, this field may be unused. - * - * Generated from protobuf field .google.cloud.gkehub.v1.CommonFeatureSpec spec = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeHub\V1\CommonFeatureSpec $var - * @return $this - */ - public function setSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\CommonFeatureSpec::class); - $this->spec = $var; - - return $this; - } - - /** - * Optional. Membership-specific configuration for this Feature. If this - * Feature does not support any per-Membership configuration, this field may - * be unused. - * The keys indicate which Membership the configuration is for, in the form: - * `projects/{p}/locations/{l}/memberships/{m}` - * Where {p} is the project, {l} is a valid location and {m} is a valid - * Membership in this project at that location. {p} WILL match the Feature's - * project. - * {p} will always be returned as the project number, but the project ID is - * also accepted during input. If the same Membership is specified in the map - * twice (using the project ID form, and the project number form), exactly - * ONE of the entries will be saved, with no guarantees as to which. For this - * reason, it is recommended the same format be used for all entries when - * mutating a Feature. - * - * Generated from protobuf field map membership_specs = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getMembershipSpecs() - { - return $this->membership_specs; - } - - /** - * Optional. Membership-specific configuration for this Feature. If this - * Feature does not support any per-Membership configuration, this field may - * be unused. - * The keys indicate which Membership the configuration is for, in the form: - * `projects/{p}/locations/{l}/memberships/{m}` - * Where {p} is the project, {l} is a valid location and {m} is a valid - * Membership in this project at that location. {p} WILL match the Feature's - * project. - * {p} will always be returned as the project number, but the project ID is - * also accepted during input. If the same Membership is specified in the map - * twice (using the project ID form, and the project number form), exactly - * ONE of the entries will be saved, with no guarantees as to which. For this - * reason, it is recommended the same format be used for all entries when - * mutating a Feature. - * - * Generated from protobuf field map membership_specs = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setMembershipSpecs($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\V1\MembershipFeatureSpec::class); - $this->membership_specs = $arr; - - return $this; - } - - /** - * Output only. The Fleet-wide Feature state. - * - * Generated from protobuf field .google.cloud.gkehub.v1.CommonFeatureState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\GkeHub\V1\CommonFeatureState|null - */ - public function getState() - { - return $this->state; - } - - public function hasState() - { - return isset($this->state); - } - - public function clearState() - { - unset($this->state); - } - - /** - * Output only. The Fleet-wide Feature state. - * - * Generated from protobuf field .google.cloud.gkehub.v1.CommonFeatureState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\GkeHub\V1\CommonFeatureState $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\CommonFeatureState::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. Membership-specific Feature status. If this Feature does - * report any per-Membership status, this field may be unused. - * The keys indicate which Membership the state is for, in the form: - * `projects/{p}/locations/{l}/memberships/{m}` - * Where {p} is the project number, {l} is a valid location and {m} is a valid - * Membership in this project at that location. {p} MUST match the Feature's - * project number. - * - * Generated from protobuf field map membership_states = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getMembershipStates() - { - return $this->membership_states; - } - - /** - * Output only. Membership-specific Feature status. If this Feature does - * report any per-Membership status, this field may be unused. - * The keys indicate which Membership the state is for, in the form: - * `projects/{p}/locations/{l}/memberships/{m}` - * Where {p} is the project number, {l} is a valid location and {m} is a valid - * Membership in this project at that location. {p} MUST match the Feature's - * project number. - * - * Generated from protobuf field map membership_states = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setMembershipStates($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\V1\MembershipFeatureState::class); - $this->membership_states = $arr; - - return $this; - } - - /** - * Output only. When the Feature resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. When the Feature resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. When the Feature resource was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. When the Feature resource was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Output only. When the Feature resource was deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getDeleteTime() - { - return $this->delete_time; - } - - public function hasDeleteTime() - { - return isset($this->delete_time); - } - - public function clearDeleteTime() - { - unset($this->delete_time); - } - - /** - * Output only. When the Feature resource was deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setDeleteTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->delete_time = $var; - - return $this; - } - - /** - * Optional. Scope-specific configuration for this Feature. If this Feature - * does not support any per-Scope configuration, this field may be unused. - * The keys indicate which Scope the configuration is for, in the form: - * `projects/{p}/locations/global/scopes/{s}` - * Where {p} is the project, {s} is a valid Scope in this project. - * {p} WILL match the Feature's project. - * {p} will always be returned as the project number, but the project ID is - * also accepted during input. If the same Scope is specified in the map - * twice (using the project ID form, and the project number form), exactly - * ONE of the entries will be saved, with no guarantees as to which. For this - * reason, it is recommended the same format be used for all entries when - * mutating a Feature. - * - * Generated from protobuf field map scope_specs = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getScopeSpecs() - { - return $this->scope_specs; - } - - /** - * Optional. Scope-specific configuration for this Feature. If this Feature - * does not support any per-Scope configuration, this field may be unused. - * The keys indicate which Scope the configuration is for, in the form: - * `projects/{p}/locations/global/scopes/{s}` - * Where {p} is the project, {s} is a valid Scope in this project. - * {p} WILL match the Feature's project. - * {p} will always be returned as the project number, but the project ID is - * also accepted during input. If the same Scope is specified in the map - * twice (using the project ID form, and the project number form), exactly - * ONE of the entries will be saved, with no guarantees as to which. For this - * reason, it is recommended the same format be used for all entries when - * mutating a Feature. - * - * Generated from protobuf field map scope_specs = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setScopeSpecs($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\V1\ScopeFeatureSpec::class); - $this->scope_specs = $arr; - - return $this; - } - - /** - * Output only. Scope-specific Feature status. If this Feature does - * report any per-Scope status, this field may be unused. - * The keys indicate which Scope the state is for, in the form: - * `projects/{p}/locations/global/scopes/{s}` - * Where {p} is the project, {s} is a valid Scope in this project. - * {p} WILL match the Feature's project. - * - * Generated from protobuf field map scope_states = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getScopeStates() - { - return $this->scope_states; - } - - /** - * Output only. Scope-specific Feature status. If this Feature does - * report any per-Scope status, this field may be unused. - * The keys indicate which Scope the state is for, in the form: - * `projects/{p}/locations/global/scopes/{s}` - * Where {p} is the project, {s} is a valid Scope in this project. - * {p} WILL match the Feature's project. - * - * Generated from protobuf field map scope_states = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setScopeStates($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\V1\ScopeFeatureState::class); - $this->scope_states = $arr; - - return $this; - } - - /** - * Output only. List of locations that could not be reached while fetching - * this feature. - * - * Generated from protobuf field repeated string unreachable = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Output only. List of locations that could not be reached while fetching - * this feature. - * - * Generated from protobuf field repeated string unreachable = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/FeatureResourceState.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/FeatureResourceState.php deleted file mode 100644 index 5337d248ca6d..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/FeatureResourceState.php +++ /dev/null @@ -1,69 +0,0 @@ -google.cloud.gkehub.v1.FeatureResourceState - */ -class FeatureResourceState extends \Google\Protobuf\Internal\Message -{ - /** - * The current state of the Feature resource in the Hub API. - * - * Generated from protobuf field .google.cloud.gkehub.v1.FeatureResourceState.State state = 1; - */ - protected $state = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state - * The current state of the Feature resource in the Hub API. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Feature::initOnce(); - parent::__construct($data); - } - - /** - * The current state of the Feature resource in the Hub API. - * - * Generated from protobuf field .google.cloud.gkehub.v1.FeatureResourceState.State state = 1; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The current state of the Feature resource in the Hub API. - * - * Generated from protobuf field .google.cloud.gkehub.v1.FeatureResourceState.State state = 1; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\V1\FeatureResourceState\State::class); - $this->state = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/FeatureResourceState/State.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/FeatureResourceState/State.php deleted file mode 100644 index d27eb2680999..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/FeatureResourceState/State.php +++ /dev/null @@ -1,88 +0,0 @@ -google.cloud.gkehub.v1.FeatureResourceState.State - */ -class State -{ - /** - * State is unknown or not set. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The Feature is being enabled, and the Feature resource is being created. - * Once complete, the corresponding Feature will be enabled in this Fleet. - * - * Generated from protobuf enum ENABLING = 1; - */ - const ENABLING = 1; - /** - * The Feature is enabled in this Fleet, and the Feature resource is fully - * available. - * - * Generated from protobuf enum ACTIVE = 2; - */ - const ACTIVE = 2; - /** - * The Feature is being disabled in this Fleet, and the Feature resource - * is being deleted. - * - * Generated from protobuf enum DISABLING = 3; - */ - const DISABLING = 3; - /** - * The Feature resource is being updated. - * - * Generated from protobuf enum UPDATING = 4; - */ - const UPDATING = 4; - /** - * The Feature resource is being updated by the Hub Service. - * - * Generated from protobuf enum SERVICE_UPDATING = 5; - */ - const SERVICE_UPDATING = 5; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::ENABLING => 'ENABLING', - self::ACTIVE => 'ACTIVE', - self::DISABLING => 'DISABLING', - self::UPDATING => 'UPDATING', - self::SERVICE_UPDATING => 'SERVICE_UPDATING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\GkeHub\V1\FeatureResourceState_State::class); - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/FeatureState.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/FeatureState.php deleted file mode 100644 index d2188bb9360d..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/FeatureState.php +++ /dev/null @@ -1,147 +0,0 @@ -google.cloud.gkehub.v1.FeatureState - */ -class FeatureState extends \Google\Protobuf\Internal\Message -{ - /** - * The high-level, machine-readable status of this Feature. - * - * Generated from protobuf field .google.cloud.gkehub.v1.FeatureState.Code code = 1; - */ - protected $code = 0; - /** - * A human-readable description of the current status. - * - * Generated from protobuf field string description = 2; - */ - protected $description = ''; - /** - * The time this status and any related Feature-specific details were updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; - */ - protected $update_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $code - * The high-level, machine-readable status of this Feature. - * @type string $description - * A human-readable description of the current status. - * @type \Google\Protobuf\Timestamp $update_time - * The time this status and any related Feature-specific details were updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Feature::initOnce(); - parent::__construct($data); - } - - /** - * The high-level, machine-readable status of this Feature. - * - * Generated from protobuf field .google.cloud.gkehub.v1.FeatureState.Code code = 1; - * @return int - */ - public function getCode() - { - return $this->code; - } - - /** - * The high-level, machine-readable status of this Feature. - * - * Generated from protobuf field .google.cloud.gkehub.v1.FeatureState.Code code = 1; - * @param int $var - * @return $this - */ - public function setCode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\V1\FeatureState\Code::class); - $this->code = $var; - - return $this; - } - - /** - * A human-readable description of the current status. - * - * Generated from protobuf field string description = 2; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * A human-readable description of the current status. - * - * Generated from protobuf field string description = 2; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * The time this status and any related Feature-specific details were updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * The time this status and any related Feature-specific details were updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/FeatureState/Code.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/FeatureState/Code.php deleted file mode 100644 index 5fe378f63660..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/FeatureState/Code.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.gkehub.v1.FeatureState.Code - */ -class Code -{ - /** - * Unknown or not set. - * - * Generated from protobuf enum CODE_UNSPECIFIED = 0; - */ - const CODE_UNSPECIFIED = 0; - /** - * The Feature is operating normally. - * - * Generated from protobuf enum OK = 1; - */ - const OK = 1; - /** - * The Feature has encountered an issue, and is operating in a degraded - * state. The Feature may need intervention to return to normal operation. - * See the description and any associated Feature-specific details for more - * information. - * - * Generated from protobuf enum WARNING = 2; - */ - const WARNING = 2; - /** - * The Feature is not operating or is in a severely degraded state. - * The Feature may need intervention to return to normal operation. - * See the description and any associated Feature-specific details for more - * information. - * - * Generated from protobuf enum ERROR = 3; - */ - const ERROR = 3; - - private static $valueToName = [ - self::CODE_UNSPECIFIED => 'CODE_UNSPECIFIED', - self::OK => 'OK', - self::WARNING => 'WARNING', - self::ERROR => 'ERROR', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Code::class, \Google\Cloud\GkeHub\V1\FeatureState_Code::class); - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/Fleet.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/Fleet.php deleted file mode 100644 index b394422e96a4..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/Fleet.php +++ /dev/null @@ -1,425 +0,0 @@ -google.cloud.gkehub.v1.Fleet - */ -class Fleet extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The full, unique resource name of this fleet in the format of - * `projects/{project}/locations/{location}/fleets/{fleet}`. - * Each Google Cloud project can have at most one fleet resource, named - * "default". - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Optional. A user-assigned display name of the Fleet. - * When present, it must be between 4 to 30 characters. - * Allowed characters are: lowercase and uppercase letters, numbers, - * hyphen, single-quote, double-quote, space, and exclamation point. - * Example: `Production Fleet` - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $display_name = ''; - /** - * Output only. When the Fleet was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. When the Fleet was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. When the Fleet was deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $delete_time = null; - /** - * Output only. Google-generated UUID for this resource. This is unique across - * all Fleet resources. If a Fleet resource is deleted and another resource - * with the same name is created, it gets a different uid. - * - * Generated from protobuf field string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. State of the namespace resource. - * - * Generated from protobuf field .google.cloud.gkehub.v1.FleetLifecycleState state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = null; - /** - * Optional. The default cluster configurations to apply across the fleet. - * - * Generated from protobuf field .google.cloud.gkehub.v1.DefaultClusterConfig default_cluster_config = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $default_cluster_config = null; - /** - * Optional. Labels for this Fleet. - * - * Generated from protobuf field map labels = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The full, unique resource name of this fleet in the format of - * `projects/{project}/locations/{location}/fleets/{fleet}`. - * Each Google Cloud project can have at most one fleet resource, named - * "default". - * @type string $display_name - * Optional. A user-assigned display name of the Fleet. - * When present, it must be between 4 to 30 characters. - * Allowed characters are: lowercase and uppercase letters, numbers, - * hyphen, single-quote, double-quote, space, and exclamation point. - * Example: `Production Fleet` - * @type \Google\Protobuf\Timestamp $create_time - * Output only. When the Fleet was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. When the Fleet was last updated. - * @type \Google\Protobuf\Timestamp $delete_time - * Output only. When the Fleet was deleted. - * @type string $uid - * Output only. Google-generated UUID for this resource. This is unique across - * all Fleet resources. If a Fleet resource is deleted and another resource - * with the same name is created, it gets a different uid. - * @type \Google\Cloud\GkeHub\V1\FleetLifecycleState $state - * Output only. State of the namespace resource. - * @type \Google\Cloud\GkeHub\V1\DefaultClusterConfig $default_cluster_config - * Optional. The default cluster configurations to apply across the fleet. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. Labels for this Fleet. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Fleet::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The full, unique resource name of this fleet in the format of - * `projects/{project}/locations/{location}/fleets/{fleet}`. - * Each Google Cloud project can have at most one fleet resource, named - * "default". - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The full, unique resource name of this fleet in the format of - * `projects/{project}/locations/{location}/fleets/{fleet}`. - * Each Google Cloud project can have at most one fleet resource, named - * "default". - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. A user-assigned display name of the Fleet. - * When present, it must be between 4 to 30 characters. - * Allowed characters are: lowercase and uppercase letters, numbers, - * hyphen, single-quote, double-quote, space, and exclamation point. - * Example: `Production Fleet` - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Optional. A user-assigned display name of the Fleet. - * When present, it must be between 4 to 30 characters. - * Allowed characters are: lowercase and uppercase letters, numbers, - * hyphen, single-quote, double-quote, space, and exclamation point. - * Example: `Production Fleet` - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Output only. When the Fleet was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. When the Fleet was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. When the Fleet was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. When the Fleet was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Output only. When the Fleet was deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getDeleteTime() - { - return $this->delete_time; - } - - public function hasDeleteTime() - { - return isset($this->delete_time); - } - - public function clearDeleteTime() - { - unset($this->delete_time); - } - - /** - * Output only. When the Fleet was deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setDeleteTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->delete_time = $var; - - return $this; - } - - /** - * Output only. Google-generated UUID for this resource. This is unique across - * all Fleet resources. If a Fleet resource is deleted and another resource - * with the same name is created, it gets a different uid. - * - * Generated from protobuf field string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. Google-generated UUID for this resource. This is unique across - * all Fleet resources. If a Fleet resource is deleted and another resource - * with the same name is created, it gets a different uid. - * - * Generated from protobuf field string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Output only. State of the namespace resource. - * - * Generated from protobuf field .google.cloud.gkehub.v1.FleetLifecycleState state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\GkeHub\V1\FleetLifecycleState|null - */ - public function getState() - { - return $this->state; - } - - public function hasState() - { - return isset($this->state); - } - - public function clearState() - { - unset($this->state); - } - - /** - * Output only. State of the namespace resource. - * - * Generated from protobuf field .google.cloud.gkehub.v1.FleetLifecycleState state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\GkeHub\V1\FleetLifecycleState $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\FleetLifecycleState::class); - $this->state = $var; - - return $this; - } - - /** - * Optional. The default cluster configurations to apply across the fleet. - * - * Generated from protobuf field .google.cloud.gkehub.v1.DefaultClusterConfig default_cluster_config = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeHub\V1\DefaultClusterConfig|null - */ - public function getDefaultClusterConfig() - { - return $this->default_cluster_config; - } - - public function hasDefaultClusterConfig() - { - return isset($this->default_cluster_config); - } - - public function clearDefaultClusterConfig() - { - unset($this->default_cluster_config); - } - - /** - * Optional. The default cluster configurations to apply across the fleet. - * - * Generated from protobuf field .google.cloud.gkehub.v1.DefaultClusterConfig default_cluster_config = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeHub\V1\DefaultClusterConfig $var - * @return $this - */ - public function setDefaultClusterConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\DefaultClusterConfig::class); - $this->default_cluster_config = $var; - - return $this; - } - - /** - * Optional. Labels for this Fleet. - * - * Generated from protobuf field map labels = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. Labels for this Fleet. - * - * Generated from protobuf field map labels = 11 [(.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; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/FleetLifecycleState.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/FleetLifecycleState.php deleted file mode 100644 index 30e10a49f2ab..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/FleetLifecycleState.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.gkehub.v1.FleetLifecycleState - */ -class FleetLifecycleState extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The current state of the Fleet resource. - * - * Generated from protobuf field .google.cloud.gkehub.v1.FleetLifecycleState.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $code = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $code - * Output only. The current state of the Fleet resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Fleet::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The current state of the Fleet resource. - * - * Generated from protobuf field .google.cloud.gkehub.v1.FleetLifecycleState.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getCode() - { - return $this->code; - } - - /** - * Output only. The current state of the Fleet resource. - * - * Generated from protobuf field .google.cloud.gkehub.v1.FleetLifecycleState.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setCode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\V1\FleetLifecycleState\Code::class); - $this->code = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/FleetLifecycleState/Code.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/FleetLifecycleState/Code.php deleted file mode 100644 index 4fc07ad7b39c..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/FleetLifecycleState/Code.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.gkehub.v1.FleetLifecycleState.Code - */ -class Code -{ - /** - * The code is not set. - * - * Generated from protobuf enum CODE_UNSPECIFIED = 0; - */ - const CODE_UNSPECIFIED = 0; - /** - * The fleet is being created. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * The fleet active. - * - * Generated from protobuf enum READY = 2; - */ - const READY = 2; - /** - * The fleet is being deleted. - * - * Generated from protobuf enum DELETING = 3; - */ - const DELETING = 3; - /** - * The fleet is being updated. - * - * Generated from protobuf enum UPDATING = 4; - */ - const UPDATING = 4; - - private static $valueToName = [ - self::CODE_UNSPECIFIED => 'CODE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::READY => 'READY', - self::DELETING => 'DELETING', - self::UPDATING => 'UPDATING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Code::class, \Google\Cloud\GkeHub\V1\FleetLifecycleState_Code::class); - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GenerateConnectManifestRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GenerateConnectManifestRequest.php deleted file mode 100644 index 70f450cccddc..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GenerateConnectManifestRequest.php +++ /dev/null @@ -1,321 +0,0 @@ -google.cloud.gkehub.v1.GenerateConnectManifestRequest - */ -class GenerateConnectManifestRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Membership resource name the Agent will associate with, in - * the format `projects/*/locations/*/memberships/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. Namespace for GKE Connect agent resources. Defaults to - * `gke-connect`. - * The Connect Agent is authorized automatically when run in the default - * namespace. Otherwise, explicit authorization must be granted with an - * additional IAM binding. - * - * Generated from protobuf field string namespace = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $namespace = ''; - /** - * Optional. URI of a proxy if connectivity from the agent to - * gkeconnect.googleapis.com requires the use of a proxy. Format must be in - * the form `http(s)://{proxy_address}`, depending on the HTTP/HTTPS protocol - * supported by the proxy. This will direct the connect agent's outbound - * traffic through a HTTP(S) proxy. - * - * Generated from protobuf field bytes proxy = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $proxy = ''; - /** - * Optional. The Connect agent version to use. Defaults to the most current - * version. - * - * Generated from protobuf field string version = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $version = ''; - /** - * Optional. If true, generate the resources for upgrade only. Some resources - * generated only for installation (e.g. secrets) will be excluded. - * - * Generated from protobuf field bool is_upgrade = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $is_upgrade = false; - /** - * Optional. The registry to fetch the connect agent image from. Defaults to - * gcr.io/gkeconnect. - * - * Generated from protobuf field string registry = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $registry = ''; - /** - * Optional. The image pull secret content for the registry, if not public. - * - * Generated from protobuf field bytes image_pull_secret_content = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $image_pull_secret_content = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The Membership resource name the Agent will associate with, in - * the format `projects/*/locations/*/memberships/*`. - * @type string $namespace - * Optional. Namespace for GKE Connect agent resources. Defaults to - * `gke-connect`. - * The Connect Agent is authorized automatically when run in the default - * namespace. Otherwise, explicit authorization must be granted with an - * additional IAM binding. - * @type string $proxy - * Optional. URI of a proxy if connectivity from the agent to - * gkeconnect.googleapis.com requires the use of a proxy. Format must be in - * the form `http(s)://{proxy_address}`, depending on the HTTP/HTTPS protocol - * supported by the proxy. This will direct the connect agent's outbound - * traffic through a HTTP(S) proxy. - * @type string $version - * Optional. The Connect agent version to use. Defaults to the most current - * version. - * @type bool $is_upgrade - * Optional. If true, generate the resources for upgrade only. Some resources - * generated only for installation (e.g. secrets) will be excluded. - * @type string $registry - * Optional. The registry to fetch the connect agent image from. Defaults to - * gcr.io/gkeconnect. - * @type string $image_pull_secret_content - * Optional. The image pull secret content for the registry, if not public. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Membership resource name the Agent will associate with, in - * the format `projects/*/locations/*/memberships/*`. - * - * 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 Membership resource name the Agent will associate with, in - * the format `projects/*/locations/*/memberships/*`. - * - * 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. Namespace for GKE Connect agent resources. Defaults to - * `gke-connect`. - * The Connect Agent is authorized automatically when run in the default - * namespace. Otherwise, explicit authorization must be granted with an - * additional IAM binding. - * - * Generated from protobuf field string namespace = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getNamespace() - { - return $this->namespace; - } - - /** - * Optional. Namespace for GKE Connect agent resources. Defaults to - * `gke-connect`. - * The Connect Agent is authorized automatically when run in the default - * namespace. Otherwise, explicit authorization must be granted with an - * additional IAM binding. - * - * Generated from protobuf field string namespace = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setNamespace($var) - { - GPBUtil::checkString($var, True); - $this->namespace = $var; - - return $this; - } - - /** - * Optional. URI of a proxy if connectivity from the agent to - * gkeconnect.googleapis.com requires the use of a proxy. Format must be in - * the form `http(s)://{proxy_address}`, depending on the HTTP/HTTPS protocol - * supported by the proxy. This will direct the connect agent's outbound - * traffic through a HTTP(S) proxy. - * - * Generated from protobuf field bytes proxy = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getProxy() - { - return $this->proxy; - } - - /** - * Optional. URI of a proxy if connectivity from the agent to - * gkeconnect.googleapis.com requires the use of a proxy. Format must be in - * the form `http(s)://{proxy_address}`, depending on the HTTP/HTTPS protocol - * supported by the proxy. This will direct the connect agent's outbound - * traffic through a HTTP(S) proxy. - * - * Generated from protobuf field bytes proxy = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setProxy($var) - { - GPBUtil::checkString($var, False); - $this->proxy = $var; - - return $this; - } - - /** - * Optional. The Connect agent version to use. Defaults to the most current - * version. - * - * Generated from protobuf field string version = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Optional. The Connect agent version to use. Defaults to the most current - * version. - * - * Generated from protobuf field string version = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * Optional. If true, generate the resources for upgrade only. Some resources - * generated only for installation (e.g. secrets) will be excluded. - * - * Generated from protobuf field bool is_upgrade = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getIsUpgrade() - { - return $this->is_upgrade; - } - - /** - * Optional. If true, generate the resources for upgrade only. Some resources - * generated only for installation (e.g. secrets) will be excluded. - * - * Generated from protobuf field bool is_upgrade = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setIsUpgrade($var) - { - GPBUtil::checkBool($var); - $this->is_upgrade = $var; - - return $this; - } - - /** - * Optional. The registry to fetch the connect agent image from. Defaults to - * gcr.io/gkeconnect. - * - * Generated from protobuf field string registry = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRegistry() - { - return $this->registry; - } - - /** - * Optional. The registry to fetch the connect agent image from. Defaults to - * gcr.io/gkeconnect. - * - * Generated from protobuf field string registry = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRegistry($var) - { - GPBUtil::checkString($var, True); - $this->registry = $var; - - return $this; - } - - /** - * Optional. The image pull secret content for the registry, if not public. - * - * Generated from protobuf field bytes image_pull_secret_content = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getImagePullSecretContent() - { - return $this->image_pull_secret_content; - } - - /** - * Optional. The image pull secret content for the registry, if not public. - * - * Generated from protobuf field bytes image_pull_secret_content = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setImagePullSecretContent($var) - { - GPBUtil::checkString($var, False); - $this->image_pull_secret_content = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GenerateConnectManifestResponse.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GenerateConnectManifestResponse.php deleted file mode 100644 index fbecc64a2c15..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GenerateConnectManifestResponse.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.gkehub.v1.GenerateConnectManifestResponse - */ -class GenerateConnectManifestResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The ordered list of Kubernetes resources that need to be applied to the - * cluster for GKE Connect agent installation/upgrade. - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1.ConnectAgentResource manifest = 1; - */ - private $manifest; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\GkeHub\V1\ConnectAgentResource>|\Google\Protobuf\Internal\RepeatedField $manifest - * The ordered list of Kubernetes resources that need to be applied to the - * cluster for GKE Connect agent installation/upgrade. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * The ordered list of Kubernetes resources that need to be applied to the - * cluster for GKE Connect agent installation/upgrade. - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1.ConnectAgentResource manifest = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getManifest() - { - return $this->manifest; - } - - /** - * The ordered list of Kubernetes resources that need to be applied to the - * cluster for GKE Connect agent installation/upgrade. - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1.ConnectAgentResource manifest = 1; - * @param array<\Google\Cloud\GkeHub\V1\ConnectAgentResource>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setManifest($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\V1\ConnectAgentResource::class); - $this->manifest = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GenerateMembershipRBACRoleBindingYAMLRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GenerateMembershipRBACRoleBindingYAMLRequest.php deleted file mode 100644 index 0a8f53f5db8f..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GenerateMembershipRBACRoleBindingYAMLRequest.php +++ /dev/null @@ -1,174 +0,0 @@ -google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLRequest - */ -class GenerateMembershipRBACRoleBindingYAMLRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent (project and location) where the RBACRoleBinding will - * be created. Specified in the format `projects/*/locations/*/memberships/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` - * must be a valid RFC 1123 compliant DNS label: - * 1. At most 63 characters in length - * 2. It must consist of lower case alphanumeric characters or `-` - * 3. It must start and end with an alphanumeric character - * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - * with a maximum length of 63 characters. - * - * Generated from protobuf field string rbacrolebinding_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $rbacrolebinding_id = ''; - /** - * Required. The rbacrolebindings to generate the YAML for. - * - * Generated from protobuf field .google.cloud.gkehub.v1.RBACRoleBinding rbacrolebinding = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $rbacrolebinding = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent (project and location) where the RBACRoleBinding will - * be created. Specified in the format `projects/*/locations/*/memberships/*`. - * @type string $rbacrolebinding_id - * Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` - * must be a valid RFC 1123 compliant DNS label: - * 1. At most 63 characters in length - * 2. It must consist of lower case alphanumeric characters or `-` - * 3. It must start and end with an alphanumeric character - * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - * with a maximum length of 63 characters. - * @type \Google\Cloud\GkeHub\V1\RBACRoleBinding $rbacrolebinding - * Required. The rbacrolebindings to generate the YAML for. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent (project and location) where the RBACRoleBinding will - * be created. Specified in the format `projects/*/locations/*/memberships/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent (project and location) where the RBACRoleBinding will - * be created. Specified in the format `projects/*/locations/*/memberships/*`. - * - * 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. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` - * must be a valid RFC 1123 compliant DNS label: - * 1. At most 63 characters in length - * 2. It must consist of lower case alphanumeric characters or `-` - * 3. It must start and end with an alphanumeric character - * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - * with a maximum length of 63 characters. - * - * Generated from protobuf field string rbacrolebinding_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getRbacrolebindingId() - { - return $this->rbacrolebinding_id; - } - - /** - * Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` - * must be a valid RFC 1123 compliant DNS label: - * 1. At most 63 characters in length - * 2. It must consist of lower case alphanumeric characters or `-` - * 3. It must start and end with an alphanumeric character - * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - * with a maximum length of 63 characters. - * - * Generated from protobuf field string rbacrolebinding_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setRbacrolebindingId($var) - { - GPBUtil::checkString($var, True); - $this->rbacrolebinding_id = $var; - - return $this; - } - - /** - * Required. The rbacrolebindings to generate the YAML for. - * - * Generated from protobuf field .google.cloud.gkehub.v1.RBACRoleBinding rbacrolebinding = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeHub\V1\RBACRoleBinding|null - */ - public function getRbacrolebinding() - { - return $this->rbacrolebinding; - } - - public function hasRbacrolebinding() - { - return isset($this->rbacrolebinding); - } - - public function clearRbacrolebinding() - { - unset($this->rbacrolebinding); - } - - /** - * Required. The rbacrolebindings to generate the YAML for. - * - * Generated from protobuf field .google.cloud.gkehub.v1.RBACRoleBinding rbacrolebinding = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeHub\V1\RBACRoleBinding $var - * @return $this - */ - public function setRbacrolebinding($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\RBACRoleBinding::class); - $this->rbacrolebinding = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GenerateMembershipRBACRoleBindingYAMLResponse.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GenerateMembershipRBACRoleBindingYAMLResponse.php deleted file mode 100644 index 9a5ad5ab8627..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GenerateMembershipRBACRoleBindingYAMLResponse.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLResponse - */ -class GenerateMembershipRBACRoleBindingYAMLResponse extends \Google\Protobuf\Internal\Message -{ - /** - * a yaml text blob including the RBAC policies. - * - * Generated from protobuf field string role_bindings_yaml = 1; - */ - protected $role_bindings_yaml = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $role_bindings_yaml - * a yaml text blob including the RBAC policies. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * a yaml text blob including the RBAC policies. - * - * Generated from protobuf field string role_bindings_yaml = 1; - * @return string - */ - public function getRoleBindingsYaml() - { - return $this->role_bindings_yaml; - } - - /** - * a yaml text blob including the RBAC policies. - * - * Generated from protobuf field string role_bindings_yaml = 1; - * @param string $var - * @return $this - */ - public function setRoleBindingsYaml($var) - { - GPBUtil::checkString($var, True); - $this->role_bindings_yaml = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetFeatureRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetFeatureRequest.php deleted file mode 100644 index 62ab7c5a9934..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetFeatureRequest.php +++ /dev/null @@ -1,131 +0,0 @@ -google.cloud.gkehub.v1.GetFeatureRequest - */ -class GetFeatureRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Feature resource name in the format - * `projects/*/locations/*/features/*` - * - * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. If set to true, the response will return partial results when - * some regions are unreachable and the unreachable field in Feature proto - * will be populated. If set to false, the request will fail when some regions - * are unreachable. - * - * Generated from protobuf field bool return_partial_success = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $return_partial_success = false; - - /** - * @param string $name Required. The Feature resource name in the format - * `projects/*/locations/*/features/*` - * - * @return \Google\Cloud\GkeHub\V1\GetFeatureRequest - * - * @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 Feature resource name in the format - * `projects/*/locations/*/features/*` - * @type bool $return_partial_success - * Optional. If set to true, the response will return partial results when - * some regions are unreachable and the unreachable field in Feature proto - * will be populated. If set to false, the request will fail when some regions - * are unreachable. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Feature resource name in the format - * `projects/*/locations/*/features/*` - * - * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The Feature resource name in the format - * `projects/*/locations/*/features/*` - * - * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. If set to true, the response will return partial results when - * some regions are unreachable and the unreachable field in Feature proto - * will be populated. If set to false, the request will fail when some regions - * are unreachable. - * - * Generated from protobuf field bool return_partial_success = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getReturnPartialSuccess() - { - return $this->return_partial_success; - } - - /** - * Optional. If set to true, the response will return partial results when - * some regions are unreachable and the unreachable field in Feature proto - * will be populated. If set to false, the request will fail when some regions - * are unreachable. - * - * Generated from protobuf field bool return_partial_success = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setReturnPartialSuccess($var) - { - GPBUtil::checkBool($var); - $this->return_partial_success = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetFleetRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetFleetRequest.php deleted file mode 100644 index c6888038d2aa..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetFleetRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.gkehub.v1.GetFleetRequest - */ -class GetFleetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Fleet resource name in the format - * `projects/*/locations/*/fleets/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The Fleet resource name in the format - * `projects/*/locations/*/fleets/*`. Please see - * {@see GkeHubClient::fleetName()} for help formatting this field. - * - * @return \Google\Cloud\GkeHub\V1\GetFleetRequest - * - * @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 Fleet resource name in the format - * `projects/*/locations/*/fleets/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Fleet resource name in the format - * `projects/*/locations/*/fleets/*`. - * - * 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 Fleet resource name in the format - * `projects/*/locations/*/fleets/*`. - * - * 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/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetMembershipBindingRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetMembershipBindingRequest.php deleted file mode 100644 index 281f8ca52922..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetMembershipBindingRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.gkehub.v1.GetMembershipBindingRequest - */ -class GetMembershipBindingRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The MembershipBinding resource name in the format - * `projects/*/locations/*/memberships/*/bindings/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The MembershipBinding resource name in the format - * `projects/*/locations/*/memberships/*/bindings/*`. Please see - * {@see GkeHubClient::membershipBindingName()} for help formatting this field. - * - * @return \Google\Cloud\GkeHub\V1\GetMembershipBindingRequest - * - * @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 MembershipBinding resource name in the format - * `projects/*/locations/*/memberships/*/bindings/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The MembershipBinding resource name in the format - * `projects/*/locations/*/memberships/*/bindings/*`. - * - * 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 MembershipBinding resource name in the format - * `projects/*/locations/*/memberships/*/bindings/*`. - * - * 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/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetMembershipRBACRoleBindingRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetMembershipRBACRoleBindingRequest.php deleted file mode 100644 index 1116fbf218c4..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetMembershipRBACRoleBindingRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.gkehub.v1.GetMembershipRBACRoleBindingRequest - */ -class GetMembershipRBACRoleBindingRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The RBACRoleBinding resource name in the format - * `projects/*/locations/*/memberships/*/rbacrolebindings/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The RBACRoleBinding resource name in the format - * `projects/*/locations/*/memberships/*/rbacrolebindings/*`. Please see - * {@see GkeHubClient::rBACRoleBindingName()} for help formatting this field. - * - * @return \Google\Cloud\GkeHub\V1\GetMembershipRBACRoleBindingRequest - * - * @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 RBACRoleBinding resource name in the format - * `projects/*/locations/*/memberships/*/rbacrolebindings/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The RBACRoleBinding resource name in the format - * `projects/*/locations/*/memberships/*/rbacrolebindings/*`. - * - * 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 RBACRoleBinding resource name in the format - * `projects/*/locations/*/memberships/*/rbacrolebindings/*`. - * - * 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/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetMembershipRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetMembershipRequest.php deleted file mode 100644 index 8f1b1f43d5a4..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetMembershipRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.gkehub.v1.GetMembershipRequest - */ -class GetMembershipRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Membership resource name in the format - * `projects/*/locations/*/memberships/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The Membership resource name in the format - * `projects/*/locations/*/memberships/*`. Please see - * {@see GkeHubClient::membershipName()} for help formatting this field. - * - * @return \Google\Cloud\GkeHub\V1\GetMembershipRequest - * - * @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 Membership resource name in the format - * `projects/*/locations/*/memberships/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Membership resource name in the format - * `projects/*/locations/*/memberships/*`. - * - * 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 Membership resource name in the format - * `projects/*/locations/*/memberships/*`. - * - * 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/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetScopeNamespaceRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetScopeNamespaceRequest.php deleted file mode 100644 index c0379c17da1b..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetScopeNamespaceRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.gkehub.v1.GetScopeNamespaceRequest - */ -class GetScopeNamespaceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Namespace resource name in the format - * `projects/*/locations/*/scopes/*/namespaces/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The Namespace resource name in the format - * `projects/*/locations/*/scopes/*/namespaces/*`. Please see - * {@see GkeHubClient::namespaceName()} for help formatting this field. - * - * @return \Google\Cloud\GkeHub\V1\GetScopeNamespaceRequest - * - * @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 Namespace resource name in the format - * `projects/*/locations/*/scopes/*/namespaces/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Namespace resource name in the format - * `projects/*/locations/*/scopes/*/namespaces/*`. - * - * 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 Namespace resource name in the format - * `projects/*/locations/*/scopes/*/namespaces/*`. - * - * 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/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetScopeRBACRoleBindingRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetScopeRBACRoleBindingRequest.php deleted file mode 100644 index 6ffacd6594e2..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetScopeRBACRoleBindingRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.gkehub.v1.GetScopeRBACRoleBindingRequest - */ -class GetScopeRBACRoleBindingRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The RBACRoleBinding resource name in the format - * `projects/*/locations/*/scopes/*/rbacrolebindings/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The RBACRoleBinding resource name in the format - * `projects/*/locations/*/scopes/*/rbacrolebindings/*`. Please see - * {@see GkeHubClient::rBACRoleBindingName()} for help formatting this field. - * - * @return \Google\Cloud\GkeHub\V1\GetScopeRBACRoleBindingRequest - * - * @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 RBACRoleBinding resource name in the format - * `projects/*/locations/*/scopes/*/rbacrolebindings/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The RBACRoleBinding resource name in the format - * `projects/*/locations/*/scopes/*/rbacrolebindings/*`. - * - * 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 RBACRoleBinding resource name in the format - * `projects/*/locations/*/scopes/*/rbacrolebindings/*`. - * - * 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/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetScopeRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetScopeRequest.php deleted file mode 100644 index f9e686bce4b2..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GetScopeRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.gkehub.v1.GetScopeRequest - */ -class GetScopeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Scope resource name in the format - * `projects/*/locations/*/scopes/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The Scope resource name in the format - * `projects/*/locations/*/scopes/*`. Please see - * {@see GkeHubClient::scopeName()} for help formatting this field. - * - * @return \Google\Cloud\GkeHub\V1\GetScopeRequest - * - * @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 Scope resource name in the format - * `projects/*/locations/*/scopes/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Scope resource name in the format - * `projects/*/locations/*/scopes/*`. - * - * 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 Scope resource name in the format - * `projects/*/locations/*/scopes/*`. - * - * 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/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GkeCluster.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GkeCluster.php deleted file mode 100644 index 5fc98881e773..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/GkeCluster.php +++ /dev/null @@ -1,117 +0,0 @@ -google.cloud.gkehub.v1.GkeCluster - */ -class GkeCluster extends \Google\Protobuf\Internal\Message -{ - /** - * Immutable. Self-link of the Google Cloud resource for the GKE cluster. For - * example: - * //container.googleapis.com/projects/my-project/locations/us-west1-a/clusters/my-cluster - * Zonal clusters are also supported. - * - * Generated from protobuf field string resource_link = 1 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $resource_link = ''; - /** - * Output only. If cluster_missing is set then it denotes that the GKE cluster - * no longer exists in the GKE Control Plane. - * - * Generated from protobuf field bool cluster_missing = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $cluster_missing = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $resource_link - * Immutable. Self-link of the Google Cloud resource for the GKE cluster. For - * example: - * //container.googleapis.com/projects/my-project/locations/us-west1-a/clusters/my-cluster - * Zonal clusters are also supported. - * @type bool $cluster_missing - * Output only. If cluster_missing is set then it denotes that the GKE cluster - * no longer exists in the GKE Control Plane. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Membership::initOnce(); - parent::__construct($data); - } - - /** - * Immutable. Self-link of the Google Cloud resource for the GKE cluster. For - * example: - * //container.googleapis.com/projects/my-project/locations/us-west1-a/clusters/my-cluster - * Zonal clusters are also supported. - * - * Generated from protobuf field string resource_link = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getResourceLink() - { - return $this->resource_link; - } - - /** - * Immutable. Self-link of the Google Cloud resource for the GKE cluster. For - * example: - * //container.googleapis.com/projects/my-project/locations/us-west1-a/clusters/my-cluster - * Zonal clusters are also supported. - * - * Generated from protobuf field string resource_link = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setResourceLink($var) - { - GPBUtil::checkString($var, True); - $this->resource_link = $var; - - return $this; - } - - /** - * Output only. If cluster_missing is set then it denotes that the GKE cluster - * no longer exists in the GKE Control Plane. - * - * Generated from protobuf field bool cluster_missing = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getClusterMissing() - { - return $this->cluster_missing; - } - - /** - * Output only. If cluster_missing is set then it denotes that the GKE cluster - * no longer exists in the GKE Control Plane. - * - * Generated from protobuf field bool cluster_missing = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setClusterMissing($var) - { - GPBUtil::checkBool($var); - $this->cluster_missing = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/KubernetesMetadata.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/KubernetesMetadata.php deleted file mode 100644 index 54fd9c79de89..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/KubernetesMetadata.php +++ /dev/null @@ -1,276 +0,0 @@ -google.cloud.gkehub.v1.KubernetesMetadata - */ -class KubernetesMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Kubernetes API server version string as reported by - * `/version`. - * - * Generated from protobuf field string kubernetes_api_server_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $kubernetes_api_server_version = ''; - /** - * Output only. Node providerID as reported by the first node in the list of - * nodes on the Kubernetes endpoint. On Kubernetes platforms that support - * zero-node clusters (like GKE-on-GCP), the node_count will be zero and the - * node_provider_id will be empty. - * - * Generated from protobuf field string node_provider_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $node_provider_id = ''; - /** - * Output only. Node count as reported by Kubernetes nodes resources. - * - * Generated from protobuf field int32 node_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $node_count = 0; - /** - * Output only. vCPU count as reported by Kubernetes nodes resources. - * - * Generated from protobuf field int32 vcpu_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $vcpu_count = 0; - /** - * Output only. The total memory capacity as reported by the sum of all - * Kubernetes nodes resources, defined in MB. - * - * Generated from protobuf field int32 memory_mb = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $memory_mb = 0; - /** - * Output only. The time at which these details were last updated. This - * update_time is different from the Membership-level update_time since - * EndpointDetails are updated internally for API consumers. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 100 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $kubernetes_api_server_version - * Output only. Kubernetes API server version string as reported by - * `/version`. - * @type string $node_provider_id - * Output only. Node providerID as reported by the first node in the list of - * nodes on the Kubernetes endpoint. On Kubernetes platforms that support - * zero-node clusters (like GKE-on-GCP), the node_count will be zero and the - * node_provider_id will be empty. - * @type int $node_count - * Output only. Node count as reported by Kubernetes nodes resources. - * @type int $vcpu_count - * Output only. vCPU count as reported by Kubernetes nodes resources. - * @type int $memory_mb - * Output only. The total memory capacity as reported by the sum of all - * Kubernetes nodes resources, defined in MB. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time at which these details were last updated. This - * update_time is different from the Membership-level update_time since - * EndpointDetails are updated internally for API consumers. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Membership::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Kubernetes API server version string as reported by - * `/version`. - * - * Generated from protobuf field string kubernetes_api_server_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getKubernetesApiServerVersion() - { - return $this->kubernetes_api_server_version; - } - - /** - * Output only. Kubernetes API server version string as reported by - * `/version`. - * - * Generated from protobuf field string kubernetes_api_server_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setKubernetesApiServerVersion($var) - { - GPBUtil::checkString($var, True); - $this->kubernetes_api_server_version = $var; - - return $this; - } - - /** - * Output only. Node providerID as reported by the first node in the list of - * nodes on the Kubernetes endpoint. On Kubernetes platforms that support - * zero-node clusters (like GKE-on-GCP), the node_count will be zero and the - * node_provider_id will be empty. - * - * Generated from protobuf field string node_provider_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getNodeProviderId() - { - return $this->node_provider_id; - } - - /** - * Output only. Node providerID as reported by the first node in the list of - * nodes on the Kubernetes endpoint. On Kubernetes platforms that support - * zero-node clusters (like GKE-on-GCP), the node_count will be zero and the - * node_provider_id will be empty. - * - * Generated from protobuf field string node_provider_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setNodeProviderId($var) - { - GPBUtil::checkString($var, True); - $this->node_provider_id = $var; - - return $this; - } - - /** - * Output only. Node count as reported by Kubernetes nodes resources. - * - * Generated from protobuf field int32 node_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getNodeCount() - { - return $this->node_count; - } - - /** - * Output only. Node count as reported by Kubernetes nodes resources. - * - * Generated from protobuf field int32 node_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setNodeCount($var) - { - GPBUtil::checkInt32($var); - $this->node_count = $var; - - return $this; - } - - /** - * Output only. vCPU count as reported by Kubernetes nodes resources. - * - * Generated from protobuf field int32 vcpu_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getVcpuCount() - { - return $this->vcpu_count; - } - - /** - * Output only. vCPU count as reported by Kubernetes nodes resources. - * - * Generated from protobuf field int32 vcpu_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setVcpuCount($var) - { - GPBUtil::checkInt32($var); - $this->vcpu_count = $var; - - return $this; - } - - /** - * Output only. The total memory capacity as reported by the sum of all - * Kubernetes nodes resources, defined in MB. - * - * Generated from protobuf field int32 memory_mb = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getMemoryMb() - { - return $this->memory_mb; - } - - /** - * Output only. The total memory capacity as reported by the sum of all - * Kubernetes nodes resources, defined in MB. - * - * Generated from protobuf field int32 memory_mb = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setMemoryMb($var) - { - GPBUtil::checkInt32($var); - $this->memory_mb = $var; - - return $this; - } - - /** - * Output only. The time at which these details were last updated. This - * update_time is different from the Membership-level update_time since - * EndpointDetails are updated internally for API consumers. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 100 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The time at which these details were last updated. This - * update_time is different from the Membership-level update_time since - * EndpointDetails are updated internally for API consumers. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 100 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/KubernetesResource.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/KubernetesResource.php deleted file mode 100644 index 6bd38f96b363..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/KubernetesResource.php +++ /dev/null @@ -1,245 +0,0 @@ -google.cloud.gkehub.v1.KubernetesResource - */ -class KubernetesResource extends \Google\Protobuf\Internal\Message -{ - /** - * Input only. The YAML representation of the Membership CR. This field is - * ignored for GKE clusters where Hub can read the CR directly. - * Callers should provide the CR that is currently present in the cluster - * during CreateMembership or UpdateMembership, or leave this field empty if - * none exists. The CR manifest is used to validate the cluster has not been - * registered with another Membership. - * - * Generated from protobuf field string membership_cr_manifest = 1 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - protected $membership_cr_manifest = ''; - /** - * Output only. Additional Kubernetes resources that need to be applied to the - * cluster after Membership creation, and after every update. - * This field is only populated in the Membership returned from a successful - * long-running operation from CreateMembership or UpdateMembership. It is not - * populated during normal GetMembership or ListMemberships requests. To get - * the resource manifest after the initial registration, the caller should - * make a UpdateMembership call with an empty field mask. - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1.ResourceManifest membership_resources = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $membership_resources; - /** - * Output only. The Kubernetes resources for installing the GKE Connect agent - * This field is only populated in the Membership returned from a successful - * long-running operation from CreateMembership or UpdateMembership. It is not - * populated during normal GetMembership or ListMemberships requests. To get - * the resource manifest after the initial registration, the caller should - * make a UpdateMembership call with an empty field mask. - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1.ResourceManifest connect_resources = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $connect_resources; - /** - * Optional. Options for Kubernetes resource generation. - * - * Generated from protobuf field .google.cloud.gkehub.v1.ResourceOptions resource_options = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $resource_options = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $membership_cr_manifest - * Input only. The YAML representation of the Membership CR. This field is - * ignored for GKE clusters where Hub can read the CR directly. - * Callers should provide the CR that is currently present in the cluster - * during CreateMembership or UpdateMembership, or leave this field empty if - * none exists. The CR manifest is used to validate the cluster has not been - * registered with another Membership. - * @type array<\Google\Cloud\GkeHub\V1\ResourceManifest>|\Google\Protobuf\Internal\RepeatedField $membership_resources - * Output only. Additional Kubernetes resources that need to be applied to the - * cluster after Membership creation, and after every update. - * This field is only populated in the Membership returned from a successful - * long-running operation from CreateMembership or UpdateMembership. It is not - * populated during normal GetMembership or ListMemberships requests. To get - * the resource manifest after the initial registration, the caller should - * make a UpdateMembership call with an empty field mask. - * @type array<\Google\Cloud\GkeHub\V1\ResourceManifest>|\Google\Protobuf\Internal\RepeatedField $connect_resources - * Output only. The Kubernetes resources for installing the GKE Connect agent - * This field is only populated in the Membership returned from a successful - * long-running operation from CreateMembership or UpdateMembership. It is not - * populated during normal GetMembership or ListMemberships requests. To get - * the resource manifest after the initial registration, the caller should - * make a UpdateMembership call with an empty field mask. - * @type \Google\Cloud\GkeHub\V1\ResourceOptions $resource_options - * Optional. Options for Kubernetes resource generation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Membership::initOnce(); - parent::__construct($data); - } - - /** - * Input only. The YAML representation of the Membership CR. This field is - * ignored for GKE clusters where Hub can read the CR directly. - * Callers should provide the CR that is currently present in the cluster - * during CreateMembership or UpdateMembership, or leave this field empty if - * none exists. The CR manifest is used to validate the cluster has not been - * registered with another Membership. - * - * Generated from protobuf field string membership_cr_manifest = 1 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return string - */ - public function getMembershipCrManifest() - { - return $this->membership_cr_manifest; - } - - /** - * Input only. The YAML representation of the Membership CR. This field is - * ignored for GKE clusters where Hub can read the CR directly. - * Callers should provide the CR that is currently present in the cluster - * during CreateMembership or UpdateMembership, or leave this field empty if - * none exists. The CR manifest is used to validate the cluster has not been - * registered with another Membership. - * - * Generated from protobuf field string membership_cr_manifest = 1 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setMembershipCrManifest($var) - { - GPBUtil::checkString($var, True); - $this->membership_cr_manifest = $var; - - return $this; - } - - /** - * Output only. Additional Kubernetes resources that need to be applied to the - * cluster after Membership creation, and after every update. - * This field is only populated in the Membership returned from a successful - * long-running operation from CreateMembership or UpdateMembership. It is not - * populated during normal GetMembership or ListMemberships requests. To get - * the resource manifest after the initial registration, the caller should - * make a UpdateMembership call with an empty field mask. - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1.ResourceManifest membership_resources = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMembershipResources() - { - return $this->membership_resources; - } - - /** - * Output only. Additional Kubernetes resources that need to be applied to the - * cluster after Membership creation, and after every update. - * This field is only populated in the Membership returned from a successful - * long-running operation from CreateMembership or UpdateMembership. It is not - * populated during normal GetMembership or ListMemberships requests. To get - * the resource manifest after the initial registration, the caller should - * make a UpdateMembership call with an empty field mask. - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1.ResourceManifest membership_resources = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\GkeHub\V1\ResourceManifest>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMembershipResources($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\V1\ResourceManifest::class); - $this->membership_resources = $arr; - - return $this; - } - - /** - * Output only. The Kubernetes resources for installing the GKE Connect agent - * This field is only populated in the Membership returned from a successful - * long-running operation from CreateMembership or UpdateMembership. It is not - * populated during normal GetMembership or ListMemberships requests. To get - * the resource manifest after the initial registration, the caller should - * make a UpdateMembership call with an empty field mask. - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1.ResourceManifest connect_resources = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getConnectResources() - { - return $this->connect_resources; - } - - /** - * Output only. The Kubernetes resources for installing the GKE Connect agent - * This field is only populated in the Membership returned from a successful - * long-running operation from CreateMembership or UpdateMembership. It is not - * populated during normal GetMembership or ListMemberships requests. To get - * the resource manifest after the initial registration, the caller should - * make a UpdateMembership call with an empty field mask. - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1.ResourceManifest connect_resources = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\GkeHub\V1\ResourceManifest>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setConnectResources($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\V1\ResourceManifest::class); - $this->connect_resources = $arr; - - return $this; - } - - /** - * Optional. Options for Kubernetes resource generation. - * - * Generated from protobuf field .google.cloud.gkehub.v1.ResourceOptions resource_options = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeHub\V1\ResourceOptions|null - */ - public function getResourceOptions() - { - return $this->resource_options; - } - - public function hasResourceOptions() - { - return isset($this->resource_options); - } - - public function clearResourceOptions() - { - unset($this->resource_options); - } - - /** - * Optional. Options for Kubernetes resource generation. - * - * Generated from protobuf field .google.cloud.gkehub.v1.ResourceOptions resource_options = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeHub\V1\ResourceOptions $var - * @return $this - */ - public function setResourceOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\ResourceOptions::class); - $this->resource_options = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListBoundMembershipsRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListBoundMembershipsRequest.php deleted file mode 100644 index bde56c249ee1..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListBoundMembershipsRequest.php +++ /dev/null @@ -1,220 +0,0 @@ -google.cloud.gkehub.v1.ListBoundMembershipsRequest - */ -class ListBoundMembershipsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the Scope, in the format - * `projects/*/locations/global/scopes/*`, to which the Memberships are bound. - * - * Generated from protobuf field string scope_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $scope_name = ''; - /** - * Optional. Lists Memberships that match the filter expression, following the - * syntax outlined in https://google.aip.dev/160. Currently, filtering - * can be done only based on Memberships's `name`, `labels`, `create_time`, - * `update_time`, and `unique_id`. - * - * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. When requesting a 'page' of resources, `page_size` specifies - * number of resources to return. If unspecified or set to 0, all resources - * will be returned. Pagination is currently not supported; therefore, setting - * this field does not have any impact for now. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. Token returned by previous call to `ListBoundMemberships` which - * specifies the position in the list from where to continue listing the - * resources. - * - * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $scopeName Required. Name of the Scope, in the format - * `projects/*/locations/global/scopes/*`, to which the Memberships are bound. Please see - * {@see GkeHubClient::scopeName()} for help formatting this field. - * - * @return \Google\Cloud\GkeHub\V1\ListBoundMembershipsRequest - * - * @experimental - */ - public static function build(string $scopeName): self - { - return (new self()) - ->setScopeName($scopeName); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $scope_name - * Required. Name of the Scope, in the format - * `projects/*/locations/global/scopes/*`, to which the Memberships are bound. - * @type string $filter - * Optional. Lists Memberships that match the filter expression, following the - * syntax outlined in https://google.aip.dev/160. Currently, filtering - * can be done only based on Memberships's `name`, `labels`, `create_time`, - * `update_time`, and `unique_id`. - * @type int $page_size - * Optional. When requesting a 'page' of resources, `page_size` specifies - * number of resources to return. If unspecified or set to 0, all resources - * will be returned. Pagination is currently not supported; therefore, setting - * this field does not have any impact for now. - * @type string $page_token - * Optional. Token returned by previous call to `ListBoundMemberships` which - * specifies the position in the list from where to continue listing the - * resources. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the Scope, in the format - * `projects/*/locations/global/scopes/*`, to which the Memberships are bound. - * - * Generated from protobuf field string scope_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getScopeName() - { - return $this->scope_name; - } - - /** - * Required. Name of the Scope, in the format - * `projects/*/locations/global/scopes/*`, to which the Memberships are bound. - * - * Generated from protobuf field string scope_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setScopeName($var) - { - GPBUtil::checkString($var, True); - $this->scope_name = $var; - - return $this; - } - - /** - * Optional. Lists Memberships that match the filter expression, following the - * syntax outlined in https://google.aip.dev/160. Currently, filtering - * can be done only based on Memberships's `name`, `labels`, `create_time`, - * `update_time`, and `unique_id`. - * - * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Lists Memberships that match the filter expression, following the - * syntax outlined in https://google.aip.dev/160. Currently, filtering - * can be done only based on Memberships's `name`, `labels`, `create_time`, - * `update_time`, and `unique_id`. - * - * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. When requesting a 'page' of resources, `page_size` specifies - * number of resources to return. If unspecified or set to 0, all resources - * will be returned. Pagination is currently not supported; therefore, setting - * this field does not have any impact for now. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. When requesting a 'page' of resources, `page_size` specifies - * number of resources to return. If unspecified or set to 0, all resources - * will be returned. Pagination is currently not supported; therefore, setting - * this field does not have any impact for now. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. Token returned by previous call to `ListBoundMemberships` which - * specifies the position in the list from where to continue listing the - * resources. - * - * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. Token returned by previous call to `ListBoundMemberships` which - * specifies the position in the list from where to continue listing the - * resources. - * - * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListBoundMembershipsResponse.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListBoundMembershipsResponse.php deleted file mode 100644 index c0b97a46566c..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListBoundMembershipsResponse.php +++ /dev/null @@ -1,143 +0,0 @@ -google.cloud.gkehub.v1.ListBoundMembershipsResponse - */ -class ListBoundMembershipsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of Memberships bound to the given Scope. - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1.Membership memberships = 1; - */ - private $memberships; - /** - * List of locations that could not be reached while fetching this list. - * - * Generated from protobuf field repeated string unreachable = 2; - */ - private $unreachable; - /** - * A token to request the next page of resources from the - * `ListBoundMemberships` method. The value of an empty string means that - * there are no more resources to return. - * - * Generated from protobuf field string next_page_token = 3; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\GkeHub\V1\Membership>|\Google\Protobuf\Internal\RepeatedField $memberships - * The list of Memberships bound to the given Scope. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * List of locations that could not be reached while fetching this list. - * @type string $next_page_token - * A token to request the next page of resources from the - * `ListBoundMemberships` method. The value of an empty string means that - * there are no more resources to return. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * The list of Memberships bound to the given Scope. - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1.Membership memberships = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMemberships() - { - return $this->memberships; - } - - /** - * The list of Memberships bound to the given Scope. - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1.Membership memberships = 1; - * @param array<\Google\Cloud\GkeHub\V1\Membership>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMemberships($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\V1\Membership::class); - $this->memberships = $arr; - - return $this; - } - - /** - * List of locations that could not be reached while fetching this list. - * - * Generated from protobuf field repeated string unreachable = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * List of locations that could not be reached while fetching this list. - * - * Generated from protobuf field repeated string unreachable = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - - /** - * A token to request the next page of resources from the - * `ListBoundMemberships` method. The value of an empty string means that - * there are no more resources to return. - * - * Generated from protobuf field string next_page_token = 3; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token to request the next page of resources from the - * `ListBoundMemberships` method. The value of an empty string means that - * there are no more resources to return. - * - * Generated from protobuf field string next_page_token = 3; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListFeaturesRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListFeaturesRequest.php deleted file mode 100644 index 47144ac4215d..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListFeaturesRequest.php +++ /dev/null @@ -1,319 +0,0 @@ -google.cloud.gkehub.v1.ListFeaturesRequest - */ -class ListFeaturesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent (project and location) where the Features will be - * listed. Specified in the format `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * When requesting a 'page' of resources, `page_size` specifies number of - * resources to return. If unspecified or set to 0, all resources will - * be returned. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * Token returned by previous call to `ListFeatures` which - * specifies the position in the list from where to continue listing the - * resources. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Lists Features that match the filter expression, following the syntax - * outlined in https://google.aip.dev/160. - * Examples: - * - Feature with the name "servicemesh" in project "foo-proj": - * name = "projects/foo-proj/locations/global/features/servicemesh" - * - Features that have a label called `foo`: - * labels.foo:* - * - Features that have a label called `foo` whose value is `bar`: - * labels.foo = bar - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * One or more fields to compare and use to sort the output. - * See https://google.aip.dev/132#ordering. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - /** - * Optional. If set to true, the response will return partial results when - * some regions are unreachable and the unreachable field in Feature proto - * will be populated. If set to false, the request will fail when some regions - * are unreachable. - * - * Generated from protobuf field bool return_partial_success = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $return_partial_success = false; - - /** - * @param string $parent Required. The parent (project and location) where the Features will be - * listed. Specified in the format `projects/*/locations/*`. - * - * @return \Google\Cloud\GkeHub\V1\ListFeaturesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent (project and location) where the Features will be - * listed. Specified in the format `projects/*/locations/*`. - * @type int $page_size - * When requesting a 'page' of resources, `page_size` specifies number of - * resources to return. If unspecified or set to 0, all resources will - * be returned. - * @type string $page_token - * Token returned by previous call to `ListFeatures` which - * specifies the position in the list from where to continue listing the - * resources. - * @type string $filter - * Lists Features that match the filter expression, following the syntax - * outlined in https://google.aip.dev/160. - * Examples: - * - Feature with the name "servicemesh" in project "foo-proj": - * name = "projects/foo-proj/locations/global/features/servicemesh" - * - Features that have a label called `foo`: - * labels.foo:* - * - Features that have a label called `foo` whose value is `bar`: - * labels.foo = bar - * @type string $order_by - * One or more fields to compare and use to sort the output. - * See https://google.aip.dev/132#ordering. - * @type bool $return_partial_success - * Optional. If set to true, the response will return partial results when - * some regions are unreachable and the unreachable field in Feature proto - * will be populated. If set to false, the request will fail when some regions - * are unreachable. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent (project and location) where the Features will be - * listed. Specified in the format `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent (project and location) where the Features will be - * listed. Specified in the format `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * When requesting a 'page' of resources, `page_size` specifies number of - * resources to return. If unspecified or set to 0, all resources will - * be returned. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * When requesting a 'page' of resources, `page_size` specifies number of - * resources to return. If unspecified or set to 0, all resources will - * be returned. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Token returned by previous call to `ListFeatures` which - * specifies the position in the list from where to continue listing the - * resources. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Token returned by previous call to `ListFeatures` which - * specifies the position in the list from where to continue listing the - * resources. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Lists Features that match the filter expression, following the syntax - * outlined in https://google.aip.dev/160. - * Examples: - * - Feature with the name "servicemesh" in project "foo-proj": - * name = "projects/foo-proj/locations/global/features/servicemesh" - * - Features that have a label called `foo`: - * labels.foo:* - * - Features that have a label called `foo` whose value is `bar`: - * labels.foo = bar - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Lists Features that match the filter expression, following the syntax - * outlined in https://google.aip.dev/160. - * Examples: - * - Feature with the name "servicemesh" in project "foo-proj": - * name = "projects/foo-proj/locations/global/features/servicemesh" - * - Features that have a label called `foo`: - * labels.foo:* - * - Features that have a label called `foo` whose value is `bar`: - * labels.foo = bar - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * One or more fields to compare and use to sort the output. - * See https://google.aip.dev/132#ordering. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * One or more fields to compare and use to sort the output. - * See https://google.aip.dev/132#ordering. - * - * Generated from protobuf field string order_by = 5; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - - /** - * Optional. If set to true, the response will return partial results when - * some regions are unreachable and the unreachable field in Feature proto - * will be populated. If set to false, the request will fail when some regions - * are unreachable. - * - * Generated from protobuf field bool return_partial_success = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getReturnPartialSuccess() - { - return $this->return_partial_success; - } - - /** - * Optional. If set to true, the response will return partial results when - * some regions are unreachable and the unreachable field in Feature proto - * will be populated. If set to false, the request will fail when some regions - * are unreachable. - * - * Generated from protobuf field bool return_partial_success = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setReturnPartialSuccess($var) - { - GPBUtil::checkBool($var); - $this->return_partial_success = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListFeaturesResponse.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListFeaturesResponse.php deleted file mode 100644 index a1b284439a46..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListFeaturesResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.gkehub.v1.ListFeaturesResponse - */ -class ListFeaturesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of matching Features - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1.Feature resources = 1; - */ - private $resources; - /** - * A token to request the next page of resources from the - * `ListFeatures` method. The value of an empty string means - * that there are no more resources to return. - * - * 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\GkeHub\V1\Feature>|\Google\Protobuf\Internal\RepeatedField $resources - * The list of matching Features - * @type string $next_page_token - * A token to request the next page of resources from the - * `ListFeatures` method. The value of an empty string means - * that there are no more resources to return. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * The list of matching Features - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1.Feature resources = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getResources() - { - return $this->resources; - } - - /** - * The list of matching Features - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1.Feature resources = 1; - * @param array<\Google\Cloud\GkeHub\V1\Feature>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setResources($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\V1\Feature::class); - $this->resources = $arr; - - return $this; - } - - /** - * A token to request the next page of resources from the - * `ListFeatures` method. The value of an empty string means - * that there are no more resources to return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token to request the next page of resources from the - * `ListFeatures` method. The value of an empty string means - * that there are no more resources to return. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListFleetsRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListFleetsRequest.php deleted file mode 100644 index efb3dd2c7711..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListFleetsRequest.php +++ /dev/null @@ -1,174 +0,0 @@ -google.cloud.gkehub.v1.ListFleetsRequest - */ -class ListFleetsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The organization or project to list for Fleets under, in the - * format `organizations/*/locations/*` or `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. A page token, received from a previous `ListFleets` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListFleets` must match - * the call that provided the page token. - * - * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. The maximum number of fleets to return. The service may return - * fewer than this value. If unspecified, at most 200 fleets will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - - /** - * @param string $parent Required. The organization or project to list for Fleets under, in the - * format `organizations/*/locations/*` or `projects/*/locations/*`. Please see - * {@see GkeHubClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\GkeHub\V1\ListFleetsRequest - * - * @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 organization or project to list for Fleets under, in the - * format `organizations/*/locations/*` or `projects/*/locations/*`. - * @type string $page_token - * Optional. A page token, received from a previous `ListFleets` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListFleets` must match - * the call that provided the page token. - * @type int $page_size - * Optional. The maximum number of fleets to return. The service may return - * fewer than this value. If unspecified, at most 200 fleets will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The organization or project to list for Fleets under, in the - * format `organizations/*/locations/*` or `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The organization or project to list for Fleets under, in the - * format `organizations/*/locations/*` or `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. A page token, received from a previous `ListFleets` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListFleets` must match - * the call that provided the page token. - * - * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A page token, received from a previous `ListFleets` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListFleets` must match - * the call that provided the page token. - * - * Generated from protobuf field string page_token = 2 [(.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 maximum number of fleets to return. The service may return - * fewer than this value. If unspecified, at most 200 fleets will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of fleets to return. The service may return - * fewer than this value. If unspecified, at most 200 fleets will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListFleetsResponse.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListFleetsResponse.php deleted file mode 100644 index d9c8ecb26d5a..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListFleetsResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.gkehub.v1.ListFleetsResponse - */ -class ListFleetsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of matching fleets. - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1.Fleet fleets = 1; - */ - private $fleets; - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * The token is only valid for 1h. - * - * 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\GkeHub\V1\Fleet>|\Google\Protobuf\Internal\RepeatedField $fleets - * The list of matching fleets. - * @type string $next_page_token - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * The token is only valid for 1h. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * The list of matching fleets. - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1.Fleet fleets = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFleets() - { - return $this->fleets; - } - - /** - * The list of matching fleets. - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1.Fleet fleets = 1; - * @param array<\Google\Cloud\GkeHub\V1\Fleet>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFleets($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\V1\Fleet::class); - $this->fleets = $arr; - - return $this; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * The token is only valid for 1h. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * The token is only valid for 1h. - * - * 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/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListMembershipBindingsRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListMembershipBindingsRequest.php deleted file mode 100644 index 76ec9ec5b06a..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListMembershipBindingsRequest.php +++ /dev/null @@ -1,208 +0,0 @@ -google.cloud.gkehub.v1.ListMembershipBindingsRequest - */ -class ListMembershipBindingsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent Membership for which the MembershipBindings will be - * listed. Specified in the format `projects/*/locations/*/memberships/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. When requesting a 'page' of resources, `page_size` specifies - * number of resources to return. If unspecified or set to 0, all resources - * will be returned. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. Token returned by previous call to `ListMembershipBindings` which - * specifies the position in the list from where to continue listing the - * resources. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. Lists MembershipBindings that match the filter expression, - * following the syntax outlined in https://google.aip.dev/160. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - - /** - * @param string $parent Required. The parent Membership for which the MembershipBindings will be - * listed. Specified in the format `projects/*/locations/*/memberships/*`. Please see - * {@see GkeHubClient::membershipName()} for help formatting this field. - * - * @return \Google\Cloud\GkeHub\V1\ListMembershipBindingsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent Membership for which the MembershipBindings will be - * listed. Specified in the format `projects/*/locations/*/memberships/*`. - * @type int $page_size - * Optional. When requesting a 'page' of resources, `page_size` specifies - * number of resources to return. If unspecified or set to 0, all resources - * will be returned. - * @type string $page_token - * Optional. Token returned by previous call to `ListMembershipBindings` which - * specifies the position in the list from where to continue listing the - * resources. - * @type string $filter - * Optional. Lists MembershipBindings that match the filter expression, - * following the syntax outlined in https://google.aip.dev/160. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent Membership for which the MembershipBindings will be - * listed. Specified in the format `projects/*/locations/*/memberships/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent Membership for which the MembershipBindings will be - * listed. Specified in the format `projects/*/locations/*/memberships/*`. - * - * 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. When requesting a 'page' of resources, `page_size` specifies - * number of resources to return. If unspecified or set to 0, all resources - * will be returned. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. When requesting a 'page' of resources, `page_size` specifies - * number of resources to return. If unspecified or set to 0, all resources - * will be returned. - * - * 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. Token returned by previous call to `ListMembershipBindings` which - * specifies the position in the list from where to continue listing the - * resources. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. Token returned by previous call to `ListMembershipBindings` which - * specifies the position in the list from where to continue listing the - * resources. - * - * 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. Lists MembershipBindings that match the filter expression, - * following the syntax outlined in https://google.aip.dev/160. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Lists MembershipBindings that match the filter expression, - * following the syntax outlined in https://google.aip.dev/160. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListMembershipBindingsResponse.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListMembershipBindingsResponse.php deleted file mode 100644 index 3c64db6acada..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListMembershipBindingsResponse.php +++ /dev/null @@ -1,143 +0,0 @@ -google.cloud.gkehub.v1.ListMembershipBindingsResponse - */ -class ListMembershipBindingsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of membership_bindings - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1.MembershipBinding membership_bindings = 1; - */ - private $membership_bindings; - /** - * A token to request the next page of resources from the - * `ListMembershipBindings` method. The value of an empty string means - * that there are no more resources to return. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * List of locations that could not be reached while fetching this list. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\GkeHub\V1\MembershipBinding>|\Google\Protobuf\Internal\RepeatedField $membership_bindings - * The list of membership_bindings - * @type string $next_page_token - * A token to request the next page of resources from the - * `ListMembershipBindings` method. The value of an empty string means - * that there are no more resources to return. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * List of locations that could not be reached while fetching this list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * The list of membership_bindings - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1.MembershipBinding membership_bindings = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMembershipBindings() - { - return $this->membership_bindings; - } - - /** - * The list of membership_bindings - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1.MembershipBinding membership_bindings = 1; - * @param array<\Google\Cloud\GkeHub\V1\MembershipBinding>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMembershipBindings($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\V1\MembershipBinding::class); - $this->membership_bindings = $arr; - - return $this; - } - - /** - * A token to request the next page of resources from the - * `ListMembershipBindings` method. The value of an empty string means - * that there are no more resources to return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token to request the next page of resources from the - * `ListMembershipBindings` method. The value of an empty string means - * that there are no more resources to return. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * List of locations that could not be reached while fetching this list. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * List of locations that could not be reached while fetching this list. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListMembershipRBACRoleBindingsRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListMembershipRBACRoleBindingsRequest.php deleted file mode 100644 index ac01d9d83bd7..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListMembershipRBACRoleBindingsRequest.php +++ /dev/null @@ -1,170 +0,0 @@ -google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsRequest - */ -class ListMembershipRBACRoleBindingsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent (project and location) where the Features will be - * listed. Specified in the format `projects/*/locations/*/memberships/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. When requesting a 'page' of resources, `page_size` specifies - * number of resources to return. If unspecified or set to 0, all resources - * will be returned. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. Token returned by previous call to - * `ListMembershipRBACRoleBindings` which specifies the position in the list - * from where to continue listing the resources. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The parent (project and location) where the Features will be - * listed. Specified in the format `projects/*/locations/*/memberships/*`. Please see - * {@see GkeHubClient::scopeName()} for help formatting this field. - * - * @return \Google\Cloud\GkeHub\V1\ListMembershipRBACRoleBindingsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent (project and location) where the Features will be - * listed. Specified in the format `projects/*/locations/*/memberships/*`. - * @type int $page_size - * Optional. When requesting a 'page' of resources, `page_size` specifies - * number of resources to return. If unspecified or set to 0, all resources - * will be returned. - * @type string $page_token - * Optional. Token returned by previous call to - * `ListMembershipRBACRoleBindings` which specifies the position in the list - * from where to continue listing the resources. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent (project and location) where the Features will be - * listed. Specified in the format `projects/*/locations/*/memberships/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent (project and location) where the Features will be - * listed. Specified in the format `projects/*/locations/*/memberships/*`. - * - * 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. When requesting a 'page' of resources, `page_size` specifies - * number of resources to return. If unspecified or set to 0, all resources - * will be returned. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. When requesting a 'page' of resources, `page_size` specifies - * number of resources to return. If unspecified or set to 0, all resources - * will be returned. - * - * 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. Token returned by previous call to - * `ListMembershipRBACRoleBindings` which specifies the position in the list - * from where to continue listing the resources. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. Token returned by previous call to - * `ListMembershipRBACRoleBindings` which specifies the position in the list - * from where to continue listing the resources. - * - * 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; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListMembershipRBACRoleBindingsResponse.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListMembershipRBACRoleBindingsResponse.php deleted file mode 100644 index d03fe6a7bf5d..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListMembershipRBACRoleBindingsResponse.php +++ /dev/null @@ -1,143 +0,0 @@ -google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsResponse - */ -class ListMembershipRBACRoleBindingsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of Membership RBACRoleBindings. - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1.RBACRoleBinding rbacrolebindings = 1; - */ - private $rbacrolebindings; - /** - * A token to request the next page of resources from the - * `ListMembershipRBACRoleBindings` method. The value of an empty string means - * that there are no more resources to return. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * List of locations that could not be reached while fetching this list. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\GkeHub\V1\RBACRoleBinding>|\Google\Protobuf\Internal\RepeatedField $rbacrolebindings - * The list of Membership RBACRoleBindings. - * @type string $next_page_token - * A token to request the next page of resources from the - * `ListMembershipRBACRoleBindings` method. The value of an empty string means - * that there are no more resources to return. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * List of locations that could not be reached while fetching this list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * The list of Membership RBACRoleBindings. - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1.RBACRoleBinding rbacrolebindings = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRbacrolebindings() - { - return $this->rbacrolebindings; - } - - /** - * The list of Membership RBACRoleBindings. - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1.RBACRoleBinding rbacrolebindings = 1; - * @param array<\Google\Cloud\GkeHub\V1\RBACRoleBinding>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRbacrolebindings($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\V1\RBACRoleBinding::class); - $this->rbacrolebindings = $arr; - - return $this; - } - - /** - * A token to request the next page of resources from the - * `ListMembershipRBACRoleBindings` method. The value of an empty string means - * that there are no more resources to return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token to request the next page of resources from the - * `ListMembershipRBACRoleBindings` method. The value of an empty string means - * that there are no more resources to return. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * List of locations that could not be reached while fetching this list. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * List of locations that could not be reached while fetching this list. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListMembershipsRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListMembershipsRequest.php deleted file mode 100644 index 4ae0d7ee4984..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListMembershipsRequest.php +++ /dev/null @@ -1,287 +0,0 @@ -google.cloud.gkehub.v1.ListMembershipsRequest - */ -class ListMembershipsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent (project and location) where the Memberships will be - * listed. Specified in the format `projects/*/locations/*`. - * `projects/*/locations/-` list memberships in all the regions. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. When requesting a 'page' of resources, `page_size` specifies - * number of resources to return. If unspecified or set to 0, all resources - * will be returned. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. Token returned by previous call to `ListMemberships` which - * specifies the position in the list from where to continue listing the - * resources. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. Lists Memberships that match the filter expression, following the - * syntax outlined in https://google.aip.dev/160. - * Examples: - * - Name is `bar` in project `foo-proj` and location `global`: - * name = "projects/foo-proj/locations/global/membership/bar" - * - Memberships that have a label called `foo`: - * labels.foo:* - * - Memberships that have a label called `foo` whose value is `bar`: - * labels.foo = bar - * - Memberships in the CREATING state: - * state = CREATING - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. One or more fields to compare and use to sort the output. - * See https://google.aip.dev/132#ordering. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The parent (project and location) where the Memberships will be - * listed. Specified in the format `projects/*/locations/*`. - * `projects/*/locations/-` list memberships in all the regions. Please see - * {@see GkeHubClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\GkeHub\V1\ListMembershipsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent (project and location) where the Memberships will be - * listed. Specified in the format `projects/*/locations/*`. - * `projects/*/locations/-` list memberships in all the regions. - * @type int $page_size - * Optional. When requesting a 'page' of resources, `page_size` specifies - * number of resources to return. If unspecified or set to 0, all resources - * will be returned. - * @type string $page_token - * Optional. Token returned by previous call to `ListMemberships` which - * specifies the position in the list from where to continue listing the - * resources. - * @type string $filter - * Optional. Lists Memberships that match the filter expression, following the - * syntax outlined in https://google.aip.dev/160. - * Examples: - * - Name is `bar` in project `foo-proj` and location `global`: - * name = "projects/foo-proj/locations/global/membership/bar" - * - Memberships that have a label called `foo`: - * labels.foo:* - * - Memberships that have a label called `foo` whose value is `bar`: - * labels.foo = bar - * - Memberships in the CREATING state: - * state = CREATING - * @type string $order_by - * Optional. One or more fields to compare and use to sort the output. - * See https://google.aip.dev/132#ordering. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent (project and location) where the Memberships will be - * listed. Specified in the format `projects/*/locations/*`. - * `projects/*/locations/-` list memberships in all the regions. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent (project and location) where the Memberships will be - * listed. Specified in the format `projects/*/locations/*`. - * `projects/*/locations/-` list memberships in all the regions. - * - * 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. When requesting a 'page' of resources, `page_size` specifies - * number of resources to return. If unspecified or set to 0, all resources - * will be returned. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. When requesting a 'page' of resources, `page_size` specifies - * number of resources to return. If unspecified or set to 0, all resources - * will be returned. - * - * 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. Token returned by previous call to `ListMemberships` which - * specifies the position in the list from where to continue listing the - * resources. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. Token returned by previous call to `ListMemberships` which - * specifies the position in the list from where to continue listing the - * resources. - * - * 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. Lists Memberships that match the filter expression, following the - * syntax outlined in https://google.aip.dev/160. - * Examples: - * - Name is `bar` in project `foo-proj` and location `global`: - * name = "projects/foo-proj/locations/global/membership/bar" - * - Memberships that have a label called `foo`: - * labels.foo:* - * - Memberships that have a label called `foo` whose value is `bar`: - * labels.foo = bar - * - Memberships in the CREATING state: - * state = CREATING - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Lists Memberships that match the filter expression, following the - * syntax outlined in https://google.aip.dev/160. - * Examples: - * - Name is `bar` in project `foo-proj` and location `global`: - * name = "projects/foo-proj/locations/global/membership/bar" - * - Memberships that have a label called `foo`: - * labels.foo:* - * - Memberships that have a label called `foo` whose value is `bar`: - * labels.foo = bar - * - Memberships in the CREATING state: - * state = CREATING - * - * 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. One or more fields to compare and use to sort the output. - * See https://google.aip.dev/132#ordering. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. One or more fields to compare and use to sort the output. - * See https://google.aip.dev/132#ordering. - * - * Generated from protobuf field string order_by = 5 [(.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/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListMembershipsResponse.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListMembershipsResponse.php deleted file mode 100644 index 401758bd06e4..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListMembershipsResponse.php +++ /dev/null @@ -1,143 +0,0 @@ -google.cloud.gkehub.v1.ListMembershipsResponse - */ -class ListMembershipsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of matching Memberships. - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1.Membership resources = 1; - */ - private $resources; - /** - * A token to request the next page of resources from the - * `ListMemberships` method. The value of an empty string means that - * there are no more resources to return. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * List of locations that could not be reached while fetching this list. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\GkeHub\V1\Membership>|\Google\Protobuf\Internal\RepeatedField $resources - * The list of matching Memberships. - * @type string $next_page_token - * A token to request the next page of resources from the - * `ListMemberships` method. The value of an empty string means that - * there are no more resources to return. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * List of locations that could not be reached while fetching this list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * The list of matching Memberships. - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1.Membership resources = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getResources() - { - return $this->resources; - } - - /** - * The list of matching Memberships. - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1.Membership resources = 1; - * @param array<\Google\Cloud\GkeHub\V1\Membership>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setResources($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\V1\Membership::class); - $this->resources = $arr; - - return $this; - } - - /** - * A token to request the next page of resources from the - * `ListMemberships` method. The value of an empty string means that - * there are no more resources to return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token to request the next page of resources from the - * `ListMemberships` method. The value of an empty string means that - * there are no more resources to return. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * List of locations that could not be reached while fetching this list. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * List of locations that could not be reached while fetching this list. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListPermittedScopesRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListPermittedScopesRequest.php deleted file mode 100644 index d9c4c66e32ed..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListPermittedScopesRequest.php +++ /dev/null @@ -1,170 +0,0 @@ -google.cloud.gkehub.v1.ListPermittedScopesRequest - */ -class ListPermittedScopesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent (project and location) where the Scope will be listed. - * Specified in the format `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. When requesting a 'page' of resources, `page_size` specifies - * number of resources to return. If unspecified or set to 0, all resources - * will be returned. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. Token returned by previous call to `ListPermittedScopes` which - * specifies the position in the list from where to continue listing the - * resources. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The parent (project and location) where the Scope will be listed. - * Specified in the format `projects/*/locations/*`. Please see - * {@see GkeHubClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\GkeHub\V1\ListPermittedScopesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent (project and location) where the Scope will be listed. - * Specified in the format `projects/*/locations/*`. - * @type int $page_size - * Optional. When requesting a 'page' of resources, `page_size` specifies - * number of resources to return. If unspecified or set to 0, all resources - * will be returned. - * @type string $page_token - * Optional. Token returned by previous call to `ListPermittedScopes` which - * specifies the position in the list from where to continue listing the - * resources. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent (project and location) where the Scope will be listed. - * Specified in the format `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent (project and location) where the Scope will be listed. - * Specified in the format `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. When requesting a 'page' of resources, `page_size` specifies - * number of resources to return. If unspecified or set to 0, all resources - * will be returned. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. When requesting a 'page' of resources, `page_size` specifies - * number of resources to return. If unspecified or set to 0, all resources - * will be returned. - * - * 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. Token returned by previous call to `ListPermittedScopes` which - * specifies the position in the list from where to continue listing the - * resources. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. Token returned by previous call to `ListPermittedScopes` which - * specifies the position in the list from where to continue listing the - * resources. - * - * 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; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListPermittedScopesResponse.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListPermittedScopesResponse.php deleted file mode 100644 index 2cc7053c4d7a..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListPermittedScopesResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.gkehub.v1.ListPermittedScopesResponse - */ -class ListPermittedScopesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of permitted Scopes - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1.Scope scopes = 1; - */ - private $scopes; - /** - * A token to request the next page of resources from the - * `ListPermittedScopes` method. The value of an empty string means - * that there are no more resources to return. - * - * 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\GkeHub\V1\Scope>|\Google\Protobuf\Internal\RepeatedField $scopes - * The list of permitted Scopes - * @type string $next_page_token - * A token to request the next page of resources from the - * `ListPermittedScopes` method. The value of an empty string means - * that there are no more resources to return. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * The list of permitted Scopes - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1.Scope scopes = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getScopes() - { - return $this->scopes; - } - - /** - * The list of permitted Scopes - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1.Scope scopes = 1; - * @param array<\Google\Cloud\GkeHub\V1\Scope>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setScopes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\V1\Scope::class); - $this->scopes = $arr; - - return $this; - } - - /** - * A token to request the next page of resources from the - * `ListPermittedScopes` method. The value of an empty string means - * that there are no more resources to return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token to request the next page of resources from the - * `ListPermittedScopes` method. The value of an empty string means - * that there are no more resources to return. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListScopeNamespacesRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListScopeNamespacesRequest.php deleted file mode 100644 index 78d6b756b883..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListScopeNamespacesRequest.php +++ /dev/null @@ -1,170 +0,0 @@ -google.cloud.gkehub.v1.ListScopeNamespacesRequest - */ -class ListScopeNamespacesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent (project and location) where the Features will be - * listed. Specified in the format `projects/*/locations/*/scopes/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. When requesting a 'page' of resources, `page_size` specifies - * number of resources to return. If unspecified or set to 0, all resources - * will be returned. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. Token returned by previous call to `ListFeatures` which - * specifies the position in the list from where to continue listing the - * resources. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The parent (project and location) where the Features will be - * listed. Specified in the format `projects/*/locations/*/scopes/*`. Please see - * {@see GkeHubClient::scopeName()} for help formatting this field. - * - * @return \Google\Cloud\GkeHub\V1\ListScopeNamespacesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent (project and location) where the Features will be - * listed. Specified in the format `projects/*/locations/*/scopes/*`. - * @type int $page_size - * Optional. When requesting a 'page' of resources, `page_size` specifies - * number of resources to return. If unspecified or set to 0, all resources - * will be returned. - * @type string $page_token - * Optional. Token returned by previous call to `ListFeatures` which - * specifies the position in the list from where to continue listing the - * resources. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent (project and location) where the Features will be - * listed. Specified in the format `projects/*/locations/*/scopes/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent (project and location) where the Features will be - * listed. Specified in the format `projects/*/locations/*/scopes/*`. - * - * 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. When requesting a 'page' of resources, `page_size` specifies - * number of resources to return. If unspecified or set to 0, all resources - * will be returned. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. When requesting a 'page' of resources, `page_size` specifies - * number of resources to return. If unspecified or set to 0, all resources - * will be returned. - * - * 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. Token returned by previous call to `ListFeatures` which - * specifies the position in the list from where to continue listing the - * resources. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. Token returned by previous call to `ListFeatures` which - * specifies the position in the list from where to continue listing the - * resources. - * - * 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; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListScopeNamespacesResponse.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListScopeNamespacesResponse.php deleted file mode 100644 index aa84bc4d604f..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListScopeNamespacesResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.gkehub.v1.ListScopeNamespacesResponse - */ -class ListScopeNamespacesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of fleet namespaces - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1.Namespace scope_namespaces = 1; - */ - private $scope_namespaces; - /** - * A token to request the next page of resources from the - * `ListNamespaces` method. The value of an empty string means - * that there are no more resources to return. - * - * 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\GkeHub\V1\PBNamespace>|\Google\Protobuf\Internal\RepeatedField $scope_namespaces - * The list of fleet namespaces - * @type string $next_page_token - * A token to request the next page of resources from the - * `ListNamespaces` method. The value of an empty string means - * that there are no more resources to return. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * The list of fleet namespaces - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1.Namespace scope_namespaces = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getScopeNamespaces() - { - return $this->scope_namespaces; - } - - /** - * The list of fleet namespaces - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1.Namespace scope_namespaces = 1; - * @param array<\Google\Cloud\GkeHub\V1\PBNamespace>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setScopeNamespaces($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\V1\PBNamespace::class); - $this->scope_namespaces = $arr; - - return $this; - } - - /** - * A token to request the next page of resources from the - * `ListNamespaces` method. The value of an empty string means - * that there are no more resources to return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token to request the next page of resources from the - * `ListNamespaces` method. The value of an empty string means - * that there are no more resources to return. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListScopeRBACRoleBindingsRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListScopeRBACRoleBindingsRequest.php deleted file mode 100644 index b6cb81f007f1..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListScopeRBACRoleBindingsRequest.php +++ /dev/null @@ -1,170 +0,0 @@ -google.cloud.gkehub.v1.ListScopeRBACRoleBindingsRequest - */ -class ListScopeRBACRoleBindingsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent (project and location) where the Features will be - * listed. Specified in the format `projects/*/locations/*/scopes/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. When requesting a 'page' of resources, `page_size` specifies - * number of resources to return. If unspecified or set to 0, all resources - * will be returned. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. Token returned by previous call to `ListScopeRBACRoleBindings` - * which specifies the position in the list from where to continue listing the - * resources. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The parent (project and location) where the Features will be - * listed. Specified in the format `projects/*/locations/*/scopes/*`. Please see - * {@see GkeHubClient::scopeName()} for help formatting this field. - * - * @return \Google\Cloud\GkeHub\V1\ListScopeRBACRoleBindingsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent (project and location) where the Features will be - * listed. Specified in the format `projects/*/locations/*/scopes/*`. - * @type int $page_size - * Optional. When requesting a 'page' of resources, `page_size` specifies - * number of resources to return. If unspecified or set to 0, all resources - * will be returned. - * @type string $page_token - * Optional. Token returned by previous call to `ListScopeRBACRoleBindings` - * which specifies the position in the list from where to continue listing the - * resources. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent (project and location) where the Features will be - * listed. Specified in the format `projects/*/locations/*/scopes/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent (project and location) where the Features will be - * listed. Specified in the format `projects/*/locations/*/scopes/*`. - * - * 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. When requesting a 'page' of resources, `page_size` specifies - * number of resources to return. If unspecified or set to 0, all resources - * will be returned. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. When requesting a 'page' of resources, `page_size` specifies - * number of resources to return. If unspecified or set to 0, all resources - * will be returned. - * - * 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. Token returned by previous call to `ListScopeRBACRoleBindings` - * which specifies the position in the list from where to continue listing the - * resources. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. Token returned by previous call to `ListScopeRBACRoleBindings` - * which specifies the position in the list from where to continue listing the - * resources. - * - * 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; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListScopeRBACRoleBindingsResponse.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListScopeRBACRoleBindingsResponse.php deleted file mode 100644 index efe78b890344..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListScopeRBACRoleBindingsResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.gkehub.v1.ListScopeRBACRoleBindingsResponse - */ -class ListScopeRBACRoleBindingsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of Scope RBACRoleBindings. - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1.RBACRoleBinding rbacrolebindings = 1; - */ - private $rbacrolebindings; - /** - * A token to request the next page of resources from the - * `ListScopeRBACRoleBindings` method. The value of an empty string means - * that there are no more resources to return. - * - * 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\GkeHub\V1\RBACRoleBinding>|\Google\Protobuf\Internal\RepeatedField $rbacrolebindings - * The list of Scope RBACRoleBindings. - * @type string $next_page_token - * A token to request the next page of resources from the - * `ListScopeRBACRoleBindings` method. The value of an empty string means - * that there are no more resources to return. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * The list of Scope RBACRoleBindings. - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1.RBACRoleBinding rbacrolebindings = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRbacrolebindings() - { - return $this->rbacrolebindings; - } - - /** - * The list of Scope RBACRoleBindings. - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1.RBACRoleBinding rbacrolebindings = 1; - * @param array<\Google\Cloud\GkeHub\V1\RBACRoleBinding>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRbacrolebindings($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\V1\RBACRoleBinding::class); - $this->rbacrolebindings = $arr; - - return $this; - } - - /** - * A token to request the next page of resources from the - * `ListScopeRBACRoleBindings` method. The value of an empty string means - * that there are no more resources to return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token to request the next page of resources from the - * `ListScopeRBACRoleBindings` method. The value of an empty string means - * that there are no more resources to return. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListScopesRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListScopesRequest.php deleted file mode 100644 index 62786ed385c1..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListScopesRequest.php +++ /dev/null @@ -1,170 +0,0 @@ -google.cloud.gkehub.v1.ListScopesRequest - */ -class ListScopesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent (project and location) where the Scope will be listed. - * Specified in the format `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. When requesting a 'page' of resources, `page_size` specifies - * number of resources to return. If unspecified or set to 0, all resources - * will be returned. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. Token returned by previous call to `ListScopes` which - * specifies the position in the list from where to continue listing the - * resources. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The parent (project and location) where the Scope will be listed. - * Specified in the format `projects/*/locations/*`. Please see - * {@see GkeHubClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\GkeHub\V1\ListScopesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent (project and location) where the Scope will be listed. - * Specified in the format `projects/*/locations/*`. - * @type int $page_size - * Optional. When requesting a 'page' of resources, `page_size` specifies - * number of resources to return. If unspecified or set to 0, all resources - * will be returned. - * @type string $page_token - * Optional. Token returned by previous call to `ListScopes` which - * specifies the position in the list from where to continue listing the - * resources. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent (project and location) where the Scope will be listed. - * Specified in the format `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent (project and location) where the Scope will be listed. - * Specified in the format `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. When requesting a 'page' of resources, `page_size` specifies - * number of resources to return. If unspecified or set to 0, all resources - * will be returned. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. When requesting a 'page' of resources, `page_size` specifies - * number of resources to return. If unspecified or set to 0, all resources - * will be returned. - * - * 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. Token returned by previous call to `ListScopes` which - * specifies the position in the list from where to continue listing the - * resources. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. Token returned by previous call to `ListScopes` which - * specifies the position in the list from where to continue listing the - * resources. - * - * 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; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListScopesResponse.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListScopesResponse.php deleted file mode 100644 index 11f51612af64..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ListScopesResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.gkehub.v1.ListScopesResponse - */ -class ListScopesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of Scopes - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1.Scope scopes = 1; - */ - private $scopes; - /** - * A token to request the next page of resources from the - * `ListScopes` method. The value of an empty string means - * that there are no more resources to return. - * - * 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\GkeHub\V1\Scope>|\Google\Protobuf\Internal\RepeatedField $scopes - * The list of Scopes - * @type string $next_page_token - * A token to request the next page of resources from the - * `ListScopes` method. The value of an empty string means - * that there are no more resources to return. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * The list of Scopes - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1.Scope scopes = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getScopes() - { - return $this->scopes; - } - - /** - * The list of Scopes - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1.Scope scopes = 1; - * @param array<\Google\Cloud\GkeHub\V1\Scope>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setScopes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\V1\Scope::class); - $this->scopes = $arr; - - return $this; - } - - /** - * A token to request the next page of resources from the - * `ListScopes` method. The value of an empty string means - * that there are no more resources to return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token to request the next page of resources from the - * `ListScopes` method. The value of an empty string means - * that there are no more resources to return. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/Membership.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/Membership.php deleted file mode 100644 index 38ddfe562907..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/Membership.php +++ /dev/null @@ -1,641 +0,0 @@ -google.cloud.gkehub.v1.Membership - */ -class Membership extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The full, unique name of this Membership resource in the - * format `projects/*/locations/*/memberships/{membership_id}`, set during - * creation. - * `membership_id` must be a valid RFC 1123 compliant DNS label: - * 1. At most 63 characters in length - * 2. It must consist of lower case alphanumeric characters or `-` - * 3. It must start and end with an alphanumeric character - * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - * with a maximum length of 63 characters. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Optional. Labels for this membership. - * - * Generated from protobuf field map labels = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Output only. Description of this membership, limited to 63 characters. - * Must match the regex: `[a-zA-Z0-9][a-zA-Z0-9_\-\.\ ]*` - * This field is present for legacy purposes. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $description = ''; - /** - * Output only. State of the Membership resource. - * - * Generated from protobuf field .google.cloud.gkehub.v1.MembershipState state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = null; - /** - * Output only. When the Membership was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. When the Membership was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. When the Membership was deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $delete_time = null; - /** - * Optional. An externally-generated and managed ID for this Membership. This - * ID may be modified after creation, but this is not recommended. - * The ID must match the regex: `[a-zA-Z0-9][a-zA-Z0-9_\-\.]*` - * If this Membership represents a Kubernetes cluster, this value should be - * set to the UID of the `kube-system` namespace object. - * - * Generated from protobuf field string external_id = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $external_id = ''; - /** - * Output only. For clusters using Connect, the timestamp of the most recent - * connection established with Google Cloud. This time is updated every - * several minutes, not continuously. For clusters that do not use GKE - * Connect, or that have never connected successfully, this field will be - * unset. - * - * Generated from protobuf field .google.protobuf.Timestamp last_connection_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $last_connection_time = null; - /** - * Output only. Google-generated UUID for this resource. This is unique across - * all Membership resources. If a Membership resource is deleted and another - * resource with the same name is created, it gets a different unique_id. - * - * Generated from protobuf field string unique_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $unique_id = ''; - /** - * Optional. How to identify workloads from this Membership. - * See the documentation on Workload Identity for more details: - * https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity - * - * Generated from protobuf field .google.cloud.gkehub.v1.Authority authority = 12 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $authority = null; - /** - * Optional. The monitoring config information for this membership. - * - * Generated from protobuf field .google.cloud.gkehub.v1.MonitoringConfig monitoring_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $monitoring_config = null; - protected $type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GkeHub\V1\MembershipEndpoint $endpoint - * Optional. Endpoint information to reach this member. - * @type string $name - * Output only. The full, unique name of this Membership resource in the - * format `projects/*/locations/*/memberships/{membership_id}`, set during - * creation. - * `membership_id` must be a valid RFC 1123 compliant DNS label: - * 1. At most 63 characters in length - * 2. It must consist of lower case alphanumeric characters or `-` - * 3. It must start and end with an alphanumeric character - * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - * with a maximum length of 63 characters. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. Labels for this membership. - * @type string $description - * Output only. Description of this membership, limited to 63 characters. - * Must match the regex: `[a-zA-Z0-9][a-zA-Z0-9_\-\.\ ]*` - * This field is present for legacy purposes. - * @type \Google\Cloud\GkeHub\V1\MembershipState $state - * Output only. State of the Membership resource. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. When the Membership was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. When the Membership was last updated. - * @type \Google\Protobuf\Timestamp $delete_time - * Output only. When the Membership was deleted. - * @type string $external_id - * Optional. An externally-generated and managed ID for this Membership. This - * ID may be modified after creation, but this is not recommended. - * The ID must match the regex: `[a-zA-Z0-9][a-zA-Z0-9_\-\.]*` - * If this Membership represents a Kubernetes cluster, this value should be - * set to the UID of the `kube-system` namespace object. - * @type \Google\Protobuf\Timestamp $last_connection_time - * Output only. For clusters using Connect, the timestamp of the most recent - * connection established with Google Cloud. This time is updated every - * several minutes, not continuously. For clusters that do not use GKE - * Connect, or that have never connected successfully, this field will be - * unset. - * @type string $unique_id - * Output only. Google-generated UUID for this resource. This is unique across - * all Membership resources. If a Membership resource is deleted and another - * resource with the same name is created, it gets a different unique_id. - * @type \Google\Cloud\GkeHub\V1\Authority $authority - * Optional. How to identify workloads from this Membership. - * See the documentation on Workload Identity for more details: - * https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity - * @type \Google\Cloud\GkeHub\V1\MonitoringConfig $monitoring_config - * Optional. The monitoring config information for this membership. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Membership::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Endpoint information to reach this member. - * - * Generated from protobuf field .google.cloud.gkehub.v1.MembershipEndpoint endpoint = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeHub\V1\MembershipEndpoint|null - */ - public function getEndpoint() - { - return $this->readOneof(4); - } - - public function hasEndpoint() - { - return $this->hasOneof(4); - } - - /** - * Optional. Endpoint information to reach this member. - * - * Generated from protobuf field .google.cloud.gkehub.v1.MembershipEndpoint endpoint = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeHub\V1\MembershipEndpoint $var - * @return $this - */ - public function setEndpoint($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\MembershipEndpoint::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Output only. The full, unique name of this Membership resource in the - * format `projects/*/locations/*/memberships/{membership_id}`, set during - * creation. - * `membership_id` must be a valid RFC 1123 compliant DNS label: - * 1. At most 63 characters in length - * 2. It must consist of lower case alphanumeric characters or `-` - * 3. It must start and end with an alphanumeric character - * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - * with a maximum length of 63 characters. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The full, unique name of this Membership resource in the - * format `projects/*/locations/*/memberships/{membership_id}`, set during - * creation. - * `membership_id` must be a valid RFC 1123 compliant DNS label: - * 1. At most 63 characters in length - * 2. It must consist of lower case alphanumeric characters or `-` - * 3. It must start and end with an alphanumeric character - * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - * with a maximum length of 63 characters. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. Labels for this membership. - * - * Generated from protobuf field map labels = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. Labels for this membership. - * - * 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. Description of this membership, limited to 63 characters. - * Must match the regex: `[a-zA-Z0-9][a-zA-Z0-9_\-\.\ ]*` - * This field is present for legacy purposes. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Output only. Description of this membership, limited to 63 characters. - * Must match the regex: `[a-zA-Z0-9][a-zA-Z0-9_\-\.\ ]*` - * This field is present for legacy purposes. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. State of the Membership resource. - * - * Generated from protobuf field .google.cloud.gkehub.v1.MembershipState state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\GkeHub\V1\MembershipState|null - */ - public function getState() - { - return $this->state; - } - - public function hasState() - { - return isset($this->state); - } - - public function clearState() - { - unset($this->state); - } - - /** - * Output only. State of the Membership resource. - * - * Generated from protobuf field .google.cloud.gkehub.v1.MembershipState state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\GkeHub\V1\MembershipState $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\MembershipState::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. When the Membership was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. When the Membership was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. When the Membership was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. When the Membership was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Output only. When the Membership was deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getDeleteTime() - { - return $this->delete_time; - } - - public function hasDeleteTime() - { - return isset($this->delete_time); - } - - public function clearDeleteTime() - { - unset($this->delete_time); - } - - /** - * Output only. When the Membership was deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setDeleteTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->delete_time = $var; - - return $this; - } - - /** - * Optional. An externally-generated and managed ID for this Membership. This - * ID may be modified after creation, but this is not recommended. - * The ID must match the regex: `[a-zA-Z0-9][a-zA-Z0-9_\-\.]*` - * If this Membership represents a Kubernetes cluster, this value should be - * set to the UID of the `kube-system` namespace object. - * - * Generated from protobuf field string external_id = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getExternalId() - { - return $this->external_id; - } - - /** - * Optional. An externally-generated and managed ID for this Membership. This - * ID may be modified after creation, but this is not recommended. - * The ID must match the regex: `[a-zA-Z0-9][a-zA-Z0-9_\-\.]*` - * If this Membership represents a Kubernetes cluster, this value should be - * set to the UID of the `kube-system` namespace object. - * - * Generated from protobuf field string external_id = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setExternalId($var) - { - GPBUtil::checkString($var, True); - $this->external_id = $var; - - return $this; - } - - /** - * Output only. For clusters using Connect, the timestamp of the most recent - * connection established with Google Cloud. This time is updated every - * several minutes, not continuously. For clusters that do not use GKE - * Connect, or that have never connected successfully, this field will be - * unset. - * - * Generated from protobuf field .google.protobuf.Timestamp last_connection_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLastConnectionTime() - { - return $this->last_connection_time; - } - - public function hasLastConnectionTime() - { - return isset($this->last_connection_time); - } - - public function clearLastConnectionTime() - { - unset($this->last_connection_time); - } - - /** - * Output only. For clusters using Connect, the timestamp of the most recent - * connection established with Google Cloud. This time is updated every - * several minutes, not continuously. For clusters that do not use GKE - * Connect, or that have never connected successfully, this field will be - * unset. - * - * Generated from protobuf field .google.protobuf.Timestamp last_connection_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLastConnectionTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->last_connection_time = $var; - - return $this; - } - - /** - * Output only. Google-generated UUID for this resource. This is unique across - * all Membership resources. If a Membership resource is deleted and another - * resource with the same name is created, it gets a different unique_id. - * - * Generated from protobuf field string unique_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUniqueId() - { - return $this->unique_id; - } - - /** - * Output only. Google-generated UUID for this resource. This is unique across - * all Membership resources. If a Membership resource is deleted and another - * resource with the same name is created, it gets a different unique_id. - * - * Generated from protobuf field string unique_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUniqueId($var) - { - GPBUtil::checkString($var, True); - $this->unique_id = $var; - - return $this; - } - - /** - * Optional. How to identify workloads from this Membership. - * See the documentation on Workload Identity for more details: - * https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity - * - * Generated from protobuf field .google.cloud.gkehub.v1.Authority authority = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeHub\V1\Authority|null - */ - public function getAuthority() - { - return $this->authority; - } - - public function hasAuthority() - { - return isset($this->authority); - } - - public function clearAuthority() - { - unset($this->authority); - } - - /** - * Optional. How to identify workloads from this Membership. - * See the documentation on Workload Identity for more details: - * https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity - * - * Generated from protobuf field .google.cloud.gkehub.v1.Authority authority = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeHub\V1\Authority $var - * @return $this - */ - public function setAuthority($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\Authority::class); - $this->authority = $var; - - return $this; - } - - /** - * Optional. The monitoring config information for this membership. - * - * Generated from protobuf field .google.cloud.gkehub.v1.MonitoringConfig monitoring_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeHub\V1\MonitoringConfig|null - */ - public function getMonitoringConfig() - { - return $this->monitoring_config; - } - - public function hasMonitoringConfig() - { - return isset($this->monitoring_config); - } - - public function clearMonitoringConfig() - { - unset($this->monitoring_config); - } - - /** - * Optional. The monitoring config information for this membership. - * - * Generated from protobuf field .google.cloud.gkehub.v1.MonitoringConfig monitoring_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeHub\V1\MonitoringConfig $var - * @return $this - */ - public function setMonitoringConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\MonitoringConfig::class); - $this->monitoring_config = $var; - - return $this; - } - - /** - * @return string - */ - public function getType() - { - return $this->whichOneof("type"); - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipBinding.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipBinding.php deleted file mode 100644 index b845df157a71..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipBinding.php +++ /dev/null @@ -1,374 +0,0 @@ -google.cloud.gkehub.v1.MembershipBinding - */ -class MembershipBinding extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name for the membershipbinding itself - * `projects/{project}/locations/{location}/memberships/{membership}/bindings/{membershipbinding}` - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Output only. Google-generated UUID for this resource. This is unique across - * all membershipbinding resources. If a membershipbinding resource is deleted - * and another resource with the same name is created, it gets a different - * uid. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. When the membership binding was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. When the membership binding was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. When the membership binding was deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $delete_time = null; - /** - * Output only. State of the membership binding resource. - * - * Generated from protobuf field .google.cloud.gkehub.v1.MembershipBindingLifecycleState state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = null; - /** - * Optional. Labels for this MembershipBinding. - * - * Generated from protobuf field map labels = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - protected $target; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $scope - * A Scope resource name in the format - * `projects/*/locations/*/scopes/*`. - * @type string $name - * The resource name for the membershipbinding itself - * `projects/{project}/locations/{location}/memberships/{membership}/bindings/{membershipbinding}` - * @type string $uid - * Output only. Google-generated UUID for this resource. This is unique across - * all membershipbinding resources. If a membershipbinding resource is deleted - * and another resource with the same name is created, it gets a different - * uid. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. When the membership binding was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. When the membership binding was last updated. - * @type \Google\Protobuf\Timestamp $delete_time - * Output only. When the membership binding was deleted. - * @type \Google\Cloud\GkeHub\V1\MembershipBindingLifecycleState $state - * Output only. State of the membership binding resource. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. Labels for this MembershipBinding. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Fleet::initOnce(); - parent::__construct($data); - } - - /** - * A Scope resource name in the format - * `projects/*/locations/*/scopes/*`. - * - * Generated from protobuf field string scope = 3 [(.google.api.resource_reference) = { - * @return string - */ - public function getScope() - { - return $this->readOneof(3); - } - - public function hasScope() - { - return $this->hasOneof(3); - } - - /** - * A Scope resource name in the format - * `projects/*/locations/*/scopes/*`. - * - * Generated from protobuf field string scope = 3 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setScope($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * The resource name for the membershipbinding itself - * `projects/{project}/locations/{location}/memberships/{membership}/bindings/{membershipbinding}` - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name for the membershipbinding itself - * `projects/{project}/locations/{location}/memberships/{membership}/bindings/{membershipbinding}` - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. Google-generated UUID for this resource. This is unique across - * all membershipbinding resources. If a membershipbinding resource is deleted - * and another resource with the same name is created, it gets a different - * uid. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. Google-generated UUID for this resource. This is unique across - * all membershipbinding resources. If a membershipbinding resource is deleted - * and another resource with the same name is created, it gets a different - * uid. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Output only. When the membership binding was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. When the membership binding was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. When the membership binding was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. When the membership binding was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Output only. When the membership binding was deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getDeleteTime() - { - return $this->delete_time; - } - - public function hasDeleteTime() - { - return isset($this->delete_time); - } - - public function clearDeleteTime() - { - unset($this->delete_time); - } - - /** - * Output only. When the membership binding was deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setDeleteTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->delete_time = $var; - - return $this; - } - - /** - * Output only. State of the membership binding resource. - * - * Generated from protobuf field .google.cloud.gkehub.v1.MembershipBindingLifecycleState state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\GkeHub\V1\MembershipBindingLifecycleState|null - */ - public function getState() - { - return $this->state; - } - - public function hasState() - { - return isset($this->state); - } - - public function clearState() - { - unset($this->state); - } - - /** - * Output only. State of the membership binding resource. - * - * Generated from protobuf field .google.cloud.gkehub.v1.MembershipBindingLifecycleState state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\GkeHub\V1\MembershipBindingLifecycleState $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\MembershipBindingLifecycleState::class); - $this->state = $var; - - return $this; - } - - /** - * Optional. Labels for this MembershipBinding. - * - * Generated from protobuf field map labels = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. Labels for this MembershipBinding. - * - * Generated from protobuf field map labels = 9 [(.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; - } - - /** - * @return string - */ - public function getTarget() - { - return $this->whichOneof("target"); - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipBindingLifecycleState.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipBindingLifecycleState.php deleted file mode 100644 index 268a32dfd8bf..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipBindingLifecycleState.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.gkehub.v1.MembershipBindingLifecycleState - */ -class MembershipBindingLifecycleState extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The current state of the MembershipBinding resource. - * - * Generated from protobuf field .google.cloud.gkehub.v1.MembershipBindingLifecycleState.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $code = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $code - * Output only. The current state of the MembershipBinding resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Fleet::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The current state of the MembershipBinding resource. - * - * Generated from protobuf field .google.cloud.gkehub.v1.MembershipBindingLifecycleState.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getCode() - { - return $this->code; - } - - /** - * Output only. The current state of the MembershipBinding resource. - * - * Generated from protobuf field .google.cloud.gkehub.v1.MembershipBindingLifecycleState.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setCode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\V1\MembershipBindingLifecycleState\Code::class); - $this->code = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipBindingLifecycleState/Code.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipBindingLifecycleState/Code.php deleted file mode 100644 index 7fae8caaf4fa..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipBindingLifecycleState/Code.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.gkehub.v1.MembershipBindingLifecycleState.Code - */ -class Code -{ - /** - * The code is not set. - * - * Generated from protobuf enum CODE_UNSPECIFIED = 0; - */ - const CODE_UNSPECIFIED = 0; - /** - * The membershipbinding is being created. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * The membershipbinding active. - * - * Generated from protobuf enum READY = 2; - */ - const READY = 2; - /** - * The membershipbinding is being deleted. - * - * Generated from protobuf enum DELETING = 3; - */ - const DELETING = 3; - /** - * The membershipbinding is being updated. - * - * Generated from protobuf enum UPDATING = 4; - */ - const UPDATING = 4; - - private static $valueToName = [ - self::CODE_UNSPECIFIED => 'CODE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::READY => 'READY', - self::DELETING => 'DELETING', - self::UPDATING => 'UPDATING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Code::class, \Google\Cloud\GkeHub\V1\MembershipBindingLifecycleState_Code::class); - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipEndpoint.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipEndpoint.php deleted file mode 100644 index 6558053fe879..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipEndpoint.php +++ /dev/null @@ -1,228 +0,0 @@ -google.cloud.gkehub.v1.MembershipEndpoint - */ -class MembershipEndpoint extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. GKE-specific information. Only present if this Membership is a GKE cluster. - * - * Generated from protobuf field .google.cloud.gkehub.v1.GkeCluster gke_cluster = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $gke_cluster = null; - /** - * Output only. Useful Kubernetes-specific metadata. - * - * Generated from protobuf field .google.cloud.gkehub.v1.KubernetesMetadata kubernetes_metadata = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $kubernetes_metadata = null; - /** - * Optional. The in-cluster Kubernetes Resources that should be applied for a - * correctly registered cluster, in the steady state. These resources: - * * Ensure that the cluster is exclusively registered to one and only one - * Hub Membership. - * * Propagate Workload Pool Information available in the Membership - * Authority field. - * * Ensure proper initial configuration of default Hub Features. - * - * Generated from protobuf field .google.cloud.gkehub.v1.KubernetesResource kubernetes_resource = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $kubernetes_resource = null; - /** - * Output only. Whether the lifecycle of this membership is managed by a - * google cluster platform service. - * - * Generated from protobuf field bool google_managed = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $google_managed = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GkeHub\V1\GkeCluster $gke_cluster - * Optional. GKE-specific information. Only present if this Membership is a GKE cluster. - * @type \Google\Cloud\GkeHub\V1\KubernetesMetadata $kubernetes_metadata - * Output only. Useful Kubernetes-specific metadata. - * @type \Google\Cloud\GkeHub\V1\KubernetesResource $kubernetes_resource - * Optional. The in-cluster Kubernetes Resources that should be applied for a - * correctly registered cluster, in the steady state. These resources: - * * Ensure that the cluster is exclusively registered to one and only one - * Hub Membership. - * * Propagate Workload Pool Information available in the Membership - * Authority field. - * * Ensure proper initial configuration of default Hub Features. - * @type bool $google_managed - * Output only. Whether the lifecycle of this membership is managed by a - * google cluster platform service. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Membership::initOnce(); - parent::__construct($data); - } - - /** - * Optional. GKE-specific information. Only present if this Membership is a GKE cluster. - * - * Generated from protobuf field .google.cloud.gkehub.v1.GkeCluster gke_cluster = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeHub\V1\GkeCluster|null - */ - public function getGkeCluster() - { - return $this->gke_cluster; - } - - public function hasGkeCluster() - { - return isset($this->gke_cluster); - } - - public function clearGkeCluster() - { - unset($this->gke_cluster); - } - - /** - * Optional. GKE-specific information. Only present if this Membership is a GKE cluster. - * - * Generated from protobuf field .google.cloud.gkehub.v1.GkeCluster gke_cluster = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeHub\V1\GkeCluster $var - * @return $this - */ - public function setGkeCluster($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\GkeCluster::class); - $this->gke_cluster = $var; - - return $this; - } - - /** - * Output only. Useful Kubernetes-specific metadata. - * - * Generated from protobuf field .google.cloud.gkehub.v1.KubernetesMetadata kubernetes_metadata = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\GkeHub\V1\KubernetesMetadata|null - */ - public function getKubernetesMetadata() - { - return $this->kubernetes_metadata; - } - - public function hasKubernetesMetadata() - { - return isset($this->kubernetes_metadata); - } - - public function clearKubernetesMetadata() - { - unset($this->kubernetes_metadata); - } - - /** - * Output only. Useful Kubernetes-specific metadata. - * - * Generated from protobuf field .google.cloud.gkehub.v1.KubernetesMetadata kubernetes_metadata = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\GkeHub\V1\KubernetesMetadata $var - * @return $this - */ - public function setKubernetesMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\KubernetesMetadata::class); - $this->kubernetes_metadata = $var; - - return $this; - } - - /** - * Optional. The in-cluster Kubernetes Resources that should be applied for a - * correctly registered cluster, in the steady state. These resources: - * * Ensure that the cluster is exclusively registered to one and only one - * Hub Membership. - * * Propagate Workload Pool Information available in the Membership - * Authority field. - * * Ensure proper initial configuration of default Hub Features. - * - * Generated from protobuf field .google.cloud.gkehub.v1.KubernetesResource kubernetes_resource = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeHub\V1\KubernetesResource|null - */ - public function getKubernetesResource() - { - return $this->kubernetes_resource; - } - - public function hasKubernetesResource() - { - return isset($this->kubernetes_resource); - } - - public function clearKubernetesResource() - { - unset($this->kubernetes_resource); - } - - /** - * Optional. The in-cluster Kubernetes Resources that should be applied for a - * correctly registered cluster, in the steady state. These resources: - * * Ensure that the cluster is exclusively registered to one and only one - * Hub Membership. - * * Propagate Workload Pool Information available in the Membership - * Authority field. - * * Ensure proper initial configuration of default Hub Features. - * - * Generated from protobuf field .google.cloud.gkehub.v1.KubernetesResource kubernetes_resource = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeHub\V1\KubernetesResource $var - * @return $this - */ - public function setKubernetesResource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\KubernetesResource::class); - $this->kubernetes_resource = $var; - - return $this; - } - - /** - * Output only. Whether the lifecycle of this membership is managed by a - * google cluster platform service. - * - * Generated from protobuf field bool google_managed = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getGoogleManaged() - { - return $this->google_managed; - } - - /** - * Output only. Whether the lifecycle of this membership is managed by a - * google cluster platform service. - * - * Generated from protobuf field bool google_managed = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setGoogleManaged($var) - { - GPBUtil::checkBool($var); - $this->google_managed = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipFeatureSpec.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipFeatureSpec.php deleted file mode 100644 index cbb126324b89..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipFeatureSpec.php +++ /dev/null @@ -1,76 +0,0 @@ -google.cloud.gkehub.v1.MembershipFeatureSpec - */ -class MembershipFeatureSpec extends \Google\Protobuf\Internal\Message -{ - protected $feature_spec; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GkeHub\ConfigManagement\V1\MembershipSpec $configmanagement - * Config Management-specific spec. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Feature::initOnce(); - parent::__construct($data); - } - - /** - * Config Management-specific spec. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.MembershipSpec configmanagement = 106; - * @return \Google\Cloud\GkeHub\ConfigManagement\V1\MembershipSpec|null - */ - public function getConfigmanagement() - { - return $this->readOneof(106); - } - - public function hasConfigmanagement() - { - return $this->hasOneof(106); - } - - /** - * Config Management-specific spec. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.MembershipSpec configmanagement = 106; - * @param \Google\Cloud\GkeHub\ConfigManagement\V1\MembershipSpec $var - * @return $this - */ - public function setConfigmanagement($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\ConfigManagement\V1\MembershipSpec::class); - $this->writeOneof(106, $var); - - return $this; - } - - /** - * @return string - */ - public function getFeatureSpec() - { - return $this->whichOneof("feature_spec"); - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipFeatureState.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipFeatureState.php deleted file mode 100644 index cdbc23edb08a..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipFeatureState.php +++ /dev/null @@ -1,120 +0,0 @@ -google.cloud.gkehub.v1.MembershipFeatureState - */ -class MembershipFeatureState extends \Google\Protobuf\Internal\Message -{ - /** - * The high-level state of this Feature for a single membership. - * - * Generated from protobuf field .google.cloud.gkehub.v1.FeatureState state = 1; - */ - protected $state = null; - protected $feature_state; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GkeHub\ConfigManagement\V1\MembershipState $configmanagement - * Config Management-specific state. - * @type \Google\Cloud\GkeHub\V1\FeatureState $state - * The high-level state of this Feature for a single membership. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Feature::initOnce(); - parent::__construct($data); - } - - /** - * Config Management-specific state. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.MembershipState configmanagement = 106; - * @return \Google\Cloud\GkeHub\ConfigManagement\V1\MembershipState|null - */ - public function getConfigmanagement() - { - return $this->readOneof(106); - } - - public function hasConfigmanagement() - { - return $this->hasOneof(106); - } - - /** - * Config Management-specific state. - * - * Generated from protobuf field .google.cloud.gkehub.configmanagement.v1.MembershipState configmanagement = 106; - * @param \Google\Cloud\GkeHub\ConfigManagement\V1\MembershipState $var - * @return $this - */ - public function setConfigmanagement($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\ConfigManagement\V1\MembershipState::class); - $this->writeOneof(106, $var); - - return $this; - } - - /** - * The high-level state of this Feature for a single membership. - * - * Generated from protobuf field .google.cloud.gkehub.v1.FeatureState state = 1; - * @return \Google\Cloud\GkeHub\V1\FeatureState|null - */ - public function getState() - { - return $this->state; - } - - public function hasState() - { - return isset($this->state); - } - - public function clearState() - { - unset($this->state); - } - - /** - * The high-level state of this Feature for a single membership. - * - * Generated from protobuf field .google.cloud.gkehub.v1.FeatureState state = 1; - * @param \Google\Cloud\GkeHub\V1\FeatureState $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\FeatureState::class); - $this->state = $var; - - return $this; - } - - /** - * @return string - */ - public function getFeatureState() - { - return $this->whichOneof("feature_state"); - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipState.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipState.php deleted file mode 100644 index c46968fcb0e0..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipState.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.gkehub.v1.MembershipState - */ -class MembershipState extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The current state of the Membership resource. - * - * Generated from protobuf field .google.cloud.gkehub.v1.MembershipState.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $code = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $code - * Output only. The current state of the Membership resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Membership::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The current state of the Membership resource. - * - * Generated from protobuf field .google.cloud.gkehub.v1.MembershipState.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getCode() - { - return $this->code; - } - - /** - * Output only. The current state of the Membership resource. - * - * Generated from protobuf field .google.cloud.gkehub.v1.MembershipState.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setCode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\V1\MembershipState\Code::class); - $this->code = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipState/Code.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipState/Code.php deleted file mode 100644 index 7c40449feacd..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MembershipState/Code.php +++ /dev/null @@ -1,85 +0,0 @@ -google.cloud.gkehub.v1.MembershipState.Code - */ -class Code -{ - /** - * The code is not set. - * - * Generated from protobuf enum CODE_UNSPECIFIED = 0; - */ - const CODE_UNSPECIFIED = 0; - /** - * The cluster is being registered. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * The cluster is registered. - * - * Generated from protobuf enum READY = 2; - */ - const READY = 2; - /** - * The cluster is being unregistered. - * - * Generated from protobuf enum DELETING = 3; - */ - const DELETING = 3; - /** - * The Membership is being updated. - * - * Generated from protobuf enum UPDATING = 4; - */ - const UPDATING = 4; - /** - * The Membership is being updated by the Hub Service. - * - * Generated from protobuf enum SERVICE_UPDATING = 5; - */ - const SERVICE_UPDATING = 5; - - private static $valueToName = [ - self::CODE_UNSPECIFIED => 'CODE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::READY => 'READY', - self::DELETING => 'DELETING', - self::UPDATING => 'UPDATING', - self::SERVICE_UPDATING => 'SERVICE_UPDATING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Code::class, \Google\Cloud\GkeHub\V1\MembershipState_Code::class); - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MonitoringConfig.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MonitoringConfig.php deleted file mode 100644 index 94b7778b1b70..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/MonitoringConfig.php +++ /dev/null @@ -1,244 +0,0 @@ -google.cloud.gkehub.v1.MonitoringConfig - */ -class MonitoringConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Immutable. Project used to report Metrics - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $project_id = ''; - /** - * Immutable. Location used to report Metrics - * - * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $location = ''; - /** - * Immutable. Cluster name used to report metrics. - * For Anthos on VMWare/Baremetal, it would be in format - * `memberClusters/cluster_name`; And for Anthos on MultiCloud, it would be in - * format - * `{azureClusters, awsClusters}/cluster_name`. - * - * Generated from protobuf field string cluster = 3 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $cluster = ''; - /** - * Kubernetes system metrics, if available, are written to this prefix. - * This defaults to kubernetes.io for GKE, and kubernetes.io/anthos for Anthos - * eventually. Noted: Anthos MultiCloud will have kubernetes.io prefix today - * but will migration to be under kubernetes.io/anthos - * - * Generated from protobuf field string kubernetes_metrics_prefix = 4; - */ - protected $kubernetes_metrics_prefix = ''; - /** - * Immutable. Cluster hash, this is a unique string generated by google code, - * which does not contain any PII, which we can use to reference the cluster. - * This is expected to be created by the monitoring stack and persisted into - * the Cluster object as well as to GKE-Hub. - * - * Generated from protobuf field string cluster_hash = 5 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $cluster_hash = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $project_id - * Immutable. Project used to report Metrics - * @type string $location - * Immutable. Location used to report Metrics - * @type string $cluster - * Immutable. Cluster name used to report metrics. - * For Anthos on VMWare/Baremetal, it would be in format - * `memberClusters/cluster_name`; And for Anthos on MultiCloud, it would be in - * format - * `{azureClusters, awsClusters}/cluster_name`. - * @type string $kubernetes_metrics_prefix - * Kubernetes system metrics, if available, are written to this prefix. - * This defaults to kubernetes.io for GKE, and kubernetes.io/anthos for Anthos - * eventually. Noted: Anthos MultiCloud will have kubernetes.io prefix today - * but will migration to be under kubernetes.io/anthos - * @type string $cluster_hash - * Immutable. Cluster hash, this is a unique string generated by google code, - * which does not contain any PII, which we can use to reference the cluster. - * This is expected to be created by the monitoring stack and persisted into - * the Cluster object as well as to GKE-Hub. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Membership::initOnce(); - parent::__construct($data); - } - - /** - * Immutable. Project used to report Metrics - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * Immutable. Project used to report Metrics - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - - /** - * Immutable. Location used to report Metrics - * - * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getLocation() - { - return $this->location; - } - - /** - * Immutable. Location used to report Metrics - * - * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setLocation($var) - { - GPBUtil::checkString($var, True); - $this->location = $var; - - return $this; - } - - /** - * Immutable. Cluster name used to report metrics. - * For Anthos on VMWare/Baremetal, it would be in format - * `memberClusters/cluster_name`; And for Anthos on MultiCloud, it would be in - * format - * `{azureClusters, awsClusters}/cluster_name`. - * - * Generated from protobuf field string cluster = 3 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getCluster() - { - return $this->cluster; - } - - /** - * Immutable. Cluster name used to report metrics. - * For Anthos on VMWare/Baremetal, it would be in format - * `memberClusters/cluster_name`; And for Anthos on MultiCloud, it would be in - * format - * `{azureClusters, awsClusters}/cluster_name`. - * - * Generated from protobuf field string cluster = 3 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setCluster($var) - { - GPBUtil::checkString($var, True); - $this->cluster = $var; - - return $this; - } - - /** - * Kubernetes system metrics, if available, are written to this prefix. - * This defaults to kubernetes.io for GKE, and kubernetes.io/anthos for Anthos - * eventually. Noted: Anthos MultiCloud will have kubernetes.io prefix today - * but will migration to be under kubernetes.io/anthos - * - * Generated from protobuf field string kubernetes_metrics_prefix = 4; - * @return string - */ - public function getKubernetesMetricsPrefix() - { - return $this->kubernetes_metrics_prefix; - } - - /** - * Kubernetes system metrics, if available, are written to this prefix. - * This defaults to kubernetes.io for GKE, and kubernetes.io/anthos for Anthos - * eventually. Noted: Anthos MultiCloud will have kubernetes.io prefix today - * but will migration to be under kubernetes.io/anthos - * - * Generated from protobuf field string kubernetes_metrics_prefix = 4; - * @param string $var - * @return $this - */ - public function setKubernetesMetricsPrefix($var) - { - GPBUtil::checkString($var, True); - $this->kubernetes_metrics_prefix = $var; - - return $this; - } - - /** - * Immutable. Cluster hash, this is a unique string generated by google code, - * which does not contain any PII, which we can use to reference the cluster. - * This is expected to be created by the monitoring stack and persisted into - * the Cluster object as well as to GKE-Hub. - * - * Generated from protobuf field string cluster_hash = 5 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getClusterHash() - { - return $this->cluster_hash; - } - - /** - * Immutable. Cluster hash, this is a unique string generated by google code, - * which does not contain any PII, which we can use to reference the cluster. - * This is expected to be created by the monitoring stack and persisted into - * the Cluster object as well as to GKE-Hub. - * - * Generated from protobuf field string cluster_hash = 5 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setClusterHash($var) - { - GPBUtil::checkString($var, True); - $this->cluster_hash = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/NamespaceLifecycleState.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/NamespaceLifecycleState.php deleted file mode 100644 index 356165d63119..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/NamespaceLifecycleState.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.gkehub.v1.NamespaceLifecycleState - */ -class NamespaceLifecycleState extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The current state of the Namespace resource. - * - * Generated from protobuf field .google.cloud.gkehub.v1.NamespaceLifecycleState.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $code = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $code - * Output only. The current state of the Namespace resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Fleet::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The current state of the Namespace resource. - * - * Generated from protobuf field .google.cloud.gkehub.v1.NamespaceLifecycleState.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getCode() - { - return $this->code; - } - - /** - * Output only. The current state of the Namespace resource. - * - * Generated from protobuf field .google.cloud.gkehub.v1.NamespaceLifecycleState.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setCode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\V1\NamespaceLifecycleState\Code::class); - $this->code = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/NamespaceLifecycleState/Code.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/NamespaceLifecycleState/Code.php deleted file mode 100644 index 93662e9d9fac..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/NamespaceLifecycleState/Code.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.gkehub.v1.NamespaceLifecycleState.Code - */ -class Code -{ - /** - * The code is not set. - * - * Generated from protobuf enum CODE_UNSPECIFIED = 0; - */ - const CODE_UNSPECIFIED = 0; - /** - * The namespace is being created. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * The namespace active. - * - * Generated from protobuf enum READY = 2; - */ - const READY = 2; - /** - * The namespace is being deleted. - * - * Generated from protobuf enum DELETING = 3; - */ - const DELETING = 3; - /** - * The namespace is being updated. - * - * Generated from protobuf enum UPDATING = 4; - */ - const UPDATING = 4; - - private static $valueToName = [ - self::CODE_UNSPECIFIED => 'CODE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::READY => 'READY', - self::DELETING => 'DELETING', - self::UPDATING => 'UPDATING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Code::class, \Google\Cloud\GkeHub\V1\NamespaceLifecycleState_Code::class); - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/OperationMetadata.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/OperationMetadata.php deleted file mode 100644 index 0dfdf1677061..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/OperationMetadata.php +++ /dev/null @@ -1,311 +0,0 @@ -google.cloud.gkehub.v1.OperationMetadata - */ -class OperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $end_time = null; - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $target = ''; - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $verb = ''; - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_detail = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $status_detail = ''; - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have - * [google.longrunning.Operation.error][google.longrunning.Operation.error] - * value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, - * corresponding to `Code.CANCELLED`. - * - * Generated from protobuf field bool cancel_requested = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $cancel_requested = false; - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $api_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time the operation was created. - * @type \Google\Protobuf\Timestamp $end_time - * Output only. The time the operation finished running. - * @type string $target - * Output only. Server-defined resource path for the target of the operation. - * @type string $verb - * Output only. Name of the verb executed by the operation. - * @type string $status_detail - * Output only. Human-readable status of the operation, if any. - * @type bool $cancel_requested - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have - * [google.longrunning.Operation.error][google.longrunning.Operation.error] - * value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, - * corresponding to `Code.CANCELLED`. - * @type string $api_version - * Output only. API version used to start the operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getTarget() - { - return $this->target; - } - - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setTarget($var) - { - GPBUtil::checkString($var, True); - $this->target = $var; - - return $this; - } - - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getVerb() - { - return $this->verb; - } - - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setVerb($var) - { - GPBUtil::checkString($var, True); - $this->verb = $var; - - return $this; - } - - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_detail = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStatusDetail() - { - return $this->status_detail; - } - - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_detail = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setStatusDetail($var) - { - GPBUtil::checkString($var, True); - $this->status_detail = $var; - - return $this; - } - - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have - * [google.longrunning.Operation.error][google.longrunning.Operation.error] - * value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, - * corresponding to `Code.CANCELLED`. - * - * Generated from protobuf field bool cancel_requested = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getCancelRequested() - { - return $this->cancel_requested; - } - - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have - * [google.longrunning.Operation.error][google.longrunning.Operation.error] - * value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, - * corresponding to `Code.CANCELLED`. - * - * Generated from protobuf field bool cancel_requested = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setCancelRequested($var) - { - GPBUtil::checkBool($var); - $this->cancel_requested = $var; - - return $this; - } - - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getApiVersion() - { - return $this->api_version; - } - - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setApiVersion($var) - { - GPBUtil::checkString($var, True); - $this->api_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/PBNamespace.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/PBNamespace.php deleted file mode 100644 index 2f14f6436c88..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/PBNamespace.php +++ /dev/null @@ -1,407 +0,0 @@ -google.cloud.gkehub.v1.Namespace - */ -class PBNamespace extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name for the namespace - * `projects/{project}/locations/{location}/namespaces/{namespace}` - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Output only. Google-generated UUID for this resource. This is unique across - * all namespace resources. If a namespace resource is deleted and another - * resource with the same name is created, it gets a different uid. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. When the namespace was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. When the namespace was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. When the namespace was deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $delete_time = null; - /** - * Output only. State of the namespace resource. - * - * Generated from protobuf field .google.cloud.gkehub.v1.NamespaceLifecycleState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = null; - /** - * Required. Scope associated with the namespace - * - * Generated from protobuf field string scope = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $scope = ''; - /** - * Optional. Namespace-level cluster namespace labels. These labels are - * applied to the related namespace of the member clusters bound to the parent - * Scope. Scope-level labels (`namespace_labels` in the Fleet Scope - * resource) take precedence over Namespace-level labels if they share - * a key. Keys and values must be Kubernetes-conformant. - * - * Generated from protobuf field map namespace_labels = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $namespace_labels; - /** - * Optional. Labels for this Namespace. - * - * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name for the namespace - * `projects/{project}/locations/{location}/namespaces/{namespace}` - * @type string $uid - * Output only. Google-generated UUID for this resource. This is unique across - * all namespace resources. If a namespace resource is deleted and another - * resource with the same name is created, it gets a different uid. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. When the namespace was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. When the namespace was last updated. - * @type \Google\Protobuf\Timestamp $delete_time - * Output only. When the namespace was deleted. - * @type \Google\Cloud\GkeHub\V1\NamespaceLifecycleState $state - * Output only. State of the namespace resource. - * @type string $scope - * Required. Scope associated with the namespace - * @type array|\Google\Protobuf\Internal\MapField $namespace_labels - * Optional. Namespace-level cluster namespace labels. These labels are - * applied to the related namespace of the member clusters bound to the parent - * Scope. Scope-level labels (`namespace_labels` in the Fleet Scope - * resource) take precedence over Namespace-level labels if they share - * a key. Keys and values must be Kubernetes-conformant. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. Labels for this Namespace. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Fleet::initOnce(); - parent::__construct($data); - } - - /** - * The resource name for the namespace - * `projects/{project}/locations/{location}/namespaces/{namespace}` - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name for the namespace - * `projects/{project}/locations/{location}/namespaces/{namespace}` - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. Google-generated UUID for this resource. This is unique across - * all namespace resources. If a namespace resource is deleted and another - * resource with the same name is created, it gets a different uid. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. Google-generated UUID for this resource. This is unique across - * all namespace resources. If a namespace resource is deleted and another - * resource with the same name is created, it gets a different uid. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Output only. When the namespace was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. When the namespace was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. When the namespace was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. When the namespace was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Output only. When the namespace was deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getDeleteTime() - { - return $this->delete_time; - } - - public function hasDeleteTime() - { - return isset($this->delete_time); - } - - public function clearDeleteTime() - { - unset($this->delete_time); - } - - /** - * Output only. When the namespace was deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setDeleteTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->delete_time = $var; - - return $this; - } - - /** - * Output only. State of the namespace resource. - * - * Generated from protobuf field .google.cloud.gkehub.v1.NamespaceLifecycleState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\GkeHub\V1\NamespaceLifecycleState|null - */ - public function getState() - { - return $this->state; - } - - public function hasState() - { - return isset($this->state); - } - - public function clearState() - { - unset($this->state); - } - - /** - * Output only. State of the namespace resource. - * - * Generated from protobuf field .google.cloud.gkehub.v1.NamespaceLifecycleState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\GkeHub\V1\NamespaceLifecycleState $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\NamespaceLifecycleState::class); - $this->state = $var; - - return $this; - } - - /** - * Required. Scope associated with the namespace - * - * Generated from protobuf field string scope = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getScope() - { - return $this->scope; - } - - /** - * Required. Scope associated with the namespace - * - * Generated from protobuf field string scope = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setScope($var) - { - GPBUtil::checkString($var, True); - $this->scope = $var; - - return $this; - } - - /** - * Optional. Namespace-level cluster namespace labels. These labels are - * applied to the related namespace of the member clusters bound to the parent - * Scope. Scope-level labels (`namespace_labels` in the Fleet Scope - * resource) take precedence over Namespace-level labels if they share - * a key. Keys and values must be Kubernetes-conformant. - * - * Generated from protobuf field map namespace_labels = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getNamespaceLabels() - { - return $this->namespace_labels; - } - - /** - * Optional. Namespace-level cluster namespace labels. These labels are - * applied to the related namespace of the member clusters bound to the parent - * Scope. Scope-level labels (`namespace_labels` in the Fleet Scope - * resource) take precedence over Namespace-level labels if they share - * a key. Keys and values must be Kubernetes-conformant. - * - * Generated from protobuf field map namespace_labels = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setNamespaceLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->namespace_labels = $arr; - - return $this; - } - - /** - * Optional. Labels for this Namespace. - * - * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. Labels for this Namespace. - * - * Generated from protobuf field map labels = 10 [(.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; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/RBACRoleBinding.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/RBACRoleBinding.php deleted file mode 100644 index dcc8783e0510..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/RBACRoleBinding.php +++ /dev/null @@ -1,453 +0,0 @@ -google.cloud.gkehub.v1.RBACRoleBinding - */ -class RBACRoleBinding extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name for the rbacrolebinding - * `projects/{project}/locations/{location}/scopes/{scope}/rbacrolebindings/{rbacrolebinding}` - * or - * `projects/{project}/locations/{location}/memberships/{membership}/rbacrolebindings/{rbacrolebinding}` - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Output only. Google-generated UUID for this resource. This is unique across - * all rbacrolebinding resources. If a rbacrolebinding resource is deleted and - * another resource with the same name is created, it gets a different uid. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. When the rbacrolebinding was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. When the rbacrolebinding was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. When the rbacrolebinding was deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $delete_time = null; - /** - * Output only. State of the rbacrolebinding resource. - * - * Generated from protobuf field .google.cloud.gkehub.v1.RBACRoleBindingLifecycleState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = null; - /** - * Required. Role to bind to the principal - * - * Generated from protobuf field .google.cloud.gkehub.v1.RBACRoleBinding.Role role = 9 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $role = null; - /** - * Optional. Labels for this RBACRolebinding. - * - * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - protected $principal; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $user - * user is the name of the user as seen by the kubernetes cluster, example - * "alice" or "alice@domain.tld" - * @type string $group - * group is the group, as seen by the kubernetes cluster. - * @type string $name - * The resource name for the rbacrolebinding - * `projects/{project}/locations/{location}/scopes/{scope}/rbacrolebindings/{rbacrolebinding}` - * or - * `projects/{project}/locations/{location}/memberships/{membership}/rbacrolebindings/{rbacrolebinding}` - * @type string $uid - * Output only. Google-generated UUID for this resource. This is unique across - * all rbacrolebinding resources. If a rbacrolebinding resource is deleted and - * another resource with the same name is created, it gets a different uid. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. When the rbacrolebinding was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. When the rbacrolebinding was last updated. - * @type \Google\Protobuf\Timestamp $delete_time - * Output only. When the rbacrolebinding was deleted. - * @type \Google\Cloud\GkeHub\V1\RBACRoleBindingLifecycleState $state - * Output only. State of the rbacrolebinding resource. - * @type \Google\Cloud\GkeHub\V1\RBACRoleBinding\Role $role - * Required. Role to bind to the principal - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. Labels for this RBACRolebinding. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Fleet::initOnce(); - parent::__construct($data); - } - - /** - * user is the name of the user as seen by the kubernetes cluster, example - * "alice" or "alice@domain.tld" - * - * Generated from protobuf field string user = 7; - * @return string - */ - public function getUser() - { - return $this->readOneof(7); - } - - public function hasUser() - { - return $this->hasOneof(7); - } - - /** - * user is the name of the user as seen by the kubernetes cluster, example - * "alice" or "alice@domain.tld" - * - * Generated from protobuf field string user = 7; - * @param string $var - * @return $this - */ - public function setUser($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * group is the group, as seen by the kubernetes cluster. - * - * Generated from protobuf field string group = 8; - * @return string - */ - public function getGroup() - { - return $this->readOneof(8); - } - - public function hasGroup() - { - return $this->hasOneof(8); - } - - /** - * group is the group, as seen by the kubernetes cluster. - * - * Generated from protobuf field string group = 8; - * @param string $var - * @return $this - */ - public function setGroup($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * The resource name for the rbacrolebinding - * `projects/{project}/locations/{location}/scopes/{scope}/rbacrolebindings/{rbacrolebinding}` - * or - * `projects/{project}/locations/{location}/memberships/{membership}/rbacrolebindings/{rbacrolebinding}` - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name for the rbacrolebinding - * `projects/{project}/locations/{location}/scopes/{scope}/rbacrolebindings/{rbacrolebinding}` - * or - * `projects/{project}/locations/{location}/memberships/{membership}/rbacrolebindings/{rbacrolebinding}` - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. Google-generated UUID for this resource. This is unique across - * all rbacrolebinding resources. If a rbacrolebinding resource is deleted and - * another resource with the same name is created, it gets a different uid. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. Google-generated UUID for this resource. This is unique across - * all rbacrolebinding resources. If a rbacrolebinding resource is deleted and - * another resource with the same name is created, it gets a different uid. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Output only. When the rbacrolebinding was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. When the rbacrolebinding was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. When the rbacrolebinding was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. When the rbacrolebinding was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Output only. When the rbacrolebinding was deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getDeleteTime() - { - return $this->delete_time; - } - - public function hasDeleteTime() - { - return isset($this->delete_time); - } - - public function clearDeleteTime() - { - unset($this->delete_time); - } - - /** - * Output only. When the rbacrolebinding was deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setDeleteTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->delete_time = $var; - - return $this; - } - - /** - * Output only. State of the rbacrolebinding resource. - * - * Generated from protobuf field .google.cloud.gkehub.v1.RBACRoleBindingLifecycleState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\GkeHub\V1\RBACRoleBindingLifecycleState|null - */ - public function getState() - { - return $this->state; - } - - public function hasState() - { - return isset($this->state); - } - - public function clearState() - { - unset($this->state); - } - - /** - * Output only. State of the rbacrolebinding resource. - * - * Generated from protobuf field .google.cloud.gkehub.v1.RBACRoleBindingLifecycleState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\GkeHub\V1\RBACRoleBindingLifecycleState $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\RBACRoleBindingLifecycleState::class); - $this->state = $var; - - return $this; - } - - /** - * Required. Role to bind to the principal - * - * Generated from protobuf field .google.cloud.gkehub.v1.RBACRoleBinding.Role role = 9 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeHub\V1\RBACRoleBinding\Role|null - */ - public function getRole() - { - return $this->role; - } - - public function hasRole() - { - return isset($this->role); - } - - public function clearRole() - { - unset($this->role); - } - - /** - * Required. Role to bind to the principal - * - * Generated from protobuf field .google.cloud.gkehub.v1.RBACRoleBinding.Role role = 9 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeHub\V1\RBACRoleBinding\Role $var - * @return $this - */ - public function setRole($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\RBACRoleBinding\Role::class); - $this->role = $var; - - return $this; - } - - /** - * Optional. Labels for this RBACRolebinding. - * - * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. Labels for this RBACRolebinding. - * - * Generated from protobuf field map labels = 10 [(.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; - } - - /** - * @return string - */ - public function getPrincipal() - { - return $this->whichOneof("principal"); - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/RBACRoleBinding/Role.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/RBACRoleBinding/Role.php deleted file mode 100644 index f987acfc3260..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/RBACRoleBinding/Role.php +++ /dev/null @@ -1,108 +0,0 @@ -google.cloud.gkehub.v1.RBACRoleBinding.Role - */ -class Role extends \Google\Protobuf\Internal\Message -{ - /** - * predefined_role is the Kubernetes default role to use - * - * Generated from protobuf field .google.cloud.gkehub.v1.RBACRoleBinding.Role.PredefinedRoles predefined_role = 1; - */ - protected $predefined_role = 0; - /** - * Optional. custom_role is the name of a custom KubernetesClusterRole to - * use. - * - * Generated from protobuf field string custom_role = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $custom_role = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $predefined_role - * predefined_role is the Kubernetes default role to use - * @type string $custom_role - * Optional. custom_role is the name of a custom KubernetesClusterRole to - * use. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Fleet::initOnce(); - parent::__construct($data); - } - - /** - * predefined_role is the Kubernetes default role to use - * - * Generated from protobuf field .google.cloud.gkehub.v1.RBACRoleBinding.Role.PredefinedRoles predefined_role = 1; - * @return int - */ - public function getPredefinedRole() - { - return $this->predefined_role; - } - - /** - * predefined_role is the Kubernetes default role to use - * - * Generated from protobuf field .google.cloud.gkehub.v1.RBACRoleBinding.Role.PredefinedRoles predefined_role = 1; - * @param int $var - * @return $this - */ - public function setPredefinedRole($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\V1\RBACRoleBinding\Role\PredefinedRoles::class); - $this->predefined_role = $var; - - return $this; - } - - /** - * Optional. custom_role is the name of a custom KubernetesClusterRole to - * use. - * - * Generated from protobuf field string custom_role = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getCustomRole() - { - return $this->custom_role; - } - - /** - * Optional. custom_role is the name of a custom KubernetesClusterRole to - * use. - * - * Generated from protobuf field string custom_role = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setCustomRole($var) - { - GPBUtil::checkString($var, True); - $this->custom_role = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Role::class, \Google\Cloud\GkeHub\V1\RBACRoleBinding_Role::class); - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/RBACRoleBinding/Role/PredefinedRoles.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/RBACRoleBinding/Role/PredefinedRoles.php deleted file mode 100644 index 00d774e00db3..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/RBACRoleBinding/Role/PredefinedRoles.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.gkehub.v1.RBACRoleBinding.Role.PredefinedRoles - */ -class PredefinedRoles -{ - /** - * UNKNOWN - * - * Generated from protobuf enum UNKNOWN = 0; - */ - const UNKNOWN = 0; - /** - * ADMIN has EDIT and RBAC permissions - * - * Generated from protobuf enum ADMIN = 1; - */ - const ADMIN = 1; - /** - * EDIT can edit all resources except RBAC - * - * Generated from protobuf enum EDIT = 2; - */ - const EDIT = 2; - /** - * VIEW can only read resources - * - * Generated from protobuf enum VIEW = 3; - */ - const VIEW = 3; - /** - * ANTHOS_SUPPORT gives Google Support read-only access to a number of - * cluster resources. - * - * Generated from protobuf enum ANTHOS_SUPPORT = 4; - */ - const ANTHOS_SUPPORT = 4; - - private static $valueToName = [ - self::UNKNOWN => 'UNKNOWN', - self::ADMIN => 'ADMIN', - self::EDIT => 'EDIT', - self::VIEW => 'VIEW', - self::ANTHOS_SUPPORT => 'ANTHOS_SUPPORT', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PredefinedRoles::class, \Google\Cloud\GkeHub\V1\RBACRoleBinding_Role_PredefinedRoles::class); - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/RBACRoleBindingLifecycleState.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/RBACRoleBindingLifecycleState.php deleted file mode 100644 index 7a36415506a4..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/RBACRoleBindingLifecycleState.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.gkehub.v1.RBACRoleBindingLifecycleState - */ -class RBACRoleBindingLifecycleState extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The current state of the rbacrolebinding resource. - * - * Generated from protobuf field .google.cloud.gkehub.v1.RBACRoleBindingLifecycleState.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $code = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $code - * Output only. The current state of the rbacrolebinding resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Fleet::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The current state of the rbacrolebinding resource. - * - * Generated from protobuf field .google.cloud.gkehub.v1.RBACRoleBindingLifecycleState.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getCode() - { - return $this->code; - } - - /** - * Output only. The current state of the rbacrolebinding resource. - * - * Generated from protobuf field .google.cloud.gkehub.v1.RBACRoleBindingLifecycleState.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setCode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\V1\RBACRoleBindingLifecycleState\Code::class); - $this->code = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/RBACRoleBindingLifecycleState/Code.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/RBACRoleBindingLifecycleState/Code.php deleted file mode 100644 index c28675492e5c..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/RBACRoleBindingLifecycleState/Code.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.gkehub.v1.RBACRoleBindingLifecycleState.Code - */ -class Code -{ - /** - * The code is not set. - * - * Generated from protobuf enum CODE_UNSPECIFIED = 0; - */ - const CODE_UNSPECIFIED = 0; - /** - * The rbacrolebinding is being created. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * The rbacrolebinding active. - * - * Generated from protobuf enum READY = 2; - */ - const READY = 2; - /** - * The rbacrolebinding is being deleted. - * - * Generated from protobuf enum DELETING = 3; - */ - const DELETING = 3; - /** - * The rbacrolebinding is being updated. - * - * Generated from protobuf enum UPDATING = 4; - */ - const UPDATING = 4; - - private static $valueToName = [ - self::CODE_UNSPECIFIED => 'CODE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::READY => 'READY', - self::DELETING => 'DELETING', - self::UPDATING => 'UPDATING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Code::class, \Google\Cloud\GkeHub\V1\RBACRoleBindingLifecycleState_Code::class); - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ResourceManifest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ResourceManifest.php deleted file mode 100644 index 1ae0d6196454..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ResourceManifest.php +++ /dev/null @@ -1,114 +0,0 @@ -google.cloud.gkehub.v1.ResourceManifest - */ -class ResourceManifest extends \Google\Protobuf\Internal\Message -{ - /** - * YAML manifest of the resource. - * - * Generated from protobuf field string manifest = 1; - */ - protected $manifest = ''; - /** - * Whether the resource provided in the manifest is `cluster_scoped`. - * If unset, the manifest is assumed to be namespace scoped. - * This field is used for REST mapping when applying the resource in a - * cluster. - * - * Generated from protobuf field bool cluster_scoped = 2; - */ - protected $cluster_scoped = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $manifest - * YAML manifest of the resource. - * @type bool $cluster_scoped - * Whether the resource provided in the manifest is `cluster_scoped`. - * If unset, the manifest is assumed to be namespace scoped. - * This field is used for REST mapping when applying the resource in a - * cluster. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Membership::initOnce(); - parent::__construct($data); - } - - /** - * YAML manifest of the resource. - * - * Generated from protobuf field string manifest = 1; - * @return string - */ - public function getManifest() - { - return $this->manifest; - } - - /** - * YAML manifest of the resource. - * - * Generated from protobuf field string manifest = 1; - * @param string $var - * @return $this - */ - public function setManifest($var) - { - GPBUtil::checkString($var, True); - $this->manifest = $var; - - return $this; - } - - /** - * Whether the resource provided in the manifest is `cluster_scoped`. - * If unset, the manifest is assumed to be namespace scoped. - * This field is used for REST mapping when applying the resource in a - * cluster. - * - * Generated from protobuf field bool cluster_scoped = 2; - * @return bool - */ - public function getClusterScoped() - { - return $this->cluster_scoped; - } - - /** - * Whether the resource provided in the manifest is `cluster_scoped`. - * If unset, the manifest is assumed to be namespace scoped. - * This field is used for REST mapping when applying the resource in a - * cluster. - * - * Generated from protobuf field bool cluster_scoped = 2; - * @param bool $var - * @return $this - */ - public function setClusterScoped($var) - { - GPBUtil::checkBool($var); - $this->cluster_scoped = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ResourceOptions.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ResourceOptions.php deleted file mode 100644 index bb595ca99482..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ResourceOptions.php +++ /dev/null @@ -1,205 +0,0 @@ -google.cloud.gkehub.v1.ResourceOptions - */ -class ResourceOptions extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The Connect agent version to use for connect_resources. Defaults - * to the latest GKE Connect version. The version must be a currently - * supported version, obsolete versions will be rejected. - * - * Generated from protobuf field string connect_version = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $connect_version = ''; - /** - * Optional. Use `apiextensions/v1beta1` instead of `apiextensions/v1` for - * CustomResourceDefinition resources. - * This option should be set for clusters with Kubernetes apiserver versions - * <1.16. - * - * Generated from protobuf field bool v1beta1_crd = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $v1beta1_crd = false; - /** - * Optional. Major and minor version of the Kubernetes cluster. This is only - * used to determine which version to use for the CustomResourceDefinition - * resources, `apiextensions/v1beta1` or`apiextensions/v1`. - * - * Generated from protobuf field string k8s_version = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $k8s_version = ''; - /** - * Optional. Git version of the Kubernetes cluster. This is only used to gate - * the Connect Agent migration to svc.id.goog on GDC-SO 1.33.100 patch and - * above. - * - * Generated from protobuf field string k8s_git_version = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $k8s_git_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $connect_version - * Optional. The Connect agent version to use for connect_resources. Defaults - * to the latest GKE Connect version. The version must be a currently - * supported version, obsolete versions will be rejected. - * @type bool $v1beta1_crd - * Optional. Use `apiextensions/v1beta1` instead of `apiextensions/v1` for - * CustomResourceDefinition resources. - * This option should be set for clusters with Kubernetes apiserver versions - * <1.16. - * @type string $k8s_version - * Optional. Major and minor version of the Kubernetes cluster. This is only - * used to determine which version to use for the CustomResourceDefinition - * resources, `apiextensions/v1beta1` or`apiextensions/v1`. - * @type string $k8s_git_version - * Optional. Git version of the Kubernetes cluster. This is only used to gate - * the Connect Agent migration to svc.id.goog on GDC-SO 1.33.100 patch and - * above. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Membership::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The Connect agent version to use for connect_resources. Defaults - * to the latest GKE Connect version. The version must be a currently - * supported version, obsolete versions will be rejected. - * - * Generated from protobuf field string connect_version = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getConnectVersion() - { - return $this->connect_version; - } - - /** - * Optional. The Connect agent version to use for connect_resources. Defaults - * to the latest GKE Connect version. The version must be a currently - * supported version, obsolete versions will be rejected. - * - * Generated from protobuf field string connect_version = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setConnectVersion($var) - { - GPBUtil::checkString($var, True); - $this->connect_version = $var; - - return $this; - } - - /** - * Optional. Use `apiextensions/v1beta1` instead of `apiextensions/v1` for - * CustomResourceDefinition resources. - * This option should be set for clusters with Kubernetes apiserver versions - * <1.16. - * - * Generated from protobuf field bool v1beta1_crd = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getV1Beta1Crd() - { - return $this->v1beta1_crd; - } - - /** - * Optional. Use `apiextensions/v1beta1` instead of `apiextensions/v1` for - * CustomResourceDefinition resources. - * This option should be set for clusters with Kubernetes apiserver versions - * <1.16. - * - * Generated from protobuf field bool v1beta1_crd = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setV1Beta1Crd($var) - { - GPBUtil::checkBool($var); - $this->v1beta1_crd = $var; - - return $this; - } - - /** - * Optional. Major and minor version of the Kubernetes cluster. This is only - * used to determine which version to use for the CustomResourceDefinition - * resources, `apiextensions/v1beta1` or`apiextensions/v1`. - * - * Generated from protobuf field string k8s_version = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getK8SVersion() - { - return $this->k8s_version; - } - - /** - * Optional. Major and minor version of the Kubernetes cluster. This is only - * used to determine which version to use for the CustomResourceDefinition - * resources, `apiextensions/v1beta1` or`apiextensions/v1`. - * - * Generated from protobuf field string k8s_version = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setK8SVersion($var) - { - GPBUtil::checkString($var, True); - $this->k8s_version = $var; - - return $this; - } - - /** - * Optional. Git version of the Kubernetes cluster. This is only used to gate - * the Connect Agent migration to svc.id.goog on GDC-SO 1.33.100 patch and - * above. - * - * Generated from protobuf field string k8s_git_version = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getK8SGitVersion() - { - return $this->k8s_git_version; - } - - /** - * Optional. Git version of the Kubernetes cluster. This is only used to gate - * the Connect Agent migration to svc.id.goog on GDC-SO 1.33.100 patch and - * above. - * - * Generated from protobuf field string k8s_git_version = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setK8SGitVersion($var) - { - GPBUtil::checkString($var, True); - $this->k8s_git_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/Scope.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/Scope.php deleted file mode 100644 index ecdfc81637f4..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/Scope.php +++ /dev/null @@ -1,373 +0,0 @@ -google.cloud.gkehub.v1.Scope - */ -class Scope extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name for the scope - * `projects/{project}/locations/{location}/scopes/{scope}` - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Output only. Google-generated UUID for this resource. This is unique across - * all scope resources. If a scope resource is deleted and another resource - * with the same name is created, it gets a different uid. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. When the scope was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. When the scope was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. When the scope was deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $delete_time = null; - /** - * Output only. State of the scope resource. - * - * Generated from protobuf field .google.cloud.gkehub.v1.ScopeLifecycleState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = null; - /** - * Optional. Scope-level cluster namespace labels. For the member clusters - * bound to the Scope, these labels are applied to each namespace under the - * Scope. Scope-level labels take precedence over Namespace-level - * labels (`namespace_labels` in the Fleet Namespace resource) if they - * share a key. Keys and values must be Kubernetes-conformant. - * - * Generated from protobuf field map namespace_labels = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $namespace_labels; - /** - * Optional. Labels for this Scope. - * - * Generated from protobuf field map labels = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name for the scope - * `projects/{project}/locations/{location}/scopes/{scope}` - * @type string $uid - * Output only. Google-generated UUID for this resource. This is unique across - * all scope resources. If a scope resource is deleted and another resource - * with the same name is created, it gets a different uid. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. When the scope was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. When the scope was last updated. - * @type \Google\Protobuf\Timestamp $delete_time - * Output only. When the scope was deleted. - * @type \Google\Cloud\GkeHub\V1\ScopeLifecycleState $state - * Output only. State of the scope resource. - * @type array|\Google\Protobuf\Internal\MapField $namespace_labels - * Optional. Scope-level cluster namespace labels. For the member clusters - * bound to the Scope, these labels are applied to each namespace under the - * Scope. Scope-level labels take precedence over Namespace-level - * labels (`namespace_labels` in the Fleet Namespace resource) if they - * share a key. Keys and values must be Kubernetes-conformant. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. Labels for this Scope. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Fleet::initOnce(); - parent::__construct($data); - } - - /** - * The resource name for the scope - * `projects/{project}/locations/{location}/scopes/{scope}` - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name for the scope - * `projects/{project}/locations/{location}/scopes/{scope}` - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. Google-generated UUID for this resource. This is unique across - * all scope resources. If a scope resource is deleted and another resource - * with the same name is created, it gets a different uid. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. Google-generated UUID for this resource. This is unique across - * all scope resources. If a scope resource is deleted and another resource - * with the same name is created, it gets a different uid. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Output only. When the scope was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. When the scope was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. When the scope was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. When the scope was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Output only. When the scope was deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getDeleteTime() - { - return $this->delete_time; - } - - public function hasDeleteTime() - { - return isset($this->delete_time); - } - - public function clearDeleteTime() - { - unset($this->delete_time); - } - - /** - * Output only. When the scope was deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setDeleteTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->delete_time = $var; - - return $this; - } - - /** - * Output only. State of the scope resource. - * - * Generated from protobuf field .google.cloud.gkehub.v1.ScopeLifecycleState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\GkeHub\V1\ScopeLifecycleState|null - */ - public function getState() - { - return $this->state; - } - - public function hasState() - { - return isset($this->state); - } - - public function clearState() - { - unset($this->state); - } - - /** - * Output only. State of the scope resource. - * - * Generated from protobuf field .google.cloud.gkehub.v1.ScopeLifecycleState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\GkeHub\V1\ScopeLifecycleState $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\ScopeLifecycleState::class); - $this->state = $var; - - return $this; - } - - /** - * Optional. Scope-level cluster namespace labels. For the member clusters - * bound to the Scope, these labels are applied to each namespace under the - * Scope. Scope-level labels take precedence over Namespace-level - * labels (`namespace_labels` in the Fleet Namespace resource) if they - * share a key. Keys and values must be Kubernetes-conformant. - * - * Generated from protobuf field map namespace_labels = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getNamespaceLabels() - { - return $this->namespace_labels; - } - - /** - * Optional. Scope-level cluster namespace labels. For the member clusters - * bound to the Scope, these labels are applied to each namespace under the - * Scope. Scope-level labels take precedence over Namespace-level - * labels (`namespace_labels` in the Fleet Namespace resource) if they - * share a key. Keys and values must be Kubernetes-conformant. - * - * Generated from protobuf field map namespace_labels = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setNamespaceLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->namespace_labels = $arr; - - return $this; - } - - /** - * Optional. Labels for this Scope. - * - * Generated from protobuf field map labels = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. Labels for this Scope. - * - * Generated from protobuf field map labels = 9 [(.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; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ScopeFeatureSpec.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ScopeFeatureSpec.php deleted file mode 100644 index c40b81a5b8a3..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ScopeFeatureSpec.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.gkehub.v1.ScopeFeatureSpec - */ -class ScopeFeatureSpec extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Feature::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ScopeFeatureState.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ScopeFeatureState.php deleted file mode 100644 index 7e86a6076fd2..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ScopeFeatureState.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.gkehub.v1.ScopeFeatureState - */ -class ScopeFeatureState extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The "running state" of the Feature in this Scope. - * - * Generated from protobuf field .google.cloud.gkehub.v1.FeatureState state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GkeHub\V1\FeatureState $state - * Output only. The "running state" of the Feature in this Scope. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Feature::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The "running state" of the Feature in this Scope. - * - * Generated from protobuf field .google.cloud.gkehub.v1.FeatureState state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\GkeHub\V1\FeatureState|null - */ - public function getState() - { - return $this->state; - } - - public function hasState() - { - return isset($this->state); - } - - public function clearState() - { - unset($this->state); - } - - /** - * Output only. The "running state" of the Feature in this Scope. - * - * Generated from protobuf field .google.cloud.gkehub.v1.FeatureState state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\GkeHub\V1\FeatureState $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\FeatureState::class); - $this->state = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ScopeLifecycleState.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ScopeLifecycleState.php deleted file mode 100644 index 156752d228a3..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ScopeLifecycleState.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.gkehub.v1.ScopeLifecycleState - */ -class ScopeLifecycleState extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The current state of the scope resource. - * - * Generated from protobuf field .google.cloud.gkehub.v1.ScopeLifecycleState.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $code = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $code - * Output only. The current state of the scope resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Fleet::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The current state of the scope resource. - * - * Generated from protobuf field .google.cloud.gkehub.v1.ScopeLifecycleState.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getCode() - { - return $this->code; - } - - /** - * Output only. The current state of the scope resource. - * - * Generated from protobuf field .google.cloud.gkehub.v1.ScopeLifecycleState.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setCode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\V1\ScopeLifecycleState\Code::class); - $this->code = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ScopeLifecycleState/Code.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ScopeLifecycleState/Code.php deleted file mode 100644 index ac1f47da56ba..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/ScopeLifecycleState/Code.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.gkehub.v1.ScopeLifecycleState.Code - */ -class Code -{ - /** - * The code is not set. - * - * Generated from protobuf enum CODE_UNSPECIFIED = 0; - */ - const CODE_UNSPECIFIED = 0; - /** - * The scope is being created. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * The scope active. - * - * Generated from protobuf enum READY = 2; - */ - const READY = 2; - /** - * The scope is being deleted. - * - * Generated from protobuf enum DELETING = 3; - */ - const DELETING = 3; - /** - * The scope is being updated. - * - * Generated from protobuf enum UPDATING = 4; - */ - const UPDATING = 4; - - private static $valueToName = [ - self::CODE_UNSPECIFIED => 'CODE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::READY => 'READY', - self::DELETING => 'DELETING', - self::UPDATING => 'UPDATING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Code::class, \Google\Cloud\GkeHub\V1\ScopeLifecycleState_Code::class); - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/SecurityPostureConfig.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/SecurityPostureConfig.php deleted file mode 100644 index fd91e6b2887e..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/SecurityPostureConfig.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.gkehub.v1.SecurityPostureConfig - */ -class SecurityPostureConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Sets which mode to use for Security Posture features. - * - * Generated from protobuf field .google.cloud.gkehub.v1.SecurityPostureConfig.Mode mode = 1; - */ - protected $mode = 0; - /** - * Sets which mode to use for vulnerability scanning. - * - * Generated from protobuf field .google.cloud.gkehub.v1.SecurityPostureConfig.VulnerabilityMode vulnerability_mode = 2; - */ - protected $vulnerability_mode = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $mode - * Sets which mode to use for Security Posture features. - * @type int $vulnerability_mode - * Sets which mode to use for vulnerability scanning. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Fleet::initOnce(); - parent::__construct($data); - } - - /** - * Sets which mode to use for Security Posture features. - * - * Generated from protobuf field .google.cloud.gkehub.v1.SecurityPostureConfig.Mode mode = 1; - * @return int - */ - public function getMode() - { - return $this->mode; - } - - /** - * Sets which mode to use for Security Posture features. - * - * Generated from protobuf field .google.cloud.gkehub.v1.SecurityPostureConfig.Mode mode = 1; - * @param int $var - * @return $this - */ - public function setMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\V1\SecurityPostureConfig\Mode::class); - $this->mode = $var; - - return $this; - } - - /** - * Sets which mode to use for vulnerability scanning. - * - * Generated from protobuf field .google.cloud.gkehub.v1.SecurityPostureConfig.VulnerabilityMode vulnerability_mode = 2; - * @return int - */ - public function getVulnerabilityMode() - { - return $this->vulnerability_mode; - } - - /** - * Sets which mode to use for vulnerability scanning. - * - * Generated from protobuf field .google.cloud.gkehub.v1.SecurityPostureConfig.VulnerabilityMode vulnerability_mode = 2; - * @param int $var - * @return $this - */ - public function setVulnerabilityMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\V1\SecurityPostureConfig\VulnerabilityMode::class); - $this->vulnerability_mode = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/SecurityPostureConfig/Mode.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/SecurityPostureConfig/Mode.php deleted file mode 100644 index e2785519d8d6..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/SecurityPostureConfig/Mode.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.gkehub.v1.SecurityPostureConfig.Mode - */ -class Mode -{ - /** - * Default value not specified. - * - * Generated from protobuf enum MODE_UNSPECIFIED = 0; - */ - const MODE_UNSPECIFIED = 0; - /** - * Disables Security Posture features on the cluster. - * - * Generated from protobuf enum DISABLED = 1; - */ - const DISABLED = 1; - /** - * Applies Security Posture features on the cluster. - * - * Generated from protobuf enum BASIC = 2; - */ - const BASIC = 2; - /** - * Applies the Security Posture off cluster Enterprise level features. - * - * Generated from protobuf enum ENTERPRISE = 3; - */ - const ENTERPRISE = 3; - - private static $valueToName = [ - self::MODE_UNSPECIFIED => 'MODE_UNSPECIFIED', - self::DISABLED => 'DISABLED', - self::BASIC => 'BASIC', - self::ENTERPRISE => 'ENTERPRISE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Mode::class, \Google\Cloud\GkeHub\V1\SecurityPostureConfig_Mode::class); - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/SecurityPostureConfig/VulnerabilityMode.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/SecurityPostureConfig/VulnerabilityMode.php deleted file mode 100644 index 47b90b4a0716..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/SecurityPostureConfig/VulnerabilityMode.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.gkehub.v1.SecurityPostureConfig.VulnerabilityMode - */ -class VulnerabilityMode -{ - /** - * Default value not specified. - * - * Generated from protobuf enum VULNERABILITY_MODE_UNSPECIFIED = 0; - */ - const VULNERABILITY_MODE_UNSPECIFIED = 0; - /** - * Disables vulnerability scanning on the cluster. - * - * Generated from protobuf enum VULNERABILITY_DISABLED = 1; - */ - const VULNERABILITY_DISABLED = 1; - /** - * Applies basic vulnerability scanning on the cluster. - * - * Generated from protobuf enum VULNERABILITY_BASIC = 2; - */ - const VULNERABILITY_BASIC = 2; - /** - * Applies the Security Posture's vulnerability on cluster Enterprise level - * features. - * - * Generated from protobuf enum VULNERABILITY_ENTERPRISE = 3; - */ - const VULNERABILITY_ENTERPRISE = 3; - - private static $valueToName = [ - self::VULNERABILITY_MODE_UNSPECIFIED => 'VULNERABILITY_MODE_UNSPECIFIED', - self::VULNERABILITY_DISABLED => 'VULNERABILITY_DISABLED', - self::VULNERABILITY_BASIC => 'VULNERABILITY_BASIC', - self::VULNERABILITY_ENTERPRISE => 'VULNERABILITY_ENTERPRISE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(VulnerabilityMode::class, \Google\Cloud\GkeHub\V1\SecurityPostureConfig_VulnerabilityMode::class); - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/TypeMeta.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/TypeMeta.php deleted file mode 100644 index d04c88055885..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/TypeMeta.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.gkehub.v1.TypeMeta - */ -class TypeMeta extends \Google\Protobuf\Internal\Message -{ - /** - * Kind of the resource (e.g. Deployment). - * - * Generated from protobuf field string kind = 1; - */ - protected $kind = ''; - /** - * APIVersion of the resource (e.g. v1). - * - * Generated from protobuf field string api_version = 2; - */ - protected $api_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $kind - * Kind of the resource (e.g. Deployment). - * @type string $api_version - * APIVersion of the resource (e.g. v1). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Kind of the resource (e.g. Deployment). - * - * Generated from protobuf field string kind = 1; - * @return string - */ - public function getKind() - { - return $this->kind; - } - - /** - * Kind of the resource (e.g. Deployment). - * - * Generated from protobuf field string kind = 1; - * @param string $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkString($var, True); - $this->kind = $var; - - return $this; - } - - /** - * APIVersion of the resource (e.g. v1). - * - * Generated from protobuf field string api_version = 2; - * @return string - */ - public function getApiVersion() - { - return $this->api_version; - } - - /** - * APIVersion of the resource (e.g. v1). - * - * Generated from protobuf field string api_version = 2; - * @param string $var - * @return $this - */ - public function setApiVersion($var) - { - GPBUtil::checkString($var, True); - $this->api_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateFeatureRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateFeatureRequest.php deleted file mode 100644 index 1433112bee7b..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateFeatureRequest.php +++ /dev/null @@ -1,286 +0,0 @@ -google.cloud.gkehub.v1.UpdateFeatureRequest - */ -class UpdateFeatureRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Feature resource name in the format - * `projects/*/locations/*/features/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - /** - * Only fields specified in update_mask are updated. - * If you specify a field in the update_mask but don't specify its value here - * that field will be deleted. - * If you are updating a map field, set the value of a key to null or empty - * string to delete the key from the map. It's not possible to update a key's - * value to the empty string. - * If you specify the update_mask to be a special path "*", fully replaces all - * user-modifiable fields to match `resource`. - * - * Generated from protobuf field .google.cloud.gkehub.v1.Feature resource = 3; - */ - protected $resource = null; - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4; - */ - protected $request_id = ''; - - /** - * @param string $name Required. The Feature resource name in the format - * `projects/*/locations/*/features/*`. - * @param \Google\Cloud\GkeHub\V1\Feature $resource Only fields specified in update_mask are updated. - * If you specify a field in the update_mask but don't specify its value here - * that field will be deleted. - * If you are updating a map field, set the value of a key to null or empty - * string to delete the key from the map. It's not possible to update a key's - * value to the empty string. - * If you specify the update_mask to be a special path "*", fully replaces all - * user-modifiable fields to match `resource`. - * @param \Google\Protobuf\FieldMask $updateMask Mask of fields to update. - * - * @return \Google\Cloud\GkeHub\V1\UpdateFeatureRequest - * - * @experimental - */ - public static function build(string $name, \Google\Cloud\GkeHub\V1\Feature $resource, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setName($name) - ->setResource($resource) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The Feature resource name in the format - * `projects/*/locations/*/features/*`. - * @type \Google\Protobuf\FieldMask $update_mask - * Mask of fields to update. - * @type \Google\Cloud\GkeHub\V1\Feature $resource - * Only fields specified in update_mask are updated. - * If you specify a field in the update_mask but don't specify its value here - * that field will be deleted. - * If you are updating a map field, set the value of a key to null or empty - * string to delete the key from the map. It's not possible to update a key's - * value to the empty string. - * If you specify the update_mask to be a special path "*", fully replaces all - * user-modifiable fields to match `resource`. - * @type string $request_id - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Feature resource name in the format - * `projects/*/locations/*/features/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The Feature resource name in the format - * `projects/*/locations/*/features/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Only fields specified in update_mask are updated. - * If you specify a field in the update_mask but don't specify its value here - * that field will be deleted. - * If you are updating a map field, set the value of a key to null or empty - * string to delete the key from the map. It's not possible to update a key's - * value to the empty string. - * If you specify the update_mask to be a special path "*", fully replaces all - * user-modifiable fields to match `resource`. - * - * Generated from protobuf field .google.cloud.gkehub.v1.Feature resource = 3; - * @return \Google\Cloud\GkeHub\V1\Feature|null - */ - public function getResource() - { - return $this->resource; - } - - public function hasResource() - { - return isset($this->resource); - } - - public function clearResource() - { - unset($this->resource); - } - - /** - * Only fields specified in update_mask are updated. - * If you specify a field in the update_mask but don't specify its value here - * that field will be deleted. - * If you are updating a map field, set the value of a key to null or empty - * string to delete the key from the map. It's not possible to update a key's - * value to the empty string. - * If you specify the update_mask to be a special path "*", fully replaces all - * user-modifiable fields to match `resource`. - * - * Generated from protobuf field .google.cloud.gkehub.v1.Feature resource = 3; - * @param \Google\Cloud\GkeHub\V1\Feature $var - * @return $this - */ - public function setResource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\Feature::class); - $this->resource = $var; - - return $this; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateFleetRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateFleetRequest.php deleted file mode 100644 index cf9e71565a9d..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateFleetRequest.php +++ /dev/null @@ -1,147 +0,0 @@ -google.cloud.gkehub.v1.UpdateFleetRequest - */ -class UpdateFleetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Fleet to update. - * The `name` field of the Fleet object identifies which fleet will be - * updated. - * - * Generated from protobuf field .google.cloud.gkehub.v1.Fleet fleet = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $fleet = null; - /** - * Required. The fields to be updated; - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\GkeHub\V1\Fleet $fleet Required. The Fleet to update. - * - * The `name` field of the Fleet object identifies which fleet will be - * updated. - * @param \Google\Protobuf\FieldMask $updateMask Required. The fields to be updated; - * - * @return \Google\Cloud\GkeHub\V1\UpdateFleetRequest - * - * @experimental - */ - public static function build(\Google\Cloud\GkeHub\V1\Fleet $fleet, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setFleet($fleet) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GkeHub\V1\Fleet $fleet - * Required. The Fleet to update. - * The `name` field of the Fleet object identifies which fleet will be - * updated. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. The fields to be updated; - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Fleet to update. - * The `name` field of the Fleet object identifies which fleet will be - * updated. - * - * Generated from protobuf field .google.cloud.gkehub.v1.Fleet fleet = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeHub\V1\Fleet|null - */ - public function getFleet() - { - return $this->fleet; - } - - public function hasFleet() - { - return isset($this->fleet); - } - - public function clearFleet() - { - unset($this->fleet); - } - - /** - * Required. The Fleet to update. - * The `name` field of the Fleet object identifies which fleet will be - * updated. - * - * Generated from protobuf field .google.cloud.gkehub.v1.Fleet fleet = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeHub\V1\Fleet $var - * @return $this - */ - public function setFleet($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\Fleet::class); - $this->fleet = $var; - - return $this; - } - - /** - * Required. The fields to be updated; - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. The fields to be updated; - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateMembershipBindingRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateMembershipBindingRequest.php deleted file mode 100644 index 09166b9134b5..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateMembershipBindingRequest.php +++ /dev/null @@ -1,136 +0,0 @@ -google.cloud.gkehub.v1.UpdateMembershipBindingRequest - */ -class UpdateMembershipBindingRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The MembershipBinding object with fields updated. - * - * Generated from protobuf field .google.cloud.gkehub.v1.MembershipBinding membership_binding = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $membership_binding = null; - /** - * Required. The fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\GkeHub\V1\MembershipBinding $membershipBinding Required. The MembershipBinding object with fields updated. - * @param \Google\Protobuf\FieldMask $updateMask Required. The fields to be updated. - * - * @return \Google\Cloud\GkeHub\V1\UpdateMembershipBindingRequest - * - * @experimental - */ - public static function build(\Google\Cloud\GkeHub\V1\MembershipBinding $membershipBinding, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setMembershipBinding($membershipBinding) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GkeHub\V1\MembershipBinding $membership_binding - * Required. The MembershipBinding object with fields updated. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. The fields to be updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The MembershipBinding object with fields updated. - * - * Generated from protobuf field .google.cloud.gkehub.v1.MembershipBinding membership_binding = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeHub\V1\MembershipBinding|null - */ - public function getMembershipBinding() - { - return $this->membership_binding; - } - - public function hasMembershipBinding() - { - return isset($this->membership_binding); - } - - public function clearMembershipBinding() - { - unset($this->membership_binding); - } - - /** - * Required. The MembershipBinding object with fields updated. - * - * Generated from protobuf field .google.cloud.gkehub.v1.MembershipBinding membership_binding = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeHub\V1\MembershipBinding $var - * @return $this - */ - public function setMembershipBinding($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\MembershipBinding::class); - $this->membership_binding = $var; - - return $this; - } - - /** - * Required. The fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. The fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateMembershipRBACRoleBindingRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateMembershipRBACRoleBindingRequest.php deleted file mode 100644 index 10c3eab25c35..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateMembershipRBACRoleBindingRequest.php +++ /dev/null @@ -1,141 +0,0 @@ -google.cloud.gkehub.v1.UpdateMembershipRBACRoleBindingRequest - */ -class UpdateMembershipRBACRoleBindingRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A rbacrolebinding with fields updated. The 'name' field in this - * rbacrolebinding is used to identify the resource to update. - * - * Generated from protobuf field .google.cloud.gkehub.v1.RBACRoleBinding rbacrolebinding = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $rbacrolebinding = null; - /** - * Required. The fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\GkeHub\V1\RBACRoleBinding $rbacrolebinding Required. A rbacrolebinding with fields updated. The 'name' field in this - * rbacrolebinding is used to identify the resource to update. - * @param \Google\Protobuf\FieldMask $updateMask Required. The fields to be updated. - * - * @return \Google\Cloud\GkeHub\V1\UpdateMembershipRBACRoleBindingRequest - * - * @experimental - */ - public static function build(\Google\Cloud\GkeHub\V1\RBACRoleBinding $rbacrolebinding, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setRbacrolebinding($rbacrolebinding) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GkeHub\V1\RBACRoleBinding $rbacrolebinding - * Required. A rbacrolebinding with fields updated. The 'name' field in this - * rbacrolebinding is used to identify the resource to update. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. The fields to be updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. A rbacrolebinding with fields updated. The 'name' field in this - * rbacrolebinding is used to identify the resource to update. - * - * Generated from protobuf field .google.cloud.gkehub.v1.RBACRoleBinding rbacrolebinding = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeHub\V1\RBACRoleBinding|null - */ - public function getRbacrolebinding() - { - return $this->rbacrolebinding; - } - - public function hasRbacrolebinding() - { - return isset($this->rbacrolebinding); - } - - public function clearRbacrolebinding() - { - unset($this->rbacrolebinding); - } - - /** - * Required. A rbacrolebinding with fields updated. The 'name' field in this - * rbacrolebinding is used to identify the resource to update. - * - * Generated from protobuf field .google.cloud.gkehub.v1.RBACRoleBinding rbacrolebinding = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeHub\V1\RBACRoleBinding $var - * @return $this - */ - public function setRbacrolebinding($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\RBACRoleBinding::class); - $this->rbacrolebinding = $var; - - return $this; - } - - /** - * Required. The fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. The fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateMembershipRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateMembershipRequest.php deleted file mode 100644 index 18371b71de73..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateMembershipRequest.php +++ /dev/null @@ -1,287 +0,0 @@ -google.cloud.gkehub.v1.UpdateMembershipRequest - */ -class UpdateMembershipRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Membership resource name in the format - * `projects/*/locations/*/memberships/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. Only fields specified in update_mask are updated. - * If you specify a field in the update_mask but don't specify its value here - * that field will be deleted. - * If you are updating a map field, set the value of a key to null or empty - * string to delete the key from the map. It's not possible to update a key's - * value to the empty string. - * If you specify the update_mask to be a special path "*", fully replaces all - * user-modifiable fields to match `resource`. - * - * Generated from protobuf field .google.cloud.gkehub.v1.Membership resource = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $resource = null; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $name Required. The Membership resource name in the format - * `projects/*/locations/*/memberships/*`. Please see - * {@see GkeHubClient::membershipName()} for help formatting this field. - * @param \Google\Cloud\GkeHub\V1\Membership $resource Required. Only fields specified in update_mask are updated. - * If you specify a field in the update_mask but don't specify its value here - * that field will be deleted. - * If you are updating a map field, set the value of a key to null or empty - * string to delete the key from the map. It's not possible to update a key's - * value to the empty string. - * If you specify the update_mask to be a special path "*", fully replaces all - * user-modifiable fields to match `resource`. - * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. - * - * @return \Google\Cloud\GkeHub\V1\UpdateMembershipRequest - * - * @experimental - */ - public static function build(string $name, \Google\Cloud\GkeHub\V1\Membership $resource, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setName($name) - ->setResource($resource) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The Membership resource name in the format - * `projects/*/locations/*/memberships/*`. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Mask of fields to update. - * @type \Google\Cloud\GkeHub\V1\Membership $resource - * Required. Only fields specified in update_mask are updated. - * If you specify a field in the update_mask but don't specify its value here - * that field will be deleted. - * If you are updating a map field, set the value of a key to null or empty - * string to delete the key from the map. It's not possible to update a key's - * value to the empty string. - * If you specify the update_mask to be a special path "*", fully replaces all - * user-modifiable fields to match `resource`. - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Membership resource name in the format - * `projects/*/locations/*/memberships/*`. - * - * 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 Membership resource name in the format - * `projects/*/locations/*/memberships/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. Mask of fields to update. - * - * 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. Mask of fields to update. - * - * 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; - } - - /** - * Required. Only fields specified in update_mask are updated. - * If you specify a field in the update_mask but don't specify its value here - * that field will be deleted. - * If you are updating a map field, set the value of a key to null or empty - * string to delete the key from the map. It's not possible to update a key's - * value to the empty string. - * If you specify the update_mask to be a special path "*", fully replaces all - * user-modifiable fields to match `resource`. - * - * Generated from protobuf field .google.cloud.gkehub.v1.Membership resource = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeHub\V1\Membership|null - */ - public function getResource() - { - return $this->resource; - } - - public function hasResource() - { - return isset($this->resource); - } - - public function clearResource() - { - unset($this->resource); - } - - /** - * Required. Only fields specified in update_mask are updated. - * If you specify a field in the update_mask but don't specify its value here - * that field will be deleted. - * If you are updating a map field, set the value of a key to null or empty - * string to delete the key from the map. It's not possible to update a key's - * value to the empty string. - * If you specify the update_mask to be a special path "*", fully replaces all - * user-modifiable fields to match `resource`. - * - * Generated from protobuf field .google.cloud.gkehub.v1.Membership resource = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeHub\V1\Membership $var - * @return $this - */ - public function setResource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\Membership::class); - $this->resource = $var; - - return $this; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateScopeNamespaceRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateScopeNamespaceRequest.php deleted file mode 100644 index 266ef1a2f7c2..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateScopeNamespaceRequest.php +++ /dev/null @@ -1,146 +0,0 @@ -google.cloud.gkehub.v1.UpdateScopeNamespaceRequest - */ -class UpdateScopeNamespaceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A namespace with fields updated. The 'name' field in this - * namespace is used to identify the resource to update. Given 'updated' - * prefix to follow go/proto-best-practices-checkers#keyword_conflict - * - * Generated from protobuf field .google.cloud.gkehub.v1.Namespace scope_namespace = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $scope_namespace = null; - /** - * Required. The fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\GkeHub\V1\PBNamespace $scopeNamespace Required. A namespace with fields updated. The 'name' field in this - * namespace is used to identify the resource to update. Given 'updated' - * prefix to follow go/proto-best-practices-checkers#keyword_conflict - * @param \Google\Protobuf\FieldMask $updateMask Required. The fields to be updated. - * - * @return \Google\Cloud\GkeHub\V1\UpdateScopeNamespaceRequest - * - * @experimental - */ - public static function build(\Google\Cloud\GkeHub\V1\PBNamespace $scopeNamespace, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setScopeNamespace($scopeNamespace) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GkeHub\V1\PBNamespace $scope_namespace - * Required. A namespace with fields updated. The 'name' field in this - * namespace is used to identify the resource to update. Given 'updated' - * prefix to follow go/proto-best-practices-checkers#keyword_conflict - * @type \Google\Protobuf\FieldMask $update_mask - * Required. The fields to be updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. A namespace with fields updated. The 'name' field in this - * namespace is used to identify the resource to update. Given 'updated' - * prefix to follow go/proto-best-practices-checkers#keyword_conflict - * - * Generated from protobuf field .google.cloud.gkehub.v1.Namespace scope_namespace = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeHub\V1\PBNamespace|null - */ - public function getScopeNamespace() - { - return $this->scope_namespace; - } - - public function hasScopeNamespace() - { - return isset($this->scope_namespace); - } - - public function clearScopeNamespace() - { - unset($this->scope_namespace); - } - - /** - * Required. A namespace with fields updated. The 'name' field in this - * namespace is used to identify the resource to update. Given 'updated' - * prefix to follow go/proto-best-practices-checkers#keyword_conflict - * - * Generated from protobuf field .google.cloud.gkehub.v1.Namespace scope_namespace = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeHub\V1\PBNamespace $var - * @return $this - */ - public function setScopeNamespace($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\PBNamespace::class); - $this->scope_namespace = $var; - - return $this; - } - - /** - * Required. The fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. The fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateScopeRBACRoleBindingRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateScopeRBACRoleBindingRequest.php deleted file mode 100644 index d2279d02f03e..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateScopeRBACRoleBindingRequest.php +++ /dev/null @@ -1,141 +0,0 @@ -google.cloud.gkehub.v1.UpdateScopeRBACRoleBindingRequest - */ -class UpdateScopeRBACRoleBindingRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A rbacrolebinding with fields updated. The 'name' field in this - * rbacrolebinding is used to identify the resource to update. - * - * Generated from protobuf field .google.cloud.gkehub.v1.RBACRoleBinding rbacrolebinding = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $rbacrolebinding = null; - /** - * Required. The fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\GkeHub\V1\RBACRoleBinding $rbacrolebinding Required. A rbacrolebinding with fields updated. The 'name' field in this - * rbacrolebinding is used to identify the resource to update. - * @param \Google\Protobuf\FieldMask $updateMask Required. The fields to be updated. - * - * @return \Google\Cloud\GkeHub\V1\UpdateScopeRBACRoleBindingRequest - * - * @experimental - */ - public static function build(\Google\Cloud\GkeHub\V1\RBACRoleBinding $rbacrolebinding, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setRbacrolebinding($rbacrolebinding) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GkeHub\V1\RBACRoleBinding $rbacrolebinding - * Required. A rbacrolebinding with fields updated. The 'name' field in this - * rbacrolebinding is used to identify the resource to update. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. The fields to be updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. A rbacrolebinding with fields updated. The 'name' field in this - * rbacrolebinding is used to identify the resource to update. - * - * Generated from protobuf field .google.cloud.gkehub.v1.RBACRoleBinding rbacrolebinding = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeHub\V1\RBACRoleBinding|null - */ - public function getRbacrolebinding() - { - return $this->rbacrolebinding; - } - - public function hasRbacrolebinding() - { - return isset($this->rbacrolebinding); - } - - public function clearRbacrolebinding() - { - unset($this->rbacrolebinding); - } - - /** - * Required. A rbacrolebinding with fields updated. The 'name' field in this - * rbacrolebinding is used to identify the resource to update. - * - * Generated from protobuf field .google.cloud.gkehub.v1.RBACRoleBinding rbacrolebinding = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeHub\V1\RBACRoleBinding $var - * @return $this - */ - public function setRbacrolebinding($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\RBACRoleBinding::class); - $this->rbacrolebinding = $var; - - return $this; - } - - /** - * Required. The fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. The fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateScopeRequest.php b/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateScopeRequest.php deleted file mode 100644 index 43853b5613d9..000000000000 --- a/owl-bot-staging/GkeHub/v1/proto/src/Google/Cloud/GkeHub/V1/UpdateScopeRequest.php +++ /dev/null @@ -1,141 +0,0 @@ -google.cloud.gkehub.v1.UpdateScopeRequest - */ -class UpdateScopeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A Scope with fields updated. The 'name' field in this - * namespace is used to identify the resource to update. - * - * Generated from protobuf field .google.cloud.gkehub.v1.Scope scope = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $scope = null; - /** - * Required. The fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\GkeHub\V1\Scope $scope Required. A Scope with fields updated. The 'name' field in this - * namespace is used to identify the resource to update. - * @param \Google\Protobuf\FieldMask $updateMask Required. The fields to be updated. - * - * @return \Google\Cloud\GkeHub\V1\UpdateScopeRequest - * - * @experimental - */ - public static function build(\Google\Cloud\GkeHub\V1\Scope $scope, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setScope($scope) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GkeHub\V1\Scope $scope - * Required. A Scope with fields updated. The 'name' field in this - * namespace is used to identify the resource to update. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. The fields to be updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. A Scope with fields updated. The 'name' field in this - * namespace is used to identify the resource to update. - * - * Generated from protobuf field .google.cloud.gkehub.v1.Scope scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeHub\V1\Scope|null - */ - public function getScope() - { - return $this->scope; - } - - public function hasScope() - { - return isset($this->scope); - } - - public function clearScope() - { - unset($this->scope); - } - - /** - * Required. A Scope with fields updated. The 'name' field in this - * namespace is used to identify the resource to update. - * - * Generated from protobuf field .google.cloud.gkehub.v1.Scope scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeHub\V1\Scope $var - * @return $this - */ - public function setScope($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\Scope::class); - $this->scope = $var; - - return $this; - } - - /** - * Required. The fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. The fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/create_feature.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/create_feature.php deleted file mode 100644 index 7eab338d1f05..000000000000 --- a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/create_feature.php +++ /dev/null @@ -1,69 +0,0 @@ -createFeature($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Feature $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END gkehub_v1_generated_GkeHub_CreateFeature_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/create_membership.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/create_membership.php deleted file mode 100644 index 7fc95934eea1..000000000000 --- a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/create_membership.php +++ /dev/null @@ -1,101 +0,0 @@ -setParent($formattedParent) - ->setMembershipId($membershipId) - ->setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $gkeHubClient->createMembership($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Membership $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = GkeHubClient::locationName('[PROJECT]', '[LOCATION]'); - $membershipId = '[MEMBERSHIP_ID]'; - - create_membership_sample($formattedParent, $membershipId); -} -// [END gkehub_v1_generated_GkeHub_CreateMembership_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/delete_feature.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/delete_feature.php deleted file mode 100644 index fb1eaab4865c..000000000000 --- a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/delete_feature.php +++ /dev/null @@ -1,66 +0,0 @@ -deleteFeature($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END gkehub_v1_generated_GkeHub_DeleteFeature_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/delete_membership.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/delete_membership.php deleted file mode 100644 index 1571f9963514..000000000000 --- a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/delete_membership.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $gkeHubClient->deleteMembership($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = GkeHubClient::membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); - - delete_membership_sample($formattedName); -} -// [END gkehub_v1_generated_GkeHub_DeleteMembership_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/generate_connect_manifest.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/generate_connect_manifest.php deleted file mode 100644 index 39a41ac908b0..000000000000 --- a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/generate_connect_manifest.php +++ /dev/null @@ -1,75 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var GenerateConnectManifestResponse $response */ - $response = $gkeHubClient->generateConnectManifest($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 = GkeHubClient::membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); - - generate_connect_manifest_sample($formattedName); -} -// [END gkehub_v1_generated_GkeHub_GenerateConnectManifest_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/get_feature.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/get_feature.php deleted file mode 100644 index bb4566556497..000000000000 --- a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/get_feature.php +++ /dev/null @@ -1,57 +0,0 @@ -getFeature($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END gkehub_v1_generated_GkeHub_GetFeature_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/get_membership.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/get_membership.php deleted file mode 100644 index 0e7071464581..000000000000 --- a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/get_membership.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Membership $response */ - $response = $gkeHubClient->getMembership($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 = GkeHubClient::membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); - - get_membership_sample($formattedName); -} -// [END gkehub_v1_generated_GkeHub_GetMembership_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_features.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_features.php deleted file mode 100644 index b81a3bac87b1..000000000000 --- a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_features.php +++ /dev/null @@ -1,62 +0,0 @@ -listFeatures($request); - - /** @var Feature $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 gkehub_v1_generated_GkeHub_ListFeatures_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_memberships.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_memberships.php deleted file mode 100644 index 853750c18e6c..000000000000 --- a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/list_memberships.php +++ /dev/null @@ -1,78 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $gkeHubClient->listMemberships($request); - - /** @var Membership $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 = GkeHubClient::locationName('[PROJECT]', '[LOCATION]'); - - list_memberships_sample($formattedParent); -} -// [END gkehub_v1_generated_GkeHub_ListMemberships_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/update_feature.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/update_feature.php deleted file mode 100644 index 9b203f4fba14..000000000000 --- a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/update_feature.php +++ /dev/null @@ -1,69 +0,0 @@ -updateFeature($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Feature $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END gkehub_v1_generated_GkeHub_UpdateFeature_sync] diff --git a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/update_membership.php b/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/update_membership.php deleted file mode 100644 index 3f422948920c..000000000000 --- a/owl-bot-staging/GkeHub/v1/samples/V1/GkeHubClient/update_membership.php +++ /dev/null @@ -1,89 +0,0 @@ -setName($formattedName) - ->setUpdateMask($updateMask) - ->setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $gkeHubClient->updateMembership($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Membership $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = GkeHubClient::membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); - - update_membership_sample($formattedName); -} -// [END gkehub_v1_generated_GkeHub_UpdateMembership_sync] diff --git a/owl-bot-staging/GkeHub/v1/src/V1/Client/GkeHubClient.php b/owl-bot-staging/GkeHub/v1/src/V1/Client/GkeHubClient.php deleted file mode 100644 index 526289f84443..000000000000 --- a/owl-bot-staging/GkeHub/v1/src/V1/Client/GkeHubClient.php +++ /dev/null @@ -1,1785 +0,0 @@ - createFeatureAsync(CreateFeatureRequest $request, array $optionalArgs = []) - * @method PromiseInterface createFleetAsync(CreateFleetRequest $request, array $optionalArgs = []) - * @method PromiseInterface createMembershipAsync(CreateMembershipRequest $request, array $optionalArgs = []) - * @method PromiseInterface createMembershipBindingAsync(CreateMembershipBindingRequest $request, array $optionalArgs = []) - * @method PromiseInterface createMembershipRBACRoleBindingAsync(CreateMembershipRBACRoleBindingRequest $request, array $optionalArgs = []) - * @method PromiseInterface createScopeAsync(CreateScopeRequest $request, array $optionalArgs = []) - * @method PromiseInterface createScopeNamespaceAsync(CreateScopeNamespaceRequest $request, array $optionalArgs = []) - * @method PromiseInterface createScopeRBACRoleBindingAsync(CreateScopeRBACRoleBindingRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteFeatureAsync(DeleteFeatureRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteFleetAsync(DeleteFleetRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteMembershipAsync(DeleteMembershipRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteMembershipBindingAsync(DeleteMembershipBindingRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteMembershipRBACRoleBindingAsync(DeleteMembershipRBACRoleBindingRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteScopeAsync(DeleteScopeRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteScopeNamespaceAsync(DeleteScopeNamespaceRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteScopeRBACRoleBindingAsync(DeleteScopeRBACRoleBindingRequest $request, array $optionalArgs = []) - * @method PromiseInterface generateConnectManifestAsync(GenerateConnectManifestRequest $request, array $optionalArgs = []) - * @method PromiseInterface generateMembershipRBACRoleBindingYAMLAsync(GenerateMembershipRBACRoleBindingYAMLRequest $request, array $optionalArgs = []) - * @method PromiseInterface getFeatureAsync(GetFeatureRequest $request, array $optionalArgs = []) - * @method PromiseInterface getFleetAsync(GetFleetRequest $request, array $optionalArgs = []) - * @method PromiseInterface getMembershipAsync(GetMembershipRequest $request, array $optionalArgs = []) - * @method PromiseInterface getMembershipBindingAsync(GetMembershipBindingRequest $request, array $optionalArgs = []) - * @method PromiseInterface getMembershipRBACRoleBindingAsync(GetMembershipRBACRoleBindingRequest $request, array $optionalArgs = []) - * @method PromiseInterface getScopeAsync(GetScopeRequest $request, array $optionalArgs = []) - * @method PromiseInterface getScopeNamespaceAsync(GetScopeNamespaceRequest $request, array $optionalArgs = []) - * @method PromiseInterface getScopeRBACRoleBindingAsync(GetScopeRBACRoleBindingRequest $request, array $optionalArgs = []) - * @method PromiseInterface listBoundMembershipsAsync(ListBoundMembershipsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listFeaturesAsync(ListFeaturesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listFleetsAsync(ListFleetsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listMembershipBindingsAsync(ListMembershipBindingsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listMembershipRBACRoleBindingsAsync(ListMembershipRBACRoleBindingsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listMembershipsAsync(ListMembershipsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listPermittedScopesAsync(ListPermittedScopesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listScopeNamespacesAsync(ListScopeNamespacesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listScopeRBACRoleBindingsAsync(ListScopeRBACRoleBindingsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listScopesAsync(ListScopesRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateFeatureAsync(UpdateFeatureRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateFleetAsync(UpdateFleetRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateMembershipAsync(UpdateMembershipRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateMembershipBindingAsync(UpdateMembershipBindingRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateMembershipRBACRoleBindingAsync(UpdateMembershipRBACRoleBindingRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateScopeAsync(UpdateScopeRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateScopeNamespaceAsync(UpdateScopeNamespaceRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateScopeRBACRoleBindingAsync(UpdateScopeRBACRoleBindingRequest $request, array $optionalArgs = []) - */ -final class GkeHubClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.gkehub.v1.GkeHub'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'gkehub.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'gkehub.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 $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/gke_hub_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/gke_hub_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/gke_hub_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/gke_hub_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = $this->descriptors[$methodName]['longRunning'] ?? []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a feature - * resource. - * - * @param string $project - * @param string $location - * @param string $feature - * - * @return string The formatted feature resource. - */ - public static function featureName(string $project, string $location, string $feature): string - { - return self::getPathTemplate('feature')->render([ - 'project' => $project, - 'location' => $location, - 'feature' => $feature, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a fleet - * resource. - * - * @param string $project - * @param string $location - * @param string $fleet - * - * @return string The formatted fleet resource. - */ - public static function fleetName(string $project, string $location, string $fleet): string - { - return self::getPathTemplate('fleet')->render([ - 'project' => $project, - 'location' => $location, - 'fleet' => $fleet, - ]); - } - - /** - * 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 membership - * resource. - * - * @param string $project - * @param string $location - * @param string $membership - * - * @return string The formatted membership resource. - */ - public static function membershipName(string $project, string $location, string $membership): string - { - return self::getPathTemplate('membership')->render([ - 'project' => $project, - 'location' => $location, - 'membership' => $membership, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * membership_binding resource. - * - * @param string $project - * @param string $location - * @param string $membership - * @param string $membershipbinding - * - * @return string The formatted membership_binding resource. - */ - public static function membershipBindingName(string $project, string $location, string $membership, string $membershipbinding): string - { - return self::getPathTemplate('membershipBinding')->render([ - 'project' => $project, - 'location' => $location, - 'membership' => $membership, - 'membershipbinding' => $membershipbinding, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a namespace - * resource. - * - * @param string $project - * @param string $location - * @param string $scope - * @param string $namespace - * - * @return string The formatted namespace resource. - */ - public static function namespaceName(string $project, string $location, string $scope, string $namespace): string - { - return self::getPathTemplate('namespace')->render([ - 'project' => $project, - 'location' => $location, - 'scope' => $scope, - 'namespace' => $namespace, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_location_fleet resource. - * - * @param string $organization - * @param string $location - * @param string $fleet - * - * @return string The formatted organization_location_fleet resource. - */ - public static function organizationLocationFleetName(string $organization, string $location, string $fleet): string - { - return self::getPathTemplate('organizationLocationFleet')->render([ - 'organization' => $organization, - 'location' => $location, - 'fleet' => $fleet, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_fleet resource. - * - * @param string $project - * @param string $location - * @param string $fleet - * - * @return string The formatted project_location_fleet resource. - */ - public static function projectLocationFleetName(string $project, string $location, string $fleet): string - { - return self::getPathTemplate('projectLocationFleet')->render([ - 'project' => $project, - 'location' => $location, - 'fleet' => $fleet, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_membership_rbacrolebinding resource. - * - * @param string $project - * @param string $location - * @param string $membership - * @param string $rbacrolebinding - * - * @return string The formatted project_location_membership_rbacrolebinding resource. - */ - public static function projectLocationMembershipRbacrolebindingName(string $project, string $location, string $membership, string $rbacrolebinding): string - { - return self::getPathTemplate('projectLocationMembershipRbacrolebinding')->render([ - 'project' => $project, - 'location' => $location, - 'membership' => $membership, - 'rbacrolebinding' => $rbacrolebinding, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_scope_rbacrolebinding resource. - * - * @param string $project - * @param string $location - * @param string $scope - * @param string $rbacrolebinding - * - * @return string The formatted project_location_scope_rbacrolebinding resource. - */ - public static function projectLocationScopeRbacrolebindingName(string $project, string $location, string $scope, string $rbacrolebinding): string - { - return self::getPathTemplate('projectLocationScopeRbacrolebinding')->render([ - 'project' => $project, - 'location' => $location, - 'scope' => $scope, - 'rbacrolebinding' => $rbacrolebinding, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * rbac_role_binding resource. - * - * @param string $project - * @param string $location - * @param string $scope - * @param string $rbacrolebinding - * - * @return string The formatted rbac_role_binding resource. - */ - public static function rBACRoleBindingName(string $project, string $location, string $scope, string $rbacrolebinding): string - { - return self::getPathTemplate('rBACRoleBinding')->render([ - 'project' => $project, - 'location' => $location, - 'scope' => $scope, - 'rbacrolebinding' => $rbacrolebinding, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a scope - * resource. - * - * @param string $project - * @param string $location - * @param string $scope - * - * @return string The formatted scope resource. - */ - public static function scopeName(string $project, string $location, string $scope): string - { - return self::getPathTemplate('scope')->render([ - 'project' => $project, - 'location' => $location, - 'scope' => $scope, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - feature: projects/{project}/locations/{location}/features/{feature} - * - fleet: projects/{project}/locations/{location}/fleets/{fleet} - * - location: projects/{project}/locations/{location} - * - membership: projects/{project}/locations/{location}/memberships/{membership} - * - membershipBinding: projects/{project}/locations/{location}/memberships/{membership}/bindings/{membershipbinding} - * - namespace: projects/{project}/locations/{location}/scopes/{scope}/namespaces/{namespace} - * - organizationLocationFleet: organizations/{organization}/locations/{location}/fleets/{fleet} - * - projectLocationFleet: projects/{project}/locations/{location}/fleets/{fleet} - * - projectLocationMembershipRbacrolebinding: projects/{project}/locations/{location}/memberships/{membership}/rbacrolebindings/{rbacrolebinding} - * - projectLocationScopeRbacrolebinding: projects/{project}/locations/{location}/scopes/{scope}/rbacrolebindings/{rbacrolebinding} - * - rBACRoleBinding: projects/{project}/locations/{location}/scopes/{scope}/rbacrolebindings/{rbacrolebinding} - * - scope: projects/{project}/locations/{location}/scopes/{scope} - * - * 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|ClientOptions $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 'gkehub.googleapis.com:443'. - * @type FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\GkeHub\V1\GkeHubClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new GkeHubClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @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. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Adds a new Feature. - * - * The async variant is {@see GkeHubClient::createFeatureAsync()} . - * - * @example samples/V1/GkeHubClient/create_feature.php - * - * @param CreateFeatureRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createFeature(CreateFeatureRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateFeature', $request, $callOptions)->wait(); - } - - /** - * Creates a fleet. - * - * The async variant is {@see GkeHubClient::createFleetAsync()} . - * - * @example samples/V1/GkeHubClient/create_fleet.php - * - * @param CreateFleetRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createFleet(CreateFleetRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateFleet', $request, $callOptions)->wait(); - } - - /** - * Creates a new Membership. - * - * **This is currently only supported for GKE clusters on Google Cloud**. - * To register other clusters, follow the instructions at - * https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster. - * - * The async variant is {@see GkeHubClient::createMembershipAsync()} . - * - * @example samples/V1/GkeHubClient/create_membership.php - * - * @param CreateMembershipRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createMembership(CreateMembershipRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateMembership', $request, $callOptions)->wait(); - } - - /** - * Creates a MembershipBinding. - * - * The async variant is {@see GkeHubClient::createMembershipBindingAsync()} . - * - * @example samples/V1/GkeHubClient/create_membership_binding.php - * - * @param CreateMembershipBindingRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createMembershipBinding(CreateMembershipBindingRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateMembershipBinding', $request, $callOptions)->wait(); - } - - /** - * Creates a Membership RBACRoleBinding. - * - * The async variant is {@see GkeHubClient::createMembershipRBACRoleBindingAsync()} - * . - * - * @example samples/V1/GkeHubClient/create_membership_rbac_role_binding.php - * - * @param CreateMembershipRBACRoleBindingRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createMembershipRBACRoleBinding(CreateMembershipRBACRoleBindingRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateMembershipRBACRoleBinding', $request, $callOptions)->wait(); - } - - /** - * Creates a Scope. - * - * The async variant is {@see GkeHubClient::createScopeAsync()} . - * - * @example samples/V1/GkeHubClient/create_scope.php - * - * @param CreateScopeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createScope(CreateScopeRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateScope', $request, $callOptions)->wait(); - } - - /** - * Creates a fleet namespace. - * - * The async variant is {@see GkeHubClient::createScopeNamespaceAsync()} . - * - * @example samples/V1/GkeHubClient/create_scope_namespace.php - * - * @param CreateScopeNamespaceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createScopeNamespace(CreateScopeNamespaceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateScopeNamespace', $request, $callOptions)->wait(); - } - - /** - * Creates a Scope RBACRoleBinding. - * - * The async variant is {@see GkeHubClient::createScopeRBACRoleBindingAsync()} . - * - * @example samples/V1/GkeHubClient/create_scope_rbac_role_binding.php - * - * @param CreateScopeRBACRoleBindingRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createScopeRBACRoleBinding(CreateScopeRBACRoleBindingRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateScopeRBACRoleBinding', $request, $callOptions)->wait(); - } - - /** - * Removes a Feature. - * - * The async variant is {@see GkeHubClient::deleteFeatureAsync()} . - * - * @example samples/V1/GkeHubClient/delete_feature.php - * - * @param DeleteFeatureRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteFeature(DeleteFeatureRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteFeature', $request, $callOptions)->wait(); - } - - /** - * Removes a Fleet. There must be no memberships remaining in the Fleet. - * - * The async variant is {@see GkeHubClient::deleteFleetAsync()} . - * - * @example samples/V1/GkeHubClient/delete_fleet.php - * - * @param DeleteFleetRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteFleet(DeleteFleetRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteFleet', $request, $callOptions)->wait(); - } - - /** - * Removes a Membership. - * - * **This is currently only supported for GKE clusters on Google Cloud**. - * To unregister other clusters, follow the instructions at - * https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster. - * - * The async variant is {@see GkeHubClient::deleteMembershipAsync()} . - * - * @example samples/V1/GkeHubClient/delete_membership.php - * - * @param DeleteMembershipRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteMembership(DeleteMembershipRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteMembership', $request, $callOptions)->wait(); - } - - /** - * Deletes a MembershipBinding. - * - * The async variant is {@see GkeHubClient::deleteMembershipBindingAsync()} . - * - * @example samples/V1/GkeHubClient/delete_membership_binding.php - * - * @param DeleteMembershipBindingRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteMembershipBinding(DeleteMembershipBindingRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteMembershipBinding', $request, $callOptions)->wait(); - } - - /** - * Deletes a Membership RBACRoleBinding. - * - * The async variant is {@see GkeHubClient::deleteMembershipRBACRoleBindingAsync()} - * . - * - * @example samples/V1/GkeHubClient/delete_membership_rbac_role_binding.php - * - * @param DeleteMembershipRBACRoleBindingRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteMembershipRBACRoleBinding(DeleteMembershipRBACRoleBindingRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteMembershipRBACRoleBinding', $request, $callOptions)->wait(); - } - - /** - * Deletes a Scope. - * - * The async variant is {@see GkeHubClient::deleteScopeAsync()} . - * - * @example samples/V1/GkeHubClient/delete_scope.php - * - * @param DeleteScopeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteScope(DeleteScopeRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteScope', $request, $callOptions)->wait(); - } - - /** - * Deletes a fleet namespace. - * - * The async variant is {@see GkeHubClient::deleteScopeNamespaceAsync()} . - * - * @example samples/V1/GkeHubClient/delete_scope_namespace.php - * - * @param DeleteScopeNamespaceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteScopeNamespace(DeleteScopeNamespaceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteScopeNamespace', $request, $callOptions)->wait(); - } - - /** - * Deletes a Scope RBACRoleBinding. - * - * The async variant is {@see GkeHubClient::deleteScopeRBACRoleBindingAsync()} . - * - * @example samples/V1/GkeHubClient/delete_scope_rbac_role_binding.php - * - * @param DeleteScopeRBACRoleBindingRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteScopeRBACRoleBinding(DeleteScopeRBACRoleBindingRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteScopeRBACRoleBinding', $request, $callOptions)->wait(); - } - - /** - * Generates the manifest for deployment of the GKE connect agent. - * - * **This method is used internally by Google-provided libraries.** - * Most clients should not need to call this method directly. - * - * The async variant is {@see GkeHubClient::generateConnectManifestAsync()} . - * - * @example samples/V1/GkeHubClient/generate_connect_manifest.php - * - * @param GenerateConnectManifestRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return GenerateConnectManifestResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function generateConnectManifest(GenerateConnectManifestRequest $request, array $callOptions = []): GenerateConnectManifestResponse - { - return $this->startApiCall('GenerateConnectManifest', $request, $callOptions)->wait(); - } - - /** - * Generates a YAML of the RBAC policies for the specified - * RoleBinding and its associated impersonation resources. - * - * The async variant is - * {@see GkeHubClient::generateMembershipRBACRoleBindingYAMLAsync()} . - * - * @example samples/V1/GkeHubClient/generate_membership_rbac_role_binding_yaml.php - * - * @param GenerateMembershipRBACRoleBindingYAMLRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return GenerateMembershipRBACRoleBindingYAMLResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function generateMembershipRBACRoleBindingYAML(GenerateMembershipRBACRoleBindingYAMLRequest $request, array $callOptions = []): GenerateMembershipRBACRoleBindingYAMLResponse - { - return $this->startApiCall('GenerateMembershipRBACRoleBindingYAML', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single Feature. - * - * The async variant is {@see GkeHubClient::getFeatureAsync()} . - * - * @example samples/V1/GkeHubClient/get_feature.php - * - * @param GetFeatureRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Feature - * - * @throws ApiException Thrown if the API call fails. - */ - public function getFeature(GetFeatureRequest $request, array $callOptions = []): Feature - { - return $this->startApiCall('GetFeature', $request, $callOptions)->wait(); - } - - /** - * Returns the details of a fleet. - * - * The async variant is {@see GkeHubClient::getFleetAsync()} . - * - * @example samples/V1/GkeHubClient/get_fleet.php - * - * @param GetFleetRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Fleet - * - * @throws ApiException Thrown if the API call fails. - */ - public function getFleet(GetFleetRequest $request, array $callOptions = []): Fleet - { - return $this->startApiCall('GetFleet', $request, $callOptions)->wait(); - } - - /** - * Gets the details of a Membership. - * - * The async variant is {@see GkeHubClient::getMembershipAsync()} . - * - * @example samples/V1/GkeHubClient/get_membership.php - * - * @param GetMembershipRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Membership - * - * @throws ApiException Thrown if the API call fails. - */ - public function getMembership(GetMembershipRequest $request, array $callOptions = []): Membership - { - return $this->startApiCall('GetMembership', $request, $callOptions)->wait(); - } - - /** - * Returns the details of a MembershipBinding. - * - * The async variant is {@see GkeHubClient::getMembershipBindingAsync()} . - * - * @example samples/V1/GkeHubClient/get_membership_binding.php - * - * @param GetMembershipBindingRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return MembershipBinding - * - * @throws ApiException Thrown if the API call fails. - */ - public function getMembershipBinding(GetMembershipBindingRequest $request, array $callOptions = []): MembershipBinding - { - return $this->startApiCall('GetMembershipBinding', $request, $callOptions)->wait(); - } - - /** - * Returns the details of a Membership RBACRoleBinding. - * - * The async variant is {@see GkeHubClient::getMembershipRBACRoleBindingAsync()} . - * - * @example samples/V1/GkeHubClient/get_membership_rbac_role_binding.php - * - * @param GetMembershipRBACRoleBindingRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return RBACRoleBinding - * - * @throws ApiException Thrown if the API call fails. - */ - public function getMembershipRBACRoleBinding(GetMembershipRBACRoleBindingRequest $request, array $callOptions = []): RBACRoleBinding - { - return $this->startApiCall('GetMembershipRBACRoleBinding', $request, $callOptions)->wait(); - } - - /** - * Returns the details of a Scope. - * - * The async variant is {@see GkeHubClient::getScopeAsync()} . - * - * @example samples/V1/GkeHubClient/get_scope.php - * - * @param GetScopeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Scope - * - * @throws ApiException Thrown if the API call fails. - */ - public function getScope(GetScopeRequest $request, array $callOptions = []): Scope - { - return $this->startApiCall('GetScope', $request, $callOptions)->wait(); - } - - /** - * Returns the details of a fleet namespace. - * - * The async variant is {@see GkeHubClient::getScopeNamespaceAsync()} . - * - * @example samples/V1/GkeHubClient/get_scope_namespace.php - * - * @param GetScopeNamespaceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 getScopeNamespace(GetScopeNamespaceRequest $request, array $callOptions = []): PBNamespace - { - return $this->startApiCall('GetScopeNamespace', $request, $callOptions)->wait(); - } - - /** - * Returns the details of a Scope RBACRoleBinding. - * - * The async variant is {@see GkeHubClient::getScopeRBACRoleBindingAsync()} . - * - * @example samples/V1/GkeHubClient/get_scope_rbac_role_binding.php - * - * @param GetScopeRBACRoleBindingRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return RBACRoleBinding - * - * @throws ApiException Thrown if the API call fails. - */ - public function getScopeRBACRoleBinding(GetScopeRBACRoleBindingRequest $request, array $callOptions = []): RBACRoleBinding - { - return $this->startApiCall('GetScopeRBACRoleBinding', $request, $callOptions)->wait(); - } - - /** - * Lists Memberships bound to a Scope. The response includes relevant - * Memberships from all regions. - * - * The async variant is {@see GkeHubClient::listBoundMembershipsAsync()} . - * - * @example samples/V1/GkeHubClient/list_bound_memberships.php - * - * @param ListBoundMembershipsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listBoundMemberships(ListBoundMembershipsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListBoundMemberships', $request, $callOptions); - } - - /** - * Lists Features in a given project and location. - * - * The async variant is {@see GkeHubClient::listFeaturesAsync()} . - * - * @example samples/V1/GkeHubClient/list_features.php - * - * @param ListFeaturesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listFeatures(ListFeaturesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListFeatures', $request, $callOptions); - } - - /** - * Returns all fleets within an organization or a project that the caller has - * access to. - * - * The async variant is {@see GkeHubClient::listFleetsAsync()} . - * - * @example samples/V1/GkeHubClient/list_fleets.php - * - * @param ListFleetsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listFleets(ListFleetsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListFleets', $request, $callOptions); - } - - /** - * Lists MembershipBindings. - * - * The async variant is {@see GkeHubClient::listMembershipBindingsAsync()} . - * - * @example samples/V1/GkeHubClient/list_membership_bindings.php - * - * @param ListMembershipBindingsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listMembershipBindings(ListMembershipBindingsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListMembershipBindings', $request, $callOptions); - } - - /** - * Lists all Membership RBACRoleBindings. - * - * The async variant is {@see GkeHubClient::listMembershipRBACRoleBindingsAsync()} - * . - * - * @example samples/V1/GkeHubClient/list_membership_rbac_role_bindings.php - * - * @param ListMembershipRBACRoleBindingsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listMembershipRBACRoleBindings(ListMembershipRBACRoleBindingsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListMembershipRBACRoleBindings', $request, $callOptions); - } - - /** - * Lists Memberships in a given project and location. - * - * The async variant is {@see GkeHubClient::listMembershipsAsync()} . - * - * @example samples/V1/GkeHubClient/list_memberships.php - * - * @param ListMembershipsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listMemberships(ListMembershipsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListMemberships', $request, $callOptions); - } - - /** - * Lists permitted Scopes. - * - * The async variant is {@see GkeHubClient::listPermittedScopesAsync()} . - * - * @example samples/V1/GkeHubClient/list_permitted_scopes.php - * - * @param ListPermittedScopesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listPermittedScopes(ListPermittedScopesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListPermittedScopes', $request, $callOptions); - } - - /** - * Lists fleet namespaces. - * - * The async variant is {@see GkeHubClient::listScopeNamespacesAsync()} . - * - * @example samples/V1/GkeHubClient/list_scope_namespaces.php - * - * @param ListScopeNamespacesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listScopeNamespaces(ListScopeNamespacesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListScopeNamespaces', $request, $callOptions); - } - - /** - * Lists all Scope RBACRoleBindings. - * - * The async variant is {@see GkeHubClient::listScopeRBACRoleBindingsAsync()} . - * - * @example samples/V1/GkeHubClient/list_scope_rbac_role_bindings.php - * - * @param ListScopeRBACRoleBindingsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listScopeRBACRoleBindings(ListScopeRBACRoleBindingsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListScopeRBACRoleBindings', $request, $callOptions); - } - - /** - * Lists Scopes. - * - * The async variant is {@see GkeHubClient::listScopesAsync()} . - * - * @example samples/V1/GkeHubClient/list_scopes.php - * - * @param ListScopesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listScopes(ListScopesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListScopes', $request, $callOptions); - } - - /** - * Updates an existing Feature. - * - * The async variant is {@see GkeHubClient::updateFeatureAsync()} . - * - * @example samples/V1/GkeHubClient/update_feature.php - * - * @param UpdateFeatureRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateFeature(UpdateFeatureRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateFeature', $request, $callOptions)->wait(); - } - - /** - * Updates a fleet. - * - * The async variant is {@see GkeHubClient::updateFleetAsync()} . - * - * @example samples/V1/GkeHubClient/update_fleet.php - * - * @param UpdateFleetRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateFleet(UpdateFleetRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateFleet', $request, $callOptions)->wait(); - } - - /** - * Updates an existing Membership. - * - * The async variant is {@see GkeHubClient::updateMembershipAsync()} . - * - * @example samples/V1/GkeHubClient/update_membership.php - * - * @param UpdateMembershipRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateMembership(UpdateMembershipRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateMembership', $request, $callOptions)->wait(); - } - - /** - * Updates a MembershipBinding. - * - * The async variant is {@see GkeHubClient::updateMembershipBindingAsync()} . - * - * @example samples/V1/GkeHubClient/update_membership_binding.php - * - * @param UpdateMembershipBindingRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateMembershipBinding(UpdateMembershipBindingRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateMembershipBinding', $request, $callOptions)->wait(); - } - - /** - * Updates a Membership RBACRoleBinding. - * - * The async variant is {@see GkeHubClient::updateMembershipRBACRoleBindingAsync()} - * . - * - * @example samples/V1/GkeHubClient/update_membership_rbac_role_binding.php - * - * @param UpdateMembershipRBACRoleBindingRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateMembershipRBACRoleBinding(UpdateMembershipRBACRoleBindingRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateMembershipRBACRoleBinding', $request, $callOptions)->wait(); - } - - /** - * Updates a scopes. - * - * The async variant is {@see GkeHubClient::updateScopeAsync()} . - * - * @example samples/V1/GkeHubClient/update_scope.php - * - * @param UpdateScopeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateScope(UpdateScopeRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateScope', $request, $callOptions)->wait(); - } - - /** - * Updates a fleet namespace. - * - * The async variant is {@see GkeHubClient::updateScopeNamespaceAsync()} . - * - * @example samples/V1/GkeHubClient/update_scope_namespace.php - * - * @param UpdateScopeNamespaceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateScopeNamespace(UpdateScopeNamespaceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateScopeNamespace', $request, $callOptions)->wait(); - } - - /** - * Updates a Scope RBACRoleBinding. - * - * The async variant is {@see GkeHubClient::updateScopeRBACRoleBindingAsync()} . - * - * @example samples/V1/GkeHubClient/update_scope_rbac_role_binding.php - * - * @param UpdateScopeRBACRoleBindingRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateScopeRBACRoleBinding(UpdateScopeRBACRoleBindingRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateScopeRBACRoleBinding', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/GkeHub/v1/src/V1/gapic_metadata.json b/owl-bot-staging/GkeHub/v1/src/V1/gapic_metadata.json deleted file mode 100644 index b97f2929ef6b..000000000000 --- a/owl-bot-staging/GkeHub/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,238 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.gkehub.v1", - "libraryPackage": "Google\\Cloud\\GkeHub\\V1", - "services": { - "GkeHub": { - "clients": { - "grpc": { - "libraryClient": "GkeHubGapicClient", - "rpcs": { - "CreateFeature": { - "methods": [ - "createFeature" - ] - }, - "CreateFleet": { - "methods": [ - "createFleet" - ] - }, - "CreateMembership": { - "methods": [ - "createMembership" - ] - }, - "CreateMembershipBinding": { - "methods": [ - "createMembershipBinding" - ] - }, - "CreateMembershipRBACRoleBinding": { - "methods": [ - "createMembershipRBACRoleBinding" - ] - }, - "CreateScope": { - "methods": [ - "createScope" - ] - }, - "CreateScopeNamespace": { - "methods": [ - "createScopeNamespace" - ] - }, - "CreateScopeRBACRoleBinding": { - "methods": [ - "createScopeRBACRoleBinding" - ] - }, - "DeleteFeature": { - "methods": [ - "deleteFeature" - ] - }, - "DeleteFleet": { - "methods": [ - "deleteFleet" - ] - }, - "DeleteMembership": { - "methods": [ - "deleteMembership" - ] - }, - "DeleteMembershipBinding": { - "methods": [ - "deleteMembershipBinding" - ] - }, - "DeleteMembershipRBACRoleBinding": { - "methods": [ - "deleteMembershipRBACRoleBinding" - ] - }, - "DeleteScope": { - "methods": [ - "deleteScope" - ] - }, - "DeleteScopeNamespace": { - "methods": [ - "deleteScopeNamespace" - ] - }, - "DeleteScopeRBACRoleBinding": { - "methods": [ - "deleteScopeRBACRoleBinding" - ] - }, - "GenerateConnectManifest": { - "methods": [ - "generateConnectManifest" - ] - }, - "GenerateMembershipRBACRoleBindingYAML": { - "methods": [ - "generateMembershipRBACRoleBindingYAML" - ] - }, - "GetFeature": { - "methods": [ - "getFeature" - ] - }, - "GetFleet": { - "methods": [ - "getFleet" - ] - }, - "GetMembership": { - "methods": [ - "getMembership" - ] - }, - "GetMembershipBinding": { - "methods": [ - "getMembershipBinding" - ] - }, - "GetMembershipRBACRoleBinding": { - "methods": [ - "getMembershipRBACRoleBinding" - ] - }, - "GetScope": { - "methods": [ - "getScope" - ] - }, - "GetScopeNamespace": { - "methods": [ - "getScopeNamespace" - ] - }, - "GetScopeRBACRoleBinding": { - "methods": [ - "getScopeRBACRoleBinding" - ] - }, - "ListBoundMemberships": { - "methods": [ - "listBoundMemberships" - ] - }, - "ListFeatures": { - "methods": [ - "listFeatures" - ] - }, - "ListFleets": { - "methods": [ - "listFleets" - ] - }, - "ListMembershipBindings": { - "methods": [ - "listMembershipBindings" - ] - }, - "ListMembershipRBACRoleBindings": { - "methods": [ - "listMembershipRBACRoleBindings" - ] - }, - "ListMemberships": { - "methods": [ - "listMemberships" - ] - }, - "ListPermittedScopes": { - "methods": [ - "listPermittedScopes" - ] - }, - "ListScopeNamespaces": { - "methods": [ - "listScopeNamespaces" - ] - }, - "ListScopeRBACRoleBindings": { - "methods": [ - "listScopeRBACRoleBindings" - ] - }, - "ListScopes": { - "methods": [ - "listScopes" - ] - }, - "UpdateFeature": { - "methods": [ - "updateFeature" - ] - }, - "UpdateFleet": { - "methods": [ - "updateFleet" - ] - }, - "UpdateMembership": { - "methods": [ - "updateMembership" - ] - }, - "UpdateMembershipBinding": { - "methods": [ - "updateMembershipBinding" - ] - }, - "UpdateMembershipRBACRoleBinding": { - "methods": [ - "updateMembershipRBACRoleBinding" - ] - }, - "UpdateScope": { - "methods": [ - "updateScope" - ] - }, - "UpdateScopeNamespace": { - "methods": [ - "updateScopeNamespace" - ] - }, - "UpdateScopeRBACRoleBinding": { - "methods": [ - "updateScopeRBACRoleBinding" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/GkeHub/v1/src/V1/resources/gke_hub_client_config.json b/owl-bot-staging/GkeHub/v1/src/V1/resources/gke_hub_client_config.json deleted file mode 100644 index 71f5c1b998c6..000000000000 --- a/owl-bot-staging/GkeHub/v1/src/V1/resources/gke_hub_client_config.json +++ /dev/null @@ -1,254 +0,0 @@ -{ - "interfaces": { - "google.cloud.gkehub.v1.GkeHub": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "CreateFeature": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "CreateFleet": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "CreateMembership": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "CreateMembershipBinding": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "CreateMembershipRBACRoleBinding": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "CreateScope": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "CreateScopeNamespace": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "CreateScopeRBACRoleBinding": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteFeature": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteFleet": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteMembership": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteMembershipBinding": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteMembershipRBACRoleBinding": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteScope": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteScopeNamespace": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteScopeRBACRoleBinding": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GenerateConnectManifest": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GenerateMembershipRBACRoleBindingYAML": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetFeature": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetFleet": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetMembership": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetMembershipBinding": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetMembershipRBACRoleBinding": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetScope": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetScopeNamespace": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetScopeRBACRoleBinding": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListBoundMemberships": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListFeatures": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListFleets": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListMembershipBindings": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListMembershipRBACRoleBindings": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListMemberships": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListPermittedScopes": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListScopeNamespaces": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListScopeRBACRoleBindings": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListScopes": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateFeature": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateFleet": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateMembership": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateMembershipBinding": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateMembershipRBACRoleBinding": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateScope": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateScopeNamespace": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateScopeRBACRoleBinding": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/GkeHub/v1/src/V1/resources/gke_hub_descriptor_config.php b/owl-bot-staging/GkeHub/v1/src/V1/resources/gke_hub_descriptor_config.php deleted file mode 100644 index e44cf5183027..000000000000 --- a/owl-bot-staging/GkeHub/v1/src/V1/resources/gke_hub_descriptor_config.php +++ /dev/null @@ -1,824 +0,0 @@ - [ - 'google.cloud.gkehub.v1.GkeHub' => [ - 'CreateFeature' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeHub\V1\Feature', - 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateFleet' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeHub\V1\Fleet', - 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateMembership' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeHub\V1\Membership', - 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateMembershipBinding' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeHub\V1\MembershipBinding', - 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateMembershipRBACRoleBinding' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeHub\V1\RBACRoleBinding', - 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateScope' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeHub\V1\Scope', - 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateScopeNamespace' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeHub\V1\PBNamespace', - 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateScopeRBACRoleBinding' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeHub\V1\RBACRoleBinding', - 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteFeature' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteFleet' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteMembership' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteMembershipBinding' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteMembershipRBACRoleBinding' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteScope' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteScopeNamespace' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteScopeRBACRoleBinding' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateFeature' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeHub\V1\Feature', - 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateFleet' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeHub\V1\Fleet', - 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'fleet.name', - 'fieldAccessors' => [ - 'getFleet', - 'getName', - ], - ], - ], - ], - 'UpdateMembership' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeHub\V1\Membership', - 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateMembershipBinding' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeHub\V1\MembershipBinding', - 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'membership_binding.name', - 'fieldAccessors' => [ - 'getMembershipBinding', - 'getName', - ], - ], - ], - ], - 'UpdateMembershipRBACRoleBinding' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeHub\V1\RBACRoleBinding', - 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'rbacrolebinding.name', - 'fieldAccessors' => [ - 'getRbacrolebinding', - 'getName', - ], - ], - ], - ], - 'UpdateScope' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeHub\V1\Scope', - 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'scope.name', - 'fieldAccessors' => [ - 'getScope', - 'getName', - ], - ], - ], - ], - 'UpdateScopeNamespace' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeHub\V1\PBNamespace', - 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'scope_namespace.name', - 'fieldAccessors' => [ - 'getScopeNamespace', - 'getName', - ], - ], - ], - ], - 'UpdateScopeRBACRoleBinding' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeHub\V1\RBACRoleBinding', - 'metadataReturnType' => '\Google\Cloud\GkeHub\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'rbacrolebinding.name', - 'fieldAccessors' => [ - 'getRbacrolebinding', - 'getName', - ], - ], - ], - ], - 'GenerateConnectManifest' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GkeHub\V1\GenerateConnectManifestResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GenerateMembershipRBACRoleBindingYAML' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GkeHub\V1\GenerateMembershipRBACRoleBindingYAMLResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'GetFeature' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GkeHub\V1\Feature', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetFleet' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GkeHub\V1\Fleet', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetMembership' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GkeHub\V1\Membership', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetMembershipBinding' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GkeHub\V1\MembershipBinding', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetMembershipRBACRoleBinding' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GkeHub\V1\RBACRoleBinding', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetScope' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GkeHub\V1\Scope', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetScopeNamespace' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GkeHub\V1\PBNamespace', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetScopeRBACRoleBinding' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GkeHub\V1\RBACRoleBinding', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListBoundMemberships' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getMemberships', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\GkeHub\V1\ListBoundMembershipsResponse', - 'headerParams' => [ - [ - 'keyName' => 'scope_name', - 'fieldAccessors' => [ - 'getScopeName', - ], - ], - ], - ], - 'ListFeatures' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getResources', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\GkeHub\V1\ListFeaturesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListFleets' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getFleets', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\GkeHub\V1\ListFleetsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListMembershipBindings' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getMembershipBindings', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\GkeHub\V1\ListMembershipBindingsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListMembershipRBACRoleBindings' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getRbacrolebindings', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\GkeHub\V1\ListMembershipRBACRoleBindingsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListMemberships' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getResources', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\GkeHub\V1\ListMembershipsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListPermittedScopes' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getScopes', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\GkeHub\V1\ListPermittedScopesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListScopeNamespaces' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getScopeNamespaces', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\GkeHub\V1\ListScopeNamespacesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListScopeRBACRoleBindings' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getRbacrolebindings', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\GkeHub\V1\ListScopeRBACRoleBindingsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListScopes' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getScopes', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\GkeHub\V1\ListScopesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'templateMap' => [ - 'feature' => 'projects/{project}/locations/{location}/features/{feature}', - 'fleet' => 'projects/{project}/locations/{location}/fleets/{fleet}', - 'location' => 'projects/{project}/locations/{location}', - 'membership' => 'projects/{project}/locations/{location}/memberships/{membership}', - 'membershipBinding' => 'projects/{project}/locations/{location}/memberships/{membership}/bindings/{membershipbinding}', - 'namespace' => 'projects/{project}/locations/{location}/scopes/{scope}/namespaces/{namespace}', - 'organizationLocationFleet' => 'organizations/{organization}/locations/{location}/fleets/{fleet}', - 'projectLocationFleet' => 'projects/{project}/locations/{location}/fleets/{fleet}', - 'projectLocationMembershipRbacrolebinding' => 'projects/{project}/locations/{location}/memberships/{membership}/rbacrolebindings/{rbacrolebinding}', - 'projectLocationScopeRbacrolebinding' => 'projects/{project}/locations/{location}/scopes/{scope}/rbacrolebindings/{rbacrolebinding}', - 'rBACRoleBinding' => 'projects/{project}/locations/{location}/scopes/{scope}/rbacrolebindings/{rbacrolebinding}', - 'scope' => 'projects/{project}/locations/{location}/scopes/{scope}', - ], - ], - ], -]; diff --git a/owl-bot-staging/GkeHub/v1/src/V1/resources/gke_hub_rest_client_config.php b/owl-bot-staging/GkeHub/v1/src/V1/resources/gke_hub_rest_client_config.php deleted file mode 100644 index 91b26a056ceb..000000000000 --- a/owl-bot-staging/GkeHub/v1/src/V1/resources/gke_hub_rest_client_config.php +++ /dev/null @@ -1,709 +0,0 @@ - [ - 'google.cloud.gkehub.v1.GkeHub' => [ - 'CreateFeature' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/features', - 'body' => 'resource', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateFleet' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/fleets', - 'body' => 'fleet', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateMembership' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/memberships', - 'body' => 'resource', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'membership_id', - ], - ], - 'CreateMembershipBinding' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/memberships/*}/bindings', - 'body' => 'membership_binding', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'membership_binding_id', - ], - ], - 'CreateMembershipRBACRoleBinding' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/memberships/*}/rbacrolebindings', - 'body' => 'rbacrolebinding', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'rbacrolebinding_id', - ], - ], - 'CreateScope' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/scopes', - 'body' => 'scope', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'scope_id', - ], - ], - 'CreateScopeNamespace' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/scopes/*}/namespaces', - 'body' => 'scope_namespace', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'scope_namespace_id', - ], - ], - 'CreateScopeRBACRoleBinding' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/scopes/*}/rbacrolebindings', - 'body' => 'rbacrolebinding', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'rbacrolebinding_id', - ], - ], - 'DeleteFeature' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/features/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteFleet' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/fleets/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteMembership' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/memberships/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteMembershipBinding' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/memberships/*/bindings/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteMembershipRBACRoleBinding' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/memberships/*/rbacrolebindings/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteScope' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/scopes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteScopeNamespace' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/scopes/*/namespaces/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteScopeRBACRoleBinding' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/scopes/*/rbacrolebindings/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GenerateConnectManifest' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/memberships/*}:generateConnectManifest', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GenerateMembershipRBACRoleBindingYAML' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/memberships/*}/rbacrolebindings:generateMembershipRBACRoleBindingYAML', - 'body' => 'rbacrolebinding', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'GetFeature' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/features/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetFleet' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/fleets/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetMembership' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/memberships/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetMembershipBinding' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/memberships/*/bindings/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetMembershipRBACRoleBinding' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/memberships/*/rbacrolebindings/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetScope' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/scopes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetScopeNamespace' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/scopes/*/namespaces/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetScopeRBACRoleBinding' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/scopes/*/rbacrolebindings/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListBoundMemberships' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{scope_name=projects/*/locations/*/scopes/*}:listMemberships', - 'placeholders' => [ - 'scope_name' => [ - 'getters' => [ - 'getScopeName', - ], - ], - ], - ], - 'ListFeatures' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/features', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListFleets' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/fleets', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=organizations/*/locations/*}/fleets', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListMembershipBindings' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/memberships/*}/bindings', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListMembershipRBACRoleBindings' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/memberships/*}/rbacrolebindings', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListMemberships' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/memberships', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListPermittedScopes' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/scopes:listPermitted', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListScopeNamespaces' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/scopes/*}/namespaces', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListScopeRBACRoleBindings' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/scopes/*}/rbacrolebindings', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListScopes' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/scopes', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateFeature' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/features/*}', - 'body' => 'resource', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateFleet' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{fleet.name=projects/*/locations/*/fleets/*}', - 'body' => 'fleet', - 'placeholders' => [ - 'fleet.name' => [ - 'getters' => [ - 'getFleet', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateMembership' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/memberships/*}', - 'body' => 'resource', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateMembershipBinding' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{membership_binding.name=projects/*/locations/*/memberships/*/bindings/*}', - 'body' => 'membership_binding', - 'placeholders' => [ - 'membership_binding.name' => [ - 'getters' => [ - 'getMembershipBinding', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateMembershipRBACRoleBinding' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{rbacrolebinding.name=projects/*/locations/*/memberships/*/rbacrolebindings/*}', - 'body' => 'rbacrolebinding', - 'placeholders' => [ - 'rbacrolebinding.name' => [ - 'getters' => [ - 'getRbacrolebinding', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateScope' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{scope.name=projects/*/locations/*/scopes/*}', - 'body' => 'scope', - 'placeholders' => [ - 'scope.name' => [ - 'getters' => [ - 'getScope', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateScopeNamespace' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{scope_namespace.name=projects/*/locations/*/scopes/*/namespaces/*}', - 'body' => 'scope_namespace', - 'placeholders' => [ - 'scope_namespace.name' => [ - 'getters' => [ - 'getScopeNamespace', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateScopeRBACRoleBinding' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{rbacrolebinding.name=projects/*/locations/*/scopes/*/rbacrolebindings/*}', - 'body' => 'rbacrolebinding', - 'placeholders' => [ - 'rbacrolebinding.name' => [ - 'getters' => [ - 'getRbacrolebinding', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - '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.iam.v1.IAMPolicy' => [ - 'GetIamPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/memberships/*}:getIamPolicy', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/features/*}:getIamPolicy', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/memberships/*}:setIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/features/*}:setIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/memberships/*}:testIamPermissions', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/features/*}:testIamPermissions', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/GkeHub/v1/tests/Unit/V1/Client/GkeHubClientTest.php b/owl-bot-staging/GkeHub/v1/tests/Unit/V1/Client/GkeHubClientTest.php deleted file mode 100644 index c597159a407a..000000000000 --- a/owl-bot-staging/GkeHub/v1/tests/Unit/V1/Client/GkeHubClientTest.php +++ /dev/null @@ -1,4695 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return GkeHubClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new GkeHubClient($options); - } - - /** @test */ - public function createFeatureTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createFeatureTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $expectedResponse = new Feature(); - $expectedResponse->setName($name); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createFeatureTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - $request = new CreateFeatureRequest(); - $response = $gapicClient->createFeature($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkehub.v1.GkeHub/CreateFeature', $actualApiFuncCall); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createFeatureTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createFeatureExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createFeatureTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - $request = new CreateFeatureRequest(); - $response = $gapicClient->createFeature($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createFeatureTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createFleetTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createFleetTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $expectedResponse = new Fleet(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createFleetTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $fleet = new Fleet(); - $request = (new CreateFleetRequest()) - ->setParent($formattedParent) - ->setFleet($fleet); - $response = $gapicClient->createFleet($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkehub.v1.GkeHub/CreateFleet', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getFleet(); - $this->assertProtobufEquals($fleet, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createFleetTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createFleetExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createFleetTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $fleet = new Fleet(); - $request = (new CreateFleetRequest()) - ->setParent($formattedParent) - ->setFleet($fleet); - $response = $gapicClient->createFleet($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createFleetTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createMembershipTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createMembershipTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $externalId = 'externalId-1153075697'; - $uniqueId = 'uniqueId-538310583'; - $expectedResponse = new Membership(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setExternalId($externalId); - $expectedResponse->setUniqueId($uniqueId); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createMembershipTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $membershipId = 'membershipId-1132211676'; - $resource = new Membership(); - $request = (new CreateMembershipRequest()) - ->setParent($formattedParent) - ->setMembershipId($membershipId) - ->setResource($resource); - $response = $gapicClient->createMembership($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkehub.v1.GkeHub/CreateMembership', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getMembershipId(); - $this->assertProtobufEquals($membershipId, $actualValue); - $actualValue = $actualApiRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createMembershipTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createMembershipExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createMembershipTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $membershipId = 'membershipId-1132211676'; - $resource = new Membership(); - $request = (new CreateMembershipRequest()) - ->setParent($formattedParent) - ->setMembershipId($membershipId) - ->setResource($resource); - $response = $gapicClient->createMembership($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createMembershipTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createMembershipBindingTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createMembershipBindingTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $scope = 'scope109264468'; - $name = 'name3373707'; - $uid = 'uid115792'; - $expectedResponse = new MembershipBinding(); - $expectedResponse->setScope($scope); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createMembershipBindingTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); - $membershipBinding = new MembershipBinding(); - $membershipBindingId = 'membershipBindingId-1012849378'; - $request = (new CreateMembershipBindingRequest()) - ->setParent($formattedParent) - ->setMembershipBinding($membershipBinding) - ->setMembershipBindingId($membershipBindingId); - $response = $gapicClient->createMembershipBinding($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkehub.v1.GkeHub/CreateMembershipBinding', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getMembershipBinding(); - $this->assertProtobufEquals($membershipBinding, $actualValue); - $actualValue = $actualApiRequestObject->getMembershipBindingId(); - $this->assertProtobufEquals($membershipBindingId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createMembershipBindingTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createMembershipBindingExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createMembershipBindingTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); - $membershipBinding = new MembershipBinding(); - $membershipBindingId = 'membershipBindingId-1012849378'; - $request = (new CreateMembershipBindingRequest()) - ->setParent($formattedParent) - ->setMembershipBinding($membershipBinding) - ->setMembershipBindingId($membershipBindingId); - $response = $gapicClient->createMembershipBinding($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createMembershipBindingTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createMembershipRBACRoleBindingTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createMembershipRBACRoleBindingTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $user = 'user3599307'; - $name = 'name3373707'; - $uid = 'uid115792'; - $expectedResponse = new RBACRoleBinding(); - $expectedResponse->setUser($user); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createMembershipRBACRoleBindingTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); - $rbacrolebindingId = 'rbacrolebindingId-114871075'; - $rbacrolebinding = new RBACRoleBinding(); - $rbacrolebindingRole = new Role(); - $rbacrolebinding->setRole($rbacrolebindingRole); - $request = (new CreateMembershipRBACRoleBindingRequest()) - ->setParent($formattedParent) - ->setRbacrolebindingId($rbacrolebindingId) - ->setRbacrolebinding($rbacrolebinding); - $response = $gapicClient->createMembershipRBACRoleBinding($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkehub.v1.GkeHub/CreateMembershipRBACRoleBinding', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getRbacrolebindingId(); - $this->assertProtobufEquals($rbacrolebindingId, $actualValue); - $actualValue = $actualApiRequestObject->getRbacrolebinding(); - $this->assertProtobufEquals($rbacrolebinding, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createMembershipRBACRoleBindingTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createMembershipRBACRoleBindingExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createMembershipRBACRoleBindingTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); - $rbacrolebindingId = 'rbacrolebindingId-114871075'; - $rbacrolebinding = new RBACRoleBinding(); - $rbacrolebindingRole = new Role(); - $rbacrolebinding->setRole($rbacrolebindingRole); - $request = (new CreateMembershipRBACRoleBindingRequest()) - ->setParent($formattedParent) - ->setRbacrolebindingId($rbacrolebindingId) - ->setRbacrolebinding($rbacrolebinding); - $response = $gapicClient->createMembershipRBACRoleBinding($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createMembershipRBACRoleBindingTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createScopeTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createScopeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $expectedResponse = new Scope(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createScopeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $scopeId = 'scopeId-487349530'; - $scope = new Scope(); - $request = (new CreateScopeRequest()) - ->setParent($formattedParent) - ->setScopeId($scopeId) - ->setScope($scope); - $response = $gapicClient->createScope($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkehub.v1.GkeHub/CreateScope', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getScopeId(); - $this->assertProtobufEquals($scopeId, $actualValue); - $actualValue = $actualApiRequestObject->getScope(); - $this->assertProtobufEquals($scope, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createScopeTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createScopeExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createScopeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $scopeId = 'scopeId-487349530'; - $scope = new Scope(); - $request = (new CreateScopeRequest()) - ->setParent($formattedParent) - ->setScopeId($scopeId) - ->setScope($scope); - $response = $gapicClient->createScope($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createScopeTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createScopeNamespaceTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createScopeNamespaceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $scope = 'scope109264468'; - $expectedResponse = new PBNamespace(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setScope($scope); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createScopeNamespaceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); - $scopeNamespaceId = 'scopeNamespaceId-236818806'; - $scopeNamespace = new PBNamespace(); - $scopeNamespaceScope = $gapicClient->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); - $scopeNamespace->setScope($scopeNamespaceScope); - $request = (new CreateScopeNamespaceRequest()) - ->setParent($formattedParent) - ->setScopeNamespaceId($scopeNamespaceId) - ->setScopeNamespace($scopeNamespace); - $response = $gapicClient->createScopeNamespace($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkehub.v1.GkeHub/CreateScopeNamespace', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getScopeNamespaceId(); - $this->assertProtobufEquals($scopeNamespaceId, $actualValue); - $actualValue = $actualApiRequestObject->getScopeNamespace(); - $this->assertProtobufEquals($scopeNamespace, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createScopeNamespaceTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createScopeNamespaceExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createScopeNamespaceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); - $scopeNamespaceId = 'scopeNamespaceId-236818806'; - $scopeNamespace = new PBNamespace(); - $scopeNamespaceScope = $gapicClient->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); - $scopeNamespace->setScope($scopeNamespaceScope); - $request = (new CreateScopeNamespaceRequest()) - ->setParent($formattedParent) - ->setScopeNamespaceId($scopeNamespaceId) - ->setScopeNamespace($scopeNamespace); - $response = $gapicClient->createScopeNamespace($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createScopeNamespaceTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createScopeRBACRoleBindingTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createScopeRBACRoleBindingTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $user = 'user3599307'; - $name = 'name3373707'; - $uid = 'uid115792'; - $expectedResponse = new RBACRoleBinding(); - $expectedResponse->setUser($user); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createScopeRBACRoleBindingTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); - $rbacrolebindingId = 'rbacrolebindingId-114871075'; - $rbacrolebinding = new RBACRoleBinding(); - $rbacrolebindingRole = new Role(); - $rbacrolebinding->setRole($rbacrolebindingRole); - $request = (new CreateScopeRBACRoleBindingRequest()) - ->setParent($formattedParent) - ->setRbacrolebindingId($rbacrolebindingId) - ->setRbacrolebinding($rbacrolebinding); - $response = $gapicClient->createScopeRBACRoleBinding($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkehub.v1.GkeHub/CreateScopeRBACRoleBinding', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getRbacrolebindingId(); - $this->assertProtobufEquals($rbacrolebindingId, $actualValue); - $actualValue = $actualApiRequestObject->getRbacrolebinding(); - $this->assertProtobufEquals($rbacrolebinding, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createScopeRBACRoleBindingTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createScopeRBACRoleBindingExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createScopeRBACRoleBindingTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); - $rbacrolebindingId = 'rbacrolebindingId-114871075'; - $rbacrolebinding = new RBACRoleBinding(); - $rbacrolebindingRole = new Role(); - $rbacrolebinding->setRole($rbacrolebindingRole); - $request = (new CreateScopeRBACRoleBindingRequest()) - ->setParent($formattedParent) - ->setRbacrolebindingId($rbacrolebindingId) - ->setRbacrolebinding($rbacrolebinding); - $response = $gapicClient->createScopeRBACRoleBinding($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createScopeRBACRoleBindingTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteFeatureTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteFeatureTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteFeatureTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - $request = new DeleteFeatureRequest(); - $response = $gapicClient->deleteFeature($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkehub.v1.GkeHub/DeleteFeature', $actualApiFuncCall); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteFeatureTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteFeatureExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteFeatureTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - $request = new DeleteFeatureRequest(); - $response = $gapicClient->deleteFeature($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteFeatureTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteFleetTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteFleetTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteFleetTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->fleetName('[PROJECT]', '[LOCATION]', '[FLEET]'); - $request = (new DeleteFleetRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteFleet($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkehub.v1.GkeHub/DeleteFleet', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteFleetTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteFleetExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteFleetTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->fleetName('[PROJECT]', '[LOCATION]', '[FLEET]'); - $request = (new DeleteFleetRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteFleet($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteFleetTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteMembershipTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteMembershipTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteMembershipTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); - $request = (new DeleteMembershipRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteMembership($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkehub.v1.GkeHub/DeleteMembership', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteMembershipTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteMembershipExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteMembershipTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); - $request = (new DeleteMembershipRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteMembership($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteMembershipTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteMembershipBindingTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteMembershipBindingTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteMembershipBindingTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->membershipBindingName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]', '[MEMBERSHIPBINDING]'); - $request = (new DeleteMembershipBindingRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteMembershipBinding($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkehub.v1.GkeHub/DeleteMembershipBinding', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteMembershipBindingTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteMembershipBindingExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteMembershipBindingTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->membershipBindingName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]', '[MEMBERSHIPBINDING]'); - $request = (new DeleteMembershipBindingRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteMembershipBinding($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteMembershipBindingTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteMembershipRBACRoleBindingTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteMembershipRBACRoleBindingTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteMembershipRBACRoleBindingTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->rBACRoleBindingName('[PROJECT]', '[LOCATION]', '[SCOPE]', '[RBACROLEBINDING]'); - $request = (new DeleteMembershipRBACRoleBindingRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteMembershipRBACRoleBinding($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkehub.v1.GkeHub/DeleteMembershipRBACRoleBinding', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteMembershipRBACRoleBindingTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteMembershipRBACRoleBindingExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteMembershipRBACRoleBindingTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->rBACRoleBindingName('[PROJECT]', '[LOCATION]', '[SCOPE]', '[RBACROLEBINDING]'); - $request = (new DeleteMembershipRBACRoleBindingRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteMembershipRBACRoleBinding($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteMembershipRBACRoleBindingTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteScopeTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteScopeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteScopeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); - $request = (new DeleteScopeRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteScope($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkehub.v1.GkeHub/DeleteScope', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteScopeTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteScopeExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteScopeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); - $request = (new DeleteScopeRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteScope($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteScopeTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteScopeNamespaceTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteScopeNamespaceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteScopeNamespaceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->namespaceName('[PROJECT]', '[LOCATION]', '[SCOPE]', '[NAMESPACE]'); - $request = (new DeleteScopeNamespaceRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteScopeNamespace($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkehub.v1.GkeHub/DeleteScopeNamespace', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteScopeNamespaceTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteScopeNamespaceExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteScopeNamespaceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->namespaceName('[PROJECT]', '[LOCATION]', '[SCOPE]', '[NAMESPACE]'); - $request = (new DeleteScopeNamespaceRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteScopeNamespace($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteScopeNamespaceTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteScopeRBACRoleBindingTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteScopeRBACRoleBindingTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteScopeRBACRoleBindingTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->rBACRoleBindingName('[PROJECT]', '[LOCATION]', '[SCOPE]', '[RBACROLEBINDING]'); - $request = (new DeleteScopeRBACRoleBindingRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteScopeRBACRoleBinding($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkehub.v1.GkeHub/DeleteScopeRBACRoleBinding', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteScopeRBACRoleBindingTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteScopeRBACRoleBindingExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteScopeRBACRoleBindingTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->rBACRoleBindingName('[PROJECT]', '[LOCATION]', '[SCOPE]', '[RBACROLEBINDING]'); - $request = (new DeleteScopeRBACRoleBindingRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteScopeRBACRoleBinding($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteScopeRBACRoleBindingTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function generateConnectManifestTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GenerateConnectManifestResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); - $request = (new GenerateConnectManifestRequest()) - ->setName($formattedName); - $response = $gapicClient->generateConnectManifest($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.gkehub.v1.GkeHub/GenerateConnectManifest', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateConnectManifestExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); - $request = (new GenerateConnectManifestRequest()) - ->setName($formattedName); - try { - $gapicClient->generateConnectManifest($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 generateMembershipRBACRoleBindingYAMLTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $roleBindingsYaml = 'roleBindingsYaml1394984367'; - $expectedResponse = new GenerateMembershipRBACRoleBindingYAMLResponse(); - $expectedResponse->setRoleBindingsYaml($roleBindingsYaml); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); - $rbacrolebindingId = 'rbacrolebindingId-114871075'; - $rbacrolebinding = new RBACRoleBinding(); - $rbacrolebindingRole = new Role(); - $rbacrolebinding->setRole($rbacrolebindingRole); - $request = (new GenerateMembershipRBACRoleBindingYAMLRequest()) - ->setParent($formattedParent) - ->setRbacrolebindingId($rbacrolebindingId) - ->setRbacrolebinding($rbacrolebinding); - $response = $gapicClient->generateMembershipRBACRoleBindingYAML($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.gkehub.v1.GkeHub/GenerateMembershipRBACRoleBindingYAML', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getRbacrolebindingId(); - $this->assertProtobufEquals($rbacrolebindingId, $actualValue); - $actualValue = $actualRequestObject->getRbacrolebinding(); - $this->assertProtobufEquals($rbacrolebinding, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateMembershipRBACRoleBindingYAMLExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); - $rbacrolebindingId = 'rbacrolebindingId-114871075'; - $rbacrolebinding = new RBACRoleBinding(); - $rbacrolebindingRole = new Role(); - $rbacrolebinding->setRole($rbacrolebindingRole); - $request = (new GenerateMembershipRBACRoleBindingYAMLRequest()) - ->setParent($formattedParent) - ->setRbacrolebindingId($rbacrolebindingId) - ->setRbacrolebinding($rbacrolebinding); - try { - $gapicClient->generateMembershipRBACRoleBindingYAML($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 getFeatureTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new Feature(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - $request = new GetFeatureRequest(); - $response = $gapicClient->getFeature($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.gkehub.v1.GkeHub/GetFeature', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getFeatureExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 GetFeatureRequest(); - try { - $gapicClient->getFeature($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 getFleetTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $expectedResponse = new Fleet(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->fleetName('[PROJECT]', '[LOCATION]', '[FLEET]'); - $request = (new GetFleetRequest()) - ->setName($formattedName); - $response = $gapicClient->getFleet($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.gkehub.v1.GkeHub/GetFleet', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getFleetExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->fleetName('[PROJECT]', '[LOCATION]', '[FLEET]'); - $request = (new GetFleetRequest()) - ->setName($formattedName); - try { - $gapicClient->getFleet($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 getMembershipTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $externalId = 'externalId-1153075697'; - $uniqueId = 'uniqueId-538310583'; - $expectedResponse = new Membership(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setExternalId($externalId); - $expectedResponse->setUniqueId($uniqueId); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); - $request = (new GetMembershipRequest()) - ->setName($formattedName); - $response = $gapicClient->getMembership($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.gkehub.v1.GkeHub/GetMembership', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getMembershipExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); - $request = (new GetMembershipRequest()) - ->setName($formattedName); - try { - $gapicClient->getMembership($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 getMembershipBindingTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $scope = 'scope109264468'; - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $expectedResponse = new MembershipBinding(); - $expectedResponse->setScope($scope); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->membershipBindingName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]', '[MEMBERSHIPBINDING]'); - $request = (new GetMembershipBindingRequest()) - ->setName($formattedName); - $response = $gapicClient->getMembershipBinding($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.gkehub.v1.GkeHub/GetMembershipBinding', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getMembershipBindingExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->membershipBindingName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]', '[MEMBERSHIPBINDING]'); - $request = (new GetMembershipBindingRequest()) - ->setName($formattedName); - try { - $gapicClient->getMembershipBinding($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 getMembershipRBACRoleBindingTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $user = 'user3599307'; - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $expectedResponse = new RBACRoleBinding(); - $expectedResponse->setUser($user); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->rBACRoleBindingName('[PROJECT]', '[LOCATION]', '[SCOPE]', '[RBACROLEBINDING]'); - $request = (new GetMembershipRBACRoleBindingRequest()) - ->setName($formattedName); - $response = $gapicClient->getMembershipRBACRoleBinding($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.gkehub.v1.GkeHub/GetMembershipRBACRoleBinding', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getMembershipRBACRoleBindingExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->rBACRoleBindingName('[PROJECT]', '[LOCATION]', '[SCOPE]', '[RBACROLEBINDING]'); - $request = (new GetMembershipRBACRoleBindingRequest()) - ->setName($formattedName); - try { - $gapicClient->getMembershipRBACRoleBinding($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 getScopeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $expectedResponse = new Scope(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); - $request = (new GetScopeRequest()) - ->setName($formattedName); - $response = $gapicClient->getScope($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.gkehub.v1.GkeHub/GetScope', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getScopeExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); - $request = (new GetScopeRequest()) - ->setName($formattedName); - try { - $gapicClient->getScope($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 getScopeNamespaceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $scope = 'scope109264468'; - $expectedResponse = new PBNamespace(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setScope($scope); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->namespaceName('[PROJECT]', '[LOCATION]', '[SCOPE]', '[NAMESPACE]'); - $request = (new GetScopeNamespaceRequest()) - ->setName($formattedName); - $response = $gapicClient->getScopeNamespace($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.gkehub.v1.GkeHub/GetScopeNamespace', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getScopeNamespaceExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]', '[SCOPE]', '[NAMESPACE]'); - $request = (new GetScopeNamespaceRequest()) - ->setName($formattedName); - try { - $gapicClient->getScopeNamespace($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 getScopeRBACRoleBindingTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $user = 'user3599307'; - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $expectedResponse = new RBACRoleBinding(); - $expectedResponse->setUser($user); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->rBACRoleBindingName('[PROJECT]', '[LOCATION]', '[SCOPE]', '[RBACROLEBINDING]'); - $request = (new GetScopeRBACRoleBindingRequest()) - ->setName($formattedName); - $response = $gapicClient->getScopeRBACRoleBinding($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.gkehub.v1.GkeHub/GetScopeRBACRoleBinding', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getScopeRBACRoleBindingExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->rBACRoleBindingName('[PROJECT]', '[LOCATION]', '[SCOPE]', '[RBACROLEBINDING]'); - $request = (new GetScopeRBACRoleBindingRequest()) - ->setName($formattedName); - try { - $gapicClient->getScopeRBACRoleBinding($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 listBoundMembershipsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $membershipsElement = new Membership(); - $memberships = [ - $membershipsElement, - ]; - $expectedResponse = new ListBoundMembershipsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setMemberships($memberships); - $transport->addResponse($expectedResponse); - // Mock request - $formattedScopeName = $gapicClient->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); - $request = (new ListBoundMembershipsRequest()) - ->setScopeName($formattedScopeName); - $response = $gapicClient->listBoundMemberships($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getMemberships()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkehub.v1.GkeHub/ListBoundMemberships', $actualFuncCall); - $actualValue = $actualRequestObject->getScopeName(); - $this->assertProtobufEquals($formattedScopeName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listBoundMembershipsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedScopeName = $gapicClient->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); - $request = (new ListBoundMembershipsRequest()) - ->setScopeName($formattedScopeName); - try { - $gapicClient->listBoundMemberships($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 listFeaturesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $resourcesElement = new Feature(); - $resources = [ - $resourcesElement, - ]; - $expectedResponse = new ListFeaturesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setResources($resources); - $transport->addResponse($expectedResponse); - $request = new ListFeaturesRequest(); - $response = $gapicClient->listFeatures($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getResources()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkehub.v1.GkeHub/ListFeatures', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listFeaturesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 ListFeaturesRequest(); - try { - $gapicClient->listFeatures($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 listFleetsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $fleetsElement = new Fleet(); - $fleets = [ - $fleetsElement, - ]; - $expectedResponse = new ListFleetsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setFleets($fleets); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListFleetsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listFleets($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getFleets()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkehub.v1.GkeHub/ListFleets', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listFleetsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListFleetsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listFleets($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 listMembershipBindingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $membershipBindingsElement = new MembershipBinding(); - $membershipBindings = [ - $membershipBindingsElement, - ]; - $expectedResponse = new ListMembershipBindingsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setMembershipBindings($membershipBindings); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); - $request = (new ListMembershipBindingsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listMembershipBindings($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getMembershipBindings()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkehub.v1.GkeHub/ListMembershipBindings', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listMembershipBindingsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); - $request = (new ListMembershipBindingsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listMembershipBindings($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 listMembershipRBACRoleBindingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $rbacrolebindingsElement = new RBACRoleBinding(); - $rbacrolebindings = [ - $rbacrolebindingsElement, - ]; - $expectedResponse = new ListMembershipRBACRoleBindingsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setRbacrolebindings($rbacrolebindings); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); - $request = (new ListMembershipRBACRoleBindingsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listMembershipRBACRoleBindings($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getRbacrolebindings()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkehub.v1.GkeHub/ListMembershipRBACRoleBindings', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listMembershipRBACRoleBindingsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); - $request = (new ListMembershipRBACRoleBindingsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listMembershipRBACRoleBindings($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 listMembershipsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $resourcesElement = new Membership(); - $resources = [ - $resourcesElement, - ]; - $expectedResponse = new ListMembershipsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setResources($resources); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListMembershipsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listMemberships($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getResources()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkehub.v1.GkeHub/ListMemberships', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listMembershipsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListMembershipsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listMemberships($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 listPermittedScopesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $scopesElement = new Scope(); - $scopes = [ - $scopesElement, - ]; - $expectedResponse = new ListPermittedScopesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setScopes($scopes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListPermittedScopesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listPermittedScopes($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getScopes()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkehub.v1.GkeHub/ListPermittedScopes', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listPermittedScopesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListPermittedScopesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listPermittedScopes($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 listScopeNamespacesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $scopeNamespacesElement = new PBNamespace(); - $scopeNamespaces = [ - $scopeNamespacesElement, - ]; - $expectedResponse = new ListScopeNamespacesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setScopeNamespaces($scopeNamespaces); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); - $request = (new ListScopeNamespacesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listScopeNamespaces($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getScopeNamespaces()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkehub.v1.GkeHub/ListScopeNamespaces', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listScopeNamespacesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); - $request = (new ListScopeNamespacesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listScopeNamespaces($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 listScopeRBACRoleBindingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $rbacrolebindingsElement = new RBACRoleBinding(); - $rbacrolebindings = [ - $rbacrolebindingsElement, - ]; - $expectedResponse = new ListScopeRBACRoleBindingsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setRbacrolebindings($rbacrolebindings); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); - $request = (new ListScopeRBACRoleBindingsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listScopeRBACRoleBindings($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getRbacrolebindings()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkehub.v1.GkeHub/ListScopeRBACRoleBindings', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listScopeRBACRoleBindingsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); - $request = (new ListScopeRBACRoleBindingsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listScopeRBACRoleBindings($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 listScopesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $scopesElement = new Scope(); - $scopes = [ - $scopesElement, - ]; - $expectedResponse = new ListScopesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setScopes($scopes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListScopesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listScopes($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getScopes()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkehub.v1.GkeHub/ListScopes', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listScopesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListScopesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listScopes($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 updateFeatureTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateFeatureTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $expectedResponse = new Feature(); - $expectedResponse->setName($name2); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateFeatureTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - $request = new UpdateFeatureRequest(); - $response = $gapicClient->updateFeature($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkehub.v1.GkeHub/UpdateFeature', $actualApiFuncCall); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateFeatureTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateFeatureExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateFeatureTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - $request = new UpdateFeatureRequest(); - $response = $gapicClient->updateFeature($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateFeatureTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateFleetTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateFleetTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $expectedResponse = new Fleet(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateFleetTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $fleet = new Fleet(); - $updateMask = new FieldMask(); - $request = (new UpdateFleetRequest()) - ->setFleet($fleet) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateFleet($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkehub.v1.GkeHub/UpdateFleet', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getFleet(); - $this->assertProtobufEquals($fleet, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateFleetTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateFleetExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateFleetTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $fleet = new Fleet(); - $updateMask = new FieldMask(); - $request = (new UpdateFleetRequest()) - ->setFleet($fleet) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateFleet($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateFleetTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateMembershipTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateMembershipTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $externalId = 'externalId-1153075697'; - $uniqueId = 'uniqueId-538310583'; - $expectedResponse = new Membership(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setExternalId($externalId); - $expectedResponse->setUniqueId($uniqueId); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateMembershipTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); - $updateMask = new FieldMask(); - $resource = new Membership(); - $request = (new UpdateMembershipRequest()) - ->setName($formattedName) - ->setUpdateMask($updateMask) - ->setResource($resource); - $response = $gapicClient->updateMembership($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkehub.v1.GkeHub/UpdateMembership', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateMembershipTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateMembershipExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateMembershipTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); - $updateMask = new FieldMask(); - $resource = new Membership(); - $request = (new UpdateMembershipRequest()) - ->setName($formattedName) - ->setUpdateMask($updateMask) - ->setResource($resource); - $response = $gapicClient->updateMembership($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateMembershipTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateMembershipBindingTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateMembershipBindingTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $scope = 'scope109264468'; - $name = 'name3373707'; - $uid = 'uid115792'; - $expectedResponse = new MembershipBinding(); - $expectedResponse->setScope($scope); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateMembershipBindingTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $membershipBinding = new MembershipBinding(); - $updateMask = new FieldMask(); - $request = (new UpdateMembershipBindingRequest()) - ->setMembershipBinding($membershipBinding) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateMembershipBinding($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkehub.v1.GkeHub/UpdateMembershipBinding', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getMembershipBinding(); - $this->assertProtobufEquals($membershipBinding, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateMembershipBindingTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateMembershipBindingExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateMembershipBindingTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $membershipBinding = new MembershipBinding(); - $updateMask = new FieldMask(); - $request = (new UpdateMembershipBindingRequest()) - ->setMembershipBinding($membershipBinding) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateMembershipBinding($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateMembershipBindingTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateMembershipRBACRoleBindingTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateMembershipRBACRoleBindingTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $user = 'user3599307'; - $name = 'name3373707'; - $uid = 'uid115792'; - $expectedResponse = new RBACRoleBinding(); - $expectedResponse->setUser($user); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateMembershipRBACRoleBindingTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $rbacrolebinding = new RBACRoleBinding(); - $rbacrolebindingRole = new Role(); - $rbacrolebinding->setRole($rbacrolebindingRole); - $updateMask = new FieldMask(); - $request = (new UpdateMembershipRBACRoleBindingRequest()) - ->setRbacrolebinding($rbacrolebinding) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateMembershipRBACRoleBinding($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkehub.v1.GkeHub/UpdateMembershipRBACRoleBinding', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getRbacrolebinding(); - $this->assertProtobufEquals($rbacrolebinding, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateMembershipRBACRoleBindingTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateMembershipRBACRoleBindingExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateMembershipRBACRoleBindingTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $rbacrolebinding = new RBACRoleBinding(); - $rbacrolebindingRole = new Role(); - $rbacrolebinding->setRole($rbacrolebindingRole); - $updateMask = new FieldMask(); - $request = (new UpdateMembershipRBACRoleBindingRequest()) - ->setRbacrolebinding($rbacrolebinding) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateMembershipRBACRoleBinding($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateMembershipRBACRoleBindingTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateScopeTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateScopeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $expectedResponse = new Scope(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateScopeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $scope = new Scope(); - $updateMask = new FieldMask(); - $request = (new UpdateScopeRequest()) - ->setScope($scope) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateScope($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkehub.v1.GkeHub/UpdateScope', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getScope(); - $this->assertProtobufEquals($scope, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateScopeTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateScopeExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateScopeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $scope = new Scope(); - $updateMask = new FieldMask(); - $request = (new UpdateScopeRequest()) - ->setScope($scope) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateScope($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateScopeTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateScopeNamespaceTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateScopeNamespaceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $scope = 'scope109264468'; - $expectedResponse = new PBNamespace(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setScope($scope); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateScopeNamespaceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $scopeNamespace = new PBNamespace(); - $scopeNamespaceScope = $gapicClient->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); - $scopeNamespace->setScope($scopeNamespaceScope); - $updateMask = new FieldMask(); - $request = (new UpdateScopeNamespaceRequest()) - ->setScopeNamespace($scopeNamespace) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateScopeNamespace($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkehub.v1.GkeHub/UpdateScopeNamespace', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getScopeNamespace(); - $this->assertProtobufEquals($scopeNamespace, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateScopeNamespaceTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateScopeNamespaceExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateScopeNamespaceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $scopeNamespace = new PBNamespace(); - $scopeNamespaceScope = $gapicClient->scopeName('[PROJECT]', '[LOCATION]', '[SCOPE]'); - $scopeNamespace->setScope($scopeNamespaceScope); - $updateMask = new FieldMask(); - $request = (new UpdateScopeNamespaceRequest()) - ->setScopeNamespace($scopeNamespace) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateScopeNamespace($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateScopeNamespaceTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateScopeRBACRoleBindingTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateScopeRBACRoleBindingTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $user = 'user3599307'; - $name = 'name3373707'; - $uid = 'uid115792'; - $expectedResponse = new RBACRoleBinding(); - $expectedResponse->setUser($user); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateScopeRBACRoleBindingTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $rbacrolebinding = new RBACRoleBinding(); - $rbacrolebindingRole = new Role(); - $rbacrolebinding->setRole($rbacrolebindingRole); - $updateMask = new FieldMask(); - $request = (new UpdateScopeRBACRoleBindingRequest()) - ->setRbacrolebinding($rbacrolebinding) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateScopeRBACRoleBinding($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkehub.v1.GkeHub/UpdateScopeRBACRoleBinding', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getRbacrolebinding(); - $this->assertProtobufEquals($rbacrolebinding, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateScopeRBACRoleBindingTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateScopeRBACRoleBindingExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateScopeRBACRoleBindingTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $rbacrolebinding = new RBACRoleBinding(); - $rbacrolebindingRole = new Role(); - $rbacrolebinding->setRole($rbacrolebindingRole); - $updateMask = new FieldMask(); - $request = (new UpdateScopeRBACRoleBindingRequest()) - ->setRbacrolebinding($rbacrolebinding) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateScopeRBACRoleBinding($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateScopeRBACRoleBindingTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createFeatureAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createFeatureTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $expectedResponse = new Feature(); - $expectedResponse->setName($name); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createFeatureTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - $request = new CreateFeatureRequest(); - $response = $gapicClient->createFeatureAsync($request)->wait(); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkehub.v1.GkeHub/CreateFeature', $actualApiFuncCall); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createFeatureTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -}