From b85568fd643b0b4d00bb412eb1c7557d5d64ce7a Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 15 Sep 2023 00:58:41 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20post-p?= =?UTF-8?q?rocessor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- Dataproc/metadata/V1/Clusters.php | Bin 14236 -> 14551 bytes Dataproc/src/V1/DiagnoseClusterRequest.php | 166 ++ .../V1/Gapic/ClusterControllerGapicClient.php | 30 + Dataproc/src/V1/InstanceGroupConfig.php | 112 +- Dataproc/src/V1/NodeGroup/Role.php | 4 +- .../Cloud/Dataproc/V1/AutoscalingPolicies.php | Bin 4769 -> 0 bytes .../Google/Cloud/Dataproc/V1/Batches.php | Bin 4874 -> 0 bytes .../Google/Cloud/Dataproc/V1/Clusters.php | Bin 14551 -> 0 bytes .../Google/Cloud/Dataproc/V1/Jobs.php | Bin 10441 -> 0 bytes .../Google/Cloud/Dataproc/V1/NodeGroups.php | 58 - .../Google/Cloud/Dataproc/V1/Operations.php | Bin 2759 -> 0 bytes .../Google/Cloud/Dataproc/V1/Shared.php | Bin 4696 -> 0 bytes .../Cloud/Dataproc/V1/WorkflowTemplates.php | Bin 8970 -> 0 bytes .../Cloud/Dataproc/V1/AcceleratorConfig.php | 151 -- .../Cloud/Dataproc/V1/AutoscalingConfig.php | 87 - .../Cloud/Dataproc/V1/AutoscalingPolicy.php | 324 ---- .../Cloud/Dataproc/V1/AuxiliaryNodeGroup.php | 123 -- .../Dataproc/V1/AuxiliaryServicesConfig.php | 121 -- .../Dataproc/V1/BasicAutoscalingAlgorithm.php | 127 -- .../V1/BasicYarnAutoscalingConfig.php | 333 ---- .../src/Google/Cloud/Dataproc/V1/Batch.php | 698 --------- .../Google/Cloud/Dataproc/V1/Batch/State.php | 92 -- .../Cloud/Dataproc/V1/Batch/StateHistory.php | 148 -- .../Dataproc/V1/BatchOperationMetadata.php | 325 ---- .../BatchOperationType.php | 57 - .../Cloud/Dataproc/V1/CancelJobRequest.php | 157 -- .../src/Google/Cloud/Dataproc/V1/Cluster.php | 472 ------ .../Cloud/Dataproc/V1/ClusterConfig.php | 841 ---------- .../Cloud/Dataproc/V1/ClusterMetrics.php | 103 -- .../Cloud/Dataproc/V1/ClusterOperation.php | 135 -- .../Dataproc/V1/ClusterOperationMetadata.php | 349 ----- .../Dataproc/V1/ClusterOperationStatus.php | 179 --- .../V1/ClusterOperationStatus/State.php | 71 - .../Cloud/Dataproc/V1/ClusterSelector.php | 117 -- .../Cloud/Dataproc/V1/ClusterStatus.php | 187 --- .../Cloud/Dataproc/V1/ClusterStatus/State.php | 124 -- .../Dataproc/V1/ClusterStatus/Substate.php | 69 - .../Google/Cloud/Dataproc/V1/Component.php | 149 -- .../V1/ConfidentialInstanceConfig.php | 72 - .../V1/CreateAutoscalingPolicyRequest.php | 164 -- .../Cloud/Dataproc/V1/CreateBatchRequest.php | 244 --- .../Dataproc/V1/CreateClusterRequest.php | 271 ---- .../Dataproc/V1/CreateNodeGroupRequest.php | 254 --- .../V1/CreateWorkflowTemplateRequest.php | 164 -- .../Dataproc/V1/DataprocMetricConfig.php | 67 - .../V1/DataprocMetricConfig/Metric.php | 208 --- .../V1/DataprocMetricConfig/MetricSource.php | 104 -- .../V1/DeleteAutoscalingPolicyRequest.php | 119 -- .../Cloud/Dataproc/V1/DeleteBatchRequest.php | 91 -- .../Dataproc/V1/DeleteClusterRequest.php | 265 ---- .../Cloud/Dataproc/V1/DeleteJobRequest.php | 157 -- .../V1/DeleteWorkflowTemplateRequest.php | 161 -- .../Dataproc/V1/DiagnoseClusterRequest.php | 323 ---- .../Dataproc/V1/DiagnoseClusterResults.php | 75 - .../Google/Cloud/Dataproc/V1/DiskConfig.php | 229 --- .../Dataproc/V1/DriverSchedulingConfig.php | 101 -- .../Cloud/Dataproc/V1/EncryptionConfig.php | 71 - .../Cloud/Dataproc/V1/EndpointConfig.php | 109 -- .../Cloud/Dataproc/V1/EnvironmentConfig.php | 121 -- .../Cloud/Dataproc/V1/ExecutionConfig.php | 352 ----- .../Cloud/Dataproc/V1/FailureAction.php | 62 - .../Cloud/Dataproc/V1/GceClusterConfig.php | 726 --------- .../PrivateIpv6GoogleAccess.php | 81 - .../V1/GetAutoscalingPolicyRequest.php | 118 -- .../Cloud/Dataproc/V1/GetBatchRequest.php | 91 -- .../Cloud/Dataproc/V1/GetClusterRequest.php | 157 -- .../Cloud/Dataproc/V1/GetJobRequest.php | 157 -- .../Cloud/Dataproc/V1/GetNodeGroupRequest.php | 91 -- .../V1/GetWorkflowTemplateRequest.php | 160 -- .../Cloud/Dataproc/V1/GkeClusterConfig.php | 133 -- .../Cloud/Dataproc/V1/GkeNodePoolConfig.php | 192 --- .../V1/GkeNodePoolConfig/GkeNodeConfig.php | 398 ----- .../GkeNodePoolAcceleratorConfig.php | 147 -- .../GkeNodePoolAutoscalingConfig.php | 117 -- .../Cloud/Dataproc/V1/GkeNodePoolTarget.php | 185 --- .../Dataproc/V1/GkeNodePoolTarget/Role.php | 91 -- .../Google/Cloud/Dataproc/V1/HadoopJob.php | 385 ----- .../src/Google/Cloud/Dataproc/V1/HiveJob.php | 277 ---- .../Cloud/Dataproc/V1/IdentityConfig.php | 68 - .../Dataproc/V1/InstanceFlexibilityPolicy.php | 106 -- .../InstanceSelection.php | 120 -- .../InstanceSelectionResult.php | 125 -- .../InstanceGroupAutoscalingPolicyConfig.php | 220 --- .../Cloud/Dataproc/V1/InstanceGroupConfig.php | 698 --------- .../V1/InstanceGroupConfig/Preemptibility.php | 84 - .../Cloud/Dataproc/V1/InstanceReference.php | 169 -- ...stantiateInlineWorkflowTemplateRequest.php | 222 --- .../V1/InstantiateWorkflowTemplateRequest.php | 290 ---- .../src/Google/Cloud/Dataproc/V1/Job.php | 885 ----------- .../Google/Cloud/Dataproc/V1/JobMetadata.php | 189 --- .../Google/Cloud/Dataproc/V1/JobPlacement.php | 143 -- .../Google/Cloud/Dataproc/V1/JobReference.php | 117 -- .../Cloud/Dataproc/V1/JobScheduling.php | 161 -- .../Google/Cloud/Dataproc/V1/JobStatus.php | 187 --- .../Cloud/Dataproc/V1/JobStatus/State.php | 117 -- .../Cloud/Dataproc/V1/JobStatus/Substate.php | 78 - .../Cloud/Dataproc/V1/KerberosConfig.php | 631 -------- .../Dataproc/V1/KubernetesClusterConfig.php | 169 -- .../Dataproc/V1/KubernetesSoftwareConfig.php | 137 -- .../Cloud/Dataproc/V1/LifecycleConfig.php | 239 --- .../V1/ListAutoscalingPoliciesRequest.php | 194 --- .../V1/ListAutoscalingPoliciesResponse.php | 105 -- .../Cloud/Dataproc/V1/ListBatchesRequest.php | 273 ---- .../Cloud/Dataproc/V1/ListBatchesResponse.php | 105 -- .../Cloud/Dataproc/V1/ListClustersRequest.php | 315 ---- .../Dataproc/V1/ListClustersResponse.php | 109 -- .../Cloud/Dataproc/V1/ListJobsRequest.php | 374 ----- .../V1/ListJobsRequest/JobStateMatcher.php | 65 - .../Cloud/Dataproc/V1/ListJobsResponse.php | 109 -- .../V1/ListWorkflowTemplatesRequest.php | 190 --- .../V1/ListWorkflowTemplatesResponse.php | 109 -- .../Cloud/Dataproc/V1/LoggingConfig.php | 87 - .../Cloud/Dataproc/V1/LoggingConfig/Level.php | 108 -- .../Cloud/Dataproc/V1/ManagedCluster.php | 185 --- .../Cloud/Dataproc/V1/ManagedGroupConfig.php | 143 -- .../Cloud/Dataproc/V1/MetastoreConfig.php | 75 - .../Google/Cloud/Dataproc/V1/NodeGroup.php | 206 --- .../Cloud/Dataproc/V1/NodeGroup/Role.php | 57 - .../Cloud/Dataproc/V1/NodeGroupAffinity.php | 97 -- .../V1/NodeGroupOperationMetadata.php | 315 ---- .../NodeGroupOperationType.php | 78 - .../Dataproc/V1/NodeInitializationAction.php | 132 -- .../Google/Cloud/Dataproc/V1/OrderedJob.php | 512 ------ .../Cloud/Dataproc/V1/ParameterValidation.php | 108 -- .../Cloud/Dataproc/V1/PeripheralsConfig.php | 119 -- .../src/Google/Cloud/Dataproc/V1/PigJob.php | 317 ---- .../Google/Cloud/Dataproc/V1/PrestoJob.php | 312 ---- .../Google/Cloud/Dataproc/V1/PySparkBatch.php | 272 ---- .../Google/Cloud/Dataproc/V1/PySparkJob.php | 362 ----- .../Google/Cloud/Dataproc/V1/QueryList.php | 115 -- .../Cloud/Dataproc/V1/RegexValidation.php | 75 - .../Cloud/Dataproc/V1/ReservationAffinity.php | 135 -- .../Dataproc/V1/ReservationAffinity/Type.php | 70 - .../Dataproc/V1/ResizeNodeGroupRequest.php | 290 ---- .../Cloud/Dataproc/V1/RuntimeConfig.php | 143 -- .../Google/Cloud/Dataproc/V1/RuntimeInfo.php | 239 --- .../Cloud/Dataproc/V1/SecurityConfig.php | 125 -- .../Dataproc/V1/ShieldedInstanceConfig.php | 166 -- .../Cloud/Dataproc/V1/SoftwareConfig.php | 215 --- .../Google/Cloud/Dataproc/V1/SparkBatch.php | 272 ---- .../Dataproc/V1/SparkHistoryServerConfig.php | 79 - .../src/Google/Cloud/Dataproc/V1/SparkJob.php | 362 ----- .../Google/Cloud/Dataproc/V1/SparkRBatch.php | 195 --- .../Google/Cloud/Dataproc/V1/SparkRJob.php | 285 ---- .../Cloud/Dataproc/V1/SparkSqlBatch.php | 145 -- .../Google/Cloud/Dataproc/V1/SparkSqlJob.php | 267 ---- .../Cloud/Dataproc/V1/StartClusterRequest.php | 247 --- .../Cloud/Dataproc/V1/StopClusterRequest.php | 247 --- .../Cloud/Dataproc/V1/SubmitJobRequest.php | 237 --- .../Cloud/Dataproc/V1/TemplateParameter.php | 355 ----- .../src/Google/Cloud/Dataproc/V1/TrinoJob.php | 312 ---- .../V1/UpdateAutoscalingPolicyRequest.php | 90 -- .../Dataproc/V1/UpdateClusterRequest.php | 629 -------- .../Cloud/Dataproc/V1/UpdateJobRequest.php | 247 --- .../V1/UpdateWorkflowTemplateRequest.php | 96 -- .../Google/Cloud/Dataproc/V1/UsageMetrics.php | 117 -- .../Cloud/Dataproc/V1/UsageSnapshot.php | 158 -- .../Cloud/Dataproc/V1/ValueValidation.php | 67 - .../Dataproc/V1/VirtualClusterConfig.php | 198 --- .../Cloud/Dataproc/V1/WorkflowGraph.php | 67 - .../Cloud/Dataproc/V1/WorkflowMetadata.php | 645 -------- .../Dataproc/V1/WorkflowMetadata/State.php | 71 - .../Google/Cloud/Dataproc/V1/WorkflowNode.php | 203 --- .../Dataproc/V1/WorkflowNode/NodeState.php | 86 - .../Cloud/Dataproc/V1/WorkflowTemplate.php | 538 ------- .../Dataproc/V1/WorkflowTemplatePlacement.php | 115 -- .../Cloud/Dataproc/V1/YarnApplication.php | 184 --- .../Dataproc/V1/YarnApplication/State.php | 111 -- .../create_autoscaling_policy.php | 131 -- .../delete_autoscaling_policy.php | 78 - .../get_autoscaling_policy.php | 79 - .../get_iam_policy.php | 67 - .../list_autoscaling_policies.php | 80 - .../set_iam_policy.php | 73 - .../test_iam_permissions.php | 80 - .../update_autoscaling_policy.php | 120 -- .../V1/BatchControllerClient/create_batch.php | 81 - .../V1/BatchControllerClient/delete_batch.php | 67 - .../V1/BatchControllerClient/get_batch.php | 68 - .../BatchControllerClient/get_iam_policy.php | 67 - .../V1/BatchControllerClient/list_batches.php | 71 - .../BatchControllerClient/set_iam_policy.php | 73 - .../test_iam_permissions.php | 80 - .../create_cluster.php | 98 -- .../delete_cluster.php | 81 - .../diagnose_cluster.php | 88 -- .../ClusterControllerClient/get_cluster.php | 70 - .../get_iam_policy.php | 67 - .../ClusterControllerClient/list_clusters.php | 73 - .../set_iam_policy.php | 73 - .../ClusterControllerClient/start_cluster.php | 82 - .../ClusterControllerClient/stop_cluster.php | 82 - .../test_iam_permissions.php | 80 - .../update_cluster.php | 112 -- .../V1/JobControllerClient/cancel_job.php | 74 - .../V1/JobControllerClient/delete_job.php | 69 - .../V1/JobControllerClient/get_iam_policy.php | 67 - .../V1/JobControllerClient/get_job.php | 70 - .../V1/JobControllerClient/list_jobs.php | 73 - .../V1/JobControllerClient/set_iam_policy.php | 73 - .../V1/JobControllerClient/submit_job.php | 80 - .../submit_job_as_operation.php | 92 -- .../test_iam_permissions.php | 80 - .../V1/JobControllerClient/update_job.php | 85 - .../create_node_group.php | 93 -- .../get_iam_policy.php | 67 - .../get_node_group.php | 74 - .../resize_node_group.php | 85 - .../set_iam_policy.php | 73 - .../test_iam_permissions.php | 80 - .../create_workflow_template.php | 104 -- .../delete_workflow_template.php | 77 - .../get_iam_policy.php | 67 - .../get_workflow_template.php | 82 - .../instantiate_inline_workflow_template.php | 141 -- .../instantiate_workflow_template.php | 107 -- .../list_workflow_templates.php | 80 - .../set_iam_policy.php | 73 - .../test_iam_permissions.php | 80 - .../update_workflow_template.php | 90 -- .../src/V1/AutoscalingPolicyServiceClient.php | 34 - .../v1/src/V1/BatchControllerClient.php | 34 - .../Client/AutoscalingPolicyServiceClient.php | 40 - .../AutoscalingPolicyServiceBaseClient.php | 513 ------ .../BaseClient/BatchControllerBaseClient.php | 479 ------ .../ClusterControllerBaseClient.php | 626 -------- .../BaseClient/JobControllerBaseClient.php | 472 ------ .../NodeGroupControllerBaseClient.php | 445 ------ .../WorkflowTemplateServiceBaseClient.php | 706 --------- .../src/V1/Client/BatchControllerClient.php | 40 - .../src/V1/Client/ClusterControllerClient.php | 40 - .../v1/src/V1/Client/JobControllerClient.php | 40 - .../V1/Client/NodeGroupControllerClient.php | 40 - .../Client/WorkflowTemplateServiceClient.php | 40 - .../v1/src/V1/ClusterControllerClient.php | 34 - .../AutoscalingPolicyServiceGapicClient.php | 812 ---------- .../V1/Gapic/BatchControllerGapicClient.php | 812 ---------- .../V1/Gapic/ClusterControllerGapicClient.php | 1395 ----------------- .../src/V1/Gapic/JobControllerGapicClient.php | 837 ---------- .../Gapic/NodeGroupControllerGapicClient.php | 761 --------- .../WorkflowTemplateServiceGapicClient.php | 1201 -------------- .../v1/src/V1/JobControllerClient.php | 34 - .../v1/src/V1/NodeGroupControllerClient.php | 34 - .../src/V1/WorkflowTemplateServiceClient.php | 34 - .../Dataproc/v1/src/V1/gapic_metadata.json | 323 ---- ...oscaling_policy_service_client_config.json | 85 - ...aling_policy_service_descriptor_config.php | 123 -- ...ling_policy_service_rest_client_config.php | 303 ---- .../batch_controller_client_config.json | 57 - .../batch_controller_descriptor_config.php | 115 -- .../batch_controller_rest_client_config.php | 258 --- .../cluster_controller_client_config.json | 103 -- .../cluster_controller_descriptor_config.php | 283 ---- .../cluster_controller_rest_client_config.php | 379 ----- .../job_controller_client_config.json | 98 -- .../job_controller_descriptor_config.php | 212 --- .../job_controller_rest_client_config.php | 352 ----- .../node_group_controller_client_config.json | 52 - ...ode_group_controller_descriptor_config.php | 101 -- ...de_group_controller_rest_client_config.php | 248 --- ...rkflow_template_service_client_config.json | 98 -- ...low_template_service_descriptor_config.php | 164 -- ...ow_template_service_rest_client_config.php | 341 ---- .../V1/AutoscalingPolicyServiceClientTest.php | 630 -------- .../Unit/V1/BatchControllerClientTest.php | 583 ------- .../AutoscalingPolicyServiceClientTest.php | 725 --------- .../V1/Client/BatchControllerClientTest.php | 702 --------- .../V1/Client/ClusterControllerClientTest.php | 1380 ---------------- .../V1/Client/JobControllerClientTest.php | 985 ------------ .../Client/NodeGroupControllerClientTest.php | 677 -------- .../WorkflowTemplateServiceClientTest.php | 956 ----------- .../Unit/V1/ClusterControllerClientTest.php | 1205 -------------- .../tests/Unit/V1/JobControllerClientTest.php | 859 ---------- .../Unit/V1/NodeGroupControllerClientTest.php | 567 ------- .../V1/WorkflowTemplateServiceClientTest.php | 855 ---------- 275 files changed, 246 insertions(+), 59318 deletions(-) delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/GPBMetadata/Google/Cloud/Dataproc/V1/AutoscalingPolicies.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/GPBMetadata/Google/Cloud/Dataproc/V1/Batches.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/GPBMetadata/Google/Cloud/Dataproc/V1/Clusters.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/GPBMetadata/Google/Cloud/Dataproc/V1/Jobs.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/GPBMetadata/Google/Cloud/Dataproc/V1/NodeGroups.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/GPBMetadata/Google/Cloud/Dataproc/V1/Operations.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/GPBMetadata/Google/Cloud/Dataproc/V1/Shared.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/GPBMetadata/Google/Cloud/Dataproc/V1/WorkflowTemplates.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/AcceleratorConfig.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/AutoscalingConfig.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/AutoscalingPolicy.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/AuxiliaryNodeGroup.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/AuxiliaryServicesConfig.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/BasicAutoscalingAlgorithm.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/BasicYarnAutoscalingConfig.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/Batch.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/Batch/State.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/Batch/StateHistory.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/BatchOperationMetadata.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/BatchOperationMetadata/BatchOperationType.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/CancelJobRequest.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/Cluster.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ClusterConfig.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ClusterMetrics.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ClusterOperation.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ClusterOperationMetadata.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ClusterOperationStatus.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ClusterOperationStatus/State.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ClusterSelector.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ClusterStatus.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ClusterStatus/State.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ClusterStatus/Substate.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/Component.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ConfidentialInstanceConfig.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/CreateAutoscalingPolicyRequest.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/CreateBatchRequest.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/CreateClusterRequest.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/CreateNodeGroupRequest.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/CreateWorkflowTemplateRequest.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DataprocMetricConfig.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DataprocMetricConfig/Metric.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DataprocMetricConfig/MetricSource.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DeleteAutoscalingPolicyRequest.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DeleteBatchRequest.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DeleteClusterRequest.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DeleteJobRequest.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DeleteWorkflowTemplateRequest.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DiagnoseClusterRequest.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DiagnoseClusterResults.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DiskConfig.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DriverSchedulingConfig.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/EncryptionConfig.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/EndpointConfig.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/EnvironmentConfig.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ExecutionConfig.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/FailureAction.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GceClusterConfig.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GceClusterConfig/PrivateIpv6GoogleAccess.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GetAutoscalingPolicyRequest.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GetBatchRequest.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GetClusterRequest.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GetJobRequest.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GetNodeGroupRequest.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GetWorkflowTemplateRequest.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GkeClusterConfig.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GkeNodePoolConfig.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GkeNodePoolConfig/GkeNodeConfig.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GkeNodePoolConfig/GkeNodePoolAcceleratorConfig.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GkeNodePoolConfig/GkeNodePoolAutoscalingConfig.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GkeNodePoolTarget.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GkeNodePoolTarget/Role.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/HadoopJob.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/HiveJob.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/IdentityConfig.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/InstanceFlexibilityPolicy.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/InstanceFlexibilityPolicy/InstanceSelection.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/InstanceFlexibilityPolicy/InstanceSelectionResult.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/InstanceGroupAutoscalingPolicyConfig.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/InstanceGroupConfig.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/InstanceGroupConfig/Preemptibility.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/InstanceReference.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/InstantiateInlineWorkflowTemplateRequest.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/InstantiateWorkflowTemplateRequest.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/Job.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/JobMetadata.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/JobPlacement.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/JobReference.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/JobScheduling.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/JobStatus.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/JobStatus/State.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/JobStatus/Substate.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/KerberosConfig.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/KubernetesClusterConfig.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/KubernetesSoftwareConfig.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/LifecycleConfig.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListAutoscalingPoliciesRequest.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListAutoscalingPoliciesResponse.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListBatchesRequest.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListBatchesResponse.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListClustersRequest.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListClustersResponse.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListJobsRequest.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListJobsRequest/JobStateMatcher.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListJobsResponse.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListWorkflowTemplatesRequest.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListWorkflowTemplatesResponse.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/LoggingConfig.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/LoggingConfig/Level.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ManagedCluster.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ManagedGroupConfig.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/MetastoreConfig.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/NodeGroup.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/NodeGroup/Role.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/NodeGroupAffinity.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/NodeGroupOperationMetadata.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/NodeGroupOperationMetadata/NodeGroupOperationType.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/NodeInitializationAction.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/OrderedJob.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ParameterValidation.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/PeripheralsConfig.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/PigJob.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/PrestoJob.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/PySparkBatch.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/PySparkJob.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/QueryList.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/RegexValidation.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ReservationAffinity.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ReservationAffinity/Type.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ResizeNodeGroupRequest.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/RuntimeConfig.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/RuntimeInfo.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SecurityConfig.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ShieldedInstanceConfig.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SoftwareConfig.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SparkBatch.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SparkHistoryServerConfig.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SparkJob.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SparkRBatch.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SparkRJob.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SparkSqlBatch.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SparkSqlJob.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/StartClusterRequest.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/StopClusterRequest.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SubmitJobRequest.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/TemplateParameter.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/TrinoJob.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/UpdateAutoscalingPolicyRequest.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/UpdateClusterRequest.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/UpdateJobRequest.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/UpdateWorkflowTemplateRequest.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/UsageMetrics.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/UsageSnapshot.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ValueValidation.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/VirtualClusterConfig.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/WorkflowGraph.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/WorkflowMetadata.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/WorkflowMetadata/State.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/WorkflowNode.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/WorkflowNode/NodeState.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/WorkflowTemplate.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/WorkflowTemplatePlacement.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/YarnApplication.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/YarnApplication/State.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/AutoscalingPolicyServiceClient/create_autoscaling_policy.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/AutoscalingPolicyServiceClient/delete_autoscaling_policy.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/AutoscalingPolicyServiceClient/get_autoscaling_policy.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/AutoscalingPolicyServiceClient/get_iam_policy.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/AutoscalingPolicyServiceClient/list_autoscaling_policies.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/AutoscalingPolicyServiceClient/set_iam_policy.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/AutoscalingPolicyServiceClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/AutoscalingPolicyServiceClient/update_autoscaling_policy.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/BatchControllerClient/create_batch.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/BatchControllerClient/delete_batch.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/BatchControllerClient/get_batch.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/BatchControllerClient/get_iam_policy.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/BatchControllerClient/list_batches.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/BatchControllerClient/set_iam_policy.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/BatchControllerClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/create_cluster.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/delete_cluster.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/diagnose_cluster.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/get_cluster.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/get_iam_policy.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/list_clusters.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/set_iam_policy.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/start_cluster.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/stop_cluster.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/update_cluster.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/cancel_job.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/delete_job.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/get_iam_policy.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/get_job.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/list_jobs.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/set_iam_policy.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/submit_job.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/submit_job_as_operation.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/update_job.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/NodeGroupControllerClient/create_node_group.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/NodeGroupControllerClient/get_iam_policy.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/NodeGroupControllerClient/get_node_group.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/NodeGroupControllerClient/resize_node_group.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/NodeGroupControllerClient/set_iam_policy.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/NodeGroupControllerClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/create_workflow_template.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/delete_workflow_template.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/get_iam_policy.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/get_workflow_template.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/instantiate_inline_workflow_template.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/instantiate_workflow_template.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/list_workflow_templates.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/set_iam_policy.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/update_workflow_template.php delete mode 100644 owl-bot-staging/Dataproc/v1/src/V1/AutoscalingPolicyServiceClient.php delete mode 100644 owl-bot-staging/Dataproc/v1/src/V1/BatchControllerClient.php delete mode 100644 owl-bot-staging/Dataproc/v1/src/V1/Client/AutoscalingPolicyServiceClient.php delete mode 100644 owl-bot-staging/Dataproc/v1/src/V1/Client/BaseClient/AutoscalingPolicyServiceBaseClient.php delete mode 100644 owl-bot-staging/Dataproc/v1/src/V1/Client/BaseClient/BatchControllerBaseClient.php delete mode 100644 owl-bot-staging/Dataproc/v1/src/V1/Client/BaseClient/ClusterControllerBaseClient.php delete mode 100644 owl-bot-staging/Dataproc/v1/src/V1/Client/BaseClient/JobControllerBaseClient.php delete mode 100644 owl-bot-staging/Dataproc/v1/src/V1/Client/BaseClient/NodeGroupControllerBaseClient.php delete mode 100644 owl-bot-staging/Dataproc/v1/src/V1/Client/BaseClient/WorkflowTemplateServiceBaseClient.php delete mode 100644 owl-bot-staging/Dataproc/v1/src/V1/Client/BatchControllerClient.php delete mode 100644 owl-bot-staging/Dataproc/v1/src/V1/Client/ClusterControllerClient.php delete mode 100644 owl-bot-staging/Dataproc/v1/src/V1/Client/JobControllerClient.php delete mode 100644 owl-bot-staging/Dataproc/v1/src/V1/Client/NodeGroupControllerClient.php delete mode 100644 owl-bot-staging/Dataproc/v1/src/V1/Client/WorkflowTemplateServiceClient.php delete mode 100644 owl-bot-staging/Dataproc/v1/src/V1/ClusterControllerClient.php delete mode 100644 owl-bot-staging/Dataproc/v1/src/V1/Gapic/AutoscalingPolicyServiceGapicClient.php delete mode 100644 owl-bot-staging/Dataproc/v1/src/V1/Gapic/BatchControllerGapicClient.php delete mode 100644 owl-bot-staging/Dataproc/v1/src/V1/Gapic/ClusterControllerGapicClient.php delete mode 100644 owl-bot-staging/Dataproc/v1/src/V1/Gapic/JobControllerGapicClient.php delete mode 100644 owl-bot-staging/Dataproc/v1/src/V1/Gapic/NodeGroupControllerGapicClient.php delete mode 100644 owl-bot-staging/Dataproc/v1/src/V1/Gapic/WorkflowTemplateServiceGapicClient.php delete mode 100644 owl-bot-staging/Dataproc/v1/src/V1/JobControllerClient.php delete mode 100644 owl-bot-staging/Dataproc/v1/src/V1/NodeGroupControllerClient.php delete mode 100644 owl-bot-staging/Dataproc/v1/src/V1/WorkflowTemplateServiceClient.php delete mode 100644 owl-bot-staging/Dataproc/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/Dataproc/v1/src/V1/resources/autoscaling_policy_service_client_config.json delete mode 100644 owl-bot-staging/Dataproc/v1/src/V1/resources/autoscaling_policy_service_descriptor_config.php delete mode 100644 owl-bot-staging/Dataproc/v1/src/V1/resources/autoscaling_policy_service_rest_client_config.php delete mode 100644 owl-bot-staging/Dataproc/v1/src/V1/resources/batch_controller_client_config.json delete mode 100644 owl-bot-staging/Dataproc/v1/src/V1/resources/batch_controller_descriptor_config.php delete mode 100644 owl-bot-staging/Dataproc/v1/src/V1/resources/batch_controller_rest_client_config.php delete mode 100644 owl-bot-staging/Dataproc/v1/src/V1/resources/cluster_controller_client_config.json delete mode 100644 owl-bot-staging/Dataproc/v1/src/V1/resources/cluster_controller_descriptor_config.php delete mode 100644 owl-bot-staging/Dataproc/v1/src/V1/resources/cluster_controller_rest_client_config.php delete mode 100644 owl-bot-staging/Dataproc/v1/src/V1/resources/job_controller_client_config.json delete mode 100644 owl-bot-staging/Dataproc/v1/src/V1/resources/job_controller_descriptor_config.php delete mode 100644 owl-bot-staging/Dataproc/v1/src/V1/resources/job_controller_rest_client_config.php delete mode 100644 owl-bot-staging/Dataproc/v1/src/V1/resources/node_group_controller_client_config.json delete mode 100644 owl-bot-staging/Dataproc/v1/src/V1/resources/node_group_controller_descriptor_config.php delete mode 100644 owl-bot-staging/Dataproc/v1/src/V1/resources/node_group_controller_rest_client_config.php delete mode 100644 owl-bot-staging/Dataproc/v1/src/V1/resources/workflow_template_service_client_config.json delete mode 100644 owl-bot-staging/Dataproc/v1/src/V1/resources/workflow_template_service_descriptor_config.php delete mode 100644 owl-bot-staging/Dataproc/v1/src/V1/resources/workflow_template_service_rest_client_config.php delete mode 100644 owl-bot-staging/Dataproc/v1/tests/Unit/V1/AutoscalingPolicyServiceClientTest.php delete mode 100644 owl-bot-staging/Dataproc/v1/tests/Unit/V1/BatchControllerClientTest.php delete mode 100644 owl-bot-staging/Dataproc/v1/tests/Unit/V1/Client/AutoscalingPolicyServiceClientTest.php delete mode 100644 owl-bot-staging/Dataproc/v1/tests/Unit/V1/Client/BatchControllerClientTest.php delete mode 100644 owl-bot-staging/Dataproc/v1/tests/Unit/V1/Client/ClusterControllerClientTest.php delete mode 100644 owl-bot-staging/Dataproc/v1/tests/Unit/V1/Client/JobControllerClientTest.php delete mode 100644 owl-bot-staging/Dataproc/v1/tests/Unit/V1/Client/NodeGroupControllerClientTest.php delete mode 100644 owl-bot-staging/Dataproc/v1/tests/Unit/V1/Client/WorkflowTemplateServiceClientTest.php delete mode 100644 owl-bot-staging/Dataproc/v1/tests/Unit/V1/ClusterControllerClientTest.php delete mode 100644 owl-bot-staging/Dataproc/v1/tests/Unit/V1/JobControllerClientTest.php delete mode 100644 owl-bot-staging/Dataproc/v1/tests/Unit/V1/NodeGroupControllerClientTest.php delete mode 100644 owl-bot-staging/Dataproc/v1/tests/Unit/V1/WorkflowTemplateServiceClientTest.php diff --git a/Dataproc/metadata/V1/Clusters.php b/Dataproc/metadata/V1/Clusters.php index 242b8bedfa4b84ea78bdb4a55df0a4f95c557aa8..42fa633e6e285cc5c48ed34ab16561ae29fbdee7 100644 GIT binary patch delta 254 zcmbP}f4y+Se&)$M%(5KeMTrFksYS(;4VkrgLn;eWV?6UpQj5wGbATdZllL?0Gp)$j z{DIknaq?9bA(e8da=n70{E~brsr3B(^qf@v5}-!?OsK}qMyxy3ncgx^eyx*OFC@do zUy@jql$etfpPpPCpORT5!J@#Z!Rf^Oz>!hNj7umbGci3czc{lv9%g_98&Cnak*FTT zbUl#idN5}}^a*mYWaTFnOK>SL!;Dho5~)lq%8Lj3CnqyGu_QA;FFunurC5R+u4c23 HZU7em$52v^ delta 42 zcmV+_0M-B3ahz|kzXOvo1TO{OW(r&vL^vylbS7IvxhEF3Tu-O A`2YX_ diff --git a/Dataproc/src/V1/DiagnoseClusterRequest.php b/Dataproc/src/V1/DiagnoseClusterRequest.php index 733dd6a6b2b..1f1e83df9d5 100644 --- a/Dataproc/src/V1/DiagnoseClusterRequest.php +++ b/Dataproc/src/V1/DiagnoseClusterRequest.php @@ -34,6 +34,35 @@ class DiagnoseClusterRequest extends \Google\Protobuf\Internal\Message * Generated from protobuf field string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; */ private $cluster_name = ''; + /** + * Optional. The output Cloud Storage directory for the diagnostic + * tarball. If not specified, a task-specific directory in the cluster's + * staging bucket will be used. + * + * Generated from protobuf field string tarball_gcs_dir = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $tarball_gcs_dir = ''; + /** + * Optional. Time interval in which diagnosis should be carried out on the + * cluster. + * + * Generated from protobuf field .google.type.Interval diagnosis_interval = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $diagnosis_interval = null; + /** + * Optional. Specifies a list of jobs on which diagnosis is to be performed. + * Format: projects/{project}/regions/{region}/jobs/{job} + * + * Generated from protobuf field repeated string jobs = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $jobs; + /** + * Optional. Specifies a list of yarn applications on which diagnosis is to be + * performed. + * + * Generated from protobuf field repeated string yarn_application_ids = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $yarn_application_ids; /** * @param string $projectId Required. The ID of the Google Cloud Platform project that the cluster @@ -66,6 +95,19 @@ public static function build(string $projectId, string $region, string $clusterN * Required. The Dataproc region in which to handle the request. * @type string $cluster_name * Required. The cluster name. + * @type string $tarball_gcs_dir + * Optional. The output Cloud Storage directory for the diagnostic + * tarball. If not specified, a task-specific directory in the cluster's + * staging bucket will be used. + * @type \Google\Type\Interval $diagnosis_interval + * Optional. Time interval in which diagnosis should be carried out on the + * cluster. + * @type array|\Google\Protobuf\Internal\RepeatedField $jobs + * Optional. Specifies a list of jobs on which diagnosis is to be performed. + * Format: projects/{project}/regions/{region}/jobs/{job} + * @type array|\Google\Protobuf\Internal\RepeatedField $yarn_application_ids + * Optional. Specifies a list of yarn applications on which diagnosis is to be + * performed. * } */ public function __construct($data = NULL) { @@ -153,5 +195,129 @@ public function setClusterName($var) return $this; } + /** + * Optional. The output Cloud Storage directory for the diagnostic + * tarball. If not specified, a task-specific directory in the cluster's + * staging bucket will be used. + * + * Generated from protobuf field string tarball_gcs_dir = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getTarballGcsDir() + { + return $this->tarball_gcs_dir; + } + + /** + * Optional. The output Cloud Storage directory for the diagnostic + * tarball. If not specified, a task-specific directory in the cluster's + * staging bucket will be used. + * + * Generated from protobuf field string tarball_gcs_dir = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setTarballGcsDir($var) + { + GPBUtil::checkString($var, True); + $this->tarball_gcs_dir = $var; + + return $this; + } + + /** + * Optional. Time interval in which diagnosis should be carried out on the + * cluster. + * + * Generated from protobuf field .google.type.Interval diagnosis_interval = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Type\Interval|null + */ + public function getDiagnosisInterval() + { + return $this->diagnosis_interval; + } + + public function hasDiagnosisInterval() + { + return isset($this->diagnosis_interval); + } + + public function clearDiagnosisInterval() + { + unset($this->diagnosis_interval); + } + + /** + * Optional. Time interval in which diagnosis should be carried out on the + * cluster. + * + * Generated from protobuf field .google.type.Interval diagnosis_interval = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Type\Interval $var + * @return $this + */ + public function setDiagnosisInterval($var) + { + GPBUtil::checkMessage($var, \Google\Type\Interval::class); + $this->diagnosis_interval = $var; + + return $this; + } + + /** + * Optional. Specifies a list of jobs on which diagnosis is to be performed. + * Format: projects/{project}/regions/{region}/jobs/{job} + * + * Generated from protobuf field repeated string jobs = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getJobs() + { + return $this->jobs; + } + + /** + * Optional. Specifies a list of jobs on which diagnosis is to be performed. + * Format: projects/{project}/regions/{region}/jobs/{job} + * + * Generated from protobuf field repeated string jobs = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setJobs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->jobs = $arr; + + return $this; + } + + /** + * Optional. Specifies a list of yarn applications on which diagnosis is to be + * performed. + * + * Generated from protobuf field repeated string yarn_application_ids = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getYarnApplicationIds() + { + return $this->yarn_application_ids; + } + + /** + * Optional. Specifies a list of yarn applications on which diagnosis is to be + * performed. + * + * Generated from protobuf field repeated string yarn_application_ids = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setYarnApplicationIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->yarn_application_ids = $arr; + + return $this; + } + } diff --git a/Dataproc/src/V1/Gapic/ClusterControllerGapicClient.php b/Dataproc/src/V1/Gapic/ClusterControllerGapicClient.php index 3b8063c2e4a..7b46cafb658 100644 --- a/Dataproc/src/V1/Gapic/ClusterControllerGapicClient.php +++ b/Dataproc/src/V1/Gapic/ClusterControllerGapicClient.php @@ -57,6 +57,7 @@ use Google\LongRunning\Operation; use Google\Protobuf\Duration; use Google\Protobuf\FieldMask; +use Google\Type\Interval; /** * Service Description: The ClusterControllerService provides methods to manage clusters @@ -674,6 +675,19 @@ public function deleteCluster($projectId, $region, $clusterName, array $optional * @param array $optionalArgs { * Optional. * + * @type string $tarballGcsDir + * Optional. The output Cloud Storage directory for the diagnostic + * tarball. If not specified, a task-specific directory in the cluster's + * staging bucket will be used. + * @type Interval $diagnosisInterval + * Optional. Time interval in which diagnosis should be carried out on the + * cluster. + * @type string[] $jobs + * Optional. Specifies a list of jobs on which diagnosis is to be performed. + * Format: projects/{project}/regions/{region}/jobs/{job} + * @type string[] $yarnApplicationIds + * Optional. Specifies a list of yarn applications on which diagnosis is to be + * performed. * @type RetrySettings|array $retrySettings * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an * associative array of retry settings parameters. See the documentation on @@ -694,6 +708,22 @@ public function diagnoseCluster($projectId, $region, $clusterName, array $option $requestParamHeaders['project_id'] = $projectId; $requestParamHeaders['region'] = $region; $requestParamHeaders['cluster_name'] = $clusterName; + if (isset($optionalArgs['tarballGcsDir'])) { + $request->setTarballGcsDir($optionalArgs['tarballGcsDir']); + } + + if (isset($optionalArgs['diagnosisInterval'])) { + $request->setDiagnosisInterval($optionalArgs['diagnosisInterval']); + } + + if (isset($optionalArgs['jobs'])) { + $request->setJobs($optionalArgs['jobs']); + } + + if (isset($optionalArgs['yarnApplicationIds'])) { + $request->setYarnApplicationIds($optionalArgs['yarnApplicationIds']); + } + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); return $this->startOperationsCall('DiagnoseCluster', $optionalArgs, $request, $this->getOperationsClient())->wait(); diff --git a/Dataproc/src/V1/InstanceGroupConfig.php b/Dataproc/src/V1/InstanceGroupConfig.php index 6faff3c5d03..4e8788d825e 100644 --- a/Dataproc/src/V1/InstanceGroupConfig.php +++ b/Dataproc/src/V1/InstanceGroupConfig.php @@ -119,22 +119,18 @@ class InstanceGroupConfig extends \Google\Protobuf\Internal\Message */ private $min_cpu_platform = ''; /** - * Optional. The minimum number of instances to create. - * If min_num_instances is set, min_num_instances is used for a criteria to - * decide the cluster. Cluster creation will be failed by being an error state - * if the total number of instances created is less than the - * min_num_instances. - * For example, given that num_instances = 5 and min_num_instances = 3, - * * if 4 instances are created and then registered successfully but one - * instance is failed, the failed VM will be deleted and the cluster will be - * resized to 4 instances in running state. - * * if 2 instances are created successfully and 3 instances are failed, - * the cluster will be in an error state and does not delete failed VMs for - * debugging. - * * if 2 instance are created and then registered successfully but 3 - * instances are failed to initialize, the cluster will be in an error state - * and does not delete failed VMs for debugging. - * NB: This can only be set for primary workers now. + * Optional. The minimum number of primary worker instances to create. + * If `min_num_instances` is set, cluster creation will succeed if + * the number of primary workers created is at least equal to the + * `min_num_instances` number. + * Example: Cluster creation request with `num_instances` = `5` and + * `min_num_instances` = `3`: + * * If 4 VMs are created and 1 instance fails, + * the failed VM is deleted. The cluster is + * resized to 4 instances and placed in a `RUNNING` state. + * * If 2 instances are created and 3 instances fail, + * the cluster in placed in an `ERROR` state. The failed VMs + * are not deleted. * * Generated from protobuf field int32 min_num_instances = 12 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -212,22 +208,18 @@ class InstanceGroupConfig extends \Google\Protobuf\Internal\Message * See [Dataproc -> Minimum CPU * Platform](https://cloud.google.com/dataproc/docs/concepts/compute/dataproc-min-cpu). * @type int $min_num_instances - * Optional. The minimum number of instances to create. - * If min_num_instances is set, min_num_instances is used for a criteria to - * decide the cluster. Cluster creation will be failed by being an error state - * if the total number of instances created is less than the - * min_num_instances. - * For example, given that num_instances = 5 and min_num_instances = 3, - * * if 4 instances are created and then registered successfully but one - * instance is failed, the failed VM will be deleted and the cluster will be - * resized to 4 instances in running state. - * * if 2 instances are created successfully and 3 instances are failed, - * the cluster will be in an error state and does not delete failed VMs for - * debugging. - * * if 2 instance are created and then registered successfully but 3 - * instances are failed to initialize, the cluster will be in an error state - * and does not delete failed VMs for debugging. - * NB: This can only be set for primary workers now. + * Optional. The minimum number of primary worker instances to create. + * If `min_num_instances` is set, cluster creation will succeed if + * the number of primary workers created is at least equal to the + * `min_num_instances` number. + * Example: Cluster creation request with `num_instances` = `5` and + * `min_num_instances` = `3`: + * * If 4 VMs are created and 1 instance fails, + * the failed VM is deleted. The cluster is + * resized to 4 instances and placed in a `RUNNING` state. + * * If 2 instances are created and 3 instances fail, + * the cluster in placed in an `ERROR` state. The failed VMs + * are not deleted. * @type \Google\Cloud\Dataproc\V1\InstanceFlexibilityPolicy $instance_flexibility_policy * Optional. Instance flexibility Policy allowing a mixture of VM shapes and * provisioning models. @@ -617,22 +609,18 @@ public function setMinCpuPlatform($var) } /** - * Optional. The minimum number of instances to create. - * If min_num_instances is set, min_num_instances is used for a criteria to - * decide the cluster. Cluster creation will be failed by being an error state - * if the total number of instances created is less than the - * min_num_instances. - * For example, given that num_instances = 5 and min_num_instances = 3, - * * if 4 instances are created and then registered successfully but one - * instance is failed, the failed VM will be deleted and the cluster will be - * resized to 4 instances in running state. - * * if 2 instances are created successfully and 3 instances are failed, - * the cluster will be in an error state and does not delete failed VMs for - * debugging. - * * if 2 instance are created and then registered successfully but 3 - * instances are failed to initialize, the cluster will be in an error state - * and does not delete failed VMs for debugging. - * NB: This can only be set for primary workers now. + * Optional. The minimum number of primary worker instances to create. + * If `min_num_instances` is set, cluster creation will succeed if + * the number of primary workers created is at least equal to the + * `min_num_instances` number. + * Example: Cluster creation request with `num_instances` = `5` and + * `min_num_instances` = `3`: + * * If 4 VMs are created and 1 instance fails, + * the failed VM is deleted. The cluster is + * resized to 4 instances and placed in a `RUNNING` state. + * * If 2 instances are created and 3 instances fail, + * the cluster in placed in an `ERROR` state. The failed VMs + * are not deleted. * * Generated from protobuf field int32 min_num_instances = 12 [(.google.api.field_behavior) = OPTIONAL]; * @return int @@ -643,22 +631,18 @@ public function getMinNumInstances() } /** - * Optional. The minimum number of instances to create. - * If min_num_instances is set, min_num_instances is used for a criteria to - * decide the cluster. Cluster creation will be failed by being an error state - * if the total number of instances created is less than the - * min_num_instances. - * For example, given that num_instances = 5 and min_num_instances = 3, - * * if 4 instances are created and then registered successfully but one - * instance is failed, the failed VM will be deleted and the cluster will be - * resized to 4 instances in running state. - * * if 2 instances are created successfully and 3 instances are failed, - * the cluster will be in an error state and does not delete failed VMs for - * debugging. - * * if 2 instance are created and then registered successfully but 3 - * instances are failed to initialize, the cluster will be in an error state - * and does not delete failed VMs for debugging. - * NB: This can only be set for primary workers now. + * Optional. The minimum number of primary worker instances to create. + * If `min_num_instances` is set, cluster creation will succeed if + * the number of primary workers created is at least equal to the + * `min_num_instances` number. + * Example: Cluster creation request with `num_instances` = `5` and + * `min_num_instances` = `3`: + * * If 4 VMs are created and 1 instance fails, + * the failed VM is deleted. The cluster is + * resized to 4 instances and placed in a `RUNNING` state. + * * If 2 instances are created and 3 instances fail, + * the cluster in placed in an `ERROR` state. The failed VMs + * are not deleted. * * Generated from protobuf field int32 min_num_instances = 12 [(.google.api.field_behavior) = OPTIONAL]; * @param int $var diff --git a/Dataproc/src/V1/NodeGroup/Role.php b/Dataproc/src/V1/NodeGroup/Role.php index 3c6f3dfd17c..f338f061458 100644 --- a/Dataproc/src/V1/NodeGroup/Role.php +++ b/Dataproc/src/V1/NodeGroup/Role.php @@ -7,7 +7,7 @@ use UnexpectedValueException; /** - * Node group roles. + * Node pool roles. * * Protobuf type google.cloud.dataproc.v1.NodeGroup.Role */ @@ -20,7 +20,7 @@ class Role */ const ROLE_UNSPECIFIED = 0; /** - * Job drivers run on the node group. + * Job drivers run on the node pool. * * Generated from protobuf enum DRIVER = 1; */ diff --git a/owl-bot-staging/Dataproc/v1/proto/src/GPBMetadata/Google/Cloud/Dataproc/V1/AutoscalingPolicies.php b/owl-bot-staging/Dataproc/v1/proto/src/GPBMetadata/Google/Cloud/Dataproc/V1/AutoscalingPolicies.php deleted file mode 100644 index 56f428345fe3899a1e2b3367a8f08f2f7808e949..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4769 zcmb_gO>Y}T7-pR&YR8JI4ybY6;x49AleG0JDOHNow5*dfR0L|Z1&PSQ8n4IB(Dm*z zJDb!*7NYzC1ic_}KtjDD{sDJ5Ai=FC4xB3f0B~VGcGpYnb>p!?~&5au}u# zvTJMDwx$$I~S%EaHOTrsv67Xfg)FQMgyG8uIm)DfI7>vZUNAX zpK3#xGd)r>9mf?cxQ<^g_t(^iNDExG33k|cF*gaen-#o`c8E*I3%!Fw1s%A^nESPW zYnCtY;0fbUPTG3MW8LAQaewU z3250nx~mdJqQfSb@iB*OBHFG0Kg;Bc%A&zdFlD0#w*B0cKEc^oN-uq&+R~pV-NLvwQB#}9^4#)NO4>ADq~MQ92~8Z1;=82 z6@S#gsZGYtrWE@xowrBU`pw?__qe~>51Svc(qOW5!njtdXtN@(;>dksj4&5!EV5EN|~ec zW#AcbT%5wV9(eT@viLbAHKHlu7r+TMDi;!t3nz!;bKp!I-62lojTSFVbYN*~IaPxf zKp_D&Y_c${nq2h3xr4Y9=E1Z;BB7IgS^K19QjVbqi7`>P9LvC$!PG7$?QJG2Q~|}u z8Yrw%%<^?#0ZQkM#;&Rdr1#uw~#6Y_* z4U{1_rT7szy@A=lU{vFcu;I$~8&x=lv5O5*c;DlFAf1N(8kAMWUjqV#HEiP%Ii7nN zkN9?O5`Tawe$R}kdI8&c5*+hT8`ph)laxCes&57W`8#v(W90*R_-Vy2G;lVxEZ^h3 z4#NsKDmB7O=z!k%*7N_;@fCytu=p@%{_wAt2;;*}JL=xiAc@Wh-} z*)J;J!tXgfDFzuuPfEz4==o03^QD%*uGS_yN=aO_QaBoV3eWdqmTu;+jY5j4dIruD zGo&5{m_NJ*=ATOg`FDOcXHu@yznP_N#yr1l7`wZ>;R52jHVW9b`eJg)vk_~#v{U&> z184XpFIwxsWuY?A&iUa{6`v!j+Sam~9=%-g>wMcye2iH%cxv8dqhh_ra{uwExef}^ zpZhDlBX8&M^|&whUj-sjL>KqQl-!@o=i|5Ji|T_$;`>MHw+}f}eWU1s9svIVC;fME diff --git a/owl-bot-staging/Dataproc/v1/proto/src/GPBMetadata/Google/Cloud/Dataproc/V1/Batches.php b/owl-bot-staging/Dataproc/v1/proto/src/GPBMetadata/Google/Cloud/Dataproc/V1/Batches.php deleted file mode 100644 index d59778c382a0e92b332aca2b5fcb7362e633af8b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4874 zcmcIoOH&(15VnvJ(Bip%$+8`<l+|h^tyy-L*%gjL zamhWEN^(wBjya}MmH&|PF}ZQdAt(QYoYFJ1yINU*uv75??`pbxy1(xJre`00U^Ohb zDlZU&P{kotxzduI29YglI;Lvsa-~_T5h|A}_CO$i>3q#uZex%_dbz zMy{J?T_-73H=ET|RdEzFp{923rYee~Hi(_%CIJj(i`bT;5_w@Y_YrXvCR0IIIowwx1IU>9WkXEiIjrpmUXIQZW+%`R((=4gtpeT6a1$u&i{3F>ys z)|!UuXr>`Eg%v|3lec7HlgVDQOpJL>_WW68Fdzh_MZ+P~Q1nuP*eca5$E2$$n#t6O zPK(@kB~tW)eUQs%jd#qRyqTNT&b*8V`07<{v49d0Z`!$TR7=2B<5jkfjHcN=k5%gWK7xV zEFA4@;%5wfNwb9|VtcmUGW4@BWGQu0wvkkM`28$89tQv2F*k`3jPDdgYMPEj8HkNx zVbUt00KD$$PpVO4<7??1a-_HUpnQ0ODt7GiA9hKL?^G6 z!CT?_J3v3rjx^Dc7K9_rerh%`pL|z_P*}PLQI%IxHnvh;ZVFBzz z=x3)ei4CFZX!?ji_{Pa~CM;Crhy{BqBa7SE3^70xLtbyx?$EP70$d(j^@Fr;qUYACoe@D@qf?kI* zeGftj3jI7FB+iNTjqFCT{B(JJwU}R=Un~~JPoVz5YH_)+xV$hPVlQh?mzUW~pEL@P z&o1YSOH1rMjK+uDcT_ydUe}-I^TlETU;8D1$b5Ej37;dG&tGLf>2bD5?;&kHC#qwo zcHO7Fly0hGrb_L4k9*#{pW3Z3^4QCb!Z3ewiz)FdrYuNY(iJ$prD#UkYB>$lDB}@A z%1x@dM;{VuALCes)@|h2u;{*!bP2{^Q?QX}{bg+2=L+?W*+{1T8kVKEiH&EH|ND6u zR;b$0cKH4_@}9Sp_$>s`W=cth3GQ-mi?+WZq~Y@bT!P@`Cx_yv+?lq)IUi zn%IUYcUzFNbP>k5S8ZV0ULS~Z2UG!vUx%uVZel+KBYaPf$fXM~iZd8(`Pm3=`YDWw z#T|ueN=3($pJh3ko;{omI?N|OX11Ss+5t}Ns)2R@@%wP<0KHz_nf@^XW1NAJ<{WD3 zcqNuzg&-OjIHeEBio--N#Y^Y0(}?j>%syY#LYVdwl_oC@^d zl;3+9F|+Px&j|TDyaB~u96euVA9(Xj>gaLS_rtrWOW%iJ(3@4ITb}RTqlqWuh1qLx zPGoqT(~^jj&Ax|3=@ZP<-hP%3$r8@J(ZDo$R0aZKo@>*GN6{fIM%2Wk4o8odko~NC z`H;RvR|8||QLYBWJXg_(?D9qgSFUfbrCzZe#7H%M0xTN?>vIlzr{{omL4Cnv= diff --git a/owl-bot-staging/Dataproc/v1/proto/src/GPBMetadata/Google/Cloud/Dataproc/V1/Clusters.php b/owl-bot-staging/Dataproc/v1/proto/src/GPBMetadata/Google/Cloud/Dataproc/V1/Clusters.php deleted file mode 100644 index 42fa633e6e285cc5c48ed34ab16561ae29fbdee7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 14551 zcmd5@O>84ac6O7JMk>xoR7o?U=8D8Urli95z4>S??)(*&x7TH#y{*V1XQR$S&ez76=fZa@bRV1jsGPDeqNP z|M6GS4ubeF7FqRPy?XV2zIw0t=r?;OJ@Q6sS2HwAb+l&c_&nvDXsMoMI%dP{q>lTo zmS&|IX1AwzG%KA-<;$s3xt=QIi}lxm)HeH8L)%KVO|#w6HX9wY-`s4fjtVRqn`aN; zo4)O6mYrri2{F{JX7|*FmfEf44m3x_$w#}4{Ae4=kMe^2=*feJgfu#;ZKt*c8}b=R z!GFE}aYt{YY)5tAe{brxq8qxSs~!D2u#1mUEwy87Ks-FR)i)ZBZW<{hC>srJn9w}4Vfoh*#fwr!LuQ+PAcLmy~mfC|YU&1Kr=RJ+v`I!oaJ<67td))t6 z7tWAvHa*+lf%vfDSu5J^UGmcta&-5Ck%1=o#54;bX*YzV&mJV#1PisNLpVXJ<-sKR zwZK3NO;b4*wkam82PRm;0L9SP#n5oXvYC~MX>W*W9p98TP0y6Xq&s2~3vm!FHk-m; z#JC$By>TvV7py|eaChR(aNMIGx5RUCzG6HnL~!5`H`)2XA@VW#FJ{O!5kKh~A+W|L zTEkKFW~8TEP&Vi1ECMKMB(ST!t#J+2p{a(-zfz@-G3_*ohc3(9HNVD49*I=prdbn`NZ@EWS;a zHKSpj_b`vTA}&ok*Mdh96mp+XweOgA12CJ>c9~Je>>J|+%=$DzZm2q~(YJKx++`J? zsyaasW)wkA5Qp8Ys_?Ml3bw}hO^CxTBInU1$h1Oks{K#(j*gCCfb}SCbUQn- z&P?szc&%k!GPF77tIWvcKZ=mmQE{KX%HnMstz|eG{VrKQ?H>a~*Bs3r3_Tc9W0?oz zWqIt84n?5I-YfJOS@$<-Yu1_Gz(sgYyf%%wx6zuQ4CpVnMsDgx%YxIg`VGMTuGPtZ zFOjt|lysC$U@DJgCRpi6n>acmuflE2I(2iHg4^>WBu4dEW6w;eLq5Ue{jKpQ6Q)k@0ciy(y)+)BZ<005P>;c3J;o65;Dl@j zV&<7yCEp>7VdAOj@E%zniZ%>CnQ-+yS0LB~(xLnwi4O)knj$Nh2zyQCv}-GndpWf7 zP?seC>>7y=<~@3o%zwu;w1E{c;evHzvSA~Ego~chKMoFhAVQ)tiMx1R(R+$%bP%XW z8(c4YuY6CE=qX9|Ed2~h05Ik3eTBn2SBsd@7Bji=hcvi@bcHi30BxadG zeQ*g`(JwGAdKM*tjjqCN0b~@}v(>_UdJgFmy7jlCV$k!lN~z@WJ7Z8;=&5knfDwKuu7(I4R(;R3W!nSZl&13#utY%z3hZ zZ#;9xOi+(lAh}6ygcLs23qOZAIL4gl+vGPY)#8(Ey`U5;Pu^E{%jMnuf|A|dF4Stu zVX0OrY!`Qmg?#)K$R2CO(q5rjtSdX!@_|x2%#{lDr{(J7INH;E`LLcVAC~g*2wf&O za>abHTG*}^%cbmoJepe}%b*Kh0&=}beupd%oeyTIz)6RKL`43jL~e~%KSVJqq8I}* znsRKK9B&65^)(U`v(B7eHxS?UB=qC^Y8A?rUhw}UEc(^2u#o2BrD4B zqPazK-TfL@$=xBh-Or=g$~z=E{@Ce;CsW9>u%y^`G!{a+O!ANC$ck$-0q~Bu5ToDq zY!S1Dv@y#a3)Jm704ptmPDGf9Qt&!&(9)og3Fs992}i*byv`M(>eAp^QF@Ck=v}qV z12bNQ+0|L1uK`3;8z(x1Y`lK6=!`c?G5j%!HFf*c_0L)6pKp$Lp*&1x`fU4Kw3VKv z!EMXYAYHDJF@j_KSD zaKJMG*&T4I0DrE(9daG>GSrb(Fi7|2KH(fNYlzuFg`mE5xPSEeO0T0jEz|0<`?1jX z9kPtWVUxieCQRn{$g7@Jv^v_S`Z3!yAQH^$2_BQ*ovyzfpSHqCncC#vCyQZi(mNzs zsTK+cm3lE(+%MLj4TPo@vQ#RU6mQOc0YcIei3Pui(0MXbtCZ{UsN5yX?iqR(3ZUVJ zw<}h_VJL&HkeK&16c-q1pcINgtbmS~ghhn~Ko@cGoz~C+-Qox{V);)bLWhqO6Sc<~ z3juHv+5o20zahzfoL<@UQymV={#RpswVg!r)%6ECJr zg~eKo!@kW(u%~5z(1s?F(mozYBN#6_CX^!-+ivo!g9sP^jQrI@1kVEn~rEW;PH>htYvl}&0!*3 z%uFa5dK}VKAmFPWkY!(HH{$cM?*!cIn$keXm!L-KmT3{H$1GIxi*UL$ z{*T!UVxqYwT%h!hFwZ#vN?7#&ki;2l1^%@hCMomBSSC3nrq|{|Iiqx!%)@P#Q8OP~ z%uKk<3ia^qP{|gnIFrbafKG^xi9c+xF!vB{F4_J1-ZKz5POjJLSukt(w|-cQ zN8~?;DoZU?%%o6#ggQ6W!%VMEh4C~tDI7c&1VN|;d~|l3^XsY@h9>eU3W5M1`A=ua zVwgX(b6&P_C1rNb?*a%MER5z*mM|K652A7po&iAdqd8dofU<~NT?qjN30qo#VtC~g zhXR-!k_8mpY{wr&ST53~Om2E~p;ZG_6~Le{CoB{KW5EJyQUU%UCV^T9%xb_1*@~s9 zovy+t_}@W13*rpVI&C%>(iiJ}gWMUOqc#x-V?{!A{XJVKTR+8^{=7&D+6+XSo(R|3cB zu*1XE&JWopilpho{8Sqc%usvNdVNsB=Gfe<*5s(3?qTB^#;k|=CX zR>;yob)D{$qzfys*&_Nk=!;<3!W=dL=KW7rCMj>iAOaD_EB`P;7Dc9mg|NX3MbGOe z&6X`XIc_EW!|}cmrcdtyvEaol2^pTNmf7#5%<<3kDO|PKDJc9&6Fbhu z%)={judxSoYzk=OS<-n7@8ds8@^IO09fY-5x}`I9x6j z>t#e4N_MwUsw?@zPWEuWUIQQj1%}Dxp#Q@>#Z8iqAknV3mET>=gmU zRG%reLKRW-EFzRW0MPt%CO(G+Q~UyC$>P*P{F?k95?S4bnD4kf{i^l{eR#|?{sGDg znd3;>zqdsomRxIaFfAg%>*JLy44kVH-nm$OMZ7u%GXE2j;@xoQgeWZlu29|rkkR!U z`8G5Wu!J`09mft3LbEQ=9GCwZ`j&@1aQZ9k*aIIE-{Az5!9&|cl~EwCwJo@^w)!0i zu8<+Rx{YbcyFl;;>6A!G-y^X;+aM%l`;;klRA}~Iyp1{uA0x@%hq_YDF?-_NE@2?v zO?X&cUY#g3#2(fJj38_sp7tgA3yG}2mBDiUKMC~%@TELUrk9s$v_1x3cn!Wmx`?Wv zb-cW*T|rS75=s7JIEj6z+KDaOmoN`c`UsRi=imkneH-S}0pR3UH{B47MK-96 z@0(7MNvs}VNURnNUZ^8IyH1@J5u$h~wzH!m>lf@=Cc zSJS?{`x4Xy6`J0b^!Bg2;r|5e98BzVLNz-$?}A(YLRf~p_fobD0OTd?`Om-~Lbzd) zKZGV;aMyp!cb$LxCHTWv**lZn;LGf{$xRUyU?%%nPPzas@pF2GSn-e0Jo3>CozR5# zXSrILp5*0I7Ay1g|3WeJU%d&sKVh5uCcR1`_$s?Rbj)96 z6GPwKB(=g$WQH=%NN0{tua@!fs*MMbWIPrnO z*cEifiu5}V`5ZTILj$dC27U^d*#ubtIk*D$jvxAe9?vnCe)q2T3!;1c*KvU#(?NL- Ue(X2mhjeTv|H0b}@`8~61v!#m;Q#;t diff --git a/owl-bot-staging/Dataproc/v1/proto/src/GPBMetadata/Google/Cloud/Dataproc/V1/Jobs.php b/owl-bot-staging/Dataproc/v1/proto/src/GPBMetadata/Google/Cloud/Dataproc/V1/Jobs.php deleted file mode 100644 index a68bc229b82804d7514b32c45e8b884b2df1ba77..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10441 zcmdT~O>7(25e`XCAu$KGY z%$u2SX5PHncl(~XYrL>2@@=E833Y;GefuTUK?| zQ58-7AxeKo+)*@}AmPEeJFeb!R6`dj!J6JB%kPSuC!PDYX`r@uL|>Q|H2^BVRo5M2 z>58^hC3e?RO~kg&BrH5e~H6f!|3(U z9V&*tqxOWyu()lhd&H78qbF-*k7#x-E+&>U#oPIDX2=il$X6KyeAi&)HQllHmk695 z^U?_jnl_!ZDsR*HX)?oM7_DXmOVkA9+%gf*%>-q zTVG#W&nD^PYPnr*WM?U(wbj*ZO8Rdc(hrnv!!R)`3g=<5uc*5GRI%h8bUE3zRIc2E z*M!pmY>*{Urehl4F2V`L>e;yjS~6`jD?vgyVr@)AZpv_8X8LB6yj8|8N8b*T-WJYWIqvAYFj; z$1bt<8>;PK7McA7f6!2l`Ie1Ke@MXW0}Or|5ILBqGxmp2!Cdn`03Xqi6U#uE;#=b_ z5-f_OBAmi-cU0XaG6h^wHP<4TwPMRDo)|VE%PTT@Pq9>`qoIT}ab=1(#xLQ?oZn!z z+#{bbl5aj7K#^v=O!4Y;hC|7Pi+CWhhFNmy2Am!x#I&q*oJ5umAe8={fD8+&jZd_f zhTW49$k6R3Q!I@)WJIb7=rjk=;c$QNa7+(}&`saRW5U6mCwZKm=bHig>jWfQYVW0C zJUu?!BfMZLU|i%04p1L(03M$2jduW#-{G(iqjLoIv)>-<|A;jr3#WAo|Ld^8w$9-S zaqO-+Q1V5}#Nm=JQY8+Sd>oYtC0`)iVRyb`1>Vt1KI!uWq+1rA`HXKcaB$Z!T*q`B zdB?E&ii5ivo>usdl7kFC_{olfMSP?nAB2Fq^2Dk;(DJYl9LxWY4#7%fv-(K_Qf*7s zzkOf~mg5|Z3FWx2+t|`nSqFm#Y!Vfw$LsfTBc#)0{NHk9+7-d$GCjjC z`Ae8yyD=YhoH)-4q-?jtsPQ08n-rIQk^|kLe4t5w!=qtLq+i8ghRI306dUbwyEfFN z$iQr?)~wc>_pwtk53o^dZ?@#>TC~r`8iO4(Tz23&Y z$E+|1X+E!kKUsH!aU1AvoPvdNyIp(OYRjwTdSi3FmQ70!@SyDpFDyW2u$zKhH#S!u z){&};k^&?@-mGonb6m*6NnE{Alc|228`*?(oB8WH!S*%5Zm)2T6%J2H*OAdBSp$fg zCnlVNBA^i-ae|tQAc=Y!?M;|9)gF_aZ_?s; zQeF@Hl=mRRrM4LL87B9H13J^27L`7O3e0f^_9q%+agwokXS@K61wVZHOb|Ph)m)6j zxoJWKm5Wc0*g3RHVC1he@(I}ad#z7>6OuH)y0+I>oS;4`PV=a1Q`&^^0nBqsc^BIo zhP9uYV^!DTIn-fsACru%gjvSUr5Te6yU$Q6;lgZPge9+)?iG({Qub|*^@JDEEG)Gp zgm)n4O{5JL%g|Wg#%9wN!fAIQ>FvgR`SK3wXfllRi3(-0!etIYSqV)17FqYanhc1M-(r8|DT~ zBS>(juYBfr#B3QG?eZ=n9de2ZZ-Ou|$H7m9TF5mfeIA1>ZnS;XLFVfOyL8y<8?!|+ z!7S3lZ+9%SGCzt71xTQpUb22;e8l4dTs>rO@s;Ri8y;$;-^L(=v-}UjksUeMrV~OK zr*yBKnB9?AG)~XMeDJADrtpMXB!p||reRseGyk-*Oj?Jz`{ekR8&Pq@rQc)4K^v|p zynO^f=w{&of^KChJuEZvTX+O(1}lB<7|%!q!PtQkK7>Sg0*g;E^k{w~GM+&(GA%r9 z(h77!sXipXUy+iBoB@w&)E>Vm;kkiTv|hb+0~S2g{K@{ev)5?7QLeP>k7`~$v(}Wo z-*M?r=*OETej}xw=p&ddDD{|gQ&rI=Y4J7a+}s}ym|?e`wRLJ?z( z^jBnCB^o)Z;is@I{tsBb!yHVvCcJVY{4R!Nzn`jvOXCwwFv-($X|nC4CqMezzkU|K zCEcLcRImc4X9K(N+B-}irLWSojCWY&(axS7o2nUV{e~m%P4>e&zaplkPeQ1Keg;ROt zN;^z}t3u(33Vc;wJRtW-U3lIUet{7YB)v&46-@HAnGz8-rog@8u@NZIl0f(~$`_=Z zN%94g4k;gD@>QjKM>KHYA*C+Mgv{Z``^v9T{vfwal0TT_%YW9-PKYPFKbB|LmL$)$ zFCE*kBi(_!{nAHYl+OjXg!rWyydY%f@zUOx<@~PWn0Bd9`1I3HJ>mSpg5o;6{KnoD zJbXK}+q|+1uOpqW#(^f&3hkHKEvj8B_WfIY+`p(}^b0*Ba`~@Vz@;#^`ofu=Tj66T j$!v7(VsK09GQSrWxkg9J54Ahu3LTrtue!Z}7XbeUw3~af diff --git a/owl-bot-staging/Dataproc/v1/proto/src/GPBMetadata/Google/Cloud/Dataproc/V1/NodeGroups.php b/owl-bot-staging/Dataproc/v1/proto/src/GPBMetadata/Google/Cloud/Dataproc/V1/NodeGroups.php deleted file mode 100644 index 816bae9f726..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/GPBMetadata/Google/Cloud/Dataproc/V1/NodeGroups.php +++ /dev/null @@ -1,58 +0,0 @@ -internalAddGeneratedFile( - ' -È -*google/cloud/dataproc/v1/node_groups.protogoogle.cloud.dataproc.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto\'google/cloud/dataproc/v1/clusters.proto#google/longrunning/operations.protogoogle/protobuf/duration.proto"Æ -CreateNodeGroupRequest9 -parent ( B)àAúA#!dataproc.googleapis.com/NodeGroup< - -node_group ( 2#.google.cloud.dataproc.v1.NodeGroupBàA - node_group_id ( BàA - -request_id ( BàA"ž -ResizeNodeGroupRequest -name ( BàA -size (BàA - -request_id ( BàAE -graceful_decommission_timeout ( 2.google.protobuf.DurationBàA"N -GetNodeGroupRequest7 -name ( B)àAúA# -!dataproc.googleapis.com/NodeGroup2§ -NodeGroupController• -CreateNodeGroup0.google.cloud.dataproc.v1.CreateNodeGroupRequest.google.longrunning.Operation"°‚Óä“E"7/v1/{parent=projects/*/regions/*/clusters/*}/nodeGroups: -node_groupÚAparent,node_group,node_group_idÊA@ - NodeGroup3google.cloud.dataproc.v1.NodeGroupOperationMetadataý -ResizeNodeGroup0.google.cloud.dataproc.v1.ResizeNodeGroupRequest.google.longrunning.Operation"˜‚Óä“C">/v1/{name=projects/*/regions/*/clusters/*/nodeGroups/*}:resize:*ÚA name,sizeÊA@ - NodeGroup3google.cloud.dataproc.v1.NodeGroupOperationMetadataª - GetNodeGroup-.google.cloud.dataproc.v1.GetNodeGroupRequest#.google.cloud.dataproc.v1.NodeGroup"F‚Óä“97/v1/{name=projects/*/regions/*/clusters/*/nodeGroups/*}ÚAnameKÊAdataproc.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBÐ -com.google.cloud.dataproc.v1BNodeGroupsProtoPZ;cloud.google.com/go/dataproc/v2/apiv1/dataprocpb;dataprocpbêA_ -%dataproc.googleapis.com/ClusterRegion6projects/{project}/regions/{region}/clusters/{cluster}bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/GPBMetadata/Google/Cloud/Dataproc/V1/Operations.php b/owl-bot-staging/Dataproc/v1/proto/src/GPBMetadata/Google/Cloud/Dataproc/V1/Operations.php deleted file mode 100644 index 6406444565f0f82e23b3c2d382871b8cce971032..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2759 zcmbtWZExd55GGC1Hj`^E@6<-c!^_+nfKcqpxI+l zDU`JHcNVrAR&0+_X-w55Z9#s(PUH;A>=h&lfd4gX8=4lz}|$#CT?-7Fqe zlu0;Kr%IX|=>Q6j?@i2eZ#Dl3N~!kEcpPAPo!%)OHK#5X7%R)k+}iF^DCrRtorwsk zj^z!`=nU3fYk=KI-b7hS=GmP+o$>3c7l&i144c1Lp+~%7Bo`=Np>hDld4nQkf5ziU zhH1jDEjPg;xwW;YnH?3R{}SSn?*eMnyUp)R-B8c#-HxuA-B*Tc_OuH_ZFWvOYODO7 zRDe9UDra_nUxV$Yn?$tt(mG$zo=+m_d&slS!aRo3(O0YaE(cH;4sK-ss%Iq`io~O1 z&=iPVBjV(J*l_5SA~df|Bn7eiHI%s}vkzmTp|^^HU)^~MdG1&$!bVSfq3J(rlrsHe zs9LL|waXdy=e(zB?9ZCC3AvW8spag>pIMM^Q%N=dAv~}}o=i4kg(yU@b4R=bHfKCk zSZ6#ER%F%zU)(i`!oy1_2^e!kB03nyGH?yv6Yish<|)oXrlpz}|AX1dMcM&d-23x) zCo@f>GAD6C?Sr{SD6vKm+Xx=nBjP&dtjmcL$q!SDyY|aJIjCs9gWI8>1gX@gaY+@} z^605KWXC2QV|=tNukW0CXY~~m?w$o%tZ(lB)Yo39Z=P1Mbo63%!B(e6Sv=yS=9W&_ z_?^_Qm+EALv-tL2Zr`XBHiCt>yXqi3J?-_3%paAR5bG6=8=`f+| zp3!3KHMVZ4XDVH1+4@|)=)6|TxrPTH(?{OQG&CNjf{ggH!N|Nm79X(b_uId!4*j{O x-%-^H2z>xfKk32Xc(xp@^AGHokJGoq6Y&z7dpNOqLhL1vCT=O7HaBns@GqejS(X3* diff --git a/owl-bot-staging/Dataproc/v1/proto/src/GPBMetadata/Google/Cloud/Dataproc/V1/Shared.php b/owl-bot-staging/Dataproc/v1/proto/src/GPBMetadata/Google/Cloud/Dataproc/V1/Shared.php deleted file mode 100644 index 3f0eef179db11d410608dec417ea0e93eaa583d2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4696 zcmbVQ&vV zfWa;ls~*kt-{_^M-r93dz4g*tFP-VN=bkb-_SCnF1qe!}rHL-WVE6s{_WRyG;%C3` zPki{UwntnNn2e0I(YeM>h~@_#^DNKNM&a=>2{g-_`nE%Yil#L?TDvpQ^k!@DF`7~@ z3@oyvO+0VnkgDZ);kY_BnTal}>e-VjJuw3^t_Y6+t~n*tH!Y&=b?Yw(Gx^rxo-iIZ zxbd(ljfXFvJO!{ElTxiOoWL8<@XrrNj%{g_nGFAZVpGF*ZDyN}{X4ASnRaYCl%VO= zy~m+zG23%BZqRWpvh_%deDb}Y_#RgLOpDX$au5)JVasJCa7|~}B-9FQpLszSx9;pr z2uq;jZ?+!Eu-u(}tZhX(?(AGi@|nhhkfft)T0mGBxKBmi+`&ciG<*wKHQyfY+Qb>x z$%%Ppd%@1mtg4xlMW#I>PwvK62^`H3xq>L(JYZrvu<`hrIrZOeD^B2tKer{`wedKC zcNgiml>oxwc?kb}0N=Y2@6=+nts>}IiRoE6ds4b59hkmd4J0NJSxXP(lAtc~pgNX? z%k_^gud}$iXhZoQ8CdUyE`Qzd++%y9z7My~NI((1Vn)ks#9$CjqkwE#|b`R$=?|%A$fQa{()eytLF^7MzQCr6+Lv(tEW4xl?i; zC8e&z@|o#`GK-z;Pc!8|XJAuz&+Nc+r^IEloPAKpYhs0*4F;BgB?=dX?MI6f)MJat zNd&?y_J}#pF)l? zrNF!+>)WoUqG?%o5AV6O|dh} z9v+caheP-P+dZOs66Ga4AAR*+Pdp~P zls(`3m=#ww{$ajm?VFKAA3k7J0gO71c+ zJeMrC!Cylu6_I+!>?@q?VkJk&zeCBhLi*A)!d;YFUxk$@zw+O+P+YWEwP2HvqMpn3 zFuO^)(DxTtw8&kh5&L=>UCKiI>dUzcH!Ipm{abjybjOxHhdXZ%c+KVeZSLzoW?}OR ztGLh-a?Y5NRhzIJcn(e%yx5KH&lVSZ#b>35hJqsV)R%0FXmK;@&-k!ZHeiW6#(_!c zbq;mosNL`Cjn-~UZz}I$^Sag4cWXz710|zw05m%70d70gdrDSSV6ES+^$v_?uk{k& zbt*!7141gYlM8n|VsbF8v`3>vJioIH^oc>jcM4gPr?i#sD#b z@Exx;w znX6PKIDjcr8wX53G?xpPLa+30SI2nD68_Z4 zzv^@jbiIq)Rv$ly^Ux z2Jj=vHM7AE&Lh7i7NgZS^68?Qw1?`O`0)b2qKF|K_sORV5#ZW!`^Ev}JdXk7)5T~7 gQ)1qa9wxuBe-M45NPW>*_%%c9jJ`Qszy-kn0ZHY;asU7T diff --git a/owl-bot-staging/Dataproc/v1/proto/src/GPBMetadata/Google/Cloud/Dataproc/V1/WorkflowTemplates.php b/owl-bot-staging/Dataproc/v1/proto/src/GPBMetadata/Google/Cloud/Dataproc/V1/WorkflowTemplates.php deleted file mode 100644 index e528923cdfcc4de0c795b4b0320361046cc40310..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8970 zcmd5?&vO&W6=o#c*iV2>Z!pFS$uN+`I3TSJ1WFiK$r8q~krixqE0n8LW2r3<$TP#t z$X>6@hj2(PxulZY)*ezxamy|F7g8yX`B9bPl&YlmkX-ka$|0|R%y>MSkuA28${twB z)9>}`ufO-b*FBnfU~kxPNu8r6b##w5)U_Se+n}oLSe{k4TIyPReVsaL-P*K`7Im_! zT3S*oODk%*G{15YO8*U z&u*`^jJoQ2x`+R}Y`8VUG(1CZ8K2?8?y2i~%cbb0bL@KCtb2xKs?1=?tka3Bs_@Ci zUbZa+;-2b9R%O^AF01pVM;%jdt(K@;cMRLJoGK2@=bO|E5M_UvxGJY*?u>PHLd2NQ zcLaG)^_(^h&#tNt_1cbkm&eT<>;<1zV{j|j#%jSdErx<+y7~P6n)Y2J8P2v0YI?od zJTz#lQKTFCmSH))nLeSCJx30*gB8e=wu{@)!$LcKe9v0z!G6&)n@-y_4YRqrWV5{K z4d{SBrM9p=I%t6@ZhU#u_IBREbj84|^Yl$S-j=id`h7!kyU=I^RDOsGFcFZCQSl1= zdj_U@PJJ>aOtM@pvc6hmx2DF=N@u!lpq4N;3bh#jR_MVxqg-uGa!w977aHJ5V#!CV zSL8E3-vM>1OZv!>ml6j)M~*}Wwf2dSvjQT>LEn^~xYnUsQJZUQqOm@Fl9?XQiV($=xP)v#9cGngR&5(MPg?aK&1wM#TKXDoxnl!r z8mIZLKTQW2ve6Z07r9~C^qd_L_yP=JO{vpOB+A%v9>9&G`>Xn<0l*B<aVa_CM|`Z*3k7*K14G#P zIxo066XMLYmTbPvhK8&^f{eYhZ!hG!i(XZCq8{=vxM6HjKE2TGi^%LkAVQ9Il^!>zl(#-n}`axe=gg#-6xi@Ok#|Lx=exQpeNt&kJk zI~yAW&*C0V92P{Cj}6(EgOn15;=|;;kxT3%I!Et{IwSNAgnVf+^PacQ&W$Hk;$Ckspy)>Ca$rat6R9;zHCX@F- z>S%D>VH=P}u=<;hZg0pv?8aWdPS3IN!WzS9V2MQD`e6tq>N$)O^s@ss#fDOuI5piR zAN?qN+_KBePJ|P!!Ax2>Vbi2?puZDYpHBv>W0ruVE^l4Q4NQGccRbN;i_|}~+n$0! zYBq$4=nW4w2`#DJ#sbC!S1u{iYzh_Z-fX7HZQL>JP(!hwM2|-}Dcph+%rJ=m)RD}_ zr(ie=-60LGb_e?To?@9l{Y;PK@yB~pM4 zOGn{Zdk#avC^8PCm8DX-w!BhUDc7D>maFC2`G@o6lGv%@;?nE_eo@E?7-TzDC@z+9 zt3vyh#_;T{qgTVOTALGTkIv#uF&Iq!4=VD&c6?GbCWSwLiwQIefB`Rk>CQmY<^MI-NDf?mfFj1Qt=l0Et+$w*`Jr zO#YmL_d{|QjiND&s!HROrB<$Y7Q3TLACf0P-GPc4lTzu)ju)i?4azG%nu4 z2e=oFdo9rZxiWsA1LMm}wr6VZi`}E~neM&QX}z>_jov_73P@uT>$?zfQvdmlzJdEy(i#`BH(=_)^`CGVvBZ7NdS%V{zj@9LRE= z(4^E)zN^$vehsM~UwBhEoA46o4~6W8=h<#Pm)qXnmca*ai1fC%A%5j?o&B0)-EuaI zZ8(oFkNjnJ$X9VRT1nh0gQBWDyDJ7uA!To%npWuj>~s$2#rD9D)Ly&0|8Z@A1A601 f@Jjlc`1M5S#}-%-@W&uAKeXT@#SbF(U=QFw{gt3? diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/AcceleratorConfig.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/AcceleratorConfig.php deleted file mode 100644 index caa0cd0d367..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/AcceleratorConfig.php +++ /dev/null @@ -1,151 +0,0 @@ -google.cloud.dataproc.v1.AcceleratorConfig - */ -class AcceleratorConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Full URL, partial URI, or short name of the accelerator type resource to - * expose to this instance. See - * [Compute Engine - * AcceleratorTypes](https://cloud.google.com/compute/docs/reference/v1/acceleratorTypes). - * Examples: - * * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]/acceleratorTypes/nvidia-tesla-k80` - * * `projects/[project_id]/zones/[zone]/acceleratorTypes/nvidia-tesla-k80` - * * `nvidia-tesla-k80` - * **Auto Zone Exception**: If you are using the Dataproc - * [Auto Zone - * Placement](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement) - * feature, you must use the short name of the accelerator type - * resource, for example, `nvidia-tesla-k80`. - * - * Generated from protobuf field string accelerator_type_uri = 1; - */ - protected $accelerator_type_uri = ''; - /** - * The number of the accelerator cards of this type exposed to this instance. - * - * Generated from protobuf field int32 accelerator_count = 2; - */ - protected $accelerator_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $accelerator_type_uri - * Full URL, partial URI, or short name of the accelerator type resource to - * expose to this instance. See - * [Compute Engine - * AcceleratorTypes](https://cloud.google.com/compute/docs/reference/v1/acceleratorTypes). - * Examples: - * * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]/acceleratorTypes/nvidia-tesla-k80` - * * `projects/[project_id]/zones/[zone]/acceleratorTypes/nvidia-tesla-k80` - * * `nvidia-tesla-k80` - * **Auto Zone Exception**: If you are using the Dataproc - * [Auto Zone - * Placement](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement) - * feature, you must use the short name of the accelerator type - * resource, for example, `nvidia-tesla-k80`. - * @type int $accelerator_count - * The number of the accelerator cards of this type exposed to this instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Clusters::initOnce(); - parent::__construct($data); - } - - /** - * Full URL, partial URI, or short name of the accelerator type resource to - * expose to this instance. See - * [Compute Engine - * AcceleratorTypes](https://cloud.google.com/compute/docs/reference/v1/acceleratorTypes). - * Examples: - * * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]/acceleratorTypes/nvidia-tesla-k80` - * * `projects/[project_id]/zones/[zone]/acceleratorTypes/nvidia-tesla-k80` - * * `nvidia-tesla-k80` - * **Auto Zone Exception**: If you are using the Dataproc - * [Auto Zone - * Placement](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement) - * feature, you must use the short name of the accelerator type - * resource, for example, `nvidia-tesla-k80`. - * - * Generated from protobuf field string accelerator_type_uri = 1; - * @return string - */ - public function getAcceleratorTypeUri() - { - return $this->accelerator_type_uri; - } - - /** - * Full URL, partial URI, or short name of the accelerator type resource to - * expose to this instance. See - * [Compute Engine - * AcceleratorTypes](https://cloud.google.com/compute/docs/reference/v1/acceleratorTypes). - * Examples: - * * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]/acceleratorTypes/nvidia-tesla-k80` - * * `projects/[project_id]/zones/[zone]/acceleratorTypes/nvidia-tesla-k80` - * * `nvidia-tesla-k80` - * **Auto Zone Exception**: If you are using the Dataproc - * [Auto Zone - * Placement](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement) - * feature, you must use the short name of the accelerator type - * resource, for example, `nvidia-tesla-k80`. - * - * Generated from protobuf field string accelerator_type_uri = 1; - * @param string $var - * @return $this - */ - public function setAcceleratorTypeUri($var) - { - GPBUtil::checkString($var, True); - $this->accelerator_type_uri = $var; - - return $this; - } - - /** - * The number of the accelerator cards of this type exposed to this instance. - * - * Generated from protobuf field int32 accelerator_count = 2; - * @return int - */ - public function getAcceleratorCount() - { - return $this->accelerator_count; - } - - /** - * The number of the accelerator cards of this type exposed to this instance. - * - * Generated from protobuf field int32 accelerator_count = 2; - * @param int $var - * @return $this - */ - public function setAcceleratorCount($var) - { - GPBUtil::checkInt32($var); - $this->accelerator_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/AutoscalingConfig.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/AutoscalingConfig.php deleted file mode 100644 index 14572342be6..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/AutoscalingConfig.php +++ /dev/null @@ -1,87 +0,0 @@ -google.cloud.dataproc.v1.AutoscalingConfig - */ -class AutoscalingConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The autoscaling policy used by the cluster. - * Only resource names including projectid and location (region) are valid. - * Examples: - * * `https://www.googleapis.com/compute/v1/projects/[project_id]/locations/[dataproc_region]/autoscalingPolicies/[policy_id]` - * * `projects/[project_id]/locations/[dataproc_region]/autoscalingPolicies/[policy_id]` - * Note that the policy must be in the same project and Dataproc region. - * - * Generated from protobuf field string policy_uri = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $policy_uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $policy_uri - * Optional. The autoscaling policy used by the cluster. - * Only resource names including projectid and location (region) are valid. - * Examples: - * * `https://www.googleapis.com/compute/v1/projects/[project_id]/locations/[dataproc_region]/autoscalingPolicies/[policy_id]` - * * `projects/[project_id]/locations/[dataproc_region]/autoscalingPolicies/[policy_id]` - * Note that the policy must be in the same project and Dataproc region. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Clusters::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The autoscaling policy used by the cluster. - * Only resource names including projectid and location (region) are valid. - * Examples: - * * `https://www.googleapis.com/compute/v1/projects/[project_id]/locations/[dataproc_region]/autoscalingPolicies/[policy_id]` - * * `projects/[project_id]/locations/[dataproc_region]/autoscalingPolicies/[policy_id]` - * Note that the policy must be in the same project and Dataproc region. - * - * Generated from protobuf field string policy_uri = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPolicyUri() - { - return $this->policy_uri; - } - - /** - * Optional. The autoscaling policy used by the cluster. - * Only resource names including projectid and location (region) are valid. - * Examples: - * * `https://www.googleapis.com/compute/v1/projects/[project_id]/locations/[dataproc_region]/autoscalingPolicies/[policy_id]` - * * `projects/[project_id]/locations/[dataproc_region]/autoscalingPolicies/[policy_id]` - * Note that the policy must be in the same project and Dataproc region. - * - * Generated from protobuf field string policy_uri = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPolicyUri($var) - { - GPBUtil::checkString($var, True); - $this->policy_uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/AutoscalingPolicy.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/AutoscalingPolicy.php deleted file mode 100644 index 09769d54f22..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/AutoscalingPolicy.php +++ /dev/null @@ -1,324 +0,0 @@ -google.cloud.dataproc.v1.AutoscalingPolicy - */ -class AutoscalingPolicy extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The policy id. - * The id must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). Cannot begin or end with underscore - * or hyphen. Must consist of between 3 and 50 characters. - * - * Generated from protobuf field string id = 1; - */ - protected $id = ''; - /** - * Output only. The "resource name" of the autoscaling policy, as described - * in https://cloud.google.com/apis/design/resource_names. - * * For `projects.regions.autoscalingPolicies`, the resource name of the - * policy has the following format: - * `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}` - * * For `projects.locations.autoscalingPolicies`, the resource name of the - * policy has the following format: - * `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}` - * - * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Required. Describes how the autoscaler will operate for primary workers. - * - * Generated from protobuf field .google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig worker_config = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $worker_config = null; - /** - * Optional. Describes how the autoscaler will operate for secondary workers. - * - * Generated from protobuf field .google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig secondary_worker_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $secondary_worker_config = null; - /** - * Optional. The labels to associate with this autoscaling policy. - * Label **keys** must contain 1 to 63 characters, and must conform to - * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). - * Label **values** may be empty, but, if present, must contain 1 to 63 - * characters, and must conform to [RFC - * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be - * associated with an autoscaling policy. - * - * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - protected $algorithm; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $id - * Required. The policy id. - * The id must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). Cannot begin or end with underscore - * or hyphen. Must consist of between 3 and 50 characters. - * @type string $name - * Output only. The "resource name" of the autoscaling policy, as described - * in https://cloud.google.com/apis/design/resource_names. - * * For `projects.regions.autoscalingPolicies`, the resource name of the - * policy has the following format: - * `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}` - * * For `projects.locations.autoscalingPolicies`, the resource name of the - * policy has the following format: - * `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}` - * @type \Google\Cloud\Dataproc\V1\BasicAutoscalingAlgorithm $basic_algorithm - * @type \Google\Cloud\Dataproc\V1\InstanceGroupAutoscalingPolicyConfig $worker_config - * Required. Describes how the autoscaler will operate for primary workers. - * @type \Google\Cloud\Dataproc\V1\InstanceGroupAutoscalingPolicyConfig $secondary_worker_config - * Optional. Describes how the autoscaler will operate for secondary workers. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. The labels to associate with this autoscaling policy. - * Label **keys** must contain 1 to 63 characters, and must conform to - * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). - * Label **values** may be empty, but, if present, must contain 1 to 63 - * characters, and must conform to [RFC - * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be - * associated with an autoscaling policy. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\AutoscalingPolicies::initOnce(); - parent::__construct($data); - } - - /** - * Required. The policy id. - * The id must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). Cannot begin or end with underscore - * or hyphen. Must consist of between 3 and 50 characters. - * - * Generated from protobuf field string id = 1; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Required. The policy id. - * The id must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). Cannot begin or end with underscore - * or hyphen. Must consist of between 3 and 50 characters. - * - * Generated from protobuf field string id = 1; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * Output only. The "resource name" of the autoscaling policy, as described - * in https://cloud.google.com/apis/design/resource_names. - * * For `projects.regions.autoscalingPolicies`, the resource name of the - * policy has the following format: - * `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}` - * * For `projects.locations.autoscalingPolicies`, the resource name of the - * policy has the following format: - * `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}` - * - * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The "resource name" of the autoscaling policy, as described - * in https://cloud.google.com/apis/design/resource_names. - * * For `projects.regions.autoscalingPolicies`, the resource name of the - * policy has the following format: - * `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}` - * * For `projects.locations.autoscalingPolicies`, the resource name of the - * policy has the following format: - * `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}` - * - * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Generated from protobuf field .google.cloud.dataproc.v1.BasicAutoscalingAlgorithm basic_algorithm = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataproc\V1\BasicAutoscalingAlgorithm|null - */ - public function getBasicAlgorithm() - { - return $this->readOneof(3); - } - - public function hasBasicAlgorithm() - { - return $this->hasOneof(3); - } - - /** - * Generated from protobuf field .google.cloud.dataproc.v1.BasicAutoscalingAlgorithm basic_algorithm = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataproc\V1\BasicAutoscalingAlgorithm $var - * @return $this - */ - public function setBasicAlgorithm($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\BasicAutoscalingAlgorithm::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Required. Describes how the autoscaler will operate for primary workers. - * - * Generated from protobuf field .google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig worker_config = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataproc\V1\InstanceGroupAutoscalingPolicyConfig|null - */ - public function getWorkerConfig() - { - return $this->worker_config; - } - - public function hasWorkerConfig() - { - return isset($this->worker_config); - } - - public function clearWorkerConfig() - { - unset($this->worker_config); - } - - /** - * Required. Describes how the autoscaler will operate for primary workers. - * - * Generated from protobuf field .google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig worker_config = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataproc\V1\InstanceGroupAutoscalingPolicyConfig $var - * @return $this - */ - public function setWorkerConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\InstanceGroupAutoscalingPolicyConfig::class); - $this->worker_config = $var; - - return $this; - } - - /** - * Optional. Describes how the autoscaler will operate for secondary workers. - * - * Generated from protobuf field .google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig secondary_worker_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\InstanceGroupAutoscalingPolicyConfig|null - */ - public function getSecondaryWorkerConfig() - { - return $this->secondary_worker_config; - } - - public function hasSecondaryWorkerConfig() - { - return isset($this->secondary_worker_config); - } - - public function clearSecondaryWorkerConfig() - { - unset($this->secondary_worker_config); - } - - /** - * Optional. Describes how the autoscaler will operate for secondary workers. - * - * Generated from protobuf field .google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig secondary_worker_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\InstanceGroupAutoscalingPolicyConfig $var - * @return $this - */ - public function setSecondaryWorkerConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\InstanceGroupAutoscalingPolicyConfig::class); - $this->secondary_worker_config = $var; - - return $this; - } - - /** - * Optional. The labels to associate with this autoscaling policy. - * Label **keys** must contain 1 to 63 characters, and must conform to - * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). - * Label **values** may be empty, but, if present, must contain 1 to 63 - * characters, and must conform to [RFC - * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be - * associated with an autoscaling policy. - * - * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. The labels to associate with this autoscaling policy. - * Label **keys** must contain 1 to 63 characters, and must conform to - * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). - * Label **values** may be empty, but, if present, must contain 1 to 63 - * characters, and must conform to [RFC - * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be - * associated with an autoscaling policy. - * - * Generated from protobuf field map labels = 6 [(.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 getAlgorithm() - { - return $this->whichOneof("algorithm"); - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/AuxiliaryNodeGroup.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/AuxiliaryNodeGroup.php deleted file mode 100644 index 3ad500577c2..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/AuxiliaryNodeGroup.php +++ /dev/null @@ -1,123 +0,0 @@ -google.cloud.dataproc.v1.AuxiliaryNodeGroup - */ -class AuxiliaryNodeGroup extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Node group configuration. - * - * Generated from protobuf field .google.cloud.dataproc.v1.NodeGroup node_group = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $node_group = null; - /** - * Optional. A node group ID. Generated if not specified. - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). Cannot begin or end with underscore - * or hyphen. Must consist of from 3 to 33 characters. - * - * Generated from protobuf field string node_group_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $node_group_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dataproc\V1\NodeGroup $node_group - * Required. Node group configuration. - * @type string $node_group_id - * Optional. A node group ID. Generated if not specified. - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). Cannot begin or end with underscore - * or hyphen. Must consist of from 3 to 33 characters. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Clusters::initOnce(); - parent::__construct($data); - } - - /** - * Required. Node group configuration. - * - * Generated from protobuf field .google.cloud.dataproc.v1.NodeGroup node_group = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataproc\V1\NodeGroup|null - */ - public function getNodeGroup() - { - return $this->node_group; - } - - public function hasNodeGroup() - { - return isset($this->node_group); - } - - public function clearNodeGroup() - { - unset($this->node_group); - } - - /** - * Required. Node group configuration. - * - * Generated from protobuf field .google.cloud.dataproc.v1.NodeGroup node_group = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataproc\V1\NodeGroup $var - * @return $this - */ - public function setNodeGroup($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\NodeGroup::class); - $this->node_group = $var; - - return $this; - } - - /** - * Optional. A node group ID. Generated if not specified. - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). Cannot begin or end with underscore - * or hyphen. Must consist of from 3 to 33 characters. - * - * Generated from protobuf field string node_group_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getNodeGroupId() - { - return $this->node_group_id; - } - - /** - * Optional. A node group ID. Generated if not specified. - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). Cannot begin or end with underscore - * or hyphen. Must consist of from 3 to 33 characters. - * - * Generated from protobuf field string node_group_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setNodeGroupId($var) - { - GPBUtil::checkString($var, True); - $this->node_group_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/AuxiliaryServicesConfig.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/AuxiliaryServicesConfig.php deleted file mode 100644 index ee5d549ff6e..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/AuxiliaryServicesConfig.php +++ /dev/null @@ -1,121 +0,0 @@ -google.cloud.dataproc.v1.AuxiliaryServicesConfig - */ -class AuxiliaryServicesConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The Hive Metastore configuration for this workload. - * - * Generated from protobuf field .google.cloud.dataproc.v1.MetastoreConfig metastore_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $metastore_config = null; - /** - * Optional. The Spark History Server configuration for the workload. - * - * Generated from protobuf field .google.cloud.dataproc.v1.SparkHistoryServerConfig spark_history_server_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $spark_history_server_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dataproc\V1\MetastoreConfig $metastore_config - * Optional. The Hive Metastore configuration for this workload. - * @type \Google\Cloud\Dataproc\V1\SparkHistoryServerConfig $spark_history_server_config - * Optional. The Spark History Server configuration for the workload. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Clusters::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The Hive Metastore configuration for this workload. - * - * Generated from protobuf field .google.cloud.dataproc.v1.MetastoreConfig metastore_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\MetastoreConfig|null - */ - public function getMetastoreConfig() - { - return $this->metastore_config; - } - - public function hasMetastoreConfig() - { - return isset($this->metastore_config); - } - - public function clearMetastoreConfig() - { - unset($this->metastore_config); - } - - /** - * Optional. The Hive Metastore configuration for this workload. - * - * Generated from protobuf field .google.cloud.dataproc.v1.MetastoreConfig metastore_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\MetastoreConfig $var - * @return $this - */ - public function setMetastoreConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\MetastoreConfig::class); - $this->metastore_config = $var; - - return $this; - } - - /** - * Optional. The Spark History Server configuration for the workload. - * - * Generated from protobuf field .google.cloud.dataproc.v1.SparkHistoryServerConfig spark_history_server_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\SparkHistoryServerConfig|null - */ - public function getSparkHistoryServerConfig() - { - return $this->spark_history_server_config; - } - - public function hasSparkHistoryServerConfig() - { - return isset($this->spark_history_server_config); - } - - public function clearSparkHistoryServerConfig() - { - unset($this->spark_history_server_config); - } - - /** - * Optional. The Spark History Server configuration for the workload. - * - * Generated from protobuf field .google.cloud.dataproc.v1.SparkHistoryServerConfig spark_history_server_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\SparkHistoryServerConfig $var - * @return $this - */ - public function setSparkHistoryServerConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\SparkHistoryServerConfig::class); - $this->spark_history_server_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/BasicAutoscalingAlgorithm.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/BasicAutoscalingAlgorithm.php deleted file mode 100644 index 17f45730410..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/BasicAutoscalingAlgorithm.php +++ /dev/null @@ -1,127 +0,0 @@ -google.cloud.dataproc.v1.BasicAutoscalingAlgorithm - */ -class BasicAutoscalingAlgorithm extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Duration between scaling events. A scaling period starts after - * the update operation from the previous event has completed. - * Bounds: [2m, 1d]. Default: 2m. - * - * Generated from protobuf field .google.protobuf.Duration cooldown_period = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $cooldown_period = null; - protected $config; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dataproc\V1\BasicYarnAutoscalingConfig $yarn_config - * Required. YARN autoscaling configuration. - * @type \Google\Protobuf\Duration $cooldown_period - * Optional. Duration between scaling events. A scaling period starts after - * the update operation from the previous event has completed. - * Bounds: [2m, 1d]. Default: 2m. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\AutoscalingPolicies::initOnce(); - parent::__construct($data); - } - - /** - * Required. YARN autoscaling configuration. - * - * Generated from protobuf field .google.cloud.dataproc.v1.BasicYarnAutoscalingConfig yarn_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataproc\V1\BasicYarnAutoscalingConfig|null - */ - public function getYarnConfig() - { - return $this->readOneof(1); - } - - public function hasYarnConfig() - { - return $this->hasOneof(1); - } - - /** - * Required. YARN autoscaling configuration. - * - * Generated from protobuf field .google.cloud.dataproc.v1.BasicYarnAutoscalingConfig yarn_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataproc\V1\BasicYarnAutoscalingConfig $var - * @return $this - */ - public function setYarnConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\BasicYarnAutoscalingConfig::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Optional. Duration between scaling events. A scaling period starts after - * the update operation from the previous event has completed. - * Bounds: [2m, 1d]. Default: 2m. - * - * Generated from protobuf field .google.protobuf.Duration cooldown_period = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Duration|null - */ - public function getCooldownPeriod() - { - return $this->cooldown_period; - } - - public function hasCooldownPeriod() - { - return isset($this->cooldown_period); - } - - public function clearCooldownPeriod() - { - unset($this->cooldown_period); - } - - /** - * Optional. Duration between scaling events. A scaling period starts after - * the update operation from the previous event has completed. - * Bounds: [2m, 1d]. Default: 2m. - * - * Generated from protobuf field .google.protobuf.Duration cooldown_period = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setCooldownPeriod($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->cooldown_period = $var; - - return $this; - } - - /** - * @return string - */ - public function getConfig() - { - return $this->whichOneof("config"); - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/BasicYarnAutoscalingConfig.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/BasicYarnAutoscalingConfig.php deleted file mode 100644 index e8bc82e7033..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/BasicYarnAutoscalingConfig.php +++ /dev/null @@ -1,333 +0,0 @@ -google.cloud.dataproc.v1.BasicYarnAutoscalingConfig - */ -class BasicYarnAutoscalingConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Timeout for YARN graceful decommissioning of Node Managers. - * Specifies the duration to wait for jobs to complete before forcefully - * removing workers (and potentially interrupting jobs). Only applicable to - * downscaling operations. - * Bounds: [0s, 1d]. - * - * Generated from protobuf field .google.protobuf.Duration graceful_decommission_timeout = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $graceful_decommission_timeout = null; - /** - * Required. Fraction of average YARN pending memory in the last cooldown - * period for which to add workers. A scale-up factor of 1.0 will result in - * scaling up so that there is no pending memory remaining after the update - * (more aggressive scaling). A scale-up factor closer to 0 will result in a - * smaller magnitude of scaling up (less aggressive scaling). See [How - * autoscaling - * works](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/autoscaling#how_autoscaling_works) - * for more information. - * Bounds: [0.0, 1.0]. - * - * Generated from protobuf field double scale_up_factor = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $scale_up_factor = 0.0; - /** - * Required. Fraction of average YARN pending memory in the last cooldown - * period for which to remove workers. A scale-down factor of 1 will result in - * scaling down so that there is no available memory remaining after the - * update (more aggressive scaling). A scale-down factor of 0 disables - * removing workers, which can be beneficial for autoscaling a single job. - * See [How autoscaling - * works](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/autoscaling#how_autoscaling_works) - * for more information. - * Bounds: [0.0, 1.0]. - * - * Generated from protobuf field double scale_down_factor = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $scale_down_factor = 0.0; - /** - * Optional. Minimum scale-up threshold as a fraction of total cluster size - * before scaling occurs. For example, in a 20-worker cluster, a threshold of - * 0.1 means the autoscaler must recommend at least a 2-worker scale-up for - * the cluster to scale. A threshold of 0 means the autoscaler will scale up - * on any recommended change. - * Bounds: [0.0, 1.0]. Default: 0.0. - * - * Generated from protobuf field double scale_up_min_worker_fraction = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $scale_up_min_worker_fraction = 0.0; - /** - * Optional. Minimum scale-down threshold as a fraction of total cluster size - * before scaling occurs. For example, in a 20-worker cluster, a threshold of - * 0.1 means the autoscaler must recommend at least a 2 worker scale-down for - * the cluster to scale. A threshold of 0 means the autoscaler will scale down - * on any recommended change. - * Bounds: [0.0, 1.0]. Default: 0.0. - * - * Generated from protobuf field double scale_down_min_worker_fraction = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $scale_down_min_worker_fraction = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $graceful_decommission_timeout - * Required. Timeout for YARN graceful decommissioning of Node Managers. - * Specifies the duration to wait for jobs to complete before forcefully - * removing workers (and potentially interrupting jobs). Only applicable to - * downscaling operations. - * Bounds: [0s, 1d]. - * @type float $scale_up_factor - * Required. Fraction of average YARN pending memory in the last cooldown - * period for which to add workers. A scale-up factor of 1.0 will result in - * scaling up so that there is no pending memory remaining after the update - * (more aggressive scaling). A scale-up factor closer to 0 will result in a - * smaller magnitude of scaling up (less aggressive scaling). See [How - * autoscaling - * works](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/autoscaling#how_autoscaling_works) - * for more information. - * Bounds: [0.0, 1.0]. - * @type float $scale_down_factor - * Required. Fraction of average YARN pending memory in the last cooldown - * period for which to remove workers. A scale-down factor of 1 will result in - * scaling down so that there is no available memory remaining after the - * update (more aggressive scaling). A scale-down factor of 0 disables - * removing workers, which can be beneficial for autoscaling a single job. - * See [How autoscaling - * works](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/autoscaling#how_autoscaling_works) - * for more information. - * Bounds: [0.0, 1.0]. - * @type float $scale_up_min_worker_fraction - * Optional. Minimum scale-up threshold as a fraction of total cluster size - * before scaling occurs. For example, in a 20-worker cluster, a threshold of - * 0.1 means the autoscaler must recommend at least a 2-worker scale-up for - * the cluster to scale. A threshold of 0 means the autoscaler will scale up - * on any recommended change. - * Bounds: [0.0, 1.0]. Default: 0.0. - * @type float $scale_down_min_worker_fraction - * Optional. Minimum scale-down threshold as a fraction of total cluster size - * before scaling occurs. For example, in a 20-worker cluster, a threshold of - * 0.1 means the autoscaler must recommend at least a 2 worker scale-down for - * the cluster to scale. A threshold of 0 means the autoscaler will scale down - * on any recommended change. - * Bounds: [0.0, 1.0]. Default: 0.0. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\AutoscalingPolicies::initOnce(); - parent::__construct($data); - } - - /** - * Required. Timeout for YARN graceful decommissioning of Node Managers. - * Specifies the duration to wait for jobs to complete before forcefully - * removing workers (and potentially interrupting jobs). Only applicable to - * downscaling operations. - * Bounds: [0s, 1d]. - * - * Generated from protobuf field .google.protobuf.Duration graceful_decommission_timeout = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Duration|null - */ - public function getGracefulDecommissionTimeout() - { - return $this->graceful_decommission_timeout; - } - - public function hasGracefulDecommissionTimeout() - { - return isset($this->graceful_decommission_timeout); - } - - public function clearGracefulDecommissionTimeout() - { - unset($this->graceful_decommission_timeout); - } - - /** - * Required. Timeout for YARN graceful decommissioning of Node Managers. - * Specifies the duration to wait for jobs to complete before forcefully - * removing workers (and potentially interrupting jobs). Only applicable to - * downscaling operations. - * Bounds: [0s, 1d]. - * - * Generated from protobuf field .google.protobuf.Duration graceful_decommission_timeout = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setGracefulDecommissionTimeout($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->graceful_decommission_timeout = $var; - - return $this; - } - - /** - * Required. Fraction of average YARN pending memory in the last cooldown - * period for which to add workers. A scale-up factor of 1.0 will result in - * scaling up so that there is no pending memory remaining after the update - * (more aggressive scaling). A scale-up factor closer to 0 will result in a - * smaller magnitude of scaling up (less aggressive scaling). See [How - * autoscaling - * works](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/autoscaling#how_autoscaling_works) - * for more information. - * Bounds: [0.0, 1.0]. - * - * Generated from protobuf field double scale_up_factor = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return float - */ - public function getScaleUpFactor() - { - return $this->scale_up_factor; - } - - /** - * Required. Fraction of average YARN pending memory in the last cooldown - * period for which to add workers. A scale-up factor of 1.0 will result in - * scaling up so that there is no pending memory remaining after the update - * (more aggressive scaling). A scale-up factor closer to 0 will result in a - * smaller magnitude of scaling up (less aggressive scaling). See [How - * autoscaling - * works](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/autoscaling#how_autoscaling_works) - * for more information. - * Bounds: [0.0, 1.0]. - * - * Generated from protobuf field double scale_up_factor = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param float $var - * @return $this - */ - public function setScaleUpFactor($var) - { - GPBUtil::checkDouble($var); - $this->scale_up_factor = $var; - - return $this; - } - - /** - * Required. Fraction of average YARN pending memory in the last cooldown - * period for which to remove workers. A scale-down factor of 1 will result in - * scaling down so that there is no available memory remaining after the - * update (more aggressive scaling). A scale-down factor of 0 disables - * removing workers, which can be beneficial for autoscaling a single job. - * See [How autoscaling - * works](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/autoscaling#how_autoscaling_works) - * for more information. - * Bounds: [0.0, 1.0]. - * - * Generated from protobuf field double scale_down_factor = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return float - */ - public function getScaleDownFactor() - { - return $this->scale_down_factor; - } - - /** - * Required. Fraction of average YARN pending memory in the last cooldown - * period for which to remove workers. A scale-down factor of 1 will result in - * scaling down so that there is no available memory remaining after the - * update (more aggressive scaling). A scale-down factor of 0 disables - * removing workers, which can be beneficial for autoscaling a single job. - * See [How autoscaling - * works](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/autoscaling#how_autoscaling_works) - * for more information. - * Bounds: [0.0, 1.0]. - * - * Generated from protobuf field double scale_down_factor = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param float $var - * @return $this - */ - public function setScaleDownFactor($var) - { - GPBUtil::checkDouble($var); - $this->scale_down_factor = $var; - - return $this; - } - - /** - * Optional. Minimum scale-up threshold as a fraction of total cluster size - * before scaling occurs. For example, in a 20-worker cluster, a threshold of - * 0.1 means the autoscaler must recommend at least a 2-worker scale-up for - * the cluster to scale. A threshold of 0 means the autoscaler will scale up - * on any recommended change. - * Bounds: [0.0, 1.0]. Default: 0.0. - * - * Generated from protobuf field double scale_up_min_worker_fraction = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return float - */ - public function getScaleUpMinWorkerFraction() - { - return $this->scale_up_min_worker_fraction; - } - - /** - * Optional. Minimum scale-up threshold as a fraction of total cluster size - * before scaling occurs. For example, in a 20-worker cluster, a threshold of - * 0.1 means the autoscaler must recommend at least a 2-worker scale-up for - * the cluster to scale. A threshold of 0 means the autoscaler will scale up - * on any recommended change. - * Bounds: [0.0, 1.0]. Default: 0.0. - * - * Generated from protobuf field double scale_up_min_worker_fraction = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param float $var - * @return $this - */ - public function setScaleUpMinWorkerFraction($var) - { - GPBUtil::checkDouble($var); - $this->scale_up_min_worker_fraction = $var; - - return $this; - } - - /** - * Optional. Minimum scale-down threshold as a fraction of total cluster size - * before scaling occurs. For example, in a 20-worker cluster, a threshold of - * 0.1 means the autoscaler must recommend at least a 2 worker scale-down for - * the cluster to scale. A threshold of 0 means the autoscaler will scale down - * on any recommended change. - * Bounds: [0.0, 1.0]. Default: 0.0. - * - * Generated from protobuf field double scale_down_min_worker_fraction = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return float - */ - public function getScaleDownMinWorkerFraction() - { - return $this->scale_down_min_worker_fraction; - } - - /** - * Optional. Minimum scale-down threshold as a fraction of total cluster size - * before scaling occurs. For example, in a 20-worker cluster, a threshold of - * 0.1 means the autoscaler must recommend at least a 2 worker scale-down for - * the cluster to scale. A threshold of 0 means the autoscaler will scale down - * on any recommended change. - * Bounds: [0.0, 1.0]. Default: 0.0. - * - * Generated from protobuf field double scale_down_min_worker_fraction = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param float $var - * @return $this - */ - public function setScaleDownMinWorkerFraction($var) - { - GPBUtil::checkDouble($var); - $this->scale_down_min_worker_fraction = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/Batch.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/Batch.php deleted file mode 100644 index d9001a4cb37..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/Batch.php +++ /dev/null @@ -1,698 +0,0 @@ -google.cloud.dataproc.v1.Batch - */ -class Batch extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name of the batch. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. A batch UUID (Unique Universal Identifier). The service - * generates this value when it creates the batch. - * - * Generated from protobuf field string uuid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uuid = ''; - /** - * Output only. The time when the batch was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Runtime information about batch execution. - * - * Generated from protobuf field .google.cloud.dataproc.v1.RuntimeInfo runtime_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $runtime_info = null; - /** - * Output only. The state of the batch. - * - * Generated from protobuf field .google.cloud.dataproc.v1.Batch.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. Batch state details, such as a failure - * description if the state is `FAILED`. - * - * Generated from protobuf field string state_message = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state_message = ''; - /** - * Output only. The time when the batch entered a current state. - * - * Generated from protobuf field .google.protobuf.Timestamp state_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state_time = null; - /** - * Output only. The email address of the user who created the batch. - * - * Generated from protobuf field string creator = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $creator = ''; - /** - * Optional. The labels to associate with this batch. - * Label **keys** must contain 1 to 63 characters, and must conform to - * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). - * Label **values** may be empty, but, if present, must contain 1 to 63 - * characters, and must conform to [RFC - * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be - * associated with a batch. - * - * Generated from protobuf field map labels = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Optional. Runtime configuration for the batch execution. - * - * Generated from protobuf field .google.cloud.dataproc.v1.RuntimeConfig runtime_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $runtime_config = null; - /** - * Optional. Environment configuration for the batch execution. - * - * Generated from protobuf field .google.cloud.dataproc.v1.EnvironmentConfig environment_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $environment_config = null; - /** - * Output only. The resource name of the operation associated with this batch. - * - * Generated from protobuf field string operation = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $operation = ''; - /** - * Output only. Historical state information for the batch. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.Batch.StateHistory state_history = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $state_history; - protected $batch_config; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name of the batch. - * @type string $uuid - * Output only. A batch UUID (Unique Universal Identifier). The service - * generates this value when it creates the batch. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time when the batch was created. - * @type \Google\Cloud\Dataproc\V1\PySparkBatch $pyspark_batch - * Optional. PySpark batch config. - * @type \Google\Cloud\Dataproc\V1\SparkBatch $spark_batch - * Optional. Spark batch config. - * @type \Google\Cloud\Dataproc\V1\SparkRBatch $spark_r_batch - * Optional. SparkR batch config. - * @type \Google\Cloud\Dataproc\V1\SparkSqlBatch $spark_sql_batch - * Optional. SparkSql batch config. - * @type \Google\Cloud\Dataproc\V1\RuntimeInfo $runtime_info - * Output only. Runtime information about batch execution. - * @type int $state - * Output only. The state of the batch. - * @type string $state_message - * Output only. Batch state details, such as a failure - * description if the state is `FAILED`. - * @type \Google\Protobuf\Timestamp $state_time - * Output only. The time when the batch entered a current state. - * @type string $creator - * Output only. The email address of the user who created the batch. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. The labels to associate with this batch. - * Label **keys** must contain 1 to 63 characters, and must conform to - * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). - * Label **values** may be empty, but, if present, must contain 1 to 63 - * characters, and must conform to [RFC - * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be - * associated with a batch. - * @type \Google\Cloud\Dataproc\V1\RuntimeConfig $runtime_config - * Optional. Runtime configuration for the batch execution. - * @type \Google\Cloud\Dataproc\V1\EnvironmentConfig $environment_config - * Optional. Environment configuration for the batch execution. - * @type string $operation - * Output only. The resource name of the operation associated with this batch. - * @type array<\Google\Cloud\Dataproc\V1\Batch\StateHistory>|\Google\Protobuf\Internal\RepeatedField $state_history - * Output only. Historical state information for the batch. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Batches::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name of the batch. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The resource name of the batch. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. A batch UUID (Unique Universal Identifier). The service - * generates this value when it creates the batch. - * - * Generated from protobuf field string uuid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUuid() - { - return $this->uuid; - } - - /** - * Output only. A batch UUID (Unique Universal Identifier). The service - * generates this value when it creates the batch. - * - * Generated from protobuf field string uuid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUuid($var) - { - GPBUtil::checkString($var, True); - $this->uuid = $var; - - return $this; - } - - /** - * Output only. The time when the batch 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. The time when the batch 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; - } - - /** - * Optional. PySpark batch config. - * - * Generated from protobuf field .google.cloud.dataproc.v1.PySparkBatch pyspark_batch = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\PySparkBatch|null - */ - public function getPysparkBatch() - { - return $this->readOneof(4); - } - - public function hasPysparkBatch() - { - return $this->hasOneof(4); - } - - /** - * Optional. PySpark batch config. - * - * Generated from protobuf field .google.cloud.dataproc.v1.PySparkBatch pyspark_batch = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\PySparkBatch $var - * @return $this - */ - public function setPysparkBatch($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\PySparkBatch::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Optional. Spark batch config. - * - * Generated from protobuf field .google.cloud.dataproc.v1.SparkBatch spark_batch = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\SparkBatch|null - */ - public function getSparkBatch() - { - return $this->readOneof(5); - } - - public function hasSparkBatch() - { - return $this->hasOneof(5); - } - - /** - * Optional. Spark batch config. - * - * Generated from protobuf field .google.cloud.dataproc.v1.SparkBatch spark_batch = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\SparkBatch $var - * @return $this - */ - public function setSparkBatch($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\SparkBatch::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Optional. SparkR batch config. - * - * Generated from protobuf field .google.cloud.dataproc.v1.SparkRBatch spark_r_batch = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\SparkRBatch|null - */ - public function getSparkRBatch() - { - return $this->readOneof(6); - } - - public function hasSparkRBatch() - { - return $this->hasOneof(6); - } - - /** - * Optional. SparkR batch config. - * - * Generated from protobuf field .google.cloud.dataproc.v1.SparkRBatch spark_r_batch = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\SparkRBatch $var - * @return $this - */ - public function setSparkRBatch($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\SparkRBatch::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Optional. SparkSql batch config. - * - * Generated from protobuf field .google.cloud.dataproc.v1.SparkSqlBatch spark_sql_batch = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\SparkSqlBatch|null - */ - public function getSparkSqlBatch() - { - return $this->readOneof(7); - } - - public function hasSparkSqlBatch() - { - return $this->hasOneof(7); - } - - /** - * Optional. SparkSql batch config. - * - * Generated from protobuf field .google.cloud.dataproc.v1.SparkSqlBatch spark_sql_batch = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\SparkSqlBatch $var - * @return $this - */ - public function setSparkSqlBatch($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\SparkSqlBatch::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * Output only. Runtime information about batch execution. - * - * Generated from protobuf field .google.cloud.dataproc.v1.RuntimeInfo runtime_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataproc\V1\RuntimeInfo|null - */ - public function getRuntimeInfo() - { - return $this->runtime_info; - } - - public function hasRuntimeInfo() - { - return isset($this->runtime_info); - } - - public function clearRuntimeInfo() - { - unset($this->runtime_info); - } - - /** - * Output only. Runtime information about batch execution. - * - * Generated from protobuf field .google.cloud.dataproc.v1.RuntimeInfo runtime_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataproc\V1\RuntimeInfo $var - * @return $this - */ - public function setRuntimeInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\RuntimeInfo::class); - $this->runtime_info = $var; - - return $this; - } - - /** - * Output only. The state of the batch. - * - * Generated from protobuf field .google.cloud.dataproc.v1.Batch.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The state of the batch. - * - * Generated from protobuf field .google.cloud.dataproc.v1.Batch.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataproc\V1\Batch\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. Batch state details, such as a failure - * description if the state is `FAILED`. - * - * Generated from protobuf field string state_message = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStateMessage() - { - return $this->state_message; - } - - /** - * Output only. Batch state details, such as a failure - * description if the state is `FAILED`. - * - * Generated from protobuf field string state_message = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setStateMessage($var) - { - GPBUtil::checkString($var, True); - $this->state_message = $var; - - return $this; - } - - /** - * Output only. The time when the batch entered a current state. - * - * Generated from protobuf field .google.protobuf.Timestamp state_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStateTime() - { - return $this->state_time; - } - - public function hasStateTime() - { - return isset($this->state_time); - } - - public function clearStateTime() - { - unset($this->state_time); - } - - /** - * Output only. The time when the batch entered a current state. - * - * Generated from protobuf field .google.protobuf.Timestamp state_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->state_time = $var; - - return $this; - } - - /** - * Output only. The email address of the user who created the batch. - * - * Generated from protobuf field string creator = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getCreator() - { - return $this->creator; - } - - /** - * Output only. The email address of the user who created the batch. - * - * Generated from protobuf field string creator = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setCreator($var) - { - GPBUtil::checkString($var, True); - $this->creator = $var; - - return $this; - } - - /** - * Optional. The labels to associate with this batch. - * Label **keys** must contain 1 to 63 characters, and must conform to - * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). - * Label **values** may be empty, but, if present, must contain 1 to 63 - * characters, and must conform to [RFC - * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be - * associated with a batch. - * - * Generated from protobuf field map labels = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. The labels to associate with this batch. - * Label **keys** must contain 1 to 63 characters, and must conform to - * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). - * Label **values** may be empty, but, if present, must contain 1 to 63 - * characters, and must conform to [RFC - * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be - * associated with a batch. - * - * Generated from protobuf field map labels = 13 [(.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; - } - - /** - * Optional. Runtime configuration for the batch execution. - * - * Generated from protobuf field .google.cloud.dataproc.v1.RuntimeConfig runtime_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\RuntimeConfig|null - */ - public function getRuntimeConfig() - { - return $this->runtime_config; - } - - public function hasRuntimeConfig() - { - return isset($this->runtime_config); - } - - public function clearRuntimeConfig() - { - unset($this->runtime_config); - } - - /** - * Optional. Runtime configuration for the batch execution. - * - * Generated from protobuf field .google.cloud.dataproc.v1.RuntimeConfig runtime_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\RuntimeConfig $var - * @return $this - */ - public function setRuntimeConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\RuntimeConfig::class); - $this->runtime_config = $var; - - return $this; - } - - /** - * Optional. Environment configuration for the batch execution. - * - * Generated from protobuf field .google.cloud.dataproc.v1.EnvironmentConfig environment_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\EnvironmentConfig|null - */ - public function getEnvironmentConfig() - { - return $this->environment_config; - } - - public function hasEnvironmentConfig() - { - return isset($this->environment_config); - } - - public function clearEnvironmentConfig() - { - unset($this->environment_config); - } - - /** - * Optional. Environment configuration for the batch execution. - * - * Generated from protobuf field .google.cloud.dataproc.v1.EnvironmentConfig environment_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\EnvironmentConfig $var - * @return $this - */ - public function setEnvironmentConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\EnvironmentConfig::class); - $this->environment_config = $var; - - return $this; - } - - /** - * Output only. The resource name of the operation associated with this batch. - * - * Generated from protobuf field string operation = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getOperation() - { - return $this->operation; - } - - /** - * Output only. The resource name of the operation associated with this batch. - * - * Generated from protobuf field string operation = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setOperation($var) - { - GPBUtil::checkString($var, True); - $this->operation = $var; - - return $this; - } - - /** - * Output only. Historical state information for the batch. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.Batch.StateHistory state_history = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getStateHistory() - { - return $this->state_history; - } - - /** - * Output only. Historical state information for the batch. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.Batch.StateHistory state_history = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\Dataproc\V1\Batch\StateHistory>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setStateHistory($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataproc\V1\Batch\StateHistory::class); - $this->state_history = $arr; - - return $this; - } - - /** - * @return string - */ - public function getBatchConfig() - { - return $this->whichOneof("batch_config"); - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/Batch/State.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/Batch/State.php deleted file mode 100644 index 7c4844fe1a6..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/Batch/State.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.dataproc.v1.Batch.State - */ -class State -{ - /** - * The batch state is unknown. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The batch is created before running. - * - * Generated from protobuf enum PENDING = 1; - */ - const PENDING = 1; - /** - * The batch is running. - * - * Generated from protobuf enum RUNNING = 2; - */ - const RUNNING = 2; - /** - * The batch is cancelling. - * - * Generated from protobuf enum CANCELLING = 3; - */ - const CANCELLING = 3; - /** - * The batch cancellation was successful. - * - * Generated from protobuf enum CANCELLED = 4; - */ - const CANCELLED = 4; - /** - * The batch completed successfully. - * - * Generated from protobuf enum SUCCEEDED = 5; - */ - const SUCCEEDED = 5; - /** - * The batch is no longer running due to an error. - * - * Generated from protobuf enum FAILED = 6; - */ - const FAILED = 6; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::PENDING => 'PENDING', - self::RUNNING => 'RUNNING', - self::CANCELLING => 'CANCELLING', - self::CANCELLED => 'CANCELLED', - self::SUCCEEDED => 'SUCCEEDED', - self::FAILED => 'FAILED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Dataproc\V1\Batch_State::class); - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/Batch/StateHistory.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/Batch/StateHistory.php deleted file mode 100644 index d3028d266da..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/Batch/StateHistory.php +++ /dev/null @@ -1,148 +0,0 @@ -google.cloud.dataproc.v1.Batch.StateHistory - */ -class StateHistory extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The state of the batch at this point in history. - * - * Generated from protobuf field .google.cloud.dataproc.v1.Batch.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. Details about the state at this point in history. - * - * Generated from protobuf field string state_message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state_message = ''; - /** - * Output only. The time when the batch entered the historical state. - * - * Generated from protobuf field .google.protobuf.Timestamp state_start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state_start_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state - * Output only. The state of the batch at this point in history. - * @type string $state_message - * Output only. Details about the state at this point in history. - * @type \Google\Protobuf\Timestamp $state_start_time - * Output only. The time when the batch entered the historical state. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Batches::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The state of the batch at this point in history. - * - * Generated from protobuf field .google.cloud.dataproc.v1.Batch.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The state of the batch at this point in history. - * - * Generated from protobuf field .google.cloud.dataproc.v1.Batch.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataproc\V1\Batch\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. Details about the state at this point in history. - * - * Generated from protobuf field string state_message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStateMessage() - { - return $this->state_message; - } - - /** - * Output only. Details about the state at this point in history. - * - * Generated from protobuf field string state_message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setStateMessage($var) - { - GPBUtil::checkString($var, True); - $this->state_message = $var; - - return $this; - } - - /** - * Output only. The time when the batch entered the historical state. - * - * Generated from protobuf field .google.protobuf.Timestamp state_start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStateStartTime() - { - return $this->state_start_time; - } - - public function hasStateStartTime() - { - return isset($this->state_start_time); - } - - public function clearStateStartTime() - { - unset($this->state_start_time); - } - - /** - * Output only. The time when the batch entered the historical state. - * - * Generated from protobuf field .google.protobuf.Timestamp state_start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStateStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->state_start_time = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(StateHistory::class, \Google\Cloud\Dataproc\V1\Batch_StateHistory::class); - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/BatchOperationMetadata.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/BatchOperationMetadata.php deleted file mode 100644 index c3647cb58e1..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/BatchOperationMetadata.php +++ /dev/null @@ -1,325 +0,0 @@ -google.cloud.dataproc.v1.BatchOperationMetadata - */ -class BatchOperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Name of the batch for the operation. - * - * Generated from protobuf field string batch = 1; - */ - protected $batch = ''; - /** - * Batch UUID for the operation. - * - * Generated from protobuf field string batch_uuid = 2; - */ - protected $batch_uuid = ''; - /** - * The time when the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; - */ - protected $create_time = null; - /** - * The time when the operation finished. - * - * Generated from protobuf field .google.protobuf.Timestamp done_time = 4; - */ - protected $done_time = null; - /** - * The operation type. - * - * Generated from protobuf field .google.cloud.dataproc.v1.BatchOperationMetadata.BatchOperationType operation_type = 6; - */ - protected $operation_type = 0; - /** - * Short description of the operation. - * - * Generated from protobuf field string description = 7; - */ - protected $description = ''; - /** - * Labels associated with the operation. - * - * Generated from protobuf field map labels = 8; - */ - private $labels; - /** - * Warnings encountered during operation execution. - * - * Generated from protobuf field repeated string warnings = 9; - */ - private $warnings; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $batch - * Name of the batch for the operation. - * @type string $batch_uuid - * Batch UUID for the operation. - * @type \Google\Protobuf\Timestamp $create_time - * The time when the operation was created. - * @type \Google\Protobuf\Timestamp $done_time - * The time when the operation finished. - * @type int $operation_type - * The operation type. - * @type string $description - * Short description of the operation. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels associated with the operation. - * @type array|\Google\Protobuf\Internal\RepeatedField $warnings - * Warnings encountered during operation execution. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Operations::initOnce(); - parent::__construct($data); - } - - /** - * Name of the batch for the operation. - * - * Generated from protobuf field string batch = 1; - * @return string - */ - public function getBatch() - { - return $this->batch; - } - - /** - * Name of the batch for the operation. - * - * Generated from protobuf field string batch = 1; - * @param string $var - * @return $this - */ - public function setBatch($var) - { - GPBUtil::checkString($var, True); - $this->batch = $var; - - return $this; - } - - /** - * Batch UUID for the operation. - * - * Generated from protobuf field string batch_uuid = 2; - * @return string - */ - public function getBatchUuid() - { - return $this->batch_uuid; - } - - /** - * Batch UUID for the operation. - * - * Generated from protobuf field string batch_uuid = 2; - * @param string $var - * @return $this - */ - public function setBatchUuid($var) - { - GPBUtil::checkString($var, True); - $this->batch_uuid = $var; - - return $this; - } - - /** - * The time when the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * The time when the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * The time when the operation finished. - * - * Generated from protobuf field .google.protobuf.Timestamp done_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getDoneTime() - { - return $this->done_time; - } - - public function hasDoneTime() - { - return isset($this->done_time); - } - - public function clearDoneTime() - { - unset($this->done_time); - } - - /** - * The time when the operation finished. - * - * Generated from protobuf field .google.protobuf.Timestamp done_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setDoneTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->done_time = $var; - - return $this; - } - - /** - * The operation type. - * - * Generated from protobuf field .google.cloud.dataproc.v1.BatchOperationMetadata.BatchOperationType operation_type = 6; - * @return int - */ - public function getOperationType() - { - return $this->operation_type; - } - - /** - * The operation type. - * - * Generated from protobuf field .google.cloud.dataproc.v1.BatchOperationMetadata.BatchOperationType operation_type = 6; - * @param int $var - * @return $this - */ - public function setOperationType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataproc\V1\BatchOperationMetadata\BatchOperationType::class); - $this->operation_type = $var; - - return $this; - } - - /** - * Short description of the operation. - * - * Generated from protobuf field string description = 7; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Short description of the operation. - * - * Generated from protobuf field string description = 7; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Labels associated with the operation. - * - * Generated from protobuf field map labels = 8; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels associated with the operation. - * - * Generated from protobuf field map labels = 8; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Warnings encountered during operation execution. - * - * Generated from protobuf field repeated string warnings = 9; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getWarnings() - { - return $this->warnings; - } - - /** - * Warnings encountered during operation execution. - * - * Generated from protobuf field repeated string warnings = 9; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setWarnings($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->warnings = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/BatchOperationMetadata/BatchOperationType.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/BatchOperationMetadata/BatchOperationType.php deleted file mode 100644 index 0f59fea5709..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/BatchOperationMetadata/BatchOperationType.php +++ /dev/null @@ -1,57 +0,0 @@ -google.cloud.dataproc.v1.BatchOperationMetadata.BatchOperationType - */ -class BatchOperationType -{ - /** - * Batch operation type is unknown. - * - * Generated from protobuf enum BATCH_OPERATION_TYPE_UNSPECIFIED = 0; - */ - const BATCH_OPERATION_TYPE_UNSPECIFIED = 0; - /** - * Batch operation type. - * - * Generated from protobuf enum BATCH = 1; - */ - const BATCH = 1; - - private static $valueToName = [ - self::BATCH_OPERATION_TYPE_UNSPECIFIED => 'BATCH_OPERATION_TYPE_UNSPECIFIED', - self::BATCH => 'BATCH', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BatchOperationType::class, \Google\Cloud\Dataproc\V1\BatchOperationMetadata_BatchOperationType::class); - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/CancelJobRequest.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/CancelJobRequest.php deleted file mode 100644 index a563926f111..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/CancelJobRequest.php +++ /dev/null @@ -1,157 +0,0 @@ -google.cloud.dataproc.v1.CancelJobRequest - */ -class CancelJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The ID of the Google Cloud Platform project that the job - * belongs to. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $project_id = ''; - /** - * Required. The Dataproc region in which to handle the request. - * - * Generated from protobuf field string region = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $region = ''; - /** - * Required. The job ID. - * - * Generated from protobuf field string job_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $job_id = ''; - - /** - * @param string $projectId Required. The ID of the Google Cloud Platform project that the job - * belongs to. - * @param string $region Required. The Dataproc region in which to handle the request. - * @param string $jobId Required. The job ID. - * - * @return \Google\Cloud\Dataproc\V1\CancelJobRequest - * - * @experimental - */ - public static function build(string $projectId, string $region, string $jobId): self - { - return (new self()) - ->setProjectId($projectId) - ->setRegion($region) - ->setJobId($jobId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $project_id - * Required. The ID of the Google Cloud Platform project that the job - * belongs to. - * @type string $region - * Required. The Dataproc region in which to handle the request. - * @type string $job_id - * Required. The job ID. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Jobs::initOnce(); - parent::__construct($data); - } - - /** - * Required. The ID of the Google Cloud Platform project that the job - * belongs to. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * Required. The ID of the Google Cloud Platform project that the job - * belongs to. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - - /** - * Required. The Dataproc region in which to handle the request. - * - * Generated from protobuf field string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getRegion() - { - return $this->region; - } - - /** - * Required. The Dataproc region in which to handle the request. - * - * Generated from protobuf field string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setRegion($var) - { - GPBUtil::checkString($var, True); - $this->region = $var; - - return $this; - } - - /** - * Required. The job ID. - * - * Generated from protobuf field string job_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getJobId() - { - return $this->job_id; - } - - /** - * Required. The job ID. - * - * Generated from protobuf field string job_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setJobId($var) - { - GPBUtil::checkString($var, True); - $this->job_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/Cluster.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/Cluster.php deleted file mode 100644 index 258dd938093..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/Cluster.php +++ /dev/null @@ -1,472 +0,0 @@ -google.cloud.dataproc.v1.Cluster - */ -class Cluster extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Google Cloud Platform project ID that the cluster belongs to. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $project_id = ''; - /** - * Required. The cluster name, which must be unique within a project. - * The name must start with a lowercase letter, and can contain - * up to 51 lowercase letters, numbers, and hyphens. It cannot end - * with a hyphen. The name of a deleted cluster can be reused. - * - * Generated from protobuf field string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $cluster_name = ''; - /** - * Optional. The cluster config for a cluster of Compute Engine Instances. - * Note that Dataproc may set default values, and values may change - * when clusters are updated. - * Exactly one of ClusterConfig or VirtualClusterConfig must be specified. - * - * Generated from protobuf field .google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $config = null; - /** - * Optional. The virtual cluster config is used when creating a Dataproc - * cluster that does not directly control the underlying compute resources, - * for example, when creating a [Dataproc-on-GKE - * cluster](https://cloud.google.com/dataproc/docs/guides/dpgke/dataproc-gke-overview). - * Dataproc may set default values, and values may change when - * clusters are updated. Exactly one of - * [config][google.cloud.dataproc.v1.Cluster.config] or - * [virtual_cluster_config][google.cloud.dataproc.v1.Cluster.virtual_cluster_config] - * must be specified. - * - * Generated from protobuf field .google.cloud.dataproc.v1.VirtualClusterConfig virtual_cluster_config = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $virtual_cluster_config = null; - /** - * Optional. The labels to associate with this cluster. - * Label **keys** must contain 1 to 63 characters, and must conform to - * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). - * Label **values** may be empty, but, if present, must contain 1 to 63 - * characters, and must conform to [RFC - * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be - * associated with a cluster. - * - * Generated from protobuf field map labels = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Output only. Cluster status. - * - * Generated from protobuf field .google.cloud.dataproc.v1.ClusterStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $status = null; - /** - * Output only. The previous cluster status. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $status_history; - /** - * Output only. A cluster UUID (Unique Universal Identifier). Dataproc - * generates this value when it creates the cluster. - * - * Generated from protobuf field string cluster_uuid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $cluster_uuid = ''; - /** - * Output only. Contains cluster daemon metrics such as HDFS and YARN stats. - * **Beta Feature**: This report is available for testing purposes only. It - * may be changed before final release. - * - * Generated from protobuf field .google.cloud.dataproc.v1.ClusterMetrics metrics = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $metrics = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $project_id - * Required. The Google Cloud Platform project ID that the cluster belongs to. - * @type string $cluster_name - * Required. The cluster name, which must be unique within a project. - * The name must start with a lowercase letter, and can contain - * up to 51 lowercase letters, numbers, and hyphens. It cannot end - * with a hyphen. The name of a deleted cluster can be reused. - * @type \Google\Cloud\Dataproc\V1\ClusterConfig $config - * Optional. The cluster config for a cluster of Compute Engine Instances. - * Note that Dataproc may set default values, and values may change - * when clusters are updated. - * Exactly one of ClusterConfig or VirtualClusterConfig must be specified. - * @type \Google\Cloud\Dataproc\V1\VirtualClusterConfig $virtual_cluster_config - * Optional. The virtual cluster config is used when creating a Dataproc - * cluster that does not directly control the underlying compute resources, - * for example, when creating a [Dataproc-on-GKE - * cluster](https://cloud.google.com/dataproc/docs/guides/dpgke/dataproc-gke-overview). - * Dataproc may set default values, and values may change when - * clusters are updated. Exactly one of - * [config][google.cloud.dataproc.v1.Cluster.config] or - * [virtual_cluster_config][google.cloud.dataproc.v1.Cluster.virtual_cluster_config] - * must be specified. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. The labels to associate with this cluster. - * Label **keys** must contain 1 to 63 characters, and must conform to - * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). - * Label **values** may be empty, but, if present, must contain 1 to 63 - * characters, and must conform to [RFC - * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be - * associated with a cluster. - * @type \Google\Cloud\Dataproc\V1\ClusterStatus $status - * Output only. Cluster status. - * @type array<\Google\Cloud\Dataproc\V1\ClusterStatus>|\Google\Protobuf\Internal\RepeatedField $status_history - * Output only. The previous cluster status. - * @type string $cluster_uuid - * Output only. A cluster UUID (Unique Universal Identifier). Dataproc - * generates this value when it creates the cluster. - * @type \Google\Cloud\Dataproc\V1\ClusterMetrics $metrics - * Output only. Contains cluster daemon metrics such as HDFS and YARN stats. - * **Beta Feature**: This report is available for testing purposes only. It - * may be changed before final release. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Clusters::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Google Cloud Platform project ID that the cluster belongs to. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * Required. The Google Cloud Platform project ID that the cluster belongs to. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - - /** - * Required. The cluster name, which must be unique within a project. - * The name must start with a lowercase letter, and can contain - * up to 51 lowercase letters, numbers, and hyphens. It cannot end - * with a hyphen. The name of a deleted cluster can be reused. - * - * Generated from protobuf field string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getClusterName() - { - return $this->cluster_name; - } - - /** - * Required. The cluster name, which must be unique within a project. - * The name must start with a lowercase letter, and can contain - * up to 51 lowercase letters, numbers, and hyphens. It cannot end - * with a hyphen. The name of a deleted cluster can be reused. - * - * Generated from protobuf field string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setClusterName($var) - { - GPBUtil::checkString($var, True); - $this->cluster_name = $var; - - return $this; - } - - /** - * Optional. The cluster config for a cluster of Compute Engine Instances. - * Note that Dataproc may set default values, and values may change - * when clusters are updated. - * Exactly one of ClusterConfig or VirtualClusterConfig must be specified. - * - * Generated from protobuf field .google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\ClusterConfig|null - */ - public function getConfig() - { - return $this->config; - } - - public function hasConfig() - { - return isset($this->config); - } - - public function clearConfig() - { - unset($this->config); - } - - /** - * Optional. The cluster config for a cluster of Compute Engine Instances. - * Note that Dataproc may set default values, and values may change - * when clusters are updated. - * Exactly one of ClusterConfig or VirtualClusterConfig must be specified. - * - * Generated from protobuf field .google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\ClusterConfig $var - * @return $this - */ - public function setConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\ClusterConfig::class); - $this->config = $var; - - return $this; - } - - /** - * Optional. The virtual cluster config is used when creating a Dataproc - * cluster that does not directly control the underlying compute resources, - * for example, when creating a [Dataproc-on-GKE - * cluster](https://cloud.google.com/dataproc/docs/guides/dpgke/dataproc-gke-overview). - * Dataproc may set default values, and values may change when - * clusters are updated. Exactly one of - * [config][google.cloud.dataproc.v1.Cluster.config] or - * [virtual_cluster_config][google.cloud.dataproc.v1.Cluster.virtual_cluster_config] - * must be specified. - * - * Generated from protobuf field .google.cloud.dataproc.v1.VirtualClusterConfig virtual_cluster_config = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\VirtualClusterConfig|null - */ - public function getVirtualClusterConfig() - { - return $this->virtual_cluster_config; - } - - public function hasVirtualClusterConfig() - { - return isset($this->virtual_cluster_config); - } - - public function clearVirtualClusterConfig() - { - unset($this->virtual_cluster_config); - } - - /** - * Optional. The virtual cluster config is used when creating a Dataproc - * cluster that does not directly control the underlying compute resources, - * for example, when creating a [Dataproc-on-GKE - * cluster](https://cloud.google.com/dataproc/docs/guides/dpgke/dataproc-gke-overview). - * Dataproc may set default values, and values may change when - * clusters are updated. Exactly one of - * [config][google.cloud.dataproc.v1.Cluster.config] or - * [virtual_cluster_config][google.cloud.dataproc.v1.Cluster.virtual_cluster_config] - * must be specified. - * - * Generated from protobuf field .google.cloud.dataproc.v1.VirtualClusterConfig virtual_cluster_config = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\VirtualClusterConfig $var - * @return $this - */ - public function setVirtualClusterConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\VirtualClusterConfig::class); - $this->virtual_cluster_config = $var; - - return $this; - } - - /** - * Optional. The labels to associate with this cluster. - * Label **keys** must contain 1 to 63 characters, and must conform to - * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). - * Label **values** may be empty, but, if present, must contain 1 to 63 - * characters, and must conform to [RFC - * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be - * associated with a cluster. - * - * Generated from protobuf field map labels = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. The labels to associate with this cluster. - * Label **keys** must contain 1 to 63 characters, and must conform to - * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). - * Label **values** may be empty, but, if present, must contain 1 to 63 - * characters, and must conform to [RFC - * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be - * associated with a cluster. - * - * Generated from protobuf field map labels = 8 [(.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. Cluster status. - * - * Generated from protobuf field .google.cloud.dataproc.v1.ClusterStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataproc\V1\ClusterStatus|null - */ - public function getStatus() - { - return $this->status; - } - - public function hasStatus() - { - return isset($this->status); - } - - public function clearStatus() - { - unset($this->status); - } - - /** - * Output only. Cluster status. - * - * Generated from protobuf field .google.cloud.dataproc.v1.ClusterStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataproc\V1\ClusterStatus $var - * @return $this - */ - public function setStatus($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\ClusterStatus::class); - $this->status = $var; - - return $this; - } - - /** - * Output only. The previous cluster status. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getStatusHistory() - { - return $this->status_history; - } - - /** - * Output only. The previous cluster status. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\Dataproc\V1\ClusterStatus>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setStatusHistory($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataproc\V1\ClusterStatus::class); - $this->status_history = $arr; - - return $this; - } - - /** - * Output only. A cluster UUID (Unique Universal Identifier). Dataproc - * generates this value when it creates the cluster. - * - * Generated from protobuf field string cluster_uuid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getClusterUuid() - { - return $this->cluster_uuid; - } - - /** - * Output only. A cluster UUID (Unique Universal Identifier). Dataproc - * generates this value when it creates the cluster. - * - * Generated from protobuf field string cluster_uuid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setClusterUuid($var) - { - GPBUtil::checkString($var, True); - $this->cluster_uuid = $var; - - return $this; - } - - /** - * Output only. Contains cluster daemon metrics such as HDFS and YARN stats. - * **Beta Feature**: This report is available for testing purposes only. It - * may be changed before final release. - * - * Generated from protobuf field .google.cloud.dataproc.v1.ClusterMetrics metrics = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataproc\V1\ClusterMetrics|null - */ - public function getMetrics() - { - return $this->metrics; - } - - public function hasMetrics() - { - return isset($this->metrics); - } - - public function clearMetrics() - { - unset($this->metrics); - } - - /** - * Output only. Contains cluster daemon metrics such as HDFS and YARN stats. - * **Beta Feature**: This report is available for testing purposes only. It - * may be changed before final release. - * - * Generated from protobuf field .google.cloud.dataproc.v1.ClusterMetrics metrics = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataproc\V1\ClusterMetrics $var - * @return $this - */ - public function setMetrics($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\ClusterMetrics::class); - $this->metrics = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ClusterConfig.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ClusterConfig.php deleted file mode 100644 index 0e1c963c9a2..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ClusterConfig.php +++ /dev/null @@ -1,841 +0,0 @@ -google.cloud.dataproc.v1.ClusterConfig - */ -class ClusterConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. A Cloud Storage bucket used to stage job - * dependencies, config files, and job driver console output. - * If you do not specify a staging bucket, Cloud - * Dataproc will determine a Cloud Storage location (US, - * ASIA, or EU) for your cluster's staging bucket according to the - * Compute Engine zone where your cluster is deployed, and then create - * and manage this project-level, per-location bucket (see - * [Dataproc staging and temp - * buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)). - * **This field requires a Cloud Storage bucket name, not a `gs://...` URI to - * a Cloud Storage bucket.** - * - * Generated from protobuf field string config_bucket = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $config_bucket = ''; - /** - * Optional. A Cloud Storage bucket used to store ephemeral cluster and jobs - * data, such as Spark and MapReduce history files. If you do not specify a - * temp bucket, Dataproc will determine a Cloud Storage location (US, ASIA, or - * EU) for your cluster's temp bucket according to the Compute Engine zone - * where your cluster is deployed, and then create and manage this - * project-level, per-location bucket. The default bucket has a TTL of 90 - * days, but you can use any TTL (or none) if you specify a bucket (see - * [Dataproc staging and temp - * buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)). - * **This field requires a Cloud Storage bucket name, not a `gs://...` URI to - * a Cloud Storage bucket.** - * - * Generated from protobuf field string temp_bucket = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $temp_bucket = ''; - /** - * Optional. The shared Compute Engine config settings for - * all instances in a cluster. - * - * Generated from protobuf field .google.cloud.dataproc.v1.GceClusterConfig gce_cluster_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $gce_cluster_config = null; - /** - * Optional. The Compute Engine config settings for - * the cluster's master instance. - * - * Generated from protobuf field .google.cloud.dataproc.v1.InstanceGroupConfig master_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $master_config = null; - /** - * Optional. The Compute Engine config settings for - * the cluster's worker instances. - * - * Generated from protobuf field .google.cloud.dataproc.v1.InstanceGroupConfig worker_config = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $worker_config = null; - /** - * Optional. The Compute Engine config settings for - * a cluster's secondary worker instances - * - * Generated from protobuf field .google.cloud.dataproc.v1.InstanceGroupConfig secondary_worker_config = 12 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $secondary_worker_config = null; - /** - * Optional. The config settings for cluster software. - * - * Generated from protobuf field .google.cloud.dataproc.v1.SoftwareConfig software_config = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $software_config = null; - /** - * Optional. Commands to execute on each node after config is - * completed. By default, executables are run on master and all worker nodes. - * You can test a node's `role` metadata to run an executable on - * a master or worker node, as shown below using `curl` (you can also use - * `wget`): - * ROLE=$(curl -H Metadata-Flavor:Google - * http://metadata/computeMetadata/v1/instance/attributes/dataproc-role) - * if [[ "${ROLE}" == 'Master' ]]; then - * ... master specific actions ... - * else - * ... worker specific actions ... - * fi - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.NodeInitializationAction initialization_actions = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $initialization_actions; - /** - * Optional. Encryption settings for the cluster. - * - * Generated from protobuf field .google.cloud.dataproc.v1.EncryptionConfig encryption_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $encryption_config = null; - /** - * Optional. Autoscaling config for the policy associated with the cluster. - * Cluster does not autoscale if this field is unset. - * - * Generated from protobuf field .google.cloud.dataproc.v1.AutoscalingConfig autoscaling_config = 18 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $autoscaling_config = null; - /** - * Optional. Security settings for the cluster. - * - * Generated from protobuf field .google.cloud.dataproc.v1.SecurityConfig security_config = 16 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $security_config = null; - /** - * Optional. Lifecycle setting for the cluster. - * - * Generated from protobuf field .google.cloud.dataproc.v1.LifecycleConfig lifecycle_config = 17 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $lifecycle_config = null; - /** - * Optional. Port/endpoint configuration for this cluster - * - * Generated from protobuf field .google.cloud.dataproc.v1.EndpointConfig endpoint_config = 19 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $endpoint_config = null; - /** - * Optional. Metastore configuration. - * - * Generated from protobuf field .google.cloud.dataproc.v1.MetastoreConfig metastore_config = 20 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $metastore_config = null; - /** - * Optional. The config for Dataproc metrics. - * - * Generated from protobuf field .google.cloud.dataproc.v1.DataprocMetricConfig dataproc_metric_config = 23 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $dataproc_metric_config = null; - /** - * Optional. The node group settings. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.AuxiliaryNodeGroup auxiliary_node_groups = 25 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $auxiliary_node_groups; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $config_bucket - * Optional. A Cloud Storage bucket used to stage job - * dependencies, config files, and job driver console output. - * If you do not specify a staging bucket, Cloud - * Dataproc will determine a Cloud Storage location (US, - * ASIA, or EU) for your cluster's staging bucket according to the - * Compute Engine zone where your cluster is deployed, and then create - * and manage this project-level, per-location bucket (see - * [Dataproc staging and temp - * buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)). - * **This field requires a Cloud Storage bucket name, not a `gs://...` URI to - * a Cloud Storage bucket.** - * @type string $temp_bucket - * Optional. A Cloud Storage bucket used to store ephemeral cluster and jobs - * data, such as Spark and MapReduce history files. If you do not specify a - * temp bucket, Dataproc will determine a Cloud Storage location (US, ASIA, or - * EU) for your cluster's temp bucket according to the Compute Engine zone - * where your cluster is deployed, and then create and manage this - * project-level, per-location bucket. The default bucket has a TTL of 90 - * days, but you can use any TTL (or none) if you specify a bucket (see - * [Dataproc staging and temp - * buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)). - * **This field requires a Cloud Storage bucket name, not a `gs://...` URI to - * a Cloud Storage bucket.** - * @type \Google\Cloud\Dataproc\V1\GceClusterConfig $gce_cluster_config - * Optional. The shared Compute Engine config settings for - * all instances in a cluster. - * @type \Google\Cloud\Dataproc\V1\InstanceGroupConfig $master_config - * Optional. The Compute Engine config settings for - * the cluster's master instance. - * @type \Google\Cloud\Dataproc\V1\InstanceGroupConfig $worker_config - * Optional. The Compute Engine config settings for - * the cluster's worker instances. - * @type \Google\Cloud\Dataproc\V1\InstanceGroupConfig $secondary_worker_config - * Optional. The Compute Engine config settings for - * a cluster's secondary worker instances - * @type \Google\Cloud\Dataproc\V1\SoftwareConfig $software_config - * Optional. The config settings for cluster software. - * @type array<\Google\Cloud\Dataproc\V1\NodeInitializationAction>|\Google\Protobuf\Internal\RepeatedField $initialization_actions - * Optional. Commands to execute on each node after config is - * completed. By default, executables are run on master and all worker nodes. - * You can test a node's `role` metadata to run an executable on - * a master or worker node, as shown below using `curl` (you can also use - * `wget`): - * ROLE=$(curl -H Metadata-Flavor:Google - * http://metadata/computeMetadata/v1/instance/attributes/dataproc-role) - * if [[ "${ROLE}" == 'Master' ]]; then - * ... master specific actions ... - * else - * ... worker specific actions ... - * fi - * @type \Google\Cloud\Dataproc\V1\EncryptionConfig $encryption_config - * Optional. Encryption settings for the cluster. - * @type \Google\Cloud\Dataproc\V1\AutoscalingConfig $autoscaling_config - * Optional. Autoscaling config for the policy associated with the cluster. - * Cluster does not autoscale if this field is unset. - * @type \Google\Cloud\Dataproc\V1\SecurityConfig $security_config - * Optional. Security settings for the cluster. - * @type \Google\Cloud\Dataproc\V1\LifecycleConfig $lifecycle_config - * Optional. Lifecycle setting for the cluster. - * @type \Google\Cloud\Dataproc\V1\EndpointConfig $endpoint_config - * Optional. Port/endpoint configuration for this cluster - * @type \Google\Cloud\Dataproc\V1\MetastoreConfig $metastore_config - * Optional. Metastore configuration. - * @type \Google\Cloud\Dataproc\V1\DataprocMetricConfig $dataproc_metric_config - * Optional. The config for Dataproc metrics. - * @type array<\Google\Cloud\Dataproc\V1\AuxiliaryNodeGroup>|\Google\Protobuf\Internal\RepeatedField $auxiliary_node_groups - * Optional. The node group settings. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Clusters::initOnce(); - parent::__construct($data); - } - - /** - * Optional. A Cloud Storage bucket used to stage job - * dependencies, config files, and job driver console output. - * If you do not specify a staging bucket, Cloud - * Dataproc will determine a Cloud Storage location (US, - * ASIA, or EU) for your cluster's staging bucket according to the - * Compute Engine zone where your cluster is deployed, and then create - * and manage this project-level, per-location bucket (see - * [Dataproc staging and temp - * buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)). - * **This field requires a Cloud Storage bucket name, not a `gs://...` URI to - * a Cloud Storage bucket.** - * - * Generated from protobuf field string config_bucket = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getConfigBucket() - { - return $this->config_bucket; - } - - /** - * Optional. A Cloud Storage bucket used to stage job - * dependencies, config files, and job driver console output. - * If you do not specify a staging bucket, Cloud - * Dataproc will determine a Cloud Storage location (US, - * ASIA, or EU) for your cluster's staging bucket according to the - * Compute Engine zone where your cluster is deployed, and then create - * and manage this project-level, per-location bucket (see - * [Dataproc staging and temp - * buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)). - * **This field requires a Cloud Storage bucket name, not a `gs://...` URI to - * a Cloud Storage bucket.** - * - * Generated from protobuf field string config_bucket = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setConfigBucket($var) - { - GPBUtil::checkString($var, True); - $this->config_bucket = $var; - - return $this; - } - - /** - * Optional. A Cloud Storage bucket used to store ephemeral cluster and jobs - * data, such as Spark and MapReduce history files. If you do not specify a - * temp bucket, Dataproc will determine a Cloud Storage location (US, ASIA, or - * EU) for your cluster's temp bucket according to the Compute Engine zone - * where your cluster is deployed, and then create and manage this - * project-level, per-location bucket. The default bucket has a TTL of 90 - * days, but you can use any TTL (or none) if you specify a bucket (see - * [Dataproc staging and temp - * buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)). - * **This field requires a Cloud Storage bucket name, not a `gs://...` URI to - * a Cloud Storage bucket.** - * - * Generated from protobuf field string temp_bucket = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getTempBucket() - { - return $this->temp_bucket; - } - - /** - * Optional. A Cloud Storage bucket used to store ephemeral cluster and jobs - * data, such as Spark and MapReduce history files. If you do not specify a - * temp bucket, Dataproc will determine a Cloud Storage location (US, ASIA, or - * EU) for your cluster's temp bucket according to the Compute Engine zone - * where your cluster is deployed, and then create and manage this - * project-level, per-location bucket. The default bucket has a TTL of 90 - * days, but you can use any TTL (or none) if you specify a bucket (see - * [Dataproc staging and temp - * buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)). - * **This field requires a Cloud Storage bucket name, not a `gs://...` URI to - * a Cloud Storage bucket.** - * - * Generated from protobuf field string temp_bucket = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setTempBucket($var) - { - GPBUtil::checkString($var, True); - $this->temp_bucket = $var; - - return $this; - } - - /** - * Optional. The shared Compute Engine config settings for - * all instances in a cluster. - * - * Generated from protobuf field .google.cloud.dataproc.v1.GceClusterConfig gce_cluster_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\GceClusterConfig|null - */ - public function getGceClusterConfig() - { - return $this->gce_cluster_config; - } - - public function hasGceClusterConfig() - { - return isset($this->gce_cluster_config); - } - - public function clearGceClusterConfig() - { - unset($this->gce_cluster_config); - } - - /** - * Optional. The shared Compute Engine config settings for - * all instances in a cluster. - * - * Generated from protobuf field .google.cloud.dataproc.v1.GceClusterConfig gce_cluster_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\GceClusterConfig $var - * @return $this - */ - public function setGceClusterConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\GceClusterConfig::class); - $this->gce_cluster_config = $var; - - return $this; - } - - /** - * Optional. The Compute Engine config settings for - * the cluster's master instance. - * - * Generated from protobuf field .google.cloud.dataproc.v1.InstanceGroupConfig master_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\InstanceGroupConfig|null - */ - public function getMasterConfig() - { - return $this->master_config; - } - - public function hasMasterConfig() - { - return isset($this->master_config); - } - - public function clearMasterConfig() - { - unset($this->master_config); - } - - /** - * Optional. The Compute Engine config settings for - * the cluster's master instance. - * - * Generated from protobuf field .google.cloud.dataproc.v1.InstanceGroupConfig master_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\InstanceGroupConfig $var - * @return $this - */ - public function setMasterConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\InstanceGroupConfig::class); - $this->master_config = $var; - - return $this; - } - - /** - * Optional. The Compute Engine config settings for - * the cluster's worker instances. - * - * Generated from protobuf field .google.cloud.dataproc.v1.InstanceGroupConfig worker_config = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\InstanceGroupConfig|null - */ - public function getWorkerConfig() - { - return $this->worker_config; - } - - public function hasWorkerConfig() - { - return isset($this->worker_config); - } - - public function clearWorkerConfig() - { - unset($this->worker_config); - } - - /** - * Optional. The Compute Engine config settings for - * the cluster's worker instances. - * - * Generated from protobuf field .google.cloud.dataproc.v1.InstanceGroupConfig worker_config = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\InstanceGroupConfig $var - * @return $this - */ - public function setWorkerConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\InstanceGroupConfig::class); - $this->worker_config = $var; - - return $this; - } - - /** - * Optional. The Compute Engine config settings for - * a cluster's secondary worker instances - * - * Generated from protobuf field .google.cloud.dataproc.v1.InstanceGroupConfig secondary_worker_config = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\InstanceGroupConfig|null - */ - public function getSecondaryWorkerConfig() - { - return $this->secondary_worker_config; - } - - public function hasSecondaryWorkerConfig() - { - return isset($this->secondary_worker_config); - } - - public function clearSecondaryWorkerConfig() - { - unset($this->secondary_worker_config); - } - - /** - * Optional. The Compute Engine config settings for - * a cluster's secondary worker instances - * - * Generated from protobuf field .google.cloud.dataproc.v1.InstanceGroupConfig secondary_worker_config = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\InstanceGroupConfig $var - * @return $this - */ - public function setSecondaryWorkerConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\InstanceGroupConfig::class); - $this->secondary_worker_config = $var; - - return $this; - } - - /** - * Optional. The config settings for cluster software. - * - * Generated from protobuf field .google.cloud.dataproc.v1.SoftwareConfig software_config = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\SoftwareConfig|null - */ - public function getSoftwareConfig() - { - return $this->software_config; - } - - public function hasSoftwareConfig() - { - return isset($this->software_config); - } - - public function clearSoftwareConfig() - { - unset($this->software_config); - } - - /** - * Optional. The config settings for cluster software. - * - * Generated from protobuf field .google.cloud.dataproc.v1.SoftwareConfig software_config = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\SoftwareConfig $var - * @return $this - */ - public function setSoftwareConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\SoftwareConfig::class); - $this->software_config = $var; - - return $this; - } - - /** - * Optional. Commands to execute on each node after config is - * completed. By default, executables are run on master and all worker nodes. - * You can test a node's `role` metadata to run an executable on - * a master or worker node, as shown below using `curl` (you can also use - * `wget`): - * ROLE=$(curl -H Metadata-Flavor:Google - * http://metadata/computeMetadata/v1/instance/attributes/dataproc-role) - * if [[ "${ROLE}" == 'Master' ]]; then - * ... master specific actions ... - * else - * ... worker specific actions ... - * fi - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.NodeInitializationAction initialization_actions = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInitializationActions() - { - return $this->initialization_actions; - } - - /** - * Optional. Commands to execute on each node after config is - * completed. By default, executables are run on master and all worker nodes. - * You can test a node's `role` metadata to run an executable on - * a master or worker node, as shown below using `curl` (you can also use - * `wget`): - * ROLE=$(curl -H Metadata-Flavor:Google - * http://metadata/computeMetadata/v1/instance/attributes/dataproc-role) - * if [[ "${ROLE}" == 'Master' ]]; then - * ... master specific actions ... - * else - * ... worker specific actions ... - * fi - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.NodeInitializationAction initialization_actions = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Dataproc\V1\NodeInitializationAction>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInitializationActions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataproc\V1\NodeInitializationAction::class); - $this->initialization_actions = $arr; - - return $this; - } - - /** - * Optional. Encryption settings for the cluster. - * - * Generated from protobuf field .google.cloud.dataproc.v1.EncryptionConfig encryption_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\EncryptionConfig|null - */ - public function getEncryptionConfig() - { - return $this->encryption_config; - } - - public function hasEncryptionConfig() - { - return isset($this->encryption_config); - } - - public function clearEncryptionConfig() - { - unset($this->encryption_config); - } - - /** - * Optional. Encryption settings for the cluster. - * - * Generated from protobuf field .google.cloud.dataproc.v1.EncryptionConfig encryption_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\EncryptionConfig $var - * @return $this - */ - public function setEncryptionConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\EncryptionConfig::class); - $this->encryption_config = $var; - - return $this; - } - - /** - * Optional. Autoscaling config for the policy associated with the cluster. - * Cluster does not autoscale if this field is unset. - * - * Generated from protobuf field .google.cloud.dataproc.v1.AutoscalingConfig autoscaling_config = 18 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\AutoscalingConfig|null - */ - public function getAutoscalingConfig() - { - return $this->autoscaling_config; - } - - public function hasAutoscalingConfig() - { - return isset($this->autoscaling_config); - } - - public function clearAutoscalingConfig() - { - unset($this->autoscaling_config); - } - - /** - * Optional. Autoscaling config for the policy associated with the cluster. - * Cluster does not autoscale if this field is unset. - * - * Generated from protobuf field .google.cloud.dataproc.v1.AutoscalingConfig autoscaling_config = 18 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\AutoscalingConfig $var - * @return $this - */ - public function setAutoscalingConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\AutoscalingConfig::class); - $this->autoscaling_config = $var; - - return $this; - } - - /** - * Optional. Security settings for the cluster. - * - * Generated from protobuf field .google.cloud.dataproc.v1.SecurityConfig security_config = 16 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\SecurityConfig|null - */ - public function getSecurityConfig() - { - return $this->security_config; - } - - public function hasSecurityConfig() - { - return isset($this->security_config); - } - - public function clearSecurityConfig() - { - unset($this->security_config); - } - - /** - * Optional. Security settings for the cluster. - * - * Generated from protobuf field .google.cloud.dataproc.v1.SecurityConfig security_config = 16 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\SecurityConfig $var - * @return $this - */ - public function setSecurityConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\SecurityConfig::class); - $this->security_config = $var; - - return $this; - } - - /** - * Optional. Lifecycle setting for the cluster. - * - * Generated from protobuf field .google.cloud.dataproc.v1.LifecycleConfig lifecycle_config = 17 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\LifecycleConfig|null - */ - public function getLifecycleConfig() - { - return $this->lifecycle_config; - } - - public function hasLifecycleConfig() - { - return isset($this->lifecycle_config); - } - - public function clearLifecycleConfig() - { - unset($this->lifecycle_config); - } - - /** - * Optional. Lifecycle setting for the cluster. - * - * Generated from protobuf field .google.cloud.dataproc.v1.LifecycleConfig lifecycle_config = 17 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\LifecycleConfig $var - * @return $this - */ - public function setLifecycleConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\LifecycleConfig::class); - $this->lifecycle_config = $var; - - return $this; - } - - /** - * Optional. Port/endpoint configuration for this cluster - * - * Generated from protobuf field .google.cloud.dataproc.v1.EndpointConfig endpoint_config = 19 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\EndpointConfig|null - */ - public function getEndpointConfig() - { - return $this->endpoint_config; - } - - public function hasEndpointConfig() - { - return isset($this->endpoint_config); - } - - public function clearEndpointConfig() - { - unset($this->endpoint_config); - } - - /** - * Optional. Port/endpoint configuration for this cluster - * - * Generated from protobuf field .google.cloud.dataproc.v1.EndpointConfig endpoint_config = 19 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\EndpointConfig $var - * @return $this - */ - public function setEndpointConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\EndpointConfig::class); - $this->endpoint_config = $var; - - return $this; - } - - /** - * Optional. Metastore configuration. - * - * Generated from protobuf field .google.cloud.dataproc.v1.MetastoreConfig metastore_config = 20 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\MetastoreConfig|null - */ - public function getMetastoreConfig() - { - return $this->metastore_config; - } - - public function hasMetastoreConfig() - { - return isset($this->metastore_config); - } - - public function clearMetastoreConfig() - { - unset($this->metastore_config); - } - - /** - * Optional. Metastore configuration. - * - * Generated from protobuf field .google.cloud.dataproc.v1.MetastoreConfig metastore_config = 20 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\MetastoreConfig $var - * @return $this - */ - public function setMetastoreConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\MetastoreConfig::class); - $this->metastore_config = $var; - - return $this; - } - - /** - * Optional. The config for Dataproc metrics. - * - * Generated from protobuf field .google.cloud.dataproc.v1.DataprocMetricConfig dataproc_metric_config = 23 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\DataprocMetricConfig|null - */ - public function getDataprocMetricConfig() - { - return $this->dataproc_metric_config; - } - - public function hasDataprocMetricConfig() - { - return isset($this->dataproc_metric_config); - } - - public function clearDataprocMetricConfig() - { - unset($this->dataproc_metric_config); - } - - /** - * Optional. The config for Dataproc metrics. - * - * Generated from protobuf field .google.cloud.dataproc.v1.DataprocMetricConfig dataproc_metric_config = 23 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\DataprocMetricConfig $var - * @return $this - */ - public function setDataprocMetricConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\DataprocMetricConfig::class); - $this->dataproc_metric_config = $var; - - return $this; - } - - /** - * Optional. The node group settings. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.AuxiliaryNodeGroup auxiliary_node_groups = 25 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAuxiliaryNodeGroups() - { - return $this->auxiliary_node_groups; - } - - /** - * Optional. The node group settings. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.AuxiliaryNodeGroup auxiliary_node_groups = 25 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Dataproc\V1\AuxiliaryNodeGroup>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAuxiliaryNodeGroups($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataproc\V1\AuxiliaryNodeGroup::class); - $this->auxiliary_node_groups = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ClusterMetrics.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ClusterMetrics.php deleted file mode 100644 index a189db9bf52..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ClusterMetrics.php +++ /dev/null @@ -1,103 +0,0 @@ -google.cloud.dataproc.v1.ClusterMetrics - */ -class ClusterMetrics extends \Google\Protobuf\Internal\Message -{ - /** - * The HDFS metrics. - * - * Generated from protobuf field map hdfs_metrics = 1; - */ - private $hdfs_metrics; - /** - * YARN metrics. - * - * Generated from protobuf field map yarn_metrics = 2; - */ - private $yarn_metrics; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\MapField $hdfs_metrics - * The HDFS metrics. - * @type array|\Google\Protobuf\Internal\MapField $yarn_metrics - * YARN metrics. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Clusters::initOnce(); - parent::__construct($data); - } - - /** - * The HDFS metrics. - * - * Generated from protobuf field map hdfs_metrics = 1; - * @return \Google\Protobuf\Internal\MapField - */ - public function getHdfsMetrics() - { - return $this->hdfs_metrics; - } - - /** - * The HDFS metrics. - * - * Generated from protobuf field map hdfs_metrics = 1; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setHdfsMetrics($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::INT64); - $this->hdfs_metrics = $arr; - - return $this; - } - - /** - * YARN metrics. - * - * Generated from protobuf field map yarn_metrics = 2; - * @return \Google\Protobuf\Internal\MapField - */ - public function getYarnMetrics() - { - return $this->yarn_metrics; - } - - /** - * YARN metrics. - * - * Generated from protobuf field map yarn_metrics = 2; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setYarnMetrics($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::INT64); - $this->yarn_metrics = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ClusterOperation.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ClusterOperation.php deleted file mode 100644 index 73c47e2fb46..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ClusterOperation.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.dataproc.v1.ClusterOperation - */ -class ClusterOperation extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The id of the cluster operation. - * - * Generated from protobuf field string operation_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $operation_id = ''; - /** - * Output only. Error, if operation failed. - * - * Generated from protobuf field string error = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $error = ''; - /** - * Output only. Indicates the operation is done. - * - * Generated from protobuf field bool done = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $done = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $operation_id - * Output only. The id of the cluster operation. - * @type string $error - * Output only. Error, if operation failed. - * @type bool $done - * Output only. Indicates the operation is done. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\WorkflowTemplates::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The id of the cluster operation. - * - * Generated from protobuf field string operation_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getOperationId() - { - return $this->operation_id; - } - - /** - * Output only. The id of the cluster operation. - * - * Generated from protobuf field string operation_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setOperationId($var) - { - GPBUtil::checkString($var, True); - $this->operation_id = $var; - - return $this; - } - - /** - * Output only. Error, if operation failed. - * - * Generated from protobuf field string error = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getError() - { - return $this->error; - } - - /** - * Output only. Error, if operation failed. - * - * Generated from protobuf field string error = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setError($var) - { - GPBUtil::checkString($var, True); - $this->error = $var; - - return $this; - } - - /** - * Output only. Indicates the operation is done. - * - * Generated from protobuf field bool done = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getDone() - { - return $this->done; - } - - /** - * Output only. Indicates the operation is done. - * - * Generated from protobuf field bool done = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setDone($var) - { - GPBUtil::checkBool($var); - $this->done = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ClusterOperationMetadata.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ClusterOperationMetadata.php deleted file mode 100644 index 1b7c5cd9858..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ClusterOperationMetadata.php +++ /dev/null @@ -1,349 +0,0 @@ -google.cloud.dataproc.v1.ClusterOperationMetadata - */ -class ClusterOperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Name of the cluster for the operation. - * - * Generated from protobuf field string cluster_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $cluster_name = ''; - /** - * Output only. Cluster UUID for the operation. - * - * Generated from protobuf field string cluster_uuid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $cluster_uuid = ''; - /** - * Output only. Current operation status. - * - * Generated from protobuf field .google.cloud.dataproc.v1.ClusterOperationStatus status = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $status = null; - /** - * Output only. The previous operation status. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.ClusterOperationStatus status_history = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $status_history; - /** - * Output only. The operation type. - * - * Generated from protobuf field string operation_type = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $operation_type = ''; - /** - * Output only. Short description of operation. - * - * Generated from protobuf field string description = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $description = ''; - /** - * Output only. Labels associated with the operation - * - * Generated from protobuf field map labels = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $labels; - /** - * Output only. Errors encountered during operation execution. - * - * Generated from protobuf field repeated string warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $warnings; - /** - * Output only. Child operation ids - * - * Generated from protobuf field repeated string child_operation_ids = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $child_operation_ids; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $cluster_name - * Output only. Name of the cluster for the operation. - * @type string $cluster_uuid - * Output only. Cluster UUID for the operation. - * @type \Google\Cloud\Dataproc\V1\ClusterOperationStatus $status - * Output only. Current operation status. - * @type array<\Google\Cloud\Dataproc\V1\ClusterOperationStatus>|\Google\Protobuf\Internal\RepeatedField $status_history - * Output only. The previous operation status. - * @type string $operation_type - * Output only. The operation type. - * @type string $description - * Output only. Short description of operation. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Output only. Labels associated with the operation - * @type array|\Google\Protobuf\Internal\RepeatedField $warnings - * Output only. Errors encountered during operation execution. - * @type array|\Google\Protobuf\Internal\RepeatedField $child_operation_ids - * Output only. Child operation ids - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Operations::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Name of the cluster for the operation. - * - * Generated from protobuf field string cluster_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getClusterName() - { - return $this->cluster_name; - } - - /** - * Output only. Name of the cluster for the operation. - * - * Generated from protobuf field string cluster_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setClusterName($var) - { - GPBUtil::checkString($var, True); - $this->cluster_name = $var; - - return $this; - } - - /** - * Output only. Cluster UUID for the operation. - * - * Generated from protobuf field string cluster_uuid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getClusterUuid() - { - return $this->cluster_uuid; - } - - /** - * Output only. Cluster UUID for the operation. - * - * Generated from protobuf field string cluster_uuid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setClusterUuid($var) - { - GPBUtil::checkString($var, True); - $this->cluster_uuid = $var; - - return $this; - } - - /** - * Output only. Current operation status. - * - * Generated from protobuf field .google.cloud.dataproc.v1.ClusterOperationStatus status = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataproc\V1\ClusterOperationStatus|null - */ - public function getStatus() - { - return $this->status; - } - - public function hasStatus() - { - return isset($this->status); - } - - public function clearStatus() - { - unset($this->status); - } - - /** - * Output only. Current operation status. - * - * Generated from protobuf field .google.cloud.dataproc.v1.ClusterOperationStatus status = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataproc\V1\ClusterOperationStatus $var - * @return $this - */ - public function setStatus($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\ClusterOperationStatus::class); - $this->status = $var; - - return $this; - } - - /** - * Output only. The previous operation status. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.ClusterOperationStatus status_history = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getStatusHistory() - { - return $this->status_history; - } - - /** - * Output only. The previous operation status. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.ClusterOperationStatus status_history = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\Dataproc\V1\ClusterOperationStatus>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setStatusHistory($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataproc\V1\ClusterOperationStatus::class); - $this->status_history = $arr; - - return $this; - } - - /** - * Output only. The operation type. - * - * Generated from protobuf field string operation_type = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getOperationType() - { - return $this->operation_type; - } - - /** - * Output only. The operation type. - * - * Generated from protobuf field string operation_type = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setOperationType($var) - { - GPBUtil::checkString($var, True); - $this->operation_type = $var; - - return $this; - } - - /** - * Output only. Short description of operation. - * - * Generated from protobuf field string description = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Output only. Short description of operation. - * - * Generated from protobuf field string description = 12 [(.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. Labels associated with the operation - * - * Generated from protobuf field map labels = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Output only. Labels associated with the operation - * - * Generated from protobuf field map labels = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @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. Errors encountered during operation execution. - * - * Generated from protobuf field repeated string warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getWarnings() - { - return $this->warnings; - } - - /** - * Output only. Errors encountered during operation execution. - * - * Generated from protobuf field repeated string warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setWarnings($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->warnings = $arr; - - return $this; - } - - /** - * Output only. Child operation ids - * - * Generated from protobuf field repeated string child_operation_ids = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getChildOperationIds() - { - return $this->child_operation_ids; - } - - /** - * Output only. Child operation ids - * - * Generated from protobuf field repeated string child_operation_ids = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setChildOperationIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->child_operation_ids = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ClusterOperationStatus.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ClusterOperationStatus.php deleted file mode 100644 index cee3013511b..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ClusterOperationStatus.php +++ /dev/null @@ -1,179 +0,0 @@ -google.cloud.dataproc.v1.ClusterOperationStatus - */ -class ClusterOperationStatus extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. A message containing the operation state. - * - * Generated from protobuf field .google.cloud.dataproc.v1.ClusterOperationStatus.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. A message containing the detailed operation state. - * - * Generated from protobuf field string inner_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $inner_state = ''; - /** - * Output only. A message containing any operation metadata details. - * - * Generated from protobuf field string details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $details = ''; - /** - * Output only. The time this state was entered. - * - * Generated from protobuf field .google.protobuf.Timestamp state_start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state_start_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state - * Output only. A message containing the operation state. - * @type string $inner_state - * Output only. A message containing the detailed operation state. - * @type string $details - * Output only. A message containing any operation metadata details. - * @type \Google\Protobuf\Timestamp $state_start_time - * Output only. The time this state was entered. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Operations::initOnce(); - parent::__construct($data); - } - - /** - * Output only. A message containing the operation state. - * - * Generated from protobuf field .google.cloud.dataproc.v1.ClusterOperationStatus.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. A message containing the operation state. - * - * Generated from protobuf field .google.cloud.dataproc.v1.ClusterOperationStatus.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataproc\V1\ClusterOperationStatus\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. A message containing the detailed operation state. - * - * Generated from protobuf field string inner_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getInnerState() - { - return $this->inner_state; - } - - /** - * Output only. A message containing the detailed operation state. - * - * Generated from protobuf field string inner_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setInnerState($var) - { - GPBUtil::checkString($var, True); - $this->inner_state = $var; - - return $this; - } - - /** - * Output only. A message containing any operation metadata details. - * - * Generated from protobuf field string details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDetails() - { - return $this->details; - } - - /** - * Output only. A message containing any operation metadata details. - * - * Generated from protobuf field string details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDetails($var) - { - GPBUtil::checkString($var, True); - $this->details = $var; - - return $this; - } - - /** - * Output only. The time this state was entered. - * - * Generated from protobuf field .google.protobuf.Timestamp state_start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStateStartTime() - { - return $this->state_start_time; - } - - public function hasStateStartTime() - { - return isset($this->state_start_time); - } - - public function clearStateStartTime() - { - unset($this->state_start_time); - } - - /** - * Output only. The time this state was entered. - * - * Generated from protobuf field .google.protobuf.Timestamp state_start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStateStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->state_start_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ClusterOperationStatus/State.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ClusterOperationStatus/State.php deleted file mode 100644 index 9e2131ca2a8..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ClusterOperationStatus/State.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.dataproc.v1.ClusterOperationStatus.State - */ -class State -{ - /** - * Unused. - * - * Generated from protobuf enum UNKNOWN = 0; - */ - const UNKNOWN = 0; - /** - * The operation has been created. - * - * Generated from protobuf enum PENDING = 1; - */ - const PENDING = 1; - /** - * The operation is running. - * - * Generated from protobuf enum RUNNING = 2; - */ - const RUNNING = 2; - /** - * The operation is done; either cancelled or completed. - * - * Generated from protobuf enum DONE = 3; - */ - const DONE = 3; - - private static $valueToName = [ - self::UNKNOWN => 'UNKNOWN', - self::PENDING => 'PENDING', - self::RUNNING => 'RUNNING', - self::DONE => 'DONE', - ]; - - 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\Dataproc\V1\ClusterOperationStatus_State::class); - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ClusterSelector.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ClusterSelector.php deleted file mode 100644 index cb91bc96ca4..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ClusterSelector.php +++ /dev/null @@ -1,117 +0,0 @@ -google.cloud.dataproc.v1.ClusterSelector - */ -class ClusterSelector extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The zone where workflow process executes. This parameter does not - * affect the selection of the cluster. - * If unspecified, the zone of the first cluster matching the selector - * is used. - * - * Generated from protobuf field string zone = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $zone = ''; - /** - * Required. The cluster labels. Cluster must have all labels - * to match. - * - * Generated from protobuf field map cluster_labels = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $cluster_labels; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $zone - * Optional. The zone where workflow process executes. This parameter does not - * affect the selection of the cluster. - * If unspecified, the zone of the first cluster matching the selector - * is used. - * @type array|\Google\Protobuf\Internal\MapField $cluster_labels - * Required. The cluster labels. Cluster must have all labels - * to match. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\WorkflowTemplates::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The zone where workflow process executes. This parameter does not - * affect the selection of the cluster. - * If unspecified, the zone of the first cluster matching the selector - * is used. - * - * Generated from protobuf field string zone = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getZone() - { - return $this->zone; - } - - /** - * Optional. The zone where workflow process executes. This parameter does not - * affect the selection of the cluster. - * If unspecified, the zone of the first cluster matching the selector - * is used. - * - * Generated from protobuf field string zone = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setZone($var) - { - GPBUtil::checkString($var, True); - $this->zone = $var; - - return $this; - } - - /** - * Required. The cluster labels. Cluster must have all labels - * to match. - * - * Generated from protobuf field map cluster_labels = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getClusterLabels() - { - return $this->cluster_labels; - } - - /** - * Required. The cluster labels. Cluster must have all labels - * to match. - * - * Generated from protobuf field map cluster_labels = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setClusterLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->cluster_labels = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ClusterStatus.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ClusterStatus.php deleted file mode 100644 index 917d1baa051..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ClusterStatus.php +++ /dev/null @@ -1,187 +0,0 @@ -google.cloud.dataproc.v1.ClusterStatus - */ -class ClusterStatus extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The cluster's state. - * - * Generated from protobuf field .google.cloud.dataproc.v1.ClusterStatus.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Optional. Output only. Details of cluster's state. - * - * Generated from protobuf field string detail = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - */ - protected $detail = ''; - /** - * Output only. Time when this state was entered (see JSON representation of - * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)). - * - * Generated from protobuf field .google.protobuf.Timestamp state_start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state_start_time = null; - /** - * Output only. Additional state information that includes - * status reported by the agent. - * - * Generated from protobuf field .google.cloud.dataproc.v1.ClusterStatus.Substate substate = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $substate = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state - * Output only. The cluster's state. - * @type string $detail - * Optional. Output only. Details of cluster's state. - * @type \Google\Protobuf\Timestamp $state_start_time - * Output only. Time when this state was entered (see JSON representation of - * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)). - * @type int $substate - * Output only. Additional state information that includes - * status reported by the agent. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Clusters::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The cluster's state. - * - * Generated from protobuf field .google.cloud.dataproc.v1.ClusterStatus.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The cluster's state. - * - * Generated from protobuf field .google.cloud.dataproc.v1.ClusterStatus.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataproc\V1\ClusterStatus\State::class); - $this->state = $var; - - return $this; - } - - /** - * Optional. Output only. Details of cluster's state. - * - * Generated from protobuf field string detail = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDetail() - { - return $this->detail; - } - - /** - * Optional. Output only. Details of cluster's state. - * - * Generated from protobuf field string detail = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDetail($var) - { - GPBUtil::checkString($var, True); - $this->detail = $var; - - return $this; - } - - /** - * Output only. Time when this state was entered (see JSON representation of - * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)). - * - * Generated from protobuf field .google.protobuf.Timestamp state_start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStateStartTime() - { - return $this->state_start_time; - } - - public function hasStateStartTime() - { - return isset($this->state_start_time); - } - - public function clearStateStartTime() - { - unset($this->state_start_time); - } - - /** - * Output only. Time when this state was entered (see JSON representation of - * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)). - * - * Generated from protobuf field .google.protobuf.Timestamp state_start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStateStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->state_start_time = $var; - - return $this; - } - - /** - * Output only. Additional state information that includes - * status reported by the agent. - * - * Generated from protobuf field .google.cloud.dataproc.v1.ClusterStatus.Substate substate = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getSubstate() - { - return $this->substate; - } - - /** - * Output only. Additional state information that includes - * status reported by the agent. - * - * Generated from protobuf field .google.cloud.dataproc.v1.ClusterStatus.Substate substate = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setSubstate($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataproc\V1\ClusterStatus\Substate::class); - $this->substate = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ClusterStatus/State.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ClusterStatus/State.php deleted file mode 100644 index 9f05d75f830..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ClusterStatus/State.php +++ /dev/null @@ -1,124 +0,0 @@ -google.cloud.dataproc.v1.ClusterStatus.State - */ -class State -{ - /** - * The cluster state is unknown. - * - * Generated from protobuf enum UNKNOWN = 0; - */ - const UNKNOWN = 0; - /** - * The cluster is being created and set up. It is not ready for use. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * The cluster is currently running and healthy. It is ready for use. - * **Note:** The cluster state changes from "creating" to "running" status - * after the master node(s), first two primary worker nodes (and the last - * primary worker node if primary workers > 2) are running. - * - * Generated from protobuf enum RUNNING = 2; - */ - const RUNNING = 2; - /** - * The cluster encountered an error. It is not ready for use. - * - * Generated from protobuf enum ERROR = 3; - */ - const ERROR = 3; - /** - * The cluster has encountered an error while being updated. Jobs can - * be submitted to the cluster, but the cluster cannot be updated. - * - * Generated from protobuf enum ERROR_DUE_TO_UPDATE = 9; - */ - const ERROR_DUE_TO_UPDATE = 9; - /** - * The cluster is being deleted. It cannot be used. - * - * Generated from protobuf enum DELETING = 4; - */ - const DELETING = 4; - /** - * The cluster is being updated. It continues to accept and process jobs. - * - * Generated from protobuf enum UPDATING = 5; - */ - const UPDATING = 5; - /** - * The cluster is being stopped. It cannot be used. - * - * Generated from protobuf enum STOPPING = 6; - */ - const STOPPING = 6; - /** - * The cluster is currently stopped. It is not ready for use. - * - * Generated from protobuf enum STOPPED = 7; - */ - const STOPPED = 7; - /** - * The cluster is being started. It is not ready for use. - * - * Generated from protobuf enum STARTING = 8; - */ - const STARTING = 8; - /** - * The cluster is being repaired. It is not ready for use. - * - * Generated from protobuf enum REPAIRING = 10; - */ - const REPAIRING = 10; - - private static $valueToName = [ - self::UNKNOWN => 'UNKNOWN', - self::CREATING => 'CREATING', - self::RUNNING => 'RUNNING', - self::ERROR => 'ERROR', - self::ERROR_DUE_TO_UPDATE => 'ERROR_DUE_TO_UPDATE', - self::DELETING => 'DELETING', - self::UPDATING => 'UPDATING', - self::STOPPING => 'STOPPING', - self::STOPPED => 'STOPPED', - self::STARTING => 'STARTING', - self::REPAIRING => 'REPAIRING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Dataproc\V1\ClusterStatus_State::class); - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ClusterStatus/Substate.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ClusterStatus/Substate.php deleted file mode 100644 index 470978df8dc..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ClusterStatus/Substate.php +++ /dev/null @@ -1,69 +0,0 @@ -google.cloud.dataproc.v1.ClusterStatus.Substate - */ -class Substate -{ - /** - * The cluster substate is unknown. - * - * Generated from protobuf enum UNSPECIFIED = 0; - */ - const UNSPECIFIED = 0; - /** - * The cluster is known to be in an unhealthy state - * (for example, critical daemons are not running or HDFS capacity is - * exhausted). - * Applies to RUNNING state. - * - * Generated from protobuf enum UNHEALTHY = 1; - */ - const UNHEALTHY = 1; - /** - * The agent-reported status is out of date (may occur if - * Dataproc loses communication with Agent). - * Applies to RUNNING state. - * - * Generated from protobuf enum STALE_STATUS = 2; - */ - const STALE_STATUS = 2; - - private static $valueToName = [ - self::UNSPECIFIED => 'UNSPECIFIED', - self::UNHEALTHY => 'UNHEALTHY', - self::STALE_STATUS => 'STALE_STATUS', - ]; - - 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(Substate::class, \Google\Cloud\Dataproc\V1\ClusterStatus_Substate::class); - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/Component.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/Component.php deleted file mode 100644 index 62a1a459880..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/Component.php +++ /dev/null @@ -1,149 +0,0 @@ -google.cloud.dataproc.v1.Component - */ -class Component -{ - /** - * Unspecified component. Specifying this will cause Cluster creation to fail. - * - * Generated from protobuf enum COMPONENT_UNSPECIFIED = 0; - */ - const COMPONENT_UNSPECIFIED = 0; - /** - * The Anaconda python distribution. The Anaconda component is not supported - * in the Dataproc - * 2.0 - * image. The 2.0 image is pre-installed with Miniconda. - * - * Generated from protobuf enum ANACONDA = 5; - */ - const ANACONDA = 5; - /** - * Docker - * - * Generated from protobuf enum DOCKER = 13; - */ - const DOCKER = 13; - /** - * The Druid query engine. (alpha) - * - * Generated from protobuf enum DRUID = 9; - */ - const DRUID = 9; - /** - * Flink - * - * Generated from protobuf enum FLINK = 14; - */ - const FLINK = 14; - /** - * HBase. (beta) - * - * Generated from protobuf enum HBASE = 11; - */ - const HBASE = 11; - /** - * The Hive Web HCatalog (the REST service for accessing HCatalog). - * - * Generated from protobuf enum HIVE_WEBHCAT = 3; - */ - const HIVE_WEBHCAT = 3; - /** - * Hudi. - * - * Generated from protobuf enum HUDI = 18; - */ - const HUDI = 18; - /** - * The Jupyter Notebook. - * - * Generated from protobuf enum JUPYTER = 1; - */ - const JUPYTER = 1; - /** - * The Presto query engine. - * - * Generated from protobuf enum PRESTO = 6; - */ - const PRESTO = 6; - /** - * The Trino query engine. - * - * Generated from protobuf enum TRINO = 17; - */ - const TRINO = 17; - /** - * The Ranger service. - * - * Generated from protobuf enum RANGER = 12; - */ - const RANGER = 12; - /** - * The Solr service. - * - * Generated from protobuf enum SOLR = 10; - */ - const SOLR = 10; - /** - * The Zeppelin notebook. - * - * Generated from protobuf enum ZEPPELIN = 4; - */ - const ZEPPELIN = 4; - /** - * The Zookeeper service. - * - * Generated from protobuf enum ZOOKEEPER = 8; - */ - const ZOOKEEPER = 8; - - private static $valueToName = [ - self::COMPONENT_UNSPECIFIED => 'COMPONENT_UNSPECIFIED', - self::ANACONDA => 'ANACONDA', - self::DOCKER => 'DOCKER', - self::DRUID => 'DRUID', - self::FLINK => 'FLINK', - self::HBASE => 'HBASE', - self::HIVE_WEBHCAT => 'HIVE_WEBHCAT', - self::HUDI => 'HUDI', - self::JUPYTER => 'JUPYTER', - self::PRESTO => 'PRESTO', - self::TRINO => 'TRINO', - self::RANGER => 'RANGER', - self::SOLR => 'SOLR', - self::ZEPPELIN => 'ZEPPELIN', - self::ZOOKEEPER => 'ZOOKEEPER', - ]; - - 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/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ConfidentialInstanceConfig.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ConfidentialInstanceConfig.php deleted file mode 100644 index dfd65edcbb0..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ConfidentialInstanceConfig.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.dataproc.v1.ConfidentialInstanceConfig - */ -class ConfidentialInstanceConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Defines whether the instance should have confidential compute - * enabled. - * - * Generated from protobuf field bool enable_confidential_compute = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $enable_confidential_compute = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $enable_confidential_compute - * Optional. Defines whether the instance should have confidential compute - * enabled. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Clusters::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Defines whether the instance should have confidential compute - * enabled. - * - * Generated from protobuf field bool enable_confidential_compute = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEnableConfidentialCompute() - { - return $this->enable_confidential_compute; - } - - /** - * Optional. Defines whether the instance should have confidential compute - * enabled. - * - * Generated from protobuf field bool enable_confidential_compute = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEnableConfidentialCompute($var) - { - GPBUtil::checkBool($var); - $this->enable_confidential_compute = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/CreateAutoscalingPolicyRequest.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/CreateAutoscalingPolicyRequest.php deleted file mode 100644 index be90e29c436..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/CreateAutoscalingPolicyRequest.php +++ /dev/null @@ -1,164 +0,0 @@ -google.cloud.dataproc.v1.CreateAutoscalingPolicyRequest - */ -class CreateAutoscalingPolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The "resource name" of the region or location, as described - * in https://cloud.google.com/apis/design/resource_names. - * * For `projects.regions.autoscalingPolicies.create`, the resource name - * of the region has the following format: - * `projects/{project_id}/regions/{region}` - * * For `projects.locations.autoscalingPolicies.create`, the resource name - * of the location has the following format: - * `projects/{project_id}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The autoscaling policy to create. - * - * Generated from protobuf field .google.cloud.dataproc.v1.AutoscalingPolicy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $policy = null; - - /** - * @param string $parent Required. The "resource name" of the region or location, as described - * in https://cloud.google.com/apis/design/resource_names. - * - * * For `projects.regions.autoscalingPolicies.create`, the resource name - * of the region has the following format: - * `projects/{project_id}/regions/{region}` - * - * * For `projects.locations.autoscalingPolicies.create`, the resource name - * of the location has the following format: - * `projects/{project_id}/locations/{location}` - * Please see {@see AutoscalingPolicyServiceClient::regionName()} for help formatting this field. - * @param \Google\Cloud\Dataproc\V1\AutoscalingPolicy $policy Required. The autoscaling policy to create. - * - * @return \Google\Cloud\Dataproc\V1\CreateAutoscalingPolicyRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Dataproc\V1\AutoscalingPolicy $policy): self - { - return (new self()) - ->setParent($parent) - ->setPolicy($policy); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The "resource name" of the region or location, as described - * in https://cloud.google.com/apis/design/resource_names. - * * For `projects.regions.autoscalingPolicies.create`, the resource name - * of the region has the following format: - * `projects/{project_id}/regions/{region}` - * * For `projects.locations.autoscalingPolicies.create`, the resource name - * of the location has the following format: - * `projects/{project_id}/locations/{location}` - * @type \Google\Cloud\Dataproc\V1\AutoscalingPolicy $policy - * Required. The autoscaling policy to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\AutoscalingPolicies::initOnce(); - parent::__construct($data); - } - - /** - * Required. The "resource name" of the region or location, as described - * in https://cloud.google.com/apis/design/resource_names. - * * For `projects.regions.autoscalingPolicies.create`, the resource name - * of the region has the following format: - * `projects/{project_id}/regions/{region}` - * * For `projects.locations.autoscalingPolicies.create`, the resource name - * of the location has the following format: - * `projects/{project_id}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The "resource name" of the region or location, as described - * in https://cloud.google.com/apis/design/resource_names. - * * For `projects.regions.autoscalingPolicies.create`, the resource name - * of the region has the following format: - * `projects/{project_id}/regions/{region}` - * * For `projects.locations.autoscalingPolicies.create`, the resource name - * of the location has the following format: - * `projects/{project_id}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The autoscaling policy to create. - * - * Generated from protobuf field .google.cloud.dataproc.v1.AutoscalingPolicy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataproc\V1\AutoscalingPolicy|null - */ - public function getPolicy() - { - return $this->policy; - } - - public function hasPolicy() - { - return isset($this->policy); - } - - public function clearPolicy() - { - unset($this->policy); - } - - /** - * Required. The autoscaling policy to create. - * - * Generated from protobuf field .google.cloud.dataproc.v1.AutoscalingPolicy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataproc\V1\AutoscalingPolicy $var - * @return $this - */ - public function setPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\AutoscalingPolicy::class); - $this->policy = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/CreateBatchRequest.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/CreateBatchRequest.php deleted file mode 100644 index 31df96ea6ed..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/CreateBatchRequest.php +++ /dev/null @@ -1,244 +0,0 @@ -google.cloud.dataproc.v1.CreateBatchRequest - */ -class CreateBatchRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource where this batch will be created. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The batch to create. - * - * Generated from protobuf field .google.cloud.dataproc.v1.Batch batch = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $batch = null; - /** - * Optional. The ID to use for the batch, which will become the final - * component of the batch's resource name. - * This value must be 4-63 characters. Valid characters are `/[a-z][0-9]-/`. - * - * Generated from protobuf field string batch_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $batch_id = ''; - /** - * Optional. A unique ID used to identify the request. If the service - * receives two - * [CreateBatchRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateBatchRequest)s - * with the same request_id, the second request is ignored and the - * Operation that corresponds to the first Batch created and stored - * in the backend is returned. - * Recommendation: Set this value to a - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - * The value must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). The maximum length is 40 characters. - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. The parent resource where this batch will be created. Please see - * {@see BatchControllerClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Dataproc\V1\Batch $batch Required. The batch to create. - * @param string $batchId Optional. The ID to use for the batch, which will become the final - * component of the batch's resource name. - * - * This value must be 4-63 characters. Valid characters are `/[a-z][0-9]-/`. - * - * @return \Google\Cloud\Dataproc\V1\CreateBatchRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Dataproc\V1\Batch $batch, string $batchId): self - { - return (new self()) - ->setParent($parent) - ->setBatch($batch) - ->setBatchId($batchId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource where this batch will be created. - * @type \Google\Cloud\Dataproc\V1\Batch $batch - * Required. The batch to create. - * @type string $batch_id - * Optional. The ID to use for the batch, which will become the final - * component of the batch's resource name. - * This value must be 4-63 characters. Valid characters are `/[a-z][0-9]-/`. - * @type string $request_id - * Optional. A unique ID used to identify the request. If the service - * receives two - * [CreateBatchRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateBatchRequest)s - * with the same request_id, the second request is ignored and the - * Operation that corresponds to the first Batch created and stored - * in the backend is returned. - * Recommendation: Set this value to a - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - * The value must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). The maximum length is 40 characters. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Batches::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource where this batch will be created. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource where this batch will be created. - * - * 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 batch to create. - * - * Generated from protobuf field .google.cloud.dataproc.v1.Batch batch = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataproc\V1\Batch|null - */ - public function getBatch() - { - return $this->batch; - } - - public function hasBatch() - { - return isset($this->batch); - } - - public function clearBatch() - { - unset($this->batch); - } - - /** - * Required. The batch to create. - * - * Generated from protobuf field .google.cloud.dataproc.v1.Batch batch = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataproc\V1\Batch $var - * @return $this - */ - public function setBatch($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\Batch::class); - $this->batch = $var; - - return $this; - } - - /** - * Optional. The ID to use for the batch, which will become the final - * component of the batch's resource name. - * This value must be 4-63 characters. Valid characters are `/[a-z][0-9]-/`. - * - * Generated from protobuf field string batch_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getBatchId() - { - return $this->batch_id; - } - - /** - * Optional. The ID to use for the batch, which will become the final - * component of the batch's resource name. - * This value must be 4-63 characters. Valid characters are `/[a-z][0-9]-/`. - * - * Generated from protobuf field string batch_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setBatchId($var) - { - GPBUtil::checkString($var, True); - $this->batch_id = $var; - - return $this; - } - - /** - * Optional. A unique ID used to identify the request. If the service - * receives two - * [CreateBatchRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateBatchRequest)s - * with the same request_id, the second request is ignored and the - * Operation that corresponds to the first Batch created and stored - * in the backend is returned. - * Recommendation: Set this value to a - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - * The value must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). The maximum length is 40 characters. - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A unique ID used to identify the request. If the service - * receives two - * [CreateBatchRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateBatchRequest)s - * with the same request_id, the second request is ignored and the - * Operation that corresponds to the first Batch created and stored - * in the backend is returned. - * Recommendation: Set this value to a - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - * The value must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). The maximum length is 40 characters. - * - * 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/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/CreateClusterRequest.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/CreateClusterRequest.php deleted file mode 100644 index 2900a99c4bf..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/CreateClusterRequest.php +++ /dev/null @@ -1,271 +0,0 @@ -google.cloud.dataproc.v1.CreateClusterRequest - */ -class CreateClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The ID of the Google Cloud Platform project that the cluster - * belongs to. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $project_id = ''; - /** - * Required. The Dataproc region in which to handle the request. - * - * Generated from protobuf field string region = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $region = ''; - /** - * Required. The cluster to create. - * - * Generated from protobuf field .google.cloud.dataproc.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $cluster = null; - /** - * Optional. A unique ID used to identify the request. If the server receives - * two - * [CreateClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateClusterRequest)s - * with the same id, then the second request will be ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created - * and stored in the backend is returned. - * It is recommended to always set this value to a - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). The maximum length is 40 characters. - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - /** - * Optional. Failure action when primary worker creation fails. - * - * Generated from protobuf field .google.cloud.dataproc.v1.FailureAction action_on_failed_primary_workers = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $action_on_failed_primary_workers = 0; - - /** - * @param string $projectId Required. The ID of the Google Cloud Platform project that the cluster - * belongs to. - * @param string $region Required. The Dataproc region in which to handle the request. - * @param \Google\Cloud\Dataproc\V1\Cluster $cluster Required. The cluster to create. - * - * @return \Google\Cloud\Dataproc\V1\CreateClusterRequest - * - * @experimental - */ - public static function build(string $projectId, string $region, \Google\Cloud\Dataproc\V1\Cluster $cluster): self - { - return (new self()) - ->setProjectId($projectId) - ->setRegion($region) - ->setCluster($cluster); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $project_id - * Required. The ID of the Google Cloud Platform project that the cluster - * belongs to. - * @type string $region - * Required. The Dataproc region in which to handle the request. - * @type \Google\Cloud\Dataproc\V1\Cluster $cluster - * Required. The cluster to create. - * @type string $request_id - * Optional. A unique ID used to identify the request. If the server receives - * two - * [CreateClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateClusterRequest)s - * with the same id, then the second request will be ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created - * and stored in the backend is returned. - * It is recommended to always set this value to a - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). The maximum length is 40 characters. - * @type int $action_on_failed_primary_workers - * Optional. Failure action when primary worker creation fails. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Clusters::initOnce(); - parent::__construct($data); - } - - /** - * Required. The ID of the Google Cloud Platform project that the cluster - * belongs to. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * Required. The ID of the Google Cloud Platform project that the cluster - * belongs to. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - - /** - * Required. The Dataproc region in which to handle the request. - * - * Generated from protobuf field string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getRegion() - { - return $this->region; - } - - /** - * Required. The Dataproc region in which to handle the request. - * - * Generated from protobuf field string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setRegion($var) - { - GPBUtil::checkString($var, True); - $this->region = $var; - - return $this; - } - - /** - * Required. The cluster to create. - * - * Generated from protobuf field .google.cloud.dataproc.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataproc\V1\Cluster|null - */ - public function getCluster() - { - return $this->cluster; - } - - public function hasCluster() - { - return isset($this->cluster); - } - - public function clearCluster() - { - unset($this->cluster); - } - - /** - * Required. The cluster to create. - * - * Generated from protobuf field .google.cloud.dataproc.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataproc\V1\Cluster $var - * @return $this - */ - public function setCluster($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\Cluster::class); - $this->cluster = $var; - - return $this; - } - - /** - * Optional. A unique ID used to identify the request. If the server receives - * two - * [CreateClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateClusterRequest)s - * with the same id, then the second request will be ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created - * and stored in the backend is returned. - * It is recommended to always set this value to a - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). The maximum length is 40 characters. - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A unique ID used to identify the request. If the server receives - * two - * [CreateClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateClusterRequest)s - * with the same id, then the second request will be ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created - * and stored in the backend is returned. - * It is recommended to always set this value to a - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). The maximum length is 40 characters. - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - - /** - * Optional. Failure action when primary worker creation fails. - * - * Generated from protobuf field .google.cloud.dataproc.v1.FailureAction action_on_failed_primary_workers = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getActionOnFailedPrimaryWorkers() - { - return $this->action_on_failed_primary_workers; - } - - /** - * Optional. Failure action when primary worker creation fails. - * - * Generated from protobuf field .google.cloud.dataproc.v1.FailureAction action_on_failed_primary_workers = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setActionOnFailedPrimaryWorkers($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataproc\V1\FailureAction::class); - $this->action_on_failed_primary_workers = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/CreateNodeGroupRequest.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/CreateNodeGroupRequest.php deleted file mode 100644 index e63d8691ba8..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/CreateNodeGroupRequest.php +++ /dev/null @@ -1,254 +0,0 @@ -google.cloud.dataproc.v1.CreateNodeGroupRequest - */ -class CreateNodeGroupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource where this node group will be created. - * Format: `projects/{project}/regions/{region}/clusters/{cluster}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The node group to create. - * - * Generated from protobuf field .google.cloud.dataproc.v1.NodeGroup node_group = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $node_group = null; - /** - * Optional. An optional node group ID. Generated if not specified. - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). Cannot begin or end with underscore - * or hyphen. Must consist of from 3 to 33 characters. - * - * Generated from protobuf field string node_group_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $node_group_id = ''; - /** - * Optional. A unique ID used to identify the request. If the server receives - * two - * [CreateNodeGroupRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateNodeGroupRequests) - * with the same ID, the second request is ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created - * and stored in the backend is returned. - * Recommendation: Set this value to a - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). The maximum length is 40 characters. - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. The parent resource where this node group will be created. - * Format: `projects/{project}/regions/{region}/clusters/{cluster}` - * Please see {@see NodeGroupControllerClient::clusterRegionName()} for help formatting this field. - * @param \Google\Cloud\Dataproc\V1\NodeGroup $nodeGroup Required. The node group to create. - * @param string $nodeGroupId Optional. An optional node group ID. Generated if not specified. - * - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). Cannot begin or end with underscore - * or hyphen. Must consist of from 3 to 33 characters. - * - * @return \Google\Cloud\Dataproc\V1\CreateNodeGroupRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Dataproc\V1\NodeGroup $nodeGroup, string $nodeGroupId): self - { - return (new self()) - ->setParent($parent) - ->setNodeGroup($nodeGroup) - ->setNodeGroupId($nodeGroupId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource where this node group will be created. - * Format: `projects/{project}/regions/{region}/clusters/{cluster}` - * @type \Google\Cloud\Dataproc\V1\NodeGroup $node_group - * Required. The node group to create. - * @type string $node_group_id - * Optional. An optional node group ID. Generated if not specified. - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). Cannot begin or end with underscore - * or hyphen. Must consist of from 3 to 33 characters. - * @type string $request_id - * Optional. A unique ID used to identify the request. If the server receives - * two - * [CreateNodeGroupRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateNodeGroupRequests) - * with the same ID, the second request is ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created - * and stored in the backend is returned. - * Recommendation: Set this value to a - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). The maximum length is 40 characters. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\NodeGroups::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource where this node group will be created. - * Format: `projects/{project}/regions/{region}/clusters/{cluster}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource where this node group will be created. - * Format: `projects/{project}/regions/{region}/clusters/{cluster}` - * - * 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 node group to create. - * - * Generated from protobuf field .google.cloud.dataproc.v1.NodeGroup node_group = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataproc\V1\NodeGroup|null - */ - public function getNodeGroup() - { - return $this->node_group; - } - - public function hasNodeGroup() - { - return isset($this->node_group); - } - - public function clearNodeGroup() - { - unset($this->node_group); - } - - /** - * Required. The node group to create. - * - * Generated from protobuf field .google.cloud.dataproc.v1.NodeGroup node_group = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataproc\V1\NodeGroup $var - * @return $this - */ - public function setNodeGroup($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\NodeGroup::class); - $this->node_group = $var; - - return $this; - } - - /** - * Optional. An optional node group ID. Generated if not specified. - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). Cannot begin or end with underscore - * or hyphen. Must consist of from 3 to 33 characters. - * - * Generated from protobuf field string node_group_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getNodeGroupId() - { - return $this->node_group_id; - } - - /** - * Optional. An optional node group ID. Generated if not specified. - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). Cannot begin or end with underscore - * or hyphen. Must consist of from 3 to 33 characters. - * - * Generated from protobuf field string node_group_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setNodeGroupId($var) - { - GPBUtil::checkString($var, True); - $this->node_group_id = $var; - - return $this; - } - - /** - * Optional. A unique ID used to identify the request. If the server receives - * two - * [CreateNodeGroupRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateNodeGroupRequests) - * with the same ID, the second request is ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created - * and stored in the backend is returned. - * Recommendation: Set this value to a - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). The maximum length is 40 characters. - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A unique ID used to identify the request. If the server receives - * two - * [CreateNodeGroupRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateNodeGroupRequests) - * with the same ID, the second request is ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created - * and stored in the backend is returned. - * Recommendation: Set this value to a - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). The maximum length is 40 characters. - * - * 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/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/CreateWorkflowTemplateRequest.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/CreateWorkflowTemplateRequest.php deleted file mode 100644 index 90662856daa..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/CreateWorkflowTemplateRequest.php +++ /dev/null @@ -1,164 +0,0 @@ -google.cloud.dataproc.v1.CreateWorkflowTemplateRequest - */ -class CreateWorkflowTemplateRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the region or location, as described - * in https://cloud.google.com/apis/design/resource_names. - * * For `projects.regions.workflowTemplates.create`, the resource name of the - * region has the following format: - * `projects/{project_id}/regions/{region}` - * * For `projects.locations.workflowTemplates.create`, the resource name of - * the location has the following format: - * `projects/{project_id}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The Dataproc workflow template to create. - * - * Generated from protobuf field .google.cloud.dataproc.v1.WorkflowTemplate template = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $template = null; - - /** - * @param string $parent Required. The resource name of the region or location, as described - * in https://cloud.google.com/apis/design/resource_names. - * - * * For `projects.regions.workflowTemplates.create`, the resource name of the - * region has the following format: - * `projects/{project_id}/regions/{region}` - * - * * For `projects.locations.workflowTemplates.create`, the resource name of - * the location has the following format: - * `projects/{project_id}/locations/{location}` - * Please see {@see WorkflowTemplateServiceClient::regionName()} for help formatting this field. - * @param \Google\Cloud\Dataproc\V1\WorkflowTemplate $template Required. The Dataproc workflow template to create. - * - * @return \Google\Cloud\Dataproc\V1\CreateWorkflowTemplateRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Dataproc\V1\WorkflowTemplate $template): self - { - return (new self()) - ->setParent($parent) - ->setTemplate($template); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the region or location, as described - * in https://cloud.google.com/apis/design/resource_names. - * * For `projects.regions.workflowTemplates.create`, the resource name of the - * region has the following format: - * `projects/{project_id}/regions/{region}` - * * For `projects.locations.workflowTemplates.create`, the resource name of - * the location has the following format: - * `projects/{project_id}/locations/{location}` - * @type \Google\Cloud\Dataproc\V1\WorkflowTemplate $template - * Required. The Dataproc workflow template to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\WorkflowTemplates::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the region or location, as described - * in https://cloud.google.com/apis/design/resource_names. - * * For `projects.regions.workflowTemplates.create`, the resource name of the - * region has the following format: - * `projects/{project_id}/regions/{region}` - * * For `projects.locations.workflowTemplates.create`, the resource name of - * the location has the following format: - * `projects/{project_id}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the region or location, as described - * in https://cloud.google.com/apis/design/resource_names. - * * For `projects.regions.workflowTemplates.create`, the resource name of the - * region has the following format: - * `projects/{project_id}/regions/{region}` - * * For `projects.locations.workflowTemplates.create`, the resource name of - * the location has the following format: - * `projects/{project_id}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The Dataproc workflow template to create. - * - * Generated from protobuf field .google.cloud.dataproc.v1.WorkflowTemplate template = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataproc\V1\WorkflowTemplate|null - */ - public function getTemplate() - { - return $this->template; - } - - public function hasTemplate() - { - return isset($this->template); - } - - public function clearTemplate() - { - unset($this->template); - } - - /** - * Required. The Dataproc workflow template to create. - * - * Generated from protobuf field .google.cloud.dataproc.v1.WorkflowTemplate template = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataproc\V1\WorkflowTemplate $var - * @return $this - */ - public function setTemplate($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\WorkflowTemplate::class); - $this->template = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DataprocMetricConfig.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DataprocMetricConfig.php deleted file mode 100644 index 1470fdd1d00..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DataprocMetricConfig.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.dataproc.v1.DataprocMetricConfig - */ -class DataprocMetricConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Metrics sources to enable. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.DataprocMetricConfig.Metric metrics = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private $metrics; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dataproc\V1\DataprocMetricConfig\Metric>|\Google\Protobuf\Internal\RepeatedField $metrics - * Required. Metrics sources to enable. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Clusters::initOnce(); - parent::__construct($data); - } - - /** - * Required. Metrics sources to enable. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.DataprocMetricConfig.Metric metrics = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMetrics() - { - return $this->metrics; - } - - /** - * Required. Metrics sources to enable. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.DataprocMetricConfig.Metric metrics = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\Dataproc\V1\DataprocMetricConfig\Metric>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMetrics($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataproc\V1\DataprocMetricConfig\Metric::class); - $this->metrics = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DataprocMetricConfig/Metric.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DataprocMetricConfig/Metric.php deleted file mode 100644 index 0e48ce2b953..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DataprocMetricConfig/Metric.php +++ /dev/null @@ -1,208 +0,0 @@ -google.cloud.dataproc.v1.DataprocMetricConfig.Metric - */ -class Metric extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A standard set of metrics is collected unless `metricOverrides` - * are specified for the metric source (see [Custom metrics] - * (https://cloud.google.com/dataproc/docs/guides/dataproc-metrics#custom_metrics) - * for more information). - * - * Generated from protobuf field .google.cloud.dataproc.v1.DataprocMetricConfig.MetricSource metric_source = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $metric_source = 0; - /** - * Optional. Specify one or more [Custom metrics] - * (https://cloud.google.com/dataproc/docs/guides/dataproc-metrics#custom_metrics) - * to collect for the metric course (for the `SPARK` metric source (any - * [Spark metric] - * (https://spark.apache.org/docs/latest/monitoring.html#metrics) can be - * specified). - * Provide metrics in the following format: - * METRIC_SOURCE:INSTANCE:GROUP:METRIC - * Use camelcase as appropriate. - * Examples: - * ``` - * yarn:ResourceManager:QueueMetrics:AppsCompleted - * spark:driver:DAGScheduler:job.allJobs - * sparkHistoryServer:JVM:Memory:NonHeapMemoryUsage.committed - * hiveserver2:JVM:Memory:NonHeapMemoryUsage.used - * ``` - * Notes: - * * Only the specified overridden metrics are collected for the - * metric source. For example, if one or more `spark:executive` metrics - * are listed as metric overrides, other `SPARK` metrics are not - * collected. The collection of the metrics for other enabled custom - * metric sources is unaffected. For example, if both `SPARK` andd `YARN` - * metric sources are enabled, and overrides are provided for Spark - * metrics only, all YARN metrics are collected. - * - * Generated from protobuf field repeated string metric_overrides = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $metric_overrides; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $metric_source - * Required. A standard set of metrics is collected unless `metricOverrides` - * are specified for the metric source (see [Custom metrics] - * (https://cloud.google.com/dataproc/docs/guides/dataproc-metrics#custom_metrics) - * for more information). - * @type array|\Google\Protobuf\Internal\RepeatedField $metric_overrides - * Optional. Specify one or more [Custom metrics] - * (https://cloud.google.com/dataproc/docs/guides/dataproc-metrics#custom_metrics) - * to collect for the metric course (for the `SPARK` metric source (any - * [Spark metric] - * (https://spark.apache.org/docs/latest/monitoring.html#metrics) can be - * specified). - * Provide metrics in the following format: - * METRIC_SOURCE:INSTANCE:GROUP:METRIC - * Use camelcase as appropriate. - * Examples: - * ``` - * yarn:ResourceManager:QueueMetrics:AppsCompleted - * spark:driver:DAGScheduler:job.allJobs - * sparkHistoryServer:JVM:Memory:NonHeapMemoryUsage.committed - * hiveserver2:JVM:Memory:NonHeapMemoryUsage.used - * ``` - * Notes: - * * Only the specified overridden metrics are collected for the - * metric source. For example, if one or more `spark:executive` metrics - * are listed as metric overrides, other `SPARK` metrics are not - * collected. The collection of the metrics for other enabled custom - * metric sources is unaffected. For example, if both `SPARK` andd `YARN` - * metric sources are enabled, and overrides are provided for Spark - * metrics only, all YARN metrics are collected. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Clusters::initOnce(); - parent::__construct($data); - } - - /** - * Required. A standard set of metrics is collected unless `metricOverrides` - * are specified for the metric source (see [Custom metrics] - * (https://cloud.google.com/dataproc/docs/guides/dataproc-metrics#custom_metrics) - * for more information). - * - * Generated from protobuf field .google.cloud.dataproc.v1.DataprocMetricConfig.MetricSource metric_source = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getMetricSource() - { - return $this->metric_source; - } - - /** - * Required. A standard set of metrics is collected unless `metricOverrides` - * are specified for the metric source (see [Custom metrics] - * (https://cloud.google.com/dataproc/docs/guides/dataproc-metrics#custom_metrics) - * for more information). - * - * Generated from protobuf field .google.cloud.dataproc.v1.DataprocMetricConfig.MetricSource metric_source = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setMetricSource($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataproc\V1\DataprocMetricConfig\MetricSource::class); - $this->metric_source = $var; - - return $this; - } - - /** - * Optional. Specify one or more [Custom metrics] - * (https://cloud.google.com/dataproc/docs/guides/dataproc-metrics#custom_metrics) - * to collect for the metric course (for the `SPARK` metric source (any - * [Spark metric] - * (https://spark.apache.org/docs/latest/monitoring.html#metrics) can be - * specified). - * Provide metrics in the following format: - * METRIC_SOURCE:INSTANCE:GROUP:METRIC - * Use camelcase as appropriate. - * Examples: - * ``` - * yarn:ResourceManager:QueueMetrics:AppsCompleted - * spark:driver:DAGScheduler:job.allJobs - * sparkHistoryServer:JVM:Memory:NonHeapMemoryUsage.committed - * hiveserver2:JVM:Memory:NonHeapMemoryUsage.used - * ``` - * Notes: - * * Only the specified overridden metrics are collected for the - * metric source. For example, if one or more `spark:executive` metrics - * are listed as metric overrides, other `SPARK` metrics are not - * collected. The collection of the metrics for other enabled custom - * metric sources is unaffected. For example, if both `SPARK` andd `YARN` - * metric sources are enabled, and overrides are provided for Spark - * metrics only, all YARN metrics are collected. - * - * Generated from protobuf field repeated string metric_overrides = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMetricOverrides() - { - return $this->metric_overrides; - } - - /** - * Optional. Specify one or more [Custom metrics] - * (https://cloud.google.com/dataproc/docs/guides/dataproc-metrics#custom_metrics) - * to collect for the metric course (for the `SPARK` metric source (any - * [Spark metric] - * (https://spark.apache.org/docs/latest/monitoring.html#metrics) can be - * specified). - * Provide metrics in the following format: - * METRIC_SOURCE:INSTANCE:GROUP:METRIC - * Use camelcase as appropriate. - * Examples: - * ``` - * yarn:ResourceManager:QueueMetrics:AppsCompleted - * spark:driver:DAGScheduler:job.allJobs - * sparkHistoryServer:JVM:Memory:NonHeapMemoryUsage.committed - * hiveserver2:JVM:Memory:NonHeapMemoryUsage.used - * ``` - * Notes: - * * Only the specified overridden metrics are collected for the - * metric source. For example, if one or more `spark:executive` metrics - * are listed as metric overrides, other `SPARK` metrics are not - * collected. The collection of the metrics for other enabled custom - * metric sources is unaffected. For example, if both `SPARK` andd `YARN` - * metric sources are enabled, and overrides are provided for Spark - * metrics only, all YARN metrics are collected. - * - * Generated from protobuf field repeated string metric_overrides = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMetricOverrides($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->metric_overrides = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Metric::class, \Google\Cloud\Dataproc\V1\DataprocMetricConfig_Metric::class); - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DataprocMetricConfig/MetricSource.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DataprocMetricConfig/MetricSource.php deleted file mode 100644 index 3028e693f21..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DataprocMetricConfig/MetricSource.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.dataproc.v1.DataprocMetricConfig.MetricSource - */ -class MetricSource -{ - /** - * Required unspecified metric source. - * - * Generated from protobuf enum METRIC_SOURCE_UNSPECIFIED = 0; - */ - const METRIC_SOURCE_UNSPECIFIED = 0; - /** - * Monitoring agent metrics. If this source is enabled, - * Dataproc enables the monitoring agent in Compute Engine, - * and collects monitoring agent metrics, which are published - * with an `agent.googleapis.com` prefix. - * - * Generated from protobuf enum MONITORING_AGENT_DEFAULTS = 1; - */ - const MONITORING_AGENT_DEFAULTS = 1; - /** - * HDFS metric source. - * - * Generated from protobuf enum HDFS = 2; - */ - const HDFS = 2; - /** - * Spark metric source. - * - * Generated from protobuf enum SPARK = 3; - */ - const SPARK = 3; - /** - * YARN metric source. - * - * Generated from protobuf enum YARN = 4; - */ - const YARN = 4; - /** - * Spark History Server metric source. - * - * Generated from protobuf enum SPARK_HISTORY_SERVER = 5; - */ - const SPARK_HISTORY_SERVER = 5; - /** - * Hiveserver2 metric source. - * - * Generated from protobuf enum HIVESERVER2 = 6; - */ - const HIVESERVER2 = 6; - /** - * hivemetastore metric source - * - * Generated from protobuf enum HIVEMETASTORE = 7; - */ - const HIVEMETASTORE = 7; - - private static $valueToName = [ - self::METRIC_SOURCE_UNSPECIFIED => 'METRIC_SOURCE_UNSPECIFIED', - self::MONITORING_AGENT_DEFAULTS => 'MONITORING_AGENT_DEFAULTS', - self::HDFS => 'HDFS', - self::SPARK => 'SPARK', - self::YARN => 'YARN', - self::SPARK_HISTORY_SERVER => 'SPARK_HISTORY_SERVER', - self::HIVESERVER2 => 'HIVESERVER2', - self::HIVEMETASTORE => 'HIVEMETASTORE', - ]; - - 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(MetricSource::class, \Google\Cloud\Dataproc\V1\DataprocMetricConfig_MetricSource::class); - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DeleteAutoscalingPolicyRequest.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DeleteAutoscalingPolicyRequest.php deleted file mode 100644 index e1e82a75901..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DeleteAutoscalingPolicyRequest.php +++ /dev/null @@ -1,119 +0,0 @@ -google.cloud.dataproc.v1.DeleteAutoscalingPolicyRequest - */ -class DeleteAutoscalingPolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The "resource name" of the autoscaling policy, as described - * in https://cloud.google.com/apis/design/resource_names. - * * For `projects.regions.autoscalingPolicies.delete`, the resource name - * of the policy has the following format: - * `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}` - * * For `projects.locations.autoscalingPolicies.delete`, the resource name - * of the policy has the following format: - * `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The "resource name" of the autoscaling policy, as described - * in https://cloud.google.com/apis/design/resource_names. - * - * * For `projects.regions.autoscalingPolicies.delete`, the resource name - * of the policy has the following format: - * `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}` - * - * * For `projects.locations.autoscalingPolicies.delete`, the resource name - * of the policy has the following format: - * `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}` - * Please see {@see AutoscalingPolicyServiceClient::autoscalingPolicyName()} for help formatting this field. - * - * @return \Google\Cloud\Dataproc\V1\DeleteAutoscalingPolicyRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The "resource name" of the autoscaling policy, as described - * in https://cloud.google.com/apis/design/resource_names. - * * For `projects.regions.autoscalingPolicies.delete`, the resource name - * of the policy has the following format: - * `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}` - * * For `projects.locations.autoscalingPolicies.delete`, the resource name - * of the policy has the following format: - * `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\AutoscalingPolicies::initOnce(); - parent::__construct($data); - } - - /** - * Required. The "resource name" of the autoscaling policy, as described - * in https://cloud.google.com/apis/design/resource_names. - * * For `projects.regions.autoscalingPolicies.delete`, the resource name - * of the policy has the following format: - * `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}` - * * For `projects.locations.autoscalingPolicies.delete`, the resource name - * of the policy has the following format: - * `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The "resource name" of the autoscaling policy, as described - * in https://cloud.google.com/apis/design/resource_names. - * * For `projects.regions.autoscalingPolicies.delete`, the resource name - * of the policy has the following format: - * `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}` - * * For `projects.locations.autoscalingPolicies.delete`, the resource name - * of the policy has the following format: - * `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DeleteBatchRequest.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DeleteBatchRequest.php deleted file mode 100644 index 4d6d9dc486e..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DeleteBatchRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.dataproc.v1.DeleteBatchRequest - */ -class DeleteBatchRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The fully qualified name of the batch to retrieve - * in the format - * "projects/PROJECT_ID/locations/DATAPROC_REGION/batches/BATCH_ID" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The fully qualified name of the batch to retrieve - * in the format - * "projects/PROJECT_ID/locations/DATAPROC_REGION/batches/BATCH_ID" - * Please see {@see BatchControllerClient::batchName()} for help formatting this field. - * - * @return \Google\Cloud\Dataproc\V1\DeleteBatchRequest - * - * @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 fully qualified name of the batch to retrieve - * in the format - * "projects/PROJECT_ID/locations/DATAPROC_REGION/batches/BATCH_ID" - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Batches::initOnce(); - parent::__construct($data); - } - - /** - * Required. The fully qualified name of the batch to retrieve - * in the format - * "projects/PROJECT_ID/locations/DATAPROC_REGION/batches/BATCH_ID" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The fully qualified name of the batch to retrieve - * in the format - * "projects/PROJECT_ID/locations/DATAPROC_REGION/batches/BATCH_ID" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DeleteClusterRequest.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DeleteClusterRequest.php deleted file mode 100644 index 5b6ece38a4e..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DeleteClusterRequest.php +++ /dev/null @@ -1,265 +0,0 @@ -google.cloud.dataproc.v1.DeleteClusterRequest - */ -class DeleteClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The ID of the Google Cloud Platform project that the cluster - * belongs to. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $project_id = ''; - /** - * Required. The Dataproc region in which to handle the request. - * - * Generated from protobuf field string region = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $region = ''; - /** - * Required. The cluster name. - * - * Generated from protobuf field string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $cluster_name = ''; - /** - * Optional. Specifying the `cluster_uuid` means the RPC should fail - * (with error NOT_FOUND) if cluster with specified UUID does not exist. - * - * Generated from protobuf field string cluster_uuid = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $cluster_uuid = ''; - /** - * Optional. A unique ID used to identify the request. If the server - * receives two - * [DeleteClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.DeleteClusterRequest)s - * with the same id, then the second request will be ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created - * and stored in the backend is returned. - * It is recommended to always set this value to a - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). The maximum length is 40 characters. - * - * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $projectId Required. The ID of the Google Cloud Platform project that the cluster - * belongs to. - * @param string $region Required. The Dataproc region in which to handle the request. - * @param string $clusterName Required. The cluster name. - * - * @return \Google\Cloud\Dataproc\V1\DeleteClusterRequest - * - * @experimental - */ - public static function build(string $projectId, string $region, string $clusterName): self - { - return (new self()) - ->setProjectId($projectId) - ->setRegion($region) - ->setClusterName($clusterName); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $project_id - * Required. The ID of the Google Cloud Platform project that the cluster - * belongs to. - * @type string $region - * Required. The Dataproc region in which to handle the request. - * @type string $cluster_name - * Required. The cluster name. - * @type string $cluster_uuid - * Optional. Specifying the `cluster_uuid` means the RPC should fail - * (with error NOT_FOUND) if cluster with specified UUID does not exist. - * @type string $request_id - * Optional. A unique ID used to identify the request. If the server - * receives two - * [DeleteClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.DeleteClusterRequest)s - * with the same id, then the second request will be ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created - * and stored in the backend is returned. - * It is recommended to always set this value to a - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). The maximum length is 40 characters. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Clusters::initOnce(); - parent::__construct($data); - } - - /** - * Required. The ID of the Google Cloud Platform project that the cluster - * belongs to. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * Required. The ID of the Google Cloud Platform project that the cluster - * belongs to. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - - /** - * Required. The Dataproc region in which to handle the request. - * - * Generated from protobuf field string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getRegion() - { - return $this->region; - } - - /** - * Required. The Dataproc region in which to handle the request. - * - * Generated from protobuf field string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setRegion($var) - { - GPBUtil::checkString($var, True); - $this->region = $var; - - return $this; - } - - /** - * Required. The cluster name. - * - * Generated from protobuf field string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getClusterName() - { - return $this->cluster_name; - } - - /** - * Required. The cluster name. - * - * Generated from protobuf field string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setClusterName($var) - { - GPBUtil::checkString($var, True); - $this->cluster_name = $var; - - return $this; - } - - /** - * Optional. Specifying the `cluster_uuid` means the RPC should fail - * (with error NOT_FOUND) if cluster with specified UUID does not exist. - * - * Generated from protobuf field string cluster_uuid = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getClusterUuid() - { - return $this->cluster_uuid; - } - - /** - * Optional. Specifying the `cluster_uuid` means the RPC should fail - * (with error NOT_FOUND) if cluster with specified UUID does not exist. - * - * Generated from protobuf field string cluster_uuid = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setClusterUuid($var) - { - GPBUtil::checkString($var, True); - $this->cluster_uuid = $var; - - return $this; - } - - /** - * Optional. A unique ID used to identify the request. If the server - * receives two - * [DeleteClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.DeleteClusterRequest)s - * with the same id, then the second request will be ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created - * and stored in the backend is returned. - * It is recommended to always set this value to a - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). The maximum length is 40 characters. - * - * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A unique ID used to identify the request. If the server - * receives two - * [DeleteClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.DeleteClusterRequest)s - * with the same id, then the second request will be ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created - * and stored in the backend is returned. - * It is recommended to always set this value to a - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). The maximum length is 40 characters. - * - * Generated from protobuf field string request_id = 5 [(.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/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DeleteJobRequest.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DeleteJobRequest.php deleted file mode 100644 index ea842f7a156..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DeleteJobRequest.php +++ /dev/null @@ -1,157 +0,0 @@ -google.cloud.dataproc.v1.DeleteJobRequest - */ -class DeleteJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The ID of the Google Cloud Platform project that the job - * belongs to. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $project_id = ''; - /** - * Required. The Dataproc region in which to handle the request. - * - * Generated from protobuf field string region = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $region = ''; - /** - * Required. The job ID. - * - * Generated from protobuf field string job_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $job_id = ''; - - /** - * @param string $projectId Required. The ID of the Google Cloud Platform project that the job - * belongs to. - * @param string $region Required. The Dataproc region in which to handle the request. - * @param string $jobId Required. The job ID. - * - * @return \Google\Cloud\Dataproc\V1\DeleteJobRequest - * - * @experimental - */ - public static function build(string $projectId, string $region, string $jobId): self - { - return (new self()) - ->setProjectId($projectId) - ->setRegion($region) - ->setJobId($jobId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $project_id - * Required. The ID of the Google Cloud Platform project that the job - * belongs to. - * @type string $region - * Required. The Dataproc region in which to handle the request. - * @type string $job_id - * Required. The job ID. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Jobs::initOnce(); - parent::__construct($data); - } - - /** - * Required. The ID of the Google Cloud Platform project that the job - * belongs to. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * Required. The ID of the Google Cloud Platform project that the job - * belongs to. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - - /** - * Required. The Dataproc region in which to handle the request. - * - * Generated from protobuf field string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getRegion() - { - return $this->region; - } - - /** - * Required. The Dataproc region in which to handle the request. - * - * Generated from protobuf field string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setRegion($var) - { - GPBUtil::checkString($var, True); - $this->region = $var; - - return $this; - } - - /** - * Required. The job ID. - * - * Generated from protobuf field string job_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getJobId() - { - return $this->job_id; - } - - /** - * Required. The job ID. - * - * Generated from protobuf field string job_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setJobId($var) - { - GPBUtil::checkString($var, True); - $this->job_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DeleteWorkflowTemplateRequest.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DeleteWorkflowTemplateRequest.php deleted file mode 100644 index 4443408e259..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DeleteWorkflowTemplateRequest.php +++ /dev/null @@ -1,161 +0,0 @@ -google.cloud.dataproc.v1.DeleteWorkflowTemplateRequest - */ -class DeleteWorkflowTemplateRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the workflow template, as described - * in https://cloud.google.com/apis/design/resource_names. - * * For `projects.regions.workflowTemplates.delete`, the resource name - * of the template has the following format: - * `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}` - * * For `projects.locations.workflowTemplates.instantiate`, the resource name - * of the template has the following format: - * `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. The version of workflow template to delete. If specified, - * will only delete the template if the current server version matches - * specified version. - * - * Generated from protobuf field int32 version = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $version = 0; - - /** - * @param string $name Required. The resource name of the workflow template, as described - * in https://cloud.google.com/apis/design/resource_names. - * - * * For `projects.regions.workflowTemplates.delete`, the resource name - * of the template has the following format: - * `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}` - * - * * For `projects.locations.workflowTemplates.instantiate`, the resource name - * of the template has the following format: - * `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}` - * Please see {@see WorkflowTemplateServiceClient::workflowTemplateName()} for help formatting this field. - * - * @return \Google\Cloud\Dataproc\V1\DeleteWorkflowTemplateRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the workflow template, as described - * in https://cloud.google.com/apis/design/resource_names. - * * For `projects.regions.workflowTemplates.delete`, the resource name - * of the template has the following format: - * `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}` - * * For `projects.locations.workflowTemplates.instantiate`, the resource name - * of the template has the following format: - * `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}` - * @type int $version - * Optional. The version of workflow template to delete. If specified, - * will only delete the template if the current server version matches - * specified version. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\WorkflowTemplates::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the workflow template, as described - * in https://cloud.google.com/apis/design/resource_names. - * * For `projects.regions.workflowTemplates.delete`, the resource name - * of the template has the following format: - * `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}` - * * For `projects.locations.workflowTemplates.instantiate`, the resource name - * of the template has the following format: - * `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the workflow template, as described - * in https://cloud.google.com/apis/design/resource_names. - * * For `projects.regions.workflowTemplates.delete`, the resource name - * of the template has the following format: - * `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}` - * * For `projects.locations.workflowTemplates.instantiate`, the resource name - * of the template has the following format: - * `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. The version of workflow template to delete. If specified, - * will only delete the template if the current server version matches - * specified version. - * - * Generated from protobuf field int32 version = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getVersion() - { - return $this->version; - } - - /** - * Optional. The version of workflow template to delete. If specified, - * will only delete the template if the current server version matches - * specified version. - * - * Generated from protobuf field int32 version = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkInt32($var); - $this->version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DiagnoseClusterRequest.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DiagnoseClusterRequest.php deleted file mode 100644 index 8815475b5f6..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DiagnoseClusterRequest.php +++ /dev/null @@ -1,323 +0,0 @@ -google.cloud.dataproc.v1.DiagnoseClusterRequest - */ -class DiagnoseClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The ID of the Google Cloud Platform project that the cluster - * belongs to. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $project_id = ''; - /** - * Required. The Dataproc region in which to handle the request. - * - * Generated from protobuf field string region = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $region = ''; - /** - * Required. The cluster name. - * - * Generated from protobuf field string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $cluster_name = ''; - /** - * Optional. The output Cloud Storage directory for the diagnostic - * tarball. If not specified, a task-specific directory in the cluster's - * staging bucket will be used. - * - * Generated from protobuf field string tarball_gcs_dir = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $tarball_gcs_dir = ''; - /** - * Optional. Time interval in which diagnosis should be carried out on the - * cluster. - * - * Generated from protobuf field .google.type.Interval diagnosis_interval = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $diagnosis_interval = null; - /** - * Optional. Specifies a list of jobs on which diagnosis is to be performed. - * Format: projects/{project}/regions/{region}/jobs/{job} - * - * Generated from protobuf field repeated string jobs = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $jobs; - /** - * Optional. Specifies a list of yarn applications on which diagnosis is to be - * performed. - * - * Generated from protobuf field repeated string yarn_application_ids = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $yarn_application_ids; - - /** - * @param string $projectId Required. The ID of the Google Cloud Platform project that the cluster - * belongs to. - * @param string $region Required. The Dataproc region in which to handle the request. - * @param string $clusterName Required. The cluster name. - * - * @return \Google\Cloud\Dataproc\V1\DiagnoseClusterRequest - * - * @experimental - */ - public static function build(string $projectId, string $region, string $clusterName): self - { - return (new self()) - ->setProjectId($projectId) - ->setRegion($region) - ->setClusterName($clusterName); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $project_id - * Required. The ID of the Google Cloud Platform project that the cluster - * belongs to. - * @type string $region - * Required. The Dataproc region in which to handle the request. - * @type string $cluster_name - * Required. The cluster name. - * @type string $tarball_gcs_dir - * Optional. The output Cloud Storage directory for the diagnostic - * tarball. If not specified, a task-specific directory in the cluster's - * staging bucket will be used. - * @type \Google\Type\Interval $diagnosis_interval - * Optional. Time interval in which diagnosis should be carried out on the - * cluster. - * @type array|\Google\Protobuf\Internal\RepeatedField $jobs - * Optional. Specifies a list of jobs on which diagnosis is to be performed. - * Format: projects/{project}/regions/{region}/jobs/{job} - * @type array|\Google\Protobuf\Internal\RepeatedField $yarn_application_ids - * Optional. Specifies a list of yarn applications on which diagnosis is to be - * performed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Clusters::initOnce(); - parent::__construct($data); - } - - /** - * Required. The ID of the Google Cloud Platform project that the cluster - * belongs to. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * Required. The ID of the Google Cloud Platform project that the cluster - * belongs to. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - - /** - * Required. The Dataproc region in which to handle the request. - * - * Generated from protobuf field string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getRegion() - { - return $this->region; - } - - /** - * Required. The Dataproc region in which to handle the request. - * - * Generated from protobuf field string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setRegion($var) - { - GPBUtil::checkString($var, True); - $this->region = $var; - - return $this; - } - - /** - * Required. The cluster name. - * - * Generated from protobuf field string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getClusterName() - { - return $this->cluster_name; - } - - /** - * Required. The cluster name. - * - * Generated from protobuf field string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setClusterName($var) - { - GPBUtil::checkString($var, True); - $this->cluster_name = $var; - - return $this; - } - - /** - * Optional. The output Cloud Storage directory for the diagnostic - * tarball. If not specified, a task-specific directory in the cluster's - * staging bucket will be used. - * - * Generated from protobuf field string tarball_gcs_dir = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getTarballGcsDir() - { - return $this->tarball_gcs_dir; - } - - /** - * Optional. The output Cloud Storage directory for the diagnostic - * tarball. If not specified, a task-specific directory in the cluster's - * staging bucket will be used. - * - * Generated from protobuf field string tarball_gcs_dir = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setTarballGcsDir($var) - { - GPBUtil::checkString($var, True); - $this->tarball_gcs_dir = $var; - - return $this; - } - - /** - * Optional. Time interval in which diagnosis should be carried out on the - * cluster. - * - * Generated from protobuf field .google.type.Interval diagnosis_interval = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Type\Interval|null - */ - public function getDiagnosisInterval() - { - return $this->diagnosis_interval; - } - - public function hasDiagnosisInterval() - { - return isset($this->diagnosis_interval); - } - - public function clearDiagnosisInterval() - { - unset($this->diagnosis_interval); - } - - /** - * Optional. Time interval in which diagnosis should be carried out on the - * cluster. - * - * Generated from protobuf field .google.type.Interval diagnosis_interval = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Type\Interval $var - * @return $this - */ - public function setDiagnosisInterval($var) - { - GPBUtil::checkMessage($var, \Google\Type\Interval::class); - $this->diagnosis_interval = $var; - - return $this; - } - - /** - * Optional. Specifies a list of jobs on which diagnosis is to be performed. - * Format: projects/{project}/regions/{region}/jobs/{job} - * - * Generated from protobuf field repeated string jobs = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getJobs() - { - return $this->jobs; - } - - /** - * Optional. Specifies a list of jobs on which diagnosis is to be performed. - * Format: projects/{project}/regions/{region}/jobs/{job} - * - * Generated from protobuf field repeated string jobs = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setJobs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->jobs = $arr; - - return $this; - } - - /** - * Optional. Specifies a list of yarn applications on which diagnosis is to be - * performed. - * - * Generated from protobuf field repeated string yarn_application_ids = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getYarnApplicationIds() - { - return $this->yarn_application_ids; - } - - /** - * Optional. Specifies a list of yarn applications on which diagnosis is to be - * performed. - * - * Generated from protobuf field repeated string yarn_application_ids = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setYarnApplicationIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->yarn_application_ids = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DiagnoseClusterResults.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DiagnoseClusterResults.php deleted file mode 100644 index c94fe3379a9..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DiagnoseClusterResults.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.dataproc.v1.DiagnoseClusterResults - */ -class DiagnoseClusterResults extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The Cloud Storage URI of the diagnostic output. - * The output report is a plain text file with a summary of collected - * diagnostics. - * - * Generated from protobuf field string output_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $output_uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $output_uri - * Output only. The Cloud Storage URI of the diagnostic output. - * The output report is a plain text file with a summary of collected - * diagnostics. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Clusters::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The Cloud Storage URI of the diagnostic output. - * The output report is a plain text file with a summary of collected - * diagnostics. - * - * Generated from protobuf field string output_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getOutputUri() - { - return $this->output_uri; - } - - /** - * Output only. The Cloud Storage URI of the diagnostic output. - * The output report is a plain text file with a summary of collected - * diagnostics. - * - * Generated from protobuf field string output_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setOutputUri($var) - { - GPBUtil::checkString($var, True); - $this->output_uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DiskConfig.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DiskConfig.php deleted file mode 100644 index 23f3a85cd58..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DiskConfig.php +++ /dev/null @@ -1,229 +0,0 @@ -google.cloud.dataproc.v1.DiskConfig - */ -class DiskConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Type of the boot disk (default is "pd-standard"). - * Valid values: "pd-balanced" (Persistent Disk Balanced Solid State Drive), - * "pd-ssd" (Persistent Disk Solid State Drive), - * or "pd-standard" (Persistent Disk Hard Disk Drive). - * See [Disk types](https://cloud.google.com/compute/docs/disks#disk-types). - * - * Generated from protobuf field string boot_disk_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $boot_disk_type = ''; - /** - * Optional. Size in GB of the boot disk (default is 500GB). - * - * Generated from protobuf field int32 boot_disk_size_gb = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $boot_disk_size_gb = 0; - /** - * Optional. Number of attached SSDs, from 0 to 8 (default is 0). - * If SSDs are not attached, the boot disk is used to store runtime logs and - * [HDFS](https://hadoop.apache.org/docs/r1.2.1/hdfs_user_guide.html) data. - * If one or more SSDs are attached, this runtime bulk - * data is spread across them, and the boot disk contains only basic - * config and installed binaries. - * Note: Local SSD options may vary by machine type and number of vCPUs - * selected. - * - * Generated from protobuf field int32 num_local_ssds = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $num_local_ssds = 0; - /** - * Optional. Interface type of local SSDs (default is "scsi"). - * Valid values: "scsi" (Small Computer System Interface), - * "nvme" (Non-Volatile Memory Express). - * See [local SSD - * performance](https://cloud.google.com/compute/docs/disks/local-ssd#performance). - * - * Generated from protobuf field string local_ssd_interface = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $local_ssd_interface = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $boot_disk_type - * Optional. Type of the boot disk (default is "pd-standard"). - * Valid values: "pd-balanced" (Persistent Disk Balanced Solid State Drive), - * "pd-ssd" (Persistent Disk Solid State Drive), - * or "pd-standard" (Persistent Disk Hard Disk Drive). - * See [Disk types](https://cloud.google.com/compute/docs/disks#disk-types). - * @type int $boot_disk_size_gb - * Optional. Size in GB of the boot disk (default is 500GB). - * @type int $num_local_ssds - * Optional. Number of attached SSDs, from 0 to 8 (default is 0). - * If SSDs are not attached, the boot disk is used to store runtime logs and - * [HDFS](https://hadoop.apache.org/docs/r1.2.1/hdfs_user_guide.html) data. - * If one or more SSDs are attached, this runtime bulk - * data is spread across them, and the boot disk contains only basic - * config and installed binaries. - * Note: Local SSD options may vary by machine type and number of vCPUs - * selected. - * @type string $local_ssd_interface - * Optional. Interface type of local SSDs (default is "scsi"). - * Valid values: "scsi" (Small Computer System Interface), - * "nvme" (Non-Volatile Memory Express). - * See [local SSD - * performance](https://cloud.google.com/compute/docs/disks/local-ssd#performance). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Clusters::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Type of the boot disk (default is "pd-standard"). - * Valid values: "pd-balanced" (Persistent Disk Balanced Solid State Drive), - * "pd-ssd" (Persistent Disk Solid State Drive), - * or "pd-standard" (Persistent Disk Hard Disk Drive). - * See [Disk types](https://cloud.google.com/compute/docs/disks#disk-types). - * - * Generated from protobuf field string boot_disk_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getBootDiskType() - { - return $this->boot_disk_type; - } - - /** - * Optional. Type of the boot disk (default is "pd-standard"). - * Valid values: "pd-balanced" (Persistent Disk Balanced Solid State Drive), - * "pd-ssd" (Persistent Disk Solid State Drive), - * or "pd-standard" (Persistent Disk Hard Disk Drive). - * See [Disk types](https://cloud.google.com/compute/docs/disks#disk-types). - * - * Generated from protobuf field string boot_disk_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setBootDiskType($var) - { - GPBUtil::checkString($var, True); - $this->boot_disk_type = $var; - - return $this; - } - - /** - * Optional. Size in GB of the boot disk (default is 500GB). - * - * Generated from protobuf field int32 boot_disk_size_gb = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getBootDiskSizeGb() - { - return $this->boot_disk_size_gb; - } - - /** - * Optional. Size in GB of the boot disk (default is 500GB). - * - * Generated from protobuf field int32 boot_disk_size_gb = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setBootDiskSizeGb($var) - { - GPBUtil::checkInt32($var); - $this->boot_disk_size_gb = $var; - - return $this; - } - - /** - * Optional. Number of attached SSDs, from 0 to 8 (default is 0). - * If SSDs are not attached, the boot disk is used to store runtime logs and - * [HDFS](https://hadoop.apache.org/docs/r1.2.1/hdfs_user_guide.html) data. - * If one or more SSDs are attached, this runtime bulk - * data is spread across them, and the boot disk contains only basic - * config and installed binaries. - * Note: Local SSD options may vary by machine type and number of vCPUs - * selected. - * - * Generated from protobuf field int32 num_local_ssds = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getNumLocalSsds() - { - return $this->num_local_ssds; - } - - /** - * Optional. Number of attached SSDs, from 0 to 8 (default is 0). - * If SSDs are not attached, the boot disk is used to store runtime logs and - * [HDFS](https://hadoop.apache.org/docs/r1.2.1/hdfs_user_guide.html) data. - * If one or more SSDs are attached, this runtime bulk - * data is spread across them, and the boot disk contains only basic - * config and installed binaries. - * Note: Local SSD options may vary by machine type and number of vCPUs - * selected. - * - * Generated from protobuf field int32 num_local_ssds = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setNumLocalSsds($var) - { - GPBUtil::checkInt32($var); - $this->num_local_ssds = $var; - - return $this; - } - - /** - * Optional. Interface type of local SSDs (default is "scsi"). - * Valid values: "scsi" (Small Computer System Interface), - * "nvme" (Non-Volatile Memory Express). - * See [local SSD - * performance](https://cloud.google.com/compute/docs/disks/local-ssd#performance). - * - * Generated from protobuf field string local_ssd_interface = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getLocalSsdInterface() - { - return $this->local_ssd_interface; - } - - /** - * Optional. Interface type of local SSDs (default is "scsi"). - * Valid values: "scsi" (Small Computer System Interface), - * "nvme" (Non-Volatile Memory Express). - * See [local SSD - * performance](https://cloud.google.com/compute/docs/disks/local-ssd#performance). - * - * Generated from protobuf field string local_ssd_interface = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setLocalSsdInterface($var) - { - GPBUtil::checkString($var, True); - $this->local_ssd_interface = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DriverSchedulingConfig.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DriverSchedulingConfig.php deleted file mode 100644 index 413acffe2aa..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DriverSchedulingConfig.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.dataproc.v1.DriverSchedulingConfig - */ -class DriverSchedulingConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The amount of memory in MB the driver is requesting. - * - * Generated from protobuf field int32 memory_mb = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $memory_mb = 0; - /** - * Required. The number of vCPUs the driver is requesting. - * - * Generated from protobuf field int32 vcores = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $vcores = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $memory_mb - * Required. The amount of memory in MB the driver is requesting. - * @type int $vcores - * Required. The number of vCPUs the driver is requesting. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Jobs::initOnce(); - parent::__construct($data); - } - - /** - * Required. The amount of memory in MB the driver is requesting. - * - * Generated from protobuf field int32 memory_mb = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getMemoryMb() - { - return $this->memory_mb; - } - - /** - * Required. The amount of memory in MB the driver is requesting. - * - * Generated from protobuf field int32 memory_mb = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setMemoryMb($var) - { - GPBUtil::checkInt32($var); - $this->memory_mb = $var; - - return $this; - } - - /** - * Required. The number of vCPUs the driver is requesting. - * - * Generated from protobuf field int32 vcores = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getVcores() - { - return $this->vcores; - } - - /** - * Required. The number of vCPUs the driver is requesting. - * - * Generated from protobuf field int32 vcores = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setVcores($var) - { - GPBUtil::checkInt32($var); - $this->vcores = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/EncryptionConfig.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/EncryptionConfig.php deleted file mode 100644 index 1907adc05dc..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/EncryptionConfig.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.dataproc.v1.EncryptionConfig - */ -class EncryptionConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The Cloud KMS key name to use for PD disk encryption for all - * instances in the cluster. - * - * Generated from protobuf field string gce_pd_kms_key_name = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $gce_pd_kms_key_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $gce_pd_kms_key_name - * Optional. The Cloud KMS key name to use for PD disk encryption for all - * instances in the cluster. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Clusters::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The Cloud KMS key name to use for PD disk encryption for all - * instances in the cluster. - * - * Generated from protobuf field string gce_pd_kms_key_name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getGcePdKmsKeyName() - { - return $this->gce_pd_kms_key_name; - } - - /** - * Optional. The Cloud KMS key name to use for PD disk encryption for all - * instances in the cluster. - * - * Generated from protobuf field string gce_pd_kms_key_name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setGcePdKmsKeyName($var) - { - GPBUtil::checkString($var, True); - $this->gce_pd_kms_key_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/EndpointConfig.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/EndpointConfig.php deleted file mode 100644 index e03e28038d5..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/EndpointConfig.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.dataproc.v1.EndpointConfig - */ -class EndpointConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The map of port descriptions to URLs. Will only be populated - * if enable_http_port_access is true. - * - * Generated from protobuf field map http_ports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $http_ports; - /** - * Optional. If true, enable http access to specific ports on the cluster - * from external sources. Defaults to false. - * - * Generated from protobuf field bool enable_http_port_access = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $enable_http_port_access = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\MapField $http_ports - * Output only. The map of port descriptions to URLs. Will only be populated - * if enable_http_port_access is true. - * @type bool $enable_http_port_access - * Optional. If true, enable http access to specific ports on the cluster - * from external sources. Defaults to false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Clusters::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The map of port descriptions to URLs. Will only be populated - * if enable_http_port_access is true. - * - * Generated from protobuf field map http_ports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getHttpPorts() - { - return $this->http_ports; - } - - /** - * Output only. The map of port descriptions to URLs. Will only be populated - * if enable_http_port_access is true. - * - * Generated from protobuf field map http_ports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setHttpPorts($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->http_ports = $arr; - - return $this; - } - - /** - * Optional. If true, enable http access to specific ports on the cluster - * from external sources. Defaults to false. - * - * Generated from protobuf field bool enable_http_port_access = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEnableHttpPortAccess() - { - return $this->enable_http_port_access; - } - - /** - * Optional. If true, enable http access to specific ports on the cluster - * from external sources. Defaults to false. - * - * Generated from protobuf field bool enable_http_port_access = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEnableHttpPortAccess($var) - { - GPBUtil::checkBool($var); - $this->enable_http_port_access = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/EnvironmentConfig.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/EnvironmentConfig.php deleted file mode 100644 index 7e55d7043f3..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/EnvironmentConfig.php +++ /dev/null @@ -1,121 +0,0 @@ -google.cloud.dataproc.v1.EnvironmentConfig - */ -class EnvironmentConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Execution configuration for a workload. - * - * Generated from protobuf field .google.cloud.dataproc.v1.ExecutionConfig execution_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $execution_config = null; - /** - * Optional. Peripherals configuration that workload has access to. - * - * Generated from protobuf field .google.cloud.dataproc.v1.PeripheralsConfig peripherals_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $peripherals_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dataproc\V1\ExecutionConfig $execution_config - * Optional. Execution configuration for a workload. - * @type \Google\Cloud\Dataproc\V1\PeripheralsConfig $peripherals_config - * Optional. Peripherals configuration that workload has access to. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Shared::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Execution configuration for a workload. - * - * Generated from protobuf field .google.cloud.dataproc.v1.ExecutionConfig execution_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\ExecutionConfig|null - */ - public function getExecutionConfig() - { - return $this->execution_config; - } - - public function hasExecutionConfig() - { - return isset($this->execution_config); - } - - public function clearExecutionConfig() - { - unset($this->execution_config); - } - - /** - * Optional. Execution configuration for a workload. - * - * Generated from protobuf field .google.cloud.dataproc.v1.ExecutionConfig execution_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\ExecutionConfig $var - * @return $this - */ - public function setExecutionConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\ExecutionConfig::class); - $this->execution_config = $var; - - return $this; - } - - /** - * Optional. Peripherals configuration that workload has access to. - * - * Generated from protobuf field .google.cloud.dataproc.v1.PeripheralsConfig peripherals_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\PeripheralsConfig|null - */ - public function getPeripheralsConfig() - { - return $this->peripherals_config; - } - - public function hasPeripheralsConfig() - { - return isset($this->peripherals_config); - } - - public function clearPeripheralsConfig() - { - unset($this->peripherals_config); - } - - /** - * Optional. Peripherals configuration that workload has access to. - * - * Generated from protobuf field .google.cloud.dataproc.v1.PeripheralsConfig peripherals_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\PeripheralsConfig $var - * @return $this - */ - public function setPeripheralsConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\PeripheralsConfig::class); - $this->peripherals_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ExecutionConfig.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ExecutionConfig.php deleted file mode 100644 index 35e4035fc69..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ExecutionConfig.php +++ /dev/null @@ -1,352 +0,0 @@ -google.cloud.dataproc.v1.ExecutionConfig - */ -class ExecutionConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Service account that used to execute workload. - * - * Generated from protobuf field string service_account = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $service_account = ''; - /** - * Optional. Tags used for network traffic control. - * - * Generated from protobuf field repeated string network_tags = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $network_tags; - /** - * Optional. The Cloud KMS key to use for encryption. - * - * Generated from protobuf field string kms_key = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $kms_key = ''; - /** - * Optional. The duration after which the workload will be terminated. - * When the workload passes this ttl, it will be unconditionally killed - * without waiting for ongoing work to finish. - * Minimum value is 10 minutes; maximum value is 14 days (see JSON - * representation of - * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). - * If both ttl and idle_ttl are specified, the conditions are treated as - * and OR: the workload will be terminated when it has been idle for idle_ttl - * or when the ttl has passed, whichever comes first. - * If ttl is not specified for a session, it defaults to 24h. - * - * Generated from protobuf field .google.protobuf.Duration ttl = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $ttl = null; - /** - * Optional. A Cloud Storage bucket used to stage workload dependencies, - * config files, and store workload output and other ephemeral data, such as - * Spark history files. If you do not specify a staging bucket, Cloud Dataproc - * will determine a Cloud Storage location according to the region where your - * workload is running, and then create and manage project-level, per-location - * staging and temporary buckets. - * **This field requires a Cloud Storage bucket name, not a `gs://...` URI to - * a Cloud Storage bucket.** - * - * Generated from protobuf field string staging_bucket = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $staging_bucket = ''; - protected $network; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $service_account - * Optional. Service account that used to execute workload. - * @type string $network_uri - * Optional. Network URI to connect workload to. - * @type string $subnetwork_uri - * Optional. Subnetwork URI to connect workload to. - * @type array|\Google\Protobuf\Internal\RepeatedField $network_tags - * Optional. Tags used for network traffic control. - * @type string $kms_key - * Optional. The Cloud KMS key to use for encryption. - * @type \Google\Protobuf\Duration $ttl - * Optional. The duration after which the workload will be terminated. - * When the workload passes this ttl, it will be unconditionally killed - * without waiting for ongoing work to finish. - * Minimum value is 10 minutes; maximum value is 14 days (see JSON - * representation of - * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). - * If both ttl and idle_ttl are specified, the conditions are treated as - * and OR: the workload will be terminated when it has been idle for idle_ttl - * or when the ttl has passed, whichever comes first. - * If ttl is not specified for a session, it defaults to 24h. - * @type string $staging_bucket - * Optional. A Cloud Storage bucket used to stage workload dependencies, - * config files, and store workload output and other ephemeral data, such as - * Spark history files. If you do not specify a staging bucket, Cloud Dataproc - * will determine a Cloud Storage location according to the region where your - * workload is running, and then create and manage project-level, per-location - * staging and temporary buckets. - * **This field requires a Cloud Storage bucket name, not a `gs://...` URI to - * a Cloud Storage bucket.** - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Shared::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Service account that used to execute workload. - * - * Generated from protobuf field string service_account = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getServiceAccount() - { - return $this->service_account; - } - - /** - * Optional. Service account that used to execute workload. - * - * Generated from protobuf field string service_account = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setServiceAccount($var) - { - GPBUtil::checkString($var, True); - $this->service_account = $var; - - return $this; - } - - /** - * Optional. Network URI to connect workload to. - * - * Generated from protobuf field string network_uri = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getNetworkUri() - { - return $this->readOneof(4); - } - - public function hasNetworkUri() - { - return $this->hasOneof(4); - } - - /** - * Optional. Network URI to connect workload to. - * - * Generated from protobuf field string network_uri = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setNetworkUri($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Optional. Subnetwork URI to connect workload to. - * - * Generated from protobuf field string subnetwork_uri = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getSubnetworkUri() - { - return $this->readOneof(5); - } - - public function hasSubnetworkUri() - { - return $this->hasOneof(5); - } - - /** - * Optional. Subnetwork URI to connect workload to. - * - * Generated from protobuf field string subnetwork_uri = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setSubnetworkUri($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Optional. Tags used for network traffic control. - * - * Generated from protobuf field repeated string network_tags = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNetworkTags() - { - return $this->network_tags; - } - - /** - * Optional. Tags used for network traffic control. - * - * Generated from protobuf field repeated string network_tags = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNetworkTags($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->network_tags = $arr; - - return $this; - } - - /** - * Optional. The Cloud KMS key to use for encryption. - * - * Generated from protobuf field string kms_key = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getKmsKey() - { - return $this->kms_key; - } - - /** - * Optional. The Cloud KMS key to use for encryption. - * - * Generated from protobuf field string kms_key = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setKmsKey($var) - { - GPBUtil::checkString($var, True); - $this->kms_key = $var; - - return $this; - } - - /** - * Optional. The duration after which the workload will be terminated. - * When the workload passes this ttl, it will be unconditionally killed - * without waiting for ongoing work to finish. - * Minimum value is 10 minutes; maximum value is 14 days (see JSON - * representation of - * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). - * If both ttl and idle_ttl are specified, the conditions are treated as - * and OR: the workload will be terminated when it has been idle for idle_ttl - * or when the ttl has passed, whichever comes first. - * If ttl is not specified for a session, it defaults to 24h. - * - * Generated from protobuf field .google.protobuf.Duration ttl = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Duration|null - */ - public function getTtl() - { - return $this->ttl; - } - - public function hasTtl() - { - return isset($this->ttl); - } - - public function clearTtl() - { - unset($this->ttl); - } - - /** - * Optional. The duration after which the workload will be terminated. - * When the workload passes this ttl, it will be unconditionally killed - * without waiting for ongoing work to finish. - * Minimum value is 10 minutes; maximum value is 14 days (see JSON - * representation of - * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). - * If both ttl and idle_ttl are specified, the conditions are treated as - * and OR: the workload will be terminated when it has been idle for idle_ttl - * or when the ttl has passed, whichever comes first. - * If ttl is not specified for a session, it defaults to 24h. - * - * Generated from protobuf field .google.protobuf.Duration ttl = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTtl($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->ttl = $var; - - return $this; - } - - /** - * Optional. A Cloud Storage bucket used to stage workload dependencies, - * config files, and store workload output and other ephemeral data, such as - * Spark history files. If you do not specify a staging bucket, Cloud Dataproc - * will determine a Cloud Storage location according to the region where your - * workload is running, and then create and manage project-level, per-location - * staging and temporary buckets. - * **This field requires a Cloud Storage bucket name, not a `gs://...` URI to - * a Cloud Storage bucket.** - * - * Generated from protobuf field string staging_bucket = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getStagingBucket() - { - return $this->staging_bucket; - } - - /** - * Optional. A Cloud Storage bucket used to stage workload dependencies, - * config files, and store workload output and other ephemeral data, such as - * Spark history files. If you do not specify a staging bucket, Cloud Dataproc - * will determine a Cloud Storage location according to the region where your - * workload is running, and then create and manage project-level, per-location - * staging and temporary buckets. - * **This field requires a Cloud Storage bucket name, not a `gs://...` URI to - * a Cloud Storage bucket.** - * - * Generated from protobuf field string staging_bucket = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setStagingBucket($var) - { - GPBUtil::checkString($var, True); - $this->staging_bucket = $var; - - return $this; - } - - /** - * @return string - */ - public function getNetwork() - { - return $this->whichOneof("network"); - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/FailureAction.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/FailureAction.php deleted file mode 100644 index 6a74c8aaacf..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/FailureAction.php +++ /dev/null @@ -1,62 +0,0 @@ -google.cloud.dataproc.v1.FailureAction - */ -class FailureAction -{ - /** - * When FailureAction is unspecified, failure action defaults to NO_ACTION. - * - * Generated from protobuf enum FAILURE_ACTION_UNSPECIFIED = 0; - */ - const FAILURE_ACTION_UNSPECIFIED = 0; - /** - * Take no action on failure to create a cluster resource. NO_ACTION is the - * default. - * - * Generated from protobuf enum NO_ACTION = 1; - */ - const NO_ACTION = 1; - /** - * Delete the failed cluster resource. - * - * Generated from protobuf enum DELETE = 2; - */ - const DELETE = 2; - - private static $valueToName = [ - self::FAILURE_ACTION_UNSPECIFIED => 'FAILURE_ACTION_UNSPECIFIED', - self::NO_ACTION => 'NO_ACTION', - self::DELETE => 'DELETE', - ]; - - 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/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GceClusterConfig.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GceClusterConfig.php deleted file mode 100644 index f845773efb0..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GceClusterConfig.php +++ /dev/null @@ -1,726 +0,0 @@ -google.cloud.dataproc.v1.GceClusterConfig - */ -class GceClusterConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The Compute Engine zone where the Dataproc cluster will be - * located. If omitted, the service will pick a zone in the cluster's Compute - * Engine region. On a get request, zone will always be present. - * A full URL, partial URI, or short name are valid. Examples: - * * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]` - * * `projects/[project_id]/zones/[zone]` - * * `[zone]` - * - * Generated from protobuf field string zone_uri = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $zone_uri = ''; - /** - * Optional. The Compute Engine network to be used for machine - * communications. Cannot be specified with subnetwork_uri. If neither - * `network_uri` nor `subnetwork_uri` is specified, the "default" network of - * the project is used, if it exists. Cannot be a "Custom Subnet Network" (see - * [Using Subnetworks](https://cloud.google.com/compute/docs/subnetworks) for - * more information). - * A full URL, partial URI, or short name are valid. Examples: - * * `https://www.googleapis.com/compute/v1/projects/[project_id]/global/networks/default` - * * `projects/[project_id]/global/networks/default` - * * `default` - * - * Generated from protobuf field string network_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $network_uri = ''; - /** - * Optional. The Compute Engine subnetwork to be used for machine - * communications. Cannot be specified with network_uri. - * A full URL, partial URI, or short name are valid. Examples: - * * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/[region]/subnetworks/sub0` - * * `projects/[project_id]/regions/[region]/subnetworks/sub0` - * * `sub0` - * - * Generated from protobuf field string subnetwork_uri = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $subnetwork_uri = ''; - /** - * Optional. If true, all instances in the cluster will only have internal IP - * addresses. By default, clusters are not restricted to internal IP - * addresses, and will have ephemeral external IP addresses assigned to each - * instance. This `internal_ip_only` restriction can only be enabled for - * subnetwork enabled networks, and all off-cluster dependencies must be - * configured to be accessible without external IP addresses. - * - * Generated from protobuf field optional bool internal_ip_only = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $internal_ip_only = null; - /** - * Optional. The type of IPv6 access for a cluster. - * - * Generated from protobuf field .google.cloud.dataproc.v1.GceClusterConfig.PrivateIpv6GoogleAccess private_ipv6_google_access = 12 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $private_ipv6_google_access = 0; - /** - * Optional. The [Dataproc service - * account](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/service-accounts#service_accounts_in_dataproc) - * (also see [VM Data Plane - * identity](https://cloud.google.com/dataproc/docs/concepts/iam/dataproc-principals#vm_service_account_data_plane_identity)) - * used by Dataproc cluster VM instances to access Google Cloud Platform - * services. - * If not specified, the - * [Compute Engine default service - * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) - * is used. - * - * Generated from protobuf field string service_account = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $service_account = ''; - /** - * Optional. The URIs of service account scopes to be included in - * Compute Engine instances. The following base set of scopes is always - * included: - * * https://www.googleapis.com/auth/cloud.useraccounts.readonly - * * https://www.googleapis.com/auth/devstorage.read_write - * * https://www.googleapis.com/auth/logging.write - * If no scopes are specified, the following defaults are also provided: - * * https://www.googleapis.com/auth/bigquery - * * https://www.googleapis.com/auth/bigtable.admin.table - * * https://www.googleapis.com/auth/bigtable.data - * * https://www.googleapis.com/auth/devstorage.full_control - * - * Generated from protobuf field repeated string service_account_scopes = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $service_account_scopes; - /** - * The Compute Engine tags to add to all instances (see [Tagging - * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)). - * - * Generated from protobuf field repeated string tags = 4; - */ - private $tags; - /** - * Optional. The Compute Engine metadata entries to add to all instances (see - * [Project and instance - * metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)). - * - * Generated from protobuf field map metadata = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $metadata; - /** - * Optional. Reservation Affinity for consuming Zonal reservation. - * - * Generated from protobuf field .google.cloud.dataproc.v1.ReservationAffinity reservation_affinity = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $reservation_affinity = null; - /** - * Optional. Node Group Affinity for sole-tenant clusters. - * - * Generated from protobuf field .google.cloud.dataproc.v1.NodeGroupAffinity node_group_affinity = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $node_group_affinity = null; - /** - * Optional. Shielded Instance Config for clusters using [Compute Engine - * Shielded - * VMs](https://cloud.google.com/security/shielded-cloud/shielded-vm). - * - * Generated from protobuf field .google.cloud.dataproc.v1.ShieldedInstanceConfig shielded_instance_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $shielded_instance_config = null; - /** - * Optional. Confidential Instance Config for clusters using [Confidential - * VMs](https://cloud.google.com/compute/confidential-vm/docs). - * - * Generated from protobuf field .google.cloud.dataproc.v1.ConfidentialInstanceConfig confidential_instance_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $confidential_instance_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $zone_uri - * Optional. The Compute Engine zone where the Dataproc cluster will be - * located. If omitted, the service will pick a zone in the cluster's Compute - * Engine region. On a get request, zone will always be present. - * A full URL, partial URI, or short name are valid. Examples: - * * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]` - * * `projects/[project_id]/zones/[zone]` - * * `[zone]` - * @type string $network_uri - * Optional. The Compute Engine network to be used for machine - * communications. Cannot be specified with subnetwork_uri. If neither - * `network_uri` nor `subnetwork_uri` is specified, the "default" network of - * the project is used, if it exists. Cannot be a "Custom Subnet Network" (see - * [Using Subnetworks](https://cloud.google.com/compute/docs/subnetworks) for - * more information). - * A full URL, partial URI, or short name are valid. Examples: - * * `https://www.googleapis.com/compute/v1/projects/[project_id]/global/networks/default` - * * `projects/[project_id]/global/networks/default` - * * `default` - * @type string $subnetwork_uri - * Optional. The Compute Engine subnetwork to be used for machine - * communications. Cannot be specified with network_uri. - * A full URL, partial URI, or short name are valid. Examples: - * * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/[region]/subnetworks/sub0` - * * `projects/[project_id]/regions/[region]/subnetworks/sub0` - * * `sub0` - * @type bool $internal_ip_only - * Optional. If true, all instances in the cluster will only have internal IP - * addresses. By default, clusters are not restricted to internal IP - * addresses, and will have ephemeral external IP addresses assigned to each - * instance. This `internal_ip_only` restriction can only be enabled for - * subnetwork enabled networks, and all off-cluster dependencies must be - * configured to be accessible without external IP addresses. - * @type int $private_ipv6_google_access - * Optional. The type of IPv6 access for a cluster. - * @type string $service_account - * Optional. The [Dataproc service - * account](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/service-accounts#service_accounts_in_dataproc) - * (also see [VM Data Plane - * identity](https://cloud.google.com/dataproc/docs/concepts/iam/dataproc-principals#vm_service_account_data_plane_identity)) - * used by Dataproc cluster VM instances to access Google Cloud Platform - * services. - * If not specified, the - * [Compute Engine default service - * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) - * is used. - * @type array|\Google\Protobuf\Internal\RepeatedField $service_account_scopes - * Optional. The URIs of service account scopes to be included in - * Compute Engine instances. The following base set of scopes is always - * included: - * * https://www.googleapis.com/auth/cloud.useraccounts.readonly - * * https://www.googleapis.com/auth/devstorage.read_write - * * https://www.googleapis.com/auth/logging.write - * If no scopes are specified, the following defaults are also provided: - * * https://www.googleapis.com/auth/bigquery - * * https://www.googleapis.com/auth/bigtable.admin.table - * * https://www.googleapis.com/auth/bigtable.data - * * https://www.googleapis.com/auth/devstorage.full_control - * @type array|\Google\Protobuf\Internal\RepeatedField $tags - * The Compute Engine tags to add to all instances (see [Tagging - * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)). - * @type array|\Google\Protobuf\Internal\MapField $metadata - * Optional. The Compute Engine metadata entries to add to all instances (see - * [Project and instance - * metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)). - * @type \Google\Cloud\Dataproc\V1\ReservationAffinity $reservation_affinity - * Optional. Reservation Affinity for consuming Zonal reservation. - * @type \Google\Cloud\Dataproc\V1\NodeGroupAffinity $node_group_affinity - * Optional. Node Group Affinity for sole-tenant clusters. - * @type \Google\Cloud\Dataproc\V1\ShieldedInstanceConfig $shielded_instance_config - * Optional. Shielded Instance Config for clusters using [Compute Engine - * Shielded - * VMs](https://cloud.google.com/security/shielded-cloud/shielded-vm). - * @type \Google\Cloud\Dataproc\V1\ConfidentialInstanceConfig $confidential_instance_config - * Optional. Confidential Instance Config for clusters using [Confidential - * VMs](https://cloud.google.com/compute/confidential-vm/docs). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Clusters::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The Compute Engine zone where the Dataproc cluster will be - * located. If omitted, the service will pick a zone in the cluster's Compute - * Engine region. On a get request, zone will always be present. - * A full URL, partial URI, or short name are valid. Examples: - * * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]` - * * `projects/[project_id]/zones/[zone]` - * * `[zone]` - * - * Generated from protobuf field string zone_uri = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getZoneUri() - { - return $this->zone_uri; - } - - /** - * Optional. The Compute Engine zone where the Dataproc cluster will be - * located. If omitted, the service will pick a zone in the cluster's Compute - * Engine region. On a get request, zone will always be present. - * A full URL, partial URI, or short name are valid. Examples: - * * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]` - * * `projects/[project_id]/zones/[zone]` - * * `[zone]` - * - * Generated from protobuf field string zone_uri = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setZoneUri($var) - { - GPBUtil::checkString($var, True); - $this->zone_uri = $var; - - return $this; - } - - /** - * Optional. The Compute Engine network to be used for machine - * communications. Cannot be specified with subnetwork_uri. If neither - * `network_uri` nor `subnetwork_uri` is specified, the "default" network of - * the project is used, if it exists. Cannot be a "Custom Subnet Network" (see - * [Using Subnetworks](https://cloud.google.com/compute/docs/subnetworks) for - * more information). - * A full URL, partial URI, or short name are valid. Examples: - * * `https://www.googleapis.com/compute/v1/projects/[project_id]/global/networks/default` - * * `projects/[project_id]/global/networks/default` - * * `default` - * - * Generated from protobuf field string network_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getNetworkUri() - { - return $this->network_uri; - } - - /** - * Optional. The Compute Engine network to be used for machine - * communications. Cannot be specified with subnetwork_uri. If neither - * `network_uri` nor `subnetwork_uri` is specified, the "default" network of - * the project is used, if it exists. Cannot be a "Custom Subnet Network" (see - * [Using Subnetworks](https://cloud.google.com/compute/docs/subnetworks) for - * more information). - * A full URL, partial URI, or short name are valid. Examples: - * * `https://www.googleapis.com/compute/v1/projects/[project_id]/global/networks/default` - * * `projects/[project_id]/global/networks/default` - * * `default` - * - * Generated from protobuf field string network_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setNetworkUri($var) - { - GPBUtil::checkString($var, True); - $this->network_uri = $var; - - return $this; - } - - /** - * Optional. The Compute Engine subnetwork to be used for machine - * communications. Cannot be specified with network_uri. - * A full URL, partial URI, or short name are valid. Examples: - * * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/[region]/subnetworks/sub0` - * * `projects/[project_id]/regions/[region]/subnetworks/sub0` - * * `sub0` - * - * Generated from protobuf field string subnetwork_uri = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getSubnetworkUri() - { - return $this->subnetwork_uri; - } - - /** - * Optional. The Compute Engine subnetwork to be used for machine - * communications. Cannot be specified with network_uri. - * A full URL, partial URI, or short name are valid. Examples: - * * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/[region]/subnetworks/sub0` - * * `projects/[project_id]/regions/[region]/subnetworks/sub0` - * * `sub0` - * - * Generated from protobuf field string subnetwork_uri = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setSubnetworkUri($var) - { - GPBUtil::checkString($var, True); - $this->subnetwork_uri = $var; - - return $this; - } - - /** - * Optional. If true, all instances in the cluster will only have internal IP - * addresses. By default, clusters are not restricted to internal IP - * addresses, and will have ephemeral external IP addresses assigned to each - * instance. This `internal_ip_only` restriction can only be enabled for - * subnetwork enabled networks, and all off-cluster dependencies must be - * configured to be accessible without external IP addresses. - * - * Generated from protobuf field optional bool internal_ip_only = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getInternalIpOnly() - { - return isset($this->internal_ip_only) ? $this->internal_ip_only : false; - } - - public function hasInternalIpOnly() - { - return isset($this->internal_ip_only); - } - - public function clearInternalIpOnly() - { - unset($this->internal_ip_only); - } - - /** - * Optional. If true, all instances in the cluster will only have internal IP - * addresses. By default, clusters are not restricted to internal IP - * addresses, and will have ephemeral external IP addresses assigned to each - * instance. This `internal_ip_only` restriction can only be enabled for - * subnetwork enabled networks, and all off-cluster dependencies must be - * configured to be accessible without external IP addresses. - * - * Generated from protobuf field optional bool internal_ip_only = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setInternalIpOnly($var) - { - GPBUtil::checkBool($var); - $this->internal_ip_only = $var; - - return $this; - } - - /** - * Optional. The type of IPv6 access for a cluster. - * - * Generated from protobuf field .google.cloud.dataproc.v1.GceClusterConfig.PrivateIpv6GoogleAccess private_ipv6_google_access = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPrivateIpv6GoogleAccess() - { - return $this->private_ipv6_google_access; - } - - /** - * Optional. The type of IPv6 access for a cluster. - * - * Generated from protobuf field .google.cloud.dataproc.v1.GceClusterConfig.PrivateIpv6GoogleAccess private_ipv6_google_access = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPrivateIpv6GoogleAccess($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataproc\V1\GceClusterConfig\PrivateIpv6GoogleAccess::class); - $this->private_ipv6_google_access = $var; - - return $this; - } - - /** - * Optional. The [Dataproc service - * account](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/service-accounts#service_accounts_in_dataproc) - * (also see [VM Data Plane - * identity](https://cloud.google.com/dataproc/docs/concepts/iam/dataproc-principals#vm_service_account_data_plane_identity)) - * used by Dataproc cluster VM instances to access Google Cloud Platform - * services. - * If not specified, the - * [Compute Engine default service - * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) - * is used. - * - * Generated from protobuf field string service_account = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getServiceAccount() - { - return $this->service_account; - } - - /** - * Optional. The [Dataproc service - * account](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/service-accounts#service_accounts_in_dataproc) - * (also see [VM Data Plane - * identity](https://cloud.google.com/dataproc/docs/concepts/iam/dataproc-principals#vm_service_account_data_plane_identity)) - * used by Dataproc cluster VM instances to access Google Cloud Platform - * services. - * If not specified, the - * [Compute Engine default service - * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) - * is used. - * - * Generated from protobuf field string service_account = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setServiceAccount($var) - { - GPBUtil::checkString($var, True); - $this->service_account = $var; - - return $this; - } - - /** - * Optional. The URIs of service account scopes to be included in - * Compute Engine instances. The following base set of scopes is always - * included: - * * https://www.googleapis.com/auth/cloud.useraccounts.readonly - * * https://www.googleapis.com/auth/devstorage.read_write - * * https://www.googleapis.com/auth/logging.write - * If no scopes are specified, the following defaults are also provided: - * * https://www.googleapis.com/auth/bigquery - * * https://www.googleapis.com/auth/bigtable.admin.table - * * https://www.googleapis.com/auth/bigtable.data - * * https://www.googleapis.com/auth/devstorage.full_control - * - * Generated from protobuf field repeated string service_account_scopes = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getServiceAccountScopes() - { - return $this->service_account_scopes; - } - - /** - * Optional. The URIs of service account scopes to be included in - * Compute Engine instances. The following base set of scopes is always - * included: - * * https://www.googleapis.com/auth/cloud.useraccounts.readonly - * * https://www.googleapis.com/auth/devstorage.read_write - * * https://www.googleapis.com/auth/logging.write - * If no scopes are specified, the following defaults are also provided: - * * https://www.googleapis.com/auth/bigquery - * * https://www.googleapis.com/auth/bigtable.admin.table - * * https://www.googleapis.com/auth/bigtable.data - * * https://www.googleapis.com/auth/devstorage.full_control - * - * Generated from protobuf field repeated string service_account_scopes = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setServiceAccountScopes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->service_account_scopes = $arr; - - return $this; - } - - /** - * The Compute Engine tags to add to all instances (see [Tagging - * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)). - * - * Generated from protobuf field repeated string tags = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTags() - { - return $this->tags; - } - - /** - * The Compute Engine tags to add to all instances (see [Tagging - * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)). - * - * Generated from protobuf field repeated string tags = 4; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTags($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->tags = $arr; - - return $this; - } - - /** - * Optional. The Compute Engine metadata entries to add to all instances (see - * [Project and instance - * metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)). - * - * Generated from protobuf field map metadata = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getMetadata() - { - return $this->metadata; - } - - /** - * Optional. The Compute Engine metadata entries to add to all instances (see - * [Project and instance - * metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)). - * - * Generated from protobuf field map metadata = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setMetadata($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->metadata = $arr; - - return $this; - } - - /** - * Optional. Reservation Affinity for consuming Zonal reservation. - * - * Generated from protobuf field .google.cloud.dataproc.v1.ReservationAffinity reservation_affinity = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\ReservationAffinity|null - */ - public function getReservationAffinity() - { - return $this->reservation_affinity; - } - - public function hasReservationAffinity() - { - return isset($this->reservation_affinity); - } - - public function clearReservationAffinity() - { - unset($this->reservation_affinity); - } - - /** - * Optional. Reservation Affinity for consuming Zonal reservation. - * - * Generated from protobuf field .google.cloud.dataproc.v1.ReservationAffinity reservation_affinity = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\ReservationAffinity $var - * @return $this - */ - public function setReservationAffinity($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\ReservationAffinity::class); - $this->reservation_affinity = $var; - - return $this; - } - - /** - * Optional. Node Group Affinity for sole-tenant clusters. - * - * Generated from protobuf field .google.cloud.dataproc.v1.NodeGroupAffinity node_group_affinity = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\NodeGroupAffinity|null - */ - public function getNodeGroupAffinity() - { - return $this->node_group_affinity; - } - - public function hasNodeGroupAffinity() - { - return isset($this->node_group_affinity); - } - - public function clearNodeGroupAffinity() - { - unset($this->node_group_affinity); - } - - /** - * Optional. Node Group Affinity for sole-tenant clusters. - * - * Generated from protobuf field .google.cloud.dataproc.v1.NodeGroupAffinity node_group_affinity = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\NodeGroupAffinity $var - * @return $this - */ - public function setNodeGroupAffinity($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\NodeGroupAffinity::class); - $this->node_group_affinity = $var; - - return $this; - } - - /** - * Optional. Shielded Instance Config for clusters using [Compute Engine - * Shielded - * VMs](https://cloud.google.com/security/shielded-cloud/shielded-vm). - * - * Generated from protobuf field .google.cloud.dataproc.v1.ShieldedInstanceConfig shielded_instance_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\ShieldedInstanceConfig|null - */ - public function getShieldedInstanceConfig() - { - return $this->shielded_instance_config; - } - - public function hasShieldedInstanceConfig() - { - return isset($this->shielded_instance_config); - } - - public function clearShieldedInstanceConfig() - { - unset($this->shielded_instance_config); - } - - /** - * Optional. Shielded Instance Config for clusters using [Compute Engine - * Shielded - * VMs](https://cloud.google.com/security/shielded-cloud/shielded-vm). - * - * Generated from protobuf field .google.cloud.dataproc.v1.ShieldedInstanceConfig shielded_instance_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\ShieldedInstanceConfig $var - * @return $this - */ - public function setShieldedInstanceConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\ShieldedInstanceConfig::class); - $this->shielded_instance_config = $var; - - return $this; - } - - /** - * Optional. Confidential Instance Config for clusters using [Confidential - * VMs](https://cloud.google.com/compute/confidential-vm/docs). - * - * Generated from protobuf field .google.cloud.dataproc.v1.ConfidentialInstanceConfig confidential_instance_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\ConfidentialInstanceConfig|null - */ - public function getConfidentialInstanceConfig() - { - return $this->confidential_instance_config; - } - - public function hasConfidentialInstanceConfig() - { - return isset($this->confidential_instance_config); - } - - public function clearConfidentialInstanceConfig() - { - unset($this->confidential_instance_config); - } - - /** - * Optional. Confidential Instance Config for clusters using [Confidential - * VMs](https://cloud.google.com/compute/confidential-vm/docs). - * - * Generated from protobuf field .google.cloud.dataproc.v1.ConfidentialInstanceConfig confidential_instance_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\ConfidentialInstanceConfig $var - * @return $this - */ - public function setConfidentialInstanceConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\ConfidentialInstanceConfig::class); - $this->confidential_instance_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GceClusterConfig/PrivateIpv6GoogleAccess.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GceClusterConfig/PrivateIpv6GoogleAccess.php deleted file mode 100644 index 5299b26dbe1..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GceClusterConfig/PrivateIpv6GoogleAccess.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.dataproc.v1.GceClusterConfig.PrivateIpv6GoogleAccess - */ -class PrivateIpv6GoogleAccess -{ - /** - * If unspecified, Compute Engine default behavior will apply, which - * is the same as - * [INHERIT_FROM_SUBNETWORK][google.cloud.dataproc.v1.GceClusterConfig.PrivateIpv6GoogleAccess.INHERIT_FROM_SUBNETWORK]. - * - * Generated from protobuf enum PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED = 0; - */ - const PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED = 0; - /** - * Private access to and from Google Services configuration - * inherited from the subnetwork configuration. This is the - * default Compute Engine behavior. - * - * Generated from protobuf enum INHERIT_FROM_SUBNETWORK = 1; - */ - const INHERIT_FROM_SUBNETWORK = 1; - /** - * Enables outbound private IPv6 access to Google Services from the Dataproc - * cluster. - * - * Generated from protobuf enum OUTBOUND = 2; - */ - const OUTBOUND = 2; - /** - * Enables bidirectional private IPv6 access between Google Services and the - * Dataproc cluster. - * - * Generated from protobuf enum BIDIRECTIONAL = 3; - */ - const BIDIRECTIONAL = 3; - - private static $valueToName = [ - self::PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED => 'PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED', - self::INHERIT_FROM_SUBNETWORK => 'INHERIT_FROM_SUBNETWORK', - self::OUTBOUND => 'OUTBOUND', - self::BIDIRECTIONAL => 'BIDIRECTIONAL', - ]; - - 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(PrivateIpv6GoogleAccess::class, \Google\Cloud\Dataproc\V1\GceClusterConfig_PrivateIpv6GoogleAccess::class); - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GetAutoscalingPolicyRequest.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GetAutoscalingPolicyRequest.php deleted file mode 100644 index bd24daba758..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GetAutoscalingPolicyRequest.php +++ /dev/null @@ -1,118 +0,0 @@ -google.cloud.dataproc.v1.GetAutoscalingPolicyRequest - */ -class GetAutoscalingPolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The "resource name" of the autoscaling policy, as described - * in https://cloud.google.com/apis/design/resource_names. - * * For `projects.regions.autoscalingPolicies.get`, the resource name - * of the policy has the following format: - * `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}` - * * For `projects.locations.autoscalingPolicies.get`, the resource name - * of the policy has the following format: - * `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The "resource name" of the autoscaling policy, as described - * in https://cloud.google.com/apis/design/resource_names. - * - * * For `projects.regions.autoscalingPolicies.get`, the resource name - * of the policy has the following format: - * `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}` - * - * * For `projects.locations.autoscalingPolicies.get`, the resource name - * of the policy has the following format: - * `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}` - * Please see {@see AutoscalingPolicyServiceClient::autoscalingPolicyName()} for help formatting this field. - * - * @return \Google\Cloud\Dataproc\V1\GetAutoscalingPolicyRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The "resource name" of the autoscaling policy, as described - * in https://cloud.google.com/apis/design/resource_names. - * * For `projects.regions.autoscalingPolicies.get`, the resource name - * of the policy has the following format: - * `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}` - * * For `projects.locations.autoscalingPolicies.get`, the resource name - * of the policy has the following format: - * `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\AutoscalingPolicies::initOnce(); - parent::__construct($data); - } - - /** - * Required. The "resource name" of the autoscaling policy, as described - * in https://cloud.google.com/apis/design/resource_names. - * * For `projects.regions.autoscalingPolicies.get`, the resource name - * of the policy has the following format: - * `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}` - * * For `projects.locations.autoscalingPolicies.get`, the resource name - * of the policy has the following format: - * `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The "resource name" of the autoscaling policy, as described - * in https://cloud.google.com/apis/design/resource_names. - * * For `projects.regions.autoscalingPolicies.get`, the resource name - * of the policy has the following format: - * `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}` - * * For `projects.locations.autoscalingPolicies.get`, the resource name - * of the policy has the following format: - * `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GetBatchRequest.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GetBatchRequest.php deleted file mode 100644 index 539e529523b..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GetBatchRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.dataproc.v1.GetBatchRequest - */ -class GetBatchRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The fully qualified name of the batch to retrieve - * in the format - * "projects/PROJECT_ID/locations/DATAPROC_REGION/batches/BATCH_ID" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The fully qualified name of the batch to retrieve - * in the format - * "projects/PROJECT_ID/locations/DATAPROC_REGION/batches/BATCH_ID" - * Please see {@see BatchControllerClient::batchName()} for help formatting this field. - * - * @return \Google\Cloud\Dataproc\V1\GetBatchRequest - * - * @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 fully qualified name of the batch to retrieve - * in the format - * "projects/PROJECT_ID/locations/DATAPROC_REGION/batches/BATCH_ID" - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Batches::initOnce(); - parent::__construct($data); - } - - /** - * Required. The fully qualified name of the batch to retrieve - * in the format - * "projects/PROJECT_ID/locations/DATAPROC_REGION/batches/BATCH_ID" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The fully qualified name of the batch to retrieve - * in the format - * "projects/PROJECT_ID/locations/DATAPROC_REGION/batches/BATCH_ID" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GetClusterRequest.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GetClusterRequest.php deleted file mode 100644 index 987be48cf26..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GetClusterRequest.php +++ /dev/null @@ -1,157 +0,0 @@ -google.cloud.dataproc.v1.GetClusterRequest - */ -class GetClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The ID of the Google Cloud Platform project that the cluster - * belongs to. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $project_id = ''; - /** - * Required. The Dataproc region in which to handle the request. - * - * Generated from protobuf field string region = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $region = ''; - /** - * Required. The cluster name. - * - * Generated from protobuf field string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $cluster_name = ''; - - /** - * @param string $projectId Required. The ID of the Google Cloud Platform project that the cluster - * belongs to. - * @param string $region Required. The Dataproc region in which to handle the request. - * @param string $clusterName Required. The cluster name. - * - * @return \Google\Cloud\Dataproc\V1\GetClusterRequest - * - * @experimental - */ - public static function build(string $projectId, string $region, string $clusterName): self - { - return (new self()) - ->setProjectId($projectId) - ->setRegion($region) - ->setClusterName($clusterName); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $project_id - * Required. The ID of the Google Cloud Platform project that the cluster - * belongs to. - * @type string $region - * Required. The Dataproc region in which to handle the request. - * @type string $cluster_name - * Required. The cluster name. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Clusters::initOnce(); - parent::__construct($data); - } - - /** - * Required. The ID of the Google Cloud Platform project that the cluster - * belongs to. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * Required. The ID of the Google Cloud Platform project that the cluster - * belongs to. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - - /** - * Required. The Dataproc region in which to handle the request. - * - * Generated from protobuf field string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getRegion() - { - return $this->region; - } - - /** - * Required. The Dataproc region in which to handle the request. - * - * Generated from protobuf field string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setRegion($var) - { - GPBUtil::checkString($var, True); - $this->region = $var; - - return $this; - } - - /** - * Required. The cluster name. - * - * Generated from protobuf field string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getClusterName() - { - return $this->cluster_name; - } - - /** - * Required. The cluster name. - * - * Generated from protobuf field string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setClusterName($var) - { - GPBUtil::checkString($var, True); - $this->cluster_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GetJobRequest.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GetJobRequest.php deleted file mode 100644 index 80b65f8ad5d..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GetJobRequest.php +++ /dev/null @@ -1,157 +0,0 @@ -google.cloud.dataproc.v1.GetJobRequest - */ -class GetJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The ID of the Google Cloud Platform project that the job - * belongs to. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $project_id = ''; - /** - * Required. The Dataproc region in which to handle the request. - * - * Generated from protobuf field string region = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $region = ''; - /** - * Required. The job ID. - * - * Generated from protobuf field string job_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $job_id = ''; - - /** - * @param string $projectId Required. The ID of the Google Cloud Platform project that the job - * belongs to. - * @param string $region Required. The Dataproc region in which to handle the request. - * @param string $jobId Required. The job ID. - * - * @return \Google\Cloud\Dataproc\V1\GetJobRequest - * - * @experimental - */ - public static function build(string $projectId, string $region, string $jobId): self - { - return (new self()) - ->setProjectId($projectId) - ->setRegion($region) - ->setJobId($jobId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $project_id - * Required. The ID of the Google Cloud Platform project that the job - * belongs to. - * @type string $region - * Required. The Dataproc region in which to handle the request. - * @type string $job_id - * Required. The job ID. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Jobs::initOnce(); - parent::__construct($data); - } - - /** - * Required. The ID of the Google Cloud Platform project that the job - * belongs to. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * Required. The ID of the Google Cloud Platform project that the job - * belongs to. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - - /** - * Required. The Dataproc region in which to handle the request. - * - * Generated from protobuf field string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getRegion() - { - return $this->region; - } - - /** - * Required. The Dataproc region in which to handle the request. - * - * Generated from protobuf field string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setRegion($var) - { - GPBUtil::checkString($var, True); - $this->region = $var; - - return $this; - } - - /** - * Required. The job ID. - * - * Generated from protobuf field string job_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getJobId() - { - return $this->job_id; - } - - /** - * Required. The job ID. - * - * Generated from protobuf field string job_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setJobId($var) - { - GPBUtil::checkString($var, True); - $this->job_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GetNodeGroupRequest.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GetNodeGroupRequest.php deleted file mode 100644 index d2cb6179dbc..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GetNodeGroupRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.dataproc.v1.GetNodeGroupRequest - */ -class GetNodeGroupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the node group to retrieve. - * Format: - * `projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{nodeGroup}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the node group to retrieve. - * Format: - * `projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{nodeGroup}` - * Please see {@see NodeGroupControllerClient::nodeGroupName()} for help formatting this field. - * - * @return \Google\Cloud\Dataproc\V1\GetNodeGroupRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the node group to retrieve. - * Format: - * `projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{nodeGroup}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\NodeGroups::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the node group to retrieve. - * Format: - * `projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{nodeGroup}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the node group to retrieve. - * Format: - * `projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{nodeGroup}` - * - * 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/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GetWorkflowTemplateRequest.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GetWorkflowTemplateRequest.php deleted file mode 100644 index 3206da40630..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GetWorkflowTemplateRequest.php +++ /dev/null @@ -1,160 +0,0 @@ -google.cloud.dataproc.v1.GetWorkflowTemplateRequest - */ -class GetWorkflowTemplateRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the workflow template, as described - * in https://cloud.google.com/apis/design/resource_names. - * * For `projects.regions.workflowTemplates.get`, the resource name of the - * template has the following format: - * `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}` - * * For `projects.locations.workflowTemplates.get`, the resource name of the - * template has the following format: - * `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. The version of workflow template to retrieve. Only previously - * instantiated versions can be retrieved. - * If unspecified, retrieves the current version. - * - * Generated from protobuf field int32 version = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $version = 0; - - /** - * @param string $name Required. The resource name of the workflow template, as described - * in https://cloud.google.com/apis/design/resource_names. - * - * * For `projects.regions.workflowTemplates.get`, the resource name of the - * template has the following format: - * `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}` - * - * * For `projects.locations.workflowTemplates.get`, the resource name of the - * template has the following format: - * `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}` - * Please see {@see WorkflowTemplateServiceClient::workflowTemplateName()} for help formatting this field. - * - * @return \Google\Cloud\Dataproc\V1\GetWorkflowTemplateRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the workflow template, as described - * in https://cloud.google.com/apis/design/resource_names. - * * For `projects.regions.workflowTemplates.get`, the resource name of the - * template has the following format: - * `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}` - * * For `projects.locations.workflowTemplates.get`, the resource name of the - * template has the following format: - * `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}` - * @type int $version - * Optional. The version of workflow template to retrieve. Only previously - * instantiated versions can be retrieved. - * If unspecified, retrieves the current version. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\WorkflowTemplates::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the workflow template, as described - * in https://cloud.google.com/apis/design/resource_names. - * * For `projects.regions.workflowTemplates.get`, the resource name of the - * template has the following format: - * `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}` - * * For `projects.locations.workflowTemplates.get`, the resource name of the - * template has the following format: - * `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the workflow template, as described - * in https://cloud.google.com/apis/design/resource_names. - * * For `projects.regions.workflowTemplates.get`, the resource name of the - * template has the following format: - * `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}` - * * For `projects.locations.workflowTemplates.get`, the resource name of the - * template has the following format: - * `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. The version of workflow template to retrieve. Only previously - * instantiated versions can be retrieved. - * If unspecified, retrieves the current version. - * - * Generated from protobuf field int32 version = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getVersion() - { - return $this->version; - } - - /** - * Optional. The version of workflow template to retrieve. Only previously - * instantiated versions can be retrieved. - * If unspecified, retrieves the current version. - * - * Generated from protobuf field int32 version = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkInt32($var); - $this->version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GkeClusterConfig.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GkeClusterConfig.php deleted file mode 100644 index 42bd2b4175f..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GkeClusterConfig.php +++ /dev/null @@ -1,133 +0,0 @@ -google.cloud.dataproc.v1.GkeClusterConfig - */ -class GkeClusterConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. A target GKE cluster to deploy to. It must be in the same project - * and region as the Dataproc cluster (the GKE cluster can be zonal or - * regional). Format: - * 'projects/{project}/locations/{location}/clusters/{cluster_id}' - * - * Generated from protobuf field string gke_cluster_target = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $gke_cluster_target = ''; - /** - * Optional. GKE node pools where workloads will be scheduled. At least one - * node pool must be assigned the `DEFAULT` - * [GkeNodePoolTarget.Role][google.cloud.dataproc.v1.GkeNodePoolTarget.Role]. - * If a `GkeNodePoolTarget` is not specified, Dataproc constructs a `DEFAULT` - * `GkeNodePoolTarget`. Each role can be given to only one - * `GkeNodePoolTarget`. All node pools must have the same location settings. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.GkeNodePoolTarget node_pool_target = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $node_pool_target; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $gke_cluster_target - * Optional. A target GKE cluster to deploy to. It must be in the same project - * and region as the Dataproc cluster (the GKE cluster can be zonal or - * regional). Format: - * 'projects/{project}/locations/{location}/clusters/{cluster_id}' - * @type array<\Google\Cloud\Dataproc\V1\GkeNodePoolTarget>|\Google\Protobuf\Internal\RepeatedField $node_pool_target - * Optional. GKE node pools where workloads will be scheduled. At least one - * node pool must be assigned the `DEFAULT` - * [GkeNodePoolTarget.Role][google.cloud.dataproc.v1.GkeNodePoolTarget.Role]. - * If a `GkeNodePoolTarget` is not specified, Dataproc constructs a `DEFAULT` - * `GkeNodePoolTarget`. Each role can be given to only one - * `GkeNodePoolTarget`. All node pools must have the same location settings. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Shared::initOnce(); - parent::__construct($data); - } - - /** - * Optional. A target GKE cluster to deploy to. It must be in the same project - * and region as the Dataproc cluster (the GKE cluster can be zonal or - * regional). Format: - * 'projects/{project}/locations/{location}/clusters/{cluster_id}' - * - * Generated from protobuf field string gke_cluster_target = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getGkeClusterTarget() - { - return $this->gke_cluster_target; - } - - /** - * Optional. A target GKE cluster to deploy to. It must be in the same project - * and region as the Dataproc cluster (the GKE cluster can be zonal or - * regional). Format: - * 'projects/{project}/locations/{location}/clusters/{cluster_id}' - * - * Generated from protobuf field string gke_cluster_target = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setGkeClusterTarget($var) - { - GPBUtil::checkString($var, True); - $this->gke_cluster_target = $var; - - return $this; - } - - /** - * Optional. GKE node pools where workloads will be scheduled. At least one - * node pool must be assigned the `DEFAULT` - * [GkeNodePoolTarget.Role][google.cloud.dataproc.v1.GkeNodePoolTarget.Role]. - * If a `GkeNodePoolTarget` is not specified, Dataproc constructs a `DEFAULT` - * `GkeNodePoolTarget`. Each role can be given to only one - * `GkeNodePoolTarget`. All node pools must have the same location settings. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.GkeNodePoolTarget node_pool_target = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNodePoolTarget() - { - return $this->node_pool_target; - } - - /** - * Optional. GKE node pools where workloads will be scheduled. At least one - * node pool must be assigned the `DEFAULT` - * [GkeNodePoolTarget.Role][google.cloud.dataproc.v1.GkeNodePoolTarget.Role]. - * If a `GkeNodePoolTarget` is not specified, Dataproc constructs a `DEFAULT` - * `GkeNodePoolTarget`. Each role can be given to only one - * `GkeNodePoolTarget`. All node pools must have the same location settings. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.GkeNodePoolTarget node_pool_target = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Dataproc\V1\GkeNodePoolTarget>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNodePoolTarget($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataproc\V1\GkeNodePoolTarget::class); - $this->node_pool_target = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GkeNodePoolConfig.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GkeNodePoolConfig.php deleted file mode 100644 index 590789b7e92..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GkeNodePoolConfig.php +++ /dev/null @@ -1,192 +0,0 @@ -google.cloud.dataproc.v1.GkeNodePoolConfig - */ -class GkeNodePoolConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The node pool configuration. - * - * Generated from protobuf field .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig config = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $config = null; - /** - * Optional. The list of Compute Engine - * [zones](https://cloud.google.com/compute/docs/zones#available) where - * node pool nodes associated with a Dataproc on GKE virtual cluster - * will be located. - * **Note:** All node pools associated with a virtual cluster - * must be located in the same region as the virtual cluster, and they must - * be located in the same zone within that region. - * If a location is not specified during node pool creation, Dataproc on GKE - * will choose the zone. - * - * Generated from protobuf field repeated string locations = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $locations; - /** - * Optional. The autoscaler configuration for this node pool. The autoscaler - * is enabled only when a valid configuration is present. - * - * Generated from protobuf field .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig autoscaling = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $autoscaling = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dataproc\V1\GkeNodePoolConfig\GkeNodeConfig $config - * Optional. The node pool configuration. - * @type array|\Google\Protobuf\Internal\RepeatedField $locations - * Optional. The list of Compute Engine - * [zones](https://cloud.google.com/compute/docs/zones#available) where - * node pool nodes associated with a Dataproc on GKE virtual cluster - * will be located. - * **Note:** All node pools associated with a virtual cluster - * must be located in the same region as the virtual cluster, and they must - * be located in the same zone within that region. - * If a location is not specified during node pool creation, Dataproc on GKE - * will choose the zone. - * @type \Google\Cloud\Dataproc\V1\GkeNodePoolConfig\GkeNodePoolAutoscalingConfig $autoscaling - * Optional. The autoscaler configuration for this node pool. The autoscaler - * is enabled only when a valid configuration is present. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Shared::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The node pool configuration. - * - * Generated from protobuf field .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\GkeNodePoolConfig\GkeNodeConfig|null - */ - public function getConfig() - { - return $this->config; - } - - public function hasConfig() - { - return isset($this->config); - } - - public function clearConfig() - { - unset($this->config); - } - - /** - * Optional. The node pool configuration. - * - * Generated from protobuf field .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\GkeNodePoolConfig\GkeNodeConfig $var - * @return $this - */ - public function setConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\GkeNodePoolConfig\GkeNodeConfig::class); - $this->config = $var; - - return $this; - } - - /** - * Optional. The list of Compute Engine - * [zones](https://cloud.google.com/compute/docs/zones#available) where - * node pool nodes associated with a Dataproc on GKE virtual cluster - * will be located. - * **Note:** All node pools associated with a virtual cluster - * must be located in the same region as the virtual cluster, and they must - * be located in the same zone within that region. - * If a location is not specified during node pool creation, Dataproc on GKE - * will choose the zone. - * - * Generated from protobuf field repeated string locations = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLocations() - { - return $this->locations; - } - - /** - * Optional. The list of Compute Engine - * [zones](https://cloud.google.com/compute/docs/zones#available) where - * node pool nodes associated with a Dataproc on GKE virtual cluster - * will be located. - * **Note:** All node pools associated with a virtual cluster - * must be located in the same region as the virtual cluster, and they must - * be located in the same zone within that region. - * If a location is not specified during node pool creation, Dataproc on GKE - * will choose the zone. - * - * Generated from protobuf field repeated string locations = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLocations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->locations = $arr; - - return $this; - } - - /** - * Optional. The autoscaler configuration for this node pool. The autoscaler - * is enabled only when a valid configuration is present. - * - * Generated from protobuf field .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig autoscaling = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\GkeNodePoolConfig\GkeNodePoolAutoscalingConfig|null - */ - public function getAutoscaling() - { - return $this->autoscaling; - } - - public function hasAutoscaling() - { - return isset($this->autoscaling); - } - - public function clearAutoscaling() - { - unset($this->autoscaling); - } - - /** - * Optional. The autoscaler configuration for this node pool. The autoscaler - * is enabled only when a valid configuration is present. - * - * Generated from protobuf field .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig autoscaling = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\GkeNodePoolConfig\GkeNodePoolAutoscalingConfig $var - * @return $this - */ - public function setAutoscaling($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\GkeNodePoolConfig\GkeNodePoolAutoscalingConfig::class); - $this->autoscaling = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GkeNodePoolConfig/GkeNodeConfig.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GkeNodePoolConfig/GkeNodeConfig.php deleted file mode 100644 index a3eb6f4595a..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GkeNodePoolConfig/GkeNodeConfig.php +++ /dev/null @@ -1,398 +0,0 @@ -google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig - */ -class GkeNodeConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The name of a Compute Engine [machine - * type](https://cloud.google.com/compute/docs/machine-types). - * - * Generated from protobuf field string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $machine_type = ''; - /** - * Optional. The number of local SSD disks to attach to the node, which is - * limited by the maximum number of disks allowable per zone (see [Adding - * Local SSDs](https://cloud.google.com/compute/docs/disks/local-ssd)). - * - * Generated from protobuf field int32 local_ssd_count = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $local_ssd_count = 0; - /** - * Optional. Whether the nodes are created as legacy [preemptible VM - * instances] (https://cloud.google.com/compute/docs/instances/preemptible). - * Also see - * [Spot][google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig.spot] - * VMs, preemptible VM instances without a maximum lifetime. Legacy and Spot - * preemptible nodes cannot be used in a node pool with the `CONTROLLER` - * [role] - * (/dataproc/docs/reference/rest/v1/projects.regions.clusters#role) - * or in the DEFAULT node pool if the CONTROLLER role is not assigned (the - * DEFAULT node pool will assume the CONTROLLER role). - * - * Generated from protobuf field bool preemptible = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $preemptible = false; - /** - * Optional. A list of [hardware - * accelerators](https://cloud.google.com/compute/docs/gpus) to attach to - * each node. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig accelerators = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $accelerators; - /** - * Optional. [Minimum CPU - * platform](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform) - * to be used by this instance. The instance may be scheduled on the - * specified or a newer CPU platform. Specify the friendly names of CPU - * platforms, such as "Intel Haswell"` or Intel Sandy Bridge". - * - * Generated from protobuf field string min_cpu_platform = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $min_cpu_platform = ''; - /** - * Optional. The [Customer Managed Encryption Key (CMEK)] - * (https://cloud.google.com/kubernetes-engine/docs/how-to/using-cmek) - * used to encrypt the boot disk attached to each node in the node pool. - * Specify the key using the following format: - * projects/KEY_PROJECT_ID/locations/LOCATION/keyRings/RING_NAME/cryptoKeys/KEY_NAME. - * - * Generated from protobuf field string boot_disk_kms_key = 23 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $boot_disk_kms_key = ''; - /** - * Optional. Whether the nodes are created as [Spot VM instances] - * (https://cloud.google.com/compute/docs/instances/spot). - * Spot VMs are the latest update to legacy - * [preemptible - * VMs][google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig.preemptible]. - * Spot VMs do not have a maximum lifetime. Legacy and Spot preemptible - * nodes cannot be used in a node pool with the `CONTROLLER` - * [role](/dataproc/docs/reference/rest/v1/projects.regions.clusters#role) - * or in the DEFAULT node pool if the CONTROLLER role is not assigned (the - * DEFAULT node pool will assume the CONTROLLER role). - * - * Generated from protobuf field bool spot = 32 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $spot = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $machine_type - * Optional. The name of a Compute Engine [machine - * type](https://cloud.google.com/compute/docs/machine-types). - * @type int $local_ssd_count - * Optional. The number of local SSD disks to attach to the node, which is - * limited by the maximum number of disks allowable per zone (see [Adding - * Local SSDs](https://cloud.google.com/compute/docs/disks/local-ssd)). - * @type bool $preemptible - * Optional. Whether the nodes are created as legacy [preemptible VM - * instances] (https://cloud.google.com/compute/docs/instances/preemptible). - * Also see - * [Spot][google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig.spot] - * VMs, preemptible VM instances without a maximum lifetime. Legacy and Spot - * preemptible nodes cannot be used in a node pool with the `CONTROLLER` - * [role] - * (/dataproc/docs/reference/rest/v1/projects.regions.clusters#role) - * or in the DEFAULT node pool if the CONTROLLER role is not assigned (the - * DEFAULT node pool will assume the CONTROLLER role). - * @type array<\Google\Cloud\Dataproc\V1\GkeNodePoolConfig\GkeNodePoolAcceleratorConfig>|\Google\Protobuf\Internal\RepeatedField $accelerators - * Optional. A list of [hardware - * accelerators](https://cloud.google.com/compute/docs/gpus) to attach to - * each node. - * @type string $min_cpu_platform - * Optional. [Minimum CPU - * platform](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform) - * to be used by this instance. The instance may be scheduled on the - * specified or a newer CPU platform. Specify the friendly names of CPU - * platforms, such as "Intel Haswell"` or Intel Sandy Bridge". - * @type string $boot_disk_kms_key - * Optional. The [Customer Managed Encryption Key (CMEK)] - * (https://cloud.google.com/kubernetes-engine/docs/how-to/using-cmek) - * used to encrypt the boot disk attached to each node in the node pool. - * Specify the key using the following format: - * projects/KEY_PROJECT_ID/locations/LOCATION/keyRings/RING_NAME/cryptoKeys/KEY_NAME. - * @type bool $spot - * Optional. Whether the nodes are created as [Spot VM instances] - * (https://cloud.google.com/compute/docs/instances/spot). - * Spot VMs are the latest update to legacy - * [preemptible - * VMs][google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig.preemptible]. - * Spot VMs do not have a maximum lifetime. Legacy and Spot preemptible - * nodes cannot be used in a node pool with the `CONTROLLER` - * [role](/dataproc/docs/reference/rest/v1/projects.regions.clusters#role) - * or in the DEFAULT node pool if the CONTROLLER role is not assigned (the - * DEFAULT node pool will assume the CONTROLLER role). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Shared::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The name of a Compute Engine [machine - * type](https://cloud.google.com/compute/docs/machine-types). - * - * Generated from protobuf field string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getMachineType() - { - return $this->machine_type; - } - - /** - * Optional. The name of a Compute Engine [machine - * type](https://cloud.google.com/compute/docs/machine-types). - * - * Generated from protobuf field string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setMachineType($var) - { - GPBUtil::checkString($var, True); - $this->machine_type = $var; - - return $this; - } - - /** - * Optional. The number of local SSD disks to attach to the node, which is - * limited by the maximum number of disks allowable per zone (see [Adding - * Local SSDs](https://cloud.google.com/compute/docs/disks/local-ssd)). - * - * Generated from protobuf field int32 local_ssd_count = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getLocalSsdCount() - { - return $this->local_ssd_count; - } - - /** - * Optional. The number of local SSD disks to attach to the node, which is - * limited by the maximum number of disks allowable per zone (see [Adding - * Local SSDs](https://cloud.google.com/compute/docs/disks/local-ssd)). - * - * Generated from protobuf field int32 local_ssd_count = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setLocalSsdCount($var) - { - GPBUtil::checkInt32($var); - $this->local_ssd_count = $var; - - return $this; - } - - /** - * Optional. Whether the nodes are created as legacy [preemptible VM - * instances] (https://cloud.google.com/compute/docs/instances/preemptible). - * Also see - * [Spot][google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig.spot] - * VMs, preemptible VM instances without a maximum lifetime. Legacy and Spot - * preemptible nodes cannot be used in a node pool with the `CONTROLLER` - * [role] - * (/dataproc/docs/reference/rest/v1/projects.regions.clusters#role) - * or in the DEFAULT node pool if the CONTROLLER role is not assigned (the - * DEFAULT node pool will assume the CONTROLLER role). - * - * Generated from protobuf field bool preemptible = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getPreemptible() - { - return $this->preemptible; - } - - /** - * Optional. Whether the nodes are created as legacy [preemptible VM - * instances] (https://cloud.google.com/compute/docs/instances/preemptible). - * Also see - * [Spot][google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig.spot] - * VMs, preemptible VM instances without a maximum lifetime. Legacy and Spot - * preemptible nodes cannot be used in a node pool with the `CONTROLLER` - * [role] - * (/dataproc/docs/reference/rest/v1/projects.regions.clusters#role) - * or in the DEFAULT node pool if the CONTROLLER role is not assigned (the - * DEFAULT node pool will assume the CONTROLLER role). - * - * Generated from protobuf field bool preemptible = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setPreemptible($var) - { - GPBUtil::checkBool($var); - $this->preemptible = $var; - - return $this; - } - - /** - * Optional. A list of [hardware - * accelerators](https://cloud.google.com/compute/docs/gpus) to attach to - * each node. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig accelerators = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAccelerators() - { - return $this->accelerators; - } - - /** - * Optional. A list of [hardware - * accelerators](https://cloud.google.com/compute/docs/gpus) to attach to - * each node. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig accelerators = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Dataproc\V1\GkeNodePoolConfig\GkeNodePoolAcceleratorConfig>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAccelerators($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataproc\V1\GkeNodePoolConfig\GkeNodePoolAcceleratorConfig::class); - $this->accelerators = $arr; - - return $this; - } - - /** - * Optional. [Minimum CPU - * platform](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform) - * to be used by this instance. The instance may be scheduled on the - * specified or a newer CPU platform. Specify the friendly names of CPU - * platforms, such as "Intel Haswell"` or Intel Sandy Bridge". - * - * Generated from protobuf field string min_cpu_platform = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getMinCpuPlatform() - { - return $this->min_cpu_platform; - } - - /** - * Optional. [Minimum CPU - * platform](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform) - * to be used by this instance. The instance may be scheduled on the - * specified or a newer CPU platform. Specify the friendly names of CPU - * platforms, such as "Intel Haswell"` or Intel Sandy Bridge". - * - * Generated from protobuf field string min_cpu_platform = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setMinCpuPlatform($var) - { - GPBUtil::checkString($var, True); - $this->min_cpu_platform = $var; - - return $this; - } - - /** - * Optional. The [Customer Managed Encryption Key (CMEK)] - * (https://cloud.google.com/kubernetes-engine/docs/how-to/using-cmek) - * used to encrypt the boot disk attached to each node in the node pool. - * Specify the key using the following format: - * projects/KEY_PROJECT_ID/locations/LOCATION/keyRings/RING_NAME/cryptoKeys/KEY_NAME. - * - * Generated from protobuf field string boot_disk_kms_key = 23 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getBootDiskKmsKey() - { - return $this->boot_disk_kms_key; - } - - /** - * Optional. The [Customer Managed Encryption Key (CMEK)] - * (https://cloud.google.com/kubernetes-engine/docs/how-to/using-cmek) - * used to encrypt the boot disk attached to each node in the node pool. - * Specify the key using the following format: - * projects/KEY_PROJECT_ID/locations/LOCATION/keyRings/RING_NAME/cryptoKeys/KEY_NAME. - * - * Generated from protobuf field string boot_disk_kms_key = 23 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setBootDiskKmsKey($var) - { - GPBUtil::checkString($var, True); - $this->boot_disk_kms_key = $var; - - return $this; - } - - /** - * Optional. Whether the nodes are created as [Spot VM instances] - * (https://cloud.google.com/compute/docs/instances/spot). - * Spot VMs are the latest update to legacy - * [preemptible - * VMs][google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig.preemptible]. - * Spot VMs do not have a maximum lifetime. Legacy and Spot preemptible - * nodes cannot be used in a node pool with the `CONTROLLER` - * [role](/dataproc/docs/reference/rest/v1/projects.regions.clusters#role) - * or in the DEFAULT node pool if the CONTROLLER role is not assigned (the - * DEFAULT node pool will assume the CONTROLLER role). - * - * Generated from protobuf field bool spot = 32 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getSpot() - { - return $this->spot; - } - - /** - * Optional. Whether the nodes are created as [Spot VM instances] - * (https://cloud.google.com/compute/docs/instances/spot). - * Spot VMs are the latest update to legacy - * [preemptible - * VMs][google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig.preemptible]. - * Spot VMs do not have a maximum lifetime. Legacy and Spot preemptible - * nodes cannot be used in a node pool with the `CONTROLLER` - * [role](/dataproc/docs/reference/rest/v1/projects.regions.clusters#role) - * or in the DEFAULT node pool if the CONTROLLER role is not assigned (the - * DEFAULT node pool will assume the CONTROLLER role). - * - * Generated from protobuf field bool spot = 32 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setSpot($var) - { - GPBUtil::checkBool($var); - $this->spot = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(GkeNodeConfig::class, \Google\Cloud\Dataproc\V1\GkeNodePoolConfig_GkeNodeConfig::class); - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GkeNodePoolConfig/GkeNodePoolAcceleratorConfig.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GkeNodePoolConfig/GkeNodePoolAcceleratorConfig.php deleted file mode 100644 index fdf2da66f5b..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GkeNodePoolConfig/GkeNodePoolAcceleratorConfig.php +++ /dev/null @@ -1,147 +0,0 @@ -google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig - */ -class GkeNodePoolAcceleratorConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The number of accelerator cards exposed to an instance. - * - * Generated from protobuf field int64 accelerator_count = 1; - */ - protected $accelerator_count = 0; - /** - * The accelerator type resource namename (see GPUs on Compute Engine). - * - * Generated from protobuf field string accelerator_type = 2; - */ - protected $accelerator_type = ''; - /** - * Size of partitions to create on the GPU. Valid values are described in - * the NVIDIA [mig user - * guide](https://docs.nvidia.com/datacenter/tesla/mig-user-guide/#partitioning). - * - * Generated from protobuf field string gpu_partition_size = 3; - */ - protected $gpu_partition_size = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $accelerator_count - * The number of accelerator cards exposed to an instance. - * @type string $accelerator_type - * The accelerator type resource namename (see GPUs on Compute Engine). - * @type string $gpu_partition_size - * Size of partitions to create on the GPU. Valid values are described in - * the NVIDIA [mig user - * guide](https://docs.nvidia.com/datacenter/tesla/mig-user-guide/#partitioning). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Shared::initOnce(); - parent::__construct($data); - } - - /** - * The number of accelerator cards exposed to an instance. - * - * Generated from protobuf field int64 accelerator_count = 1; - * @return int|string - */ - public function getAcceleratorCount() - { - return $this->accelerator_count; - } - - /** - * The number of accelerator cards exposed to an instance. - * - * Generated from protobuf field int64 accelerator_count = 1; - * @param int|string $var - * @return $this - */ - public function setAcceleratorCount($var) - { - GPBUtil::checkInt64($var); - $this->accelerator_count = $var; - - return $this; - } - - /** - * The accelerator type resource namename (see GPUs on Compute Engine). - * - * Generated from protobuf field string accelerator_type = 2; - * @return string - */ - public function getAcceleratorType() - { - return $this->accelerator_type; - } - - /** - * The accelerator type resource namename (see GPUs on Compute Engine). - * - * Generated from protobuf field string accelerator_type = 2; - * @param string $var - * @return $this - */ - public function setAcceleratorType($var) - { - GPBUtil::checkString($var, True); - $this->accelerator_type = $var; - - return $this; - } - - /** - * Size of partitions to create on the GPU. Valid values are described in - * the NVIDIA [mig user - * guide](https://docs.nvidia.com/datacenter/tesla/mig-user-guide/#partitioning). - * - * Generated from protobuf field string gpu_partition_size = 3; - * @return string - */ - public function getGpuPartitionSize() - { - return $this->gpu_partition_size; - } - - /** - * Size of partitions to create on the GPU. Valid values are described in - * the NVIDIA [mig user - * guide](https://docs.nvidia.com/datacenter/tesla/mig-user-guide/#partitioning). - * - * Generated from protobuf field string gpu_partition_size = 3; - * @param string $var - * @return $this - */ - public function setGpuPartitionSize($var) - { - GPBUtil::checkString($var, True); - $this->gpu_partition_size = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(GkeNodePoolAcceleratorConfig::class, \Google\Cloud\Dataproc\V1\GkeNodePoolConfig_GkeNodePoolAcceleratorConfig::class); - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GkeNodePoolConfig/GkeNodePoolAutoscalingConfig.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GkeNodePoolConfig/GkeNodePoolAutoscalingConfig.php deleted file mode 100644 index b62f05b4c3d..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GkeNodePoolConfig/GkeNodePoolAutoscalingConfig.php +++ /dev/null @@ -1,117 +0,0 @@ -google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig - */ -class GkeNodePoolAutoscalingConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The minimum number of nodes in the node pool. Must be >= 0 and <= - * max_node_count. - * - * Generated from protobuf field int32 min_node_count = 2; - */ - protected $min_node_count = 0; - /** - * The maximum number of nodes in the node pool. Must be >= min_node_count, - * and must be > 0. - * **Note:** Quota must be sufficient to scale up the cluster. - * - * Generated from protobuf field int32 max_node_count = 3; - */ - protected $max_node_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $min_node_count - * The minimum number of nodes in the node pool. Must be >= 0 and <= - * max_node_count. - * @type int $max_node_count - * The maximum number of nodes in the node pool. Must be >= min_node_count, - * and must be > 0. - * **Note:** Quota must be sufficient to scale up the cluster. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Shared::initOnce(); - parent::__construct($data); - } - - /** - * The minimum number of nodes in the node pool. Must be >= 0 and <= - * max_node_count. - * - * Generated from protobuf field int32 min_node_count = 2; - * @return int - */ - public function getMinNodeCount() - { - return $this->min_node_count; - } - - /** - * The minimum number of nodes in the node pool. Must be >= 0 and <= - * max_node_count. - * - * Generated from protobuf field int32 min_node_count = 2; - * @param int $var - * @return $this - */ - public function setMinNodeCount($var) - { - GPBUtil::checkInt32($var); - $this->min_node_count = $var; - - return $this; - } - - /** - * The maximum number of nodes in the node pool. Must be >= min_node_count, - * and must be > 0. - * **Note:** Quota must be sufficient to scale up the cluster. - * - * Generated from protobuf field int32 max_node_count = 3; - * @return int - */ - public function getMaxNodeCount() - { - return $this->max_node_count; - } - - /** - * The maximum number of nodes in the node pool. Must be >= min_node_count, - * and must be > 0. - * **Note:** Quota must be sufficient to scale up the cluster. - * - * Generated from protobuf field int32 max_node_count = 3; - * @param int $var - * @return $this - */ - public function setMaxNodeCount($var) - { - GPBUtil::checkInt32($var); - $this->max_node_count = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(GkeNodePoolAutoscalingConfig::class, \Google\Cloud\Dataproc\V1\GkeNodePoolConfig_GkeNodePoolAutoscalingConfig::class); - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GkeNodePoolTarget.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GkeNodePoolTarget.php deleted file mode 100644 index 3f4f9f452c4..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GkeNodePoolTarget.php +++ /dev/null @@ -1,185 +0,0 @@ -google.cloud.dataproc.v1.GkeNodePoolTarget - */ -class GkeNodePoolTarget extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The target GKE node pool. - * Format: - * 'projects/{project}/locations/{location}/clusters/{cluster}/nodePools/{node_pool}' - * - * Generated from protobuf field string node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $node_pool = ''; - /** - * Required. The roles associated with the GKE node pool. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.GkeNodePoolTarget.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $roles; - /** - * Input only. The configuration for the GKE node pool. - * If specified, Dataproc attempts to create a node pool with the - * specified shape. If one with the same name already exists, it is - * verified against all specified fields. If a field differs, the - * virtual cluster creation will fail. - * If omitted, any node pool with the specified name is used. If a - * node pool with the specified name does not exist, Dataproc create a - * node pool with default values. - * This is an input only field. It will not be returned by the API. - * - * Generated from protobuf field .google.cloud.dataproc.v1.GkeNodePoolConfig node_pool_config = 3 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - protected $node_pool_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $node_pool - * Required. The target GKE node pool. - * Format: - * 'projects/{project}/locations/{location}/clusters/{cluster}/nodePools/{node_pool}' - * @type array|\Google\Protobuf\Internal\RepeatedField $roles - * Required. The roles associated with the GKE node pool. - * @type \Google\Cloud\Dataproc\V1\GkeNodePoolConfig $node_pool_config - * Input only. The configuration for the GKE node pool. - * If specified, Dataproc attempts to create a node pool with the - * specified shape. If one with the same name already exists, it is - * verified against all specified fields. If a field differs, the - * virtual cluster creation will fail. - * If omitted, any node pool with the specified name is used. If a - * node pool with the specified name does not exist, Dataproc create a - * node pool with default values. - * This is an input only field. It will not be returned by the API. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Shared::initOnce(); - parent::__construct($data); - } - - /** - * Required. The target GKE node pool. - * Format: - * 'projects/{project}/locations/{location}/clusters/{cluster}/nodePools/{node_pool}' - * - * Generated from protobuf field string node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getNodePool() - { - return $this->node_pool; - } - - /** - * Required. The target GKE node pool. - * Format: - * 'projects/{project}/locations/{location}/clusters/{cluster}/nodePools/{node_pool}' - * - * Generated from protobuf field string node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setNodePool($var) - { - GPBUtil::checkString($var, True); - $this->node_pool = $var; - - return $this; - } - - /** - * Required. The roles associated with the GKE node pool. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.GkeNodePoolTarget.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRoles() - { - return $this->roles; - } - - /** - * Required. The roles associated with the GKE node pool. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.GkeNodePoolTarget.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRoles($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Dataproc\V1\GkeNodePoolTarget\Role::class); - $this->roles = $arr; - - return $this; - } - - /** - * Input only. The configuration for the GKE node pool. - * If specified, Dataproc attempts to create a node pool with the - * specified shape. If one with the same name already exists, it is - * verified against all specified fields. If a field differs, the - * virtual cluster creation will fail. - * If omitted, any node pool with the specified name is used. If a - * node pool with the specified name does not exist, Dataproc create a - * node pool with default values. - * This is an input only field. It will not be returned by the API. - * - * Generated from protobuf field .google.cloud.dataproc.v1.GkeNodePoolConfig node_pool_config = 3 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return \Google\Cloud\Dataproc\V1\GkeNodePoolConfig|null - */ - public function getNodePoolConfig() - { - return $this->node_pool_config; - } - - public function hasNodePoolConfig() - { - return isset($this->node_pool_config); - } - - public function clearNodePoolConfig() - { - unset($this->node_pool_config); - } - - /** - * Input only. The configuration for the GKE node pool. - * If specified, Dataproc attempts to create a node pool with the - * specified shape. If one with the same name already exists, it is - * verified against all specified fields. If a field differs, the - * virtual cluster creation will fail. - * If omitted, any node pool with the specified name is used. If a - * node pool with the specified name does not exist, Dataproc create a - * node pool with default values. - * This is an input only field. It will not be returned by the API. - * - * Generated from protobuf field .google.cloud.dataproc.v1.GkeNodePoolConfig node_pool_config = 3 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param \Google\Cloud\Dataproc\V1\GkeNodePoolConfig $var - * @return $this - */ - public function setNodePoolConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\GkeNodePoolConfig::class); - $this->node_pool_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GkeNodePoolTarget/Role.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GkeNodePoolTarget/Role.php deleted file mode 100644 index c6fe2d439dc..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GkeNodePoolTarget/Role.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.dataproc.v1.GkeNodePoolTarget.Role - */ -class Role -{ - /** - * Role is unspecified. - * - * Generated from protobuf enum ROLE_UNSPECIFIED = 0; - */ - const ROLE_UNSPECIFIED = 0; - /** - * At least one node pool must have the `DEFAULT` role. - * Work assigned to a role that is not associated with a node pool - * is assigned to the node pool with the `DEFAULT` role. For example, - * work assigned to the `CONTROLLER` role will be assigned to the node pool - * with the `DEFAULT` role if no node pool has the `CONTROLLER` role. - * - * Generated from protobuf enum DEFAULT = 1; - */ - const PBDEFAULT = 1; - /** - * Run work associated with the Dataproc control plane (for example, - * controllers and webhooks). Very low resource requirements. - * - * Generated from protobuf enum CONTROLLER = 2; - */ - const CONTROLLER = 2; - /** - * Run work associated with a Spark driver of a job. - * - * Generated from protobuf enum SPARK_DRIVER = 3; - */ - const SPARK_DRIVER = 3; - /** - * Run work associated with a Spark executor of a job. - * - * Generated from protobuf enum SPARK_EXECUTOR = 4; - */ - const SPARK_EXECUTOR = 4; - - private static $valueToName = [ - self::ROLE_UNSPECIFIED => 'ROLE_UNSPECIFIED', - self::PBDEFAULT => 'DEFAULT', - self::CONTROLLER => 'CONTROLLER', - self::SPARK_DRIVER => 'SPARK_DRIVER', - self::SPARK_EXECUTOR => 'SPARK_EXECUTOR', - ]; - - 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)) { - $pbconst = __CLASS__. '::PB' . strtoupper($name); - if (!defined($pbconst)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($pbconst); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Role::class, \Google\Cloud\Dataproc\V1\GkeNodePoolTarget_Role::class); - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/HadoopJob.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/HadoopJob.php deleted file mode 100644 index 047ef763aef..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/HadoopJob.php +++ /dev/null @@ -1,385 +0,0 @@ -google.cloud.dataproc.v1.HadoopJob - */ -class HadoopJob extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The arguments to pass to the driver. Do not - * include arguments, such as `-libjars` or `-Dfoo=bar`, that can be set as - * job properties, since a collision may occur that causes an incorrect job - * submission. - * - * Generated from protobuf field repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $args; - /** - * Optional. Jar file URIs to add to the CLASSPATHs of the - * Hadoop driver and tasks. - * - * Generated from protobuf field repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $jar_file_uris; - /** - * Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied - * to the working directory of Hadoop drivers and distributed tasks. Useful - * for naively parallel tasks. - * - * Generated from protobuf field repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $file_uris; - /** - * Optional. HCFS URIs of archives to be extracted in the working directory of - * Hadoop drivers and tasks. Supported file types: - * .jar, .tar, .tar.gz, .tgz, or .zip. - * - * Generated from protobuf field repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $archive_uris; - /** - * Optional. A mapping of property names to values, used to configure Hadoop. - * Properties that conflict with values set by the Dataproc API may be - * overwritten. Can include properties set in `/etc/hadoop/conf/*-site` and - * classes in user code. - * - * Generated from protobuf field map properties = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $properties; - /** - * Optional. The runtime log config for job execution. - * - * Generated from protobuf field .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $logging_config = null; - protected $driver; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $main_jar_file_uri - * The HCFS URI of the jar file containing the main class. - * Examples: - * 'gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar' - * 'hdfs:/tmp/test-samples/custom-wordcount.jar' - * 'file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar' - * @type string $main_class - * The name of the driver's main class. The jar file containing the class - * must be in the default CLASSPATH or specified in `jar_file_uris`. - * @type array|\Google\Protobuf\Internal\RepeatedField $args - * Optional. The arguments to pass to the driver. Do not - * include arguments, such as `-libjars` or `-Dfoo=bar`, that can be set as - * job properties, since a collision may occur that causes an incorrect job - * submission. - * @type array|\Google\Protobuf\Internal\RepeatedField $jar_file_uris - * Optional. Jar file URIs to add to the CLASSPATHs of the - * Hadoop driver and tasks. - * @type array|\Google\Protobuf\Internal\RepeatedField $file_uris - * Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied - * to the working directory of Hadoop drivers and distributed tasks. Useful - * for naively parallel tasks. - * @type array|\Google\Protobuf\Internal\RepeatedField $archive_uris - * Optional. HCFS URIs of archives to be extracted in the working directory of - * Hadoop drivers and tasks. Supported file types: - * .jar, .tar, .tar.gz, .tgz, or .zip. - * @type array|\Google\Protobuf\Internal\MapField $properties - * Optional. A mapping of property names to values, used to configure Hadoop. - * Properties that conflict with values set by the Dataproc API may be - * overwritten. Can include properties set in `/etc/hadoop/conf/*-site` and - * classes in user code. - * @type \Google\Cloud\Dataproc\V1\LoggingConfig $logging_config - * Optional. The runtime log config for job execution. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Jobs::initOnce(); - parent::__construct($data); - } - - /** - * The HCFS URI of the jar file containing the main class. - * Examples: - * 'gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar' - * 'hdfs:/tmp/test-samples/custom-wordcount.jar' - * 'file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar' - * - * Generated from protobuf field string main_jar_file_uri = 1; - * @return string - */ - public function getMainJarFileUri() - { - return $this->readOneof(1); - } - - public function hasMainJarFileUri() - { - return $this->hasOneof(1); - } - - /** - * The HCFS URI of the jar file containing the main class. - * Examples: - * 'gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar' - * 'hdfs:/tmp/test-samples/custom-wordcount.jar' - * 'file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar' - * - * Generated from protobuf field string main_jar_file_uri = 1; - * @param string $var - * @return $this - */ - public function setMainJarFileUri($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * The name of the driver's main class. The jar file containing the class - * must be in the default CLASSPATH or specified in `jar_file_uris`. - * - * Generated from protobuf field string main_class = 2; - * @return string - */ - public function getMainClass() - { - return $this->readOneof(2); - } - - public function hasMainClass() - { - return $this->hasOneof(2); - } - - /** - * The name of the driver's main class. The jar file containing the class - * must be in the default CLASSPATH or specified in `jar_file_uris`. - * - * Generated from protobuf field string main_class = 2; - * @param string $var - * @return $this - */ - public function setMainClass($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Optional. The arguments to pass to the driver. Do not - * include arguments, such as `-libjars` or `-Dfoo=bar`, that can be set as - * job properties, since a collision may occur that causes an incorrect job - * submission. - * - * Generated from protobuf field repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getArgs() - { - return $this->args; - } - - /** - * Optional. The arguments to pass to the driver. Do not - * include arguments, such as `-libjars` or `-Dfoo=bar`, that can be set as - * job properties, since a collision may occur that causes an incorrect job - * submission. - * - * Generated from protobuf field repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setArgs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->args = $arr; - - return $this; - } - - /** - * Optional. Jar file URIs to add to the CLASSPATHs of the - * Hadoop driver and tasks. - * - * Generated from protobuf field repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getJarFileUris() - { - return $this->jar_file_uris; - } - - /** - * Optional. Jar file URIs to add to the CLASSPATHs of the - * Hadoop driver and tasks. - * - * Generated from protobuf field repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setJarFileUris($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->jar_file_uris = $arr; - - return $this; - } - - /** - * Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied - * to the working directory of Hadoop drivers and distributed tasks. Useful - * for naively parallel tasks. - * - * Generated from protobuf field repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFileUris() - { - return $this->file_uris; - } - - /** - * Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied - * to the working directory of Hadoop drivers and distributed tasks. Useful - * for naively parallel tasks. - * - * Generated from protobuf field repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFileUris($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->file_uris = $arr; - - return $this; - } - - /** - * Optional. HCFS URIs of archives to be extracted in the working directory of - * Hadoop drivers and tasks. Supported file types: - * .jar, .tar, .tar.gz, .tgz, or .zip. - * - * Generated from protobuf field repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getArchiveUris() - { - return $this->archive_uris; - } - - /** - * Optional. HCFS URIs of archives to be extracted in the working directory of - * Hadoop drivers and tasks. Supported file types: - * .jar, .tar, .tar.gz, .tgz, or .zip. - * - * Generated from protobuf field repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setArchiveUris($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->archive_uris = $arr; - - return $this; - } - - /** - * Optional. A mapping of property names to values, used to configure Hadoop. - * Properties that conflict with values set by the Dataproc API may be - * overwritten. Can include properties set in `/etc/hadoop/conf/*-site` and - * classes in user code. - * - * Generated from protobuf field map properties = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getProperties() - { - return $this->properties; - } - - /** - * Optional. A mapping of property names to values, used to configure Hadoop. - * Properties that conflict with values set by the Dataproc API may be - * overwritten. Can include properties set in `/etc/hadoop/conf/*-site` and - * classes in user code. - * - * Generated from protobuf field map properties = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setProperties($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->properties = $arr; - - return $this; - } - - /** - * Optional. The runtime log config for job execution. - * - * Generated from protobuf field .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\LoggingConfig|null - */ - public function getLoggingConfig() - { - return $this->logging_config; - } - - public function hasLoggingConfig() - { - return isset($this->logging_config); - } - - public function clearLoggingConfig() - { - unset($this->logging_config); - } - - /** - * Optional. The runtime log config for job execution. - * - * Generated from protobuf field .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\LoggingConfig $var - * @return $this - */ - public function setLoggingConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\LoggingConfig::class); - $this->logging_config = $var; - - return $this; - } - - /** - * @return string - */ - public function getDriver() - { - return $this->whichOneof("driver"); - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/HiveJob.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/HiveJob.php deleted file mode 100644 index 0cc4f8a2d88..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/HiveJob.php +++ /dev/null @@ -1,277 +0,0 @@ -google.cloud.dataproc.v1.HiveJob - */ -class HiveJob extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Whether to continue executing queries if a query fails. - * The default value is `false`. Setting to `true` can be useful when - * executing independent parallel queries. - * - * Generated from protobuf field bool continue_on_failure = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $continue_on_failure = false; - /** - * Optional. Mapping of query variable names to values (equivalent to the - * Hive command: `SET name="value";`). - * - * Generated from protobuf field map script_variables = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $script_variables; - /** - * Optional. A mapping of property names and values, used to configure Hive. - * Properties that conflict with values set by the Dataproc API may be - * overwritten. Can include properties set in `/etc/hadoop/conf/*-site.xml`, - * /etc/hive/conf/hive-site.xml, and classes in user code. - * - * Generated from protobuf field map properties = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $properties; - /** - * Optional. HCFS URIs of jar files to add to the CLASSPATH of the - * Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes - * and UDFs. - * - * Generated from protobuf field repeated string jar_file_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $jar_file_uris; - protected $queries; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $query_file_uri - * The HCFS URI of the script that contains Hive queries. - * @type \Google\Cloud\Dataproc\V1\QueryList $query_list - * A list of queries. - * @type bool $continue_on_failure - * Optional. Whether to continue executing queries if a query fails. - * The default value is `false`. Setting to `true` can be useful when - * executing independent parallel queries. - * @type array|\Google\Protobuf\Internal\MapField $script_variables - * Optional. Mapping of query variable names to values (equivalent to the - * Hive command: `SET name="value";`). - * @type array|\Google\Protobuf\Internal\MapField $properties - * Optional. A mapping of property names and values, used to configure Hive. - * Properties that conflict with values set by the Dataproc API may be - * overwritten. Can include properties set in `/etc/hadoop/conf/*-site.xml`, - * /etc/hive/conf/hive-site.xml, and classes in user code. - * @type array|\Google\Protobuf\Internal\RepeatedField $jar_file_uris - * Optional. HCFS URIs of jar files to add to the CLASSPATH of the - * Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes - * and UDFs. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Jobs::initOnce(); - parent::__construct($data); - } - - /** - * The HCFS URI of the script that contains Hive queries. - * - * Generated from protobuf field string query_file_uri = 1; - * @return string - */ - public function getQueryFileUri() - { - return $this->readOneof(1); - } - - public function hasQueryFileUri() - { - return $this->hasOneof(1); - } - - /** - * The HCFS URI of the script that contains Hive queries. - * - * Generated from protobuf field string query_file_uri = 1; - * @param string $var - * @return $this - */ - public function setQueryFileUri($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * A list of queries. - * - * Generated from protobuf field .google.cloud.dataproc.v1.QueryList query_list = 2; - * @return \Google\Cloud\Dataproc\V1\QueryList|null - */ - public function getQueryList() - { - return $this->readOneof(2); - } - - public function hasQueryList() - { - return $this->hasOneof(2); - } - - /** - * A list of queries. - * - * Generated from protobuf field .google.cloud.dataproc.v1.QueryList query_list = 2; - * @param \Google\Cloud\Dataproc\V1\QueryList $var - * @return $this - */ - public function setQueryList($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\QueryList::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Optional. Whether to continue executing queries if a query fails. - * The default value is `false`. Setting to `true` can be useful when - * executing independent parallel queries. - * - * Generated from protobuf field bool continue_on_failure = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getContinueOnFailure() - { - return $this->continue_on_failure; - } - - /** - * Optional. Whether to continue executing queries if a query fails. - * The default value is `false`. Setting to `true` can be useful when - * executing independent parallel queries. - * - * Generated from protobuf field bool continue_on_failure = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setContinueOnFailure($var) - { - GPBUtil::checkBool($var); - $this->continue_on_failure = $var; - - return $this; - } - - /** - * Optional. Mapping of query variable names to values (equivalent to the - * Hive command: `SET name="value";`). - * - * Generated from protobuf field map script_variables = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getScriptVariables() - { - return $this->script_variables; - } - - /** - * Optional. Mapping of query variable names to values (equivalent to the - * Hive command: `SET name="value";`). - * - * Generated from protobuf field map script_variables = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setScriptVariables($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->script_variables = $arr; - - return $this; - } - - /** - * Optional. A mapping of property names and values, used to configure Hive. - * Properties that conflict with values set by the Dataproc API may be - * overwritten. Can include properties set in `/etc/hadoop/conf/*-site.xml`, - * /etc/hive/conf/hive-site.xml, and classes in user code. - * - * Generated from protobuf field map properties = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getProperties() - { - return $this->properties; - } - - /** - * Optional. A mapping of property names and values, used to configure Hive. - * Properties that conflict with values set by the Dataproc API may be - * overwritten. Can include properties set in `/etc/hadoop/conf/*-site.xml`, - * /etc/hive/conf/hive-site.xml, and classes in user code. - * - * Generated from protobuf field map properties = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setProperties($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->properties = $arr; - - return $this; - } - - /** - * Optional. HCFS URIs of jar files to add to the CLASSPATH of the - * Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes - * and UDFs. - * - * Generated from protobuf field repeated string jar_file_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getJarFileUris() - { - return $this->jar_file_uris; - } - - /** - * Optional. HCFS URIs of jar files to add to the CLASSPATH of the - * Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes - * and UDFs. - * - * Generated from protobuf field repeated string jar_file_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setJarFileUris($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->jar_file_uris = $arr; - - return $this; - } - - /** - * @return string - */ - public function getQueries() - { - return $this->whichOneof("queries"); - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/IdentityConfig.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/IdentityConfig.php deleted file mode 100644 index d733c1071b3..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/IdentityConfig.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.dataproc.v1.IdentityConfig - */ -class IdentityConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Map of user to service account. - * - * Generated from protobuf field map user_service_account_mapping = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private $user_service_account_mapping; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\MapField $user_service_account_mapping - * Required. Map of user to service account. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Clusters::initOnce(); - parent::__construct($data); - } - - /** - * Required. Map of user to service account. - * - * Generated from protobuf field map user_service_account_mapping = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getUserServiceAccountMapping() - { - return $this->user_service_account_mapping; - } - - /** - * Required. Map of user to service account. - * - * Generated from protobuf field map user_service_account_mapping = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setUserServiceAccountMapping($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->user_service_account_mapping = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/InstanceFlexibilityPolicy.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/InstanceFlexibilityPolicy.php deleted file mode 100644 index 60e39ca8fc1..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/InstanceFlexibilityPolicy.php +++ /dev/null @@ -1,106 +0,0 @@ -google.cloud.dataproc.v1.InstanceFlexibilityPolicy - */ -class InstanceFlexibilityPolicy extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. List of instance selection options that the group will use when - * creating new VMs. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.InstanceFlexibilityPolicy.InstanceSelection instance_selection_list = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $instance_selection_list; - /** - * Output only. A list of instance selection results in the group. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.InstanceFlexibilityPolicy.InstanceSelectionResult instance_selection_results = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $instance_selection_results; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dataproc\V1\InstanceFlexibilityPolicy\InstanceSelection>|\Google\Protobuf\Internal\RepeatedField $instance_selection_list - * Optional. List of instance selection options that the group will use when - * creating new VMs. - * @type array<\Google\Cloud\Dataproc\V1\InstanceFlexibilityPolicy\InstanceSelectionResult>|\Google\Protobuf\Internal\RepeatedField $instance_selection_results - * Output only. A list of instance selection results in the group. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Clusters::initOnce(); - parent::__construct($data); - } - - /** - * Optional. List of instance selection options that the group will use when - * creating new VMs. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.InstanceFlexibilityPolicy.InstanceSelection instance_selection_list = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInstanceSelectionList() - { - return $this->instance_selection_list; - } - - /** - * Optional. List of instance selection options that the group will use when - * creating new VMs. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.InstanceFlexibilityPolicy.InstanceSelection instance_selection_list = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Dataproc\V1\InstanceFlexibilityPolicy\InstanceSelection>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInstanceSelectionList($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataproc\V1\InstanceFlexibilityPolicy\InstanceSelection::class); - $this->instance_selection_list = $arr; - - return $this; - } - - /** - * Output only. A list of instance selection results in the group. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.InstanceFlexibilityPolicy.InstanceSelectionResult instance_selection_results = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInstanceSelectionResults() - { - return $this->instance_selection_results; - } - - /** - * Output only. A list of instance selection results in the group. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.InstanceFlexibilityPolicy.InstanceSelectionResult instance_selection_results = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\Dataproc\V1\InstanceFlexibilityPolicy\InstanceSelectionResult>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInstanceSelectionResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataproc\V1\InstanceFlexibilityPolicy\InstanceSelectionResult::class); - $this->instance_selection_results = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/InstanceFlexibilityPolicy/InstanceSelection.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/InstanceFlexibilityPolicy/InstanceSelection.php deleted file mode 100644 index 4af40360b8f..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/InstanceFlexibilityPolicy/InstanceSelection.php +++ /dev/null @@ -1,120 +0,0 @@ -google.cloud.dataproc.v1.InstanceFlexibilityPolicy.InstanceSelection - */ -class InstanceSelection extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Full machine-type names, e.g. "n1-standard-16". - * - * Generated from protobuf field repeated string machine_types = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $machine_types; - /** - * Optional. Preference of this instance selection. Lower number means - * higher preference. Dataproc will first try to create a VM based on the - * machine-type with priority rank and fallback to next rank based on - * availability. Machine types and instance selections with the same - * priority have the same preference. - * - * Generated from protobuf field int32 rank = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $rank = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $machine_types - * Optional. Full machine-type names, e.g. "n1-standard-16". - * @type int $rank - * Optional. Preference of this instance selection. Lower number means - * higher preference. Dataproc will first try to create a VM based on the - * machine-type with priority rank and fallback to next rank based on - * availability. Machine types and instance selections with the same - * priority have the same preference. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Clusters::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Full machine-type names, e.g. "n1-standard-16". - * - * Generated from protobuf field repeated string machine_types = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMachineTypes() - { - return $this->machine_types; - } - - /** - * Optional. Full machine-type names, e.g. "n1-standard-16". - * - * Generated from protobuf field repeated string machine_types = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMachineTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->machine_types = $arr; - - return $this; - } - - /** - * Optional. Preference of this instance selection. Lower number means - * higher preference. Dataproc will first try to create a VM based on the - * machine-type with priority rank and fallback to next rank based on - * availability. Machine types and instance selections with the same - * priority have the same preference. - * - * Generated from protobuf field int32 rank = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getRank() - { - return $this->rank; - } - - /** - * Optional. Preference of this instance selection. Lower number means - * higher preference. Dataproc will first try to create a VM based on the - * machine-type with priority rank and fallback to next rank based on - * availability. Machine types and instance selections with the same - * priority have the same preference. - * - * Generated from protobuf field int32 rank = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setRank($var) - { - GPBUtil::checkInt32($var); - $this->rank = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(InstanceSelection::class, \Google\Cloud\Dataproc\V1\InstanceFlexibilityPolicy_InstanceSelection::class); - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/InstanceFlexibilityPolicy/InstanceSelectionResult.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/InstanceFlexibilityPolicy/InstanceSelectionResult.php deleted file mode 100644 index 66834be9c20..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/InstanceFlexibilityPolicy/InstanceSelectionResult.php +++ /dev/null @@ -1,125 +0,0 @@ -google.cloud.dataproc.v1.InstanceFlexibilityPolicy.InstanceSelectionResult - */ -class InstanceSelectionResult extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Full machine-type names, e.g. "n1-standard-16". - * - * Generated from protobuf field optional string machine_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $machine_type = null; - /** - * Output only. Number of VM provisioned with the machine_type. - * - * Generated from protobuf field optional int32 vm_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $vm_count = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $machine_type - * Output only. Full machine-type names, e.g. "n1-standard-16". - * @type int $vm_count - * Output only. Number of VM provisioned with the machine_type. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Clusters::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Full machine-type names, e.g. "n1-standard-16". - * - * Generated from protobuf field optional string machine_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getMachineType() - { - return isset($this->machine_type) ? $this->machine_type : ''; - } - - public function hasMachineType() - { - return isset($this->machine_type); - } - - public function clearMachineType() - { - unset($this->machine_type); - } - - /** - * Output only. Full machine-type names, e.g. "n1-standard-16". - * - * Generated from protobuf field optional string machine_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setMachineType($var) - { - GPBUtil::checkString($var, True); - $this->machine_type = $var; - - return $this; - } - - /** - * Output only. Number of VM provisioned with the machine_type. - * - * Generated from protobuf field optional int32 vm_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getVmCount() - { - return isset($this->vm_count) ? $this->vm_count : 0; - } - - public function hasVmCount() - { - return isset($this->vm_count); - } - - public function clearVmCount() - { - unset($this->vm_count); - } - - /** - * Output only. Number of VM provisioned with the machine_type. - * - * Generated from protobuf field optional int32 vm_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setVmCount($var) - { - GPBUtil::checkInt32($var); - $this->vm_count = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(InstanceSelectionResult::class, \Google\Cloud\Dataproc\V1\InstanceFlexibilityPolicy_InstanceSelectionResult::class); - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/InstanceGroupAutoscalingPolicyConfig.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/InstanceGroupAutoscalingPolicyConfig.php deleted file mode 100644 index 4e3adafefd9..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/InstanceGroupAutoscalingPolicyConfig.php +++ /dev/null @@ -1,220 +0,0 @@ -google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig - */ -class InstanceGroupAutoscalingPolicyConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Minimum number of instances for this group. - * Primary workers - Bounds: [2, max_instances]. Default: 2. - * Secondary workers - Bounds: [0, max_instances]. Default: 0. - * - * Generated from protobuf field int32 min_instances = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $min_instances = 0; - /** - * Required. Maximum number of instances for this group. Required for primary - * workers. Note that by default, clusters will not use secondary workers. - * Required for secondary workers if the minimum secondary instances is set. - * Primary workers - Bounds: [min_instances, ). - * Secondary workers - Bounds: [min_instances, ). Default: 0. - * - * Generated from protobuf field int32 max_instances = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $max_instances = 0; - /** - * Optional. Weight for the instance group, which is used to determine the - * fraction of total workers in the cluster from this instance group. - * For example, if primary workers have weight 2, and secondary workers have - * weight 1, the cluster will have approximately 2 primary workers for each - * secondary worker. - * The cluster may not reach the specified balance if constrained - * by min/max bounds or other autoscaling settings. For example, if - * `max_instances` for secondary workers is 0, then only primary workers will - * be added. The cluster can also be out of balance when created. - * If weight is not set on any instance group, the cluster will default to - * equal weight for all groups: the cluster will attempt to maintain an equal - * number of workers in each group within the configured size bounds for each - * group. If weight is set for one group only, the cluster will default to - * zero weight on the unset group. For example if weight is set only on - * primary workers, the cluster will use primary workers only and no - * secondary workers. - * - * Generated from protobuf field int32 weight = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $weight = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $min_instances - * Optional. Minimum number of instances for this group. - * Primary workers - Bounds: [2, max_instances]. Default: 2. - * Secondary workers - Bounds: [0, max_instances]. Default: 0. - * @type int $max_instances - * Required. Maximum number of instances for this group. Required for primary - * workers. Note that by default, clusters will not use secondary workers. - * Required for secondary workers if the minimum secondary instances is set. - * Primary workers - Bounds: [min_instances, ). - * Secondary workers - Bounds: [min_instances, ). Default: 0. - * @type int $weight - * Optional. Weight for the instance group, which is used to determine the - * fraction of total workers in the cluster from this instance group. - * For example, if primary workers have weight 2, and secondary workers have - * weight 1, the cluster will have approximately 2 primary workers for each - * secondary worker. - * The cluster may not reach the specified balance if constrained - * by min/max bounds or other autoscaling settings. For example, if - * `max_instances` for secondary workers is 0, then only primary workers will - * be added. The cluster can also be out of balance when created. - * If weight is not set on any instance group, the cluster will default to - * equal weight for all groups: the cluster will attempt to maintain an equal - * number of workers in each group within the configured size bounds for each - * group. If weight is set for one group only, the cluster will default to - * zero weight on the unset group. For example if weight is set only on - * primary workers, the cluster will use primary workers only and no - * secondary workers. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\AutoscalingPolicies::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Minimum number of instances for this group. - * Primary workers - Bounds: [2, max_instances]. Default: 2. - * Secondary workers - Bounds: [0, max_instances]. Default: 0. - * - * Generated from protobuf field int32 min_instances = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getMinInstances() - { - return $this->min_instances; - } - - /** - * Optional. Minimum number of instances for this group. - * Primary workers - Bounds: [2, max_instances]. Default: 2. - * Secondary workers - Bounds: [0, max_instances]. Default: 0. - * - * Generated from protobuf field int32 min_instances = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setMinInstances($var) - { - GPBUtil::checkInt32($var); - $this->min_instances = $var; - - return $this; - } - - /** - * Required. Maximum number of instances for this group. Required for primary - * workers. Note that by default, clusters will not use secondary workers. - * Required for secondary workers if the minimum secondary instances is set. - * Primary workers - Bounds: [min_instances, ). - * Secondary workers - Bounds: [min_instances, ). Default: 0. - * - * Generated from protobuf field int32 max_instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getMaxInstances() - { - return $this->max_instances; - } - - /** - * Required. Maximum number of instances for this group. Required for primary - * workers. Note that by default, clusters will not use secondary workers. - * Required for secondary workers if the minimum secondary instances is set. - * Primary workers - Bounds: [min_instances, ). - * Secondary workers - Bounds: [min_instances, ). Default: 0. - * - * Generated from protobuf field int32 max_instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setMaxInstances($var) - { - GPBUtil::checkInt32($var); - $this->max_instances = $var; - - return $this; - } - - /** - * Optional. Weight for the instance group, which is used to determine the - * fraction of total workers in the cluster from this instance group. - * For example, if primary workers have weight 2, and secondary workers have - * weight 1, the cluster will have approximately 2 primary workers for each - * secondary worker. - * The cluster may not reach the specified balance if constrained - * by min/max bounds or other autoscaling settings. For example, if - * `max_instances` for secondary workers is 0, then only primary workers will - * be added. The cluster can also be out of balance when created. - * If weight is not set on any instance group, the cluster will default to - * equal weight for all groups: the cluster will attempt to maintain an equal - * number of workers in each group within the configured size bounds for each - * group. If weight is set for one group only, the cluster will default to - * zero weight on the unset group. For example if weight is set only on - * primary workers, the cluster will use primary workers only and no - * secondary workers. - * - * Generated from protobuf field int32 weight = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getWeight() - { - return $this->weight; - } - - /** - * Optional. Weight for the instance group, which is used to determine the - * fraction of total workers in the cluster from this instance group. - * For example, if primary workers have weight 2, and secondary workers have - * weight 1, the cluster will have approximately 2 primary workers for each - * secondary worker. - * The cluster may not reach the specified balance if constrained - * by min/max bounds or other autoscaling settings. For example, if - * `max_instances` for secondary workers is 0, then only primary workers will - * be added. The cluster can also be out of balance when created. - * If weight is not set on any instance group, the cluster will default to - * equal weight for all groups: the cluster will attempt to maintain an equal - * number of workers in each group within the configured size bounds for each - * group. If weight is set for one group only, the cluster will default to - * zero weight on the unset group. For example if weight is set only on - * primary workers, the cluster will use primary workers only and no - * secondary workers. - * - * Generated from protobuf field int32 weight = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setWeight($var) - { - GPBUtil::checkInt32($var); - $this->weight = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/InstanceGroupConfig.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/InstanceGroupConfig.php deleted file mode 100644 index be156f633b2..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/InstanceGroupConfig.php +++ /dev/null @@ -1,698 +0,0 @@ -google.cloud.dataproc.v1.InstanceGroupConfig - */ -class InstanceGroupConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The number of VM instances in the instance group. - * For [HA - * cluster](/dataproc/docs/concepts/configuring-clusters/high-availability) - * [master_config](#FIELDS.master_config) groups, **must be set to 3**. - * For standard cluster [master_config](#FIELDS.master_config) groups, - * **must be set to 1**. - * - * Generated from protobuf field int32 num_instances = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $num_instances = 0; - /** - * Output only. The list of instance names. Dataproc derives the names - * from `cluster_name`, `num_instances`, and the instance group. - * - * Generated from protobuf field repeated string instance_names = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $instance_names; - /** - * Output only. List of references to Compute Engine instances. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.InstanceReference instance_references = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $instance_references; - /** - * Optional. The Compute Engine image resource used for cluster instances. - * The URI can represent an image or image family. - * Image examples: - * * `https://www.googleapis.com/compute/v1/projects/[project_id]/global/images/[image-id]` - * * `projects/[project_id]/global/images/[image-id]` - * * `image-id` - * Image family examples. Dataproc will use the most recent - * image from the family: - * * `https://www.googleapis.com/compute/v1/projects/[project_id]/global/images/family/[custom-image-family-name]` - * * `projects/[project_id]/global/images/family/[custom-image-family-name]` - * If the URI is unspecified, it will be inferred from - * `SoftwareConfig.image_version` or the system default. - * - * Generated from protobuf field string image_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $image_uri = ''; - /** - * Optional. The Compute Engine machine type used for cluster instances. - * A full URL, partial URI, or short name are valid. Examples: - * * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]/machineTypes/n1-standard-2` - * * `projects/[project_id]/zones/[zone]/machineTypes/n1-standard-2` - * * `n1-standard-2` - * **Auto Zone Exception**: If you are using the Dataproc - * [Auto Zone - * Placement](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement) - * feature, you must use the short name of the machine type - * resource, for example, `n1-standard-2`. - * - * Generated from protobuf field string machine_type_uri = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $machine_type_uri = ''; - /** - * Optional. Disk option config settings. - * - * Generated from protobuf field .google.cloud.dataproc.v1.DiskConfig disk_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $disk_config = null; - /** - * Output only. Specifies that this instance group contains preemptible - * instances. - * - * Generated from protobuf field bool is_preemptible = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $is_preemptible = false; - /** - * Optional. Specifies the preemptibility of the instance group. - * The default value for master and worker groups is - * `NON_PREEMPTIBLE`. This default cannot be changed. - * The default value for secondary instances is - * `PREEMPTIBLE`. - * - * Generated from protobuf field .google.cloud.dataproc.v1.InstanceGroupConfig.Preemptibility preemptibility = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $preemptibility = 0; - /** - * Output only. The config for Compute Engine Instance Group - * Manager that manages this group. - * This is only used for preemptible instance groups. - * - * Generated from protobuf field .google.cloud.dataproc.v1.ManagedGroupConfig managed_group_config = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $managed_group_config = null; - /** - * Optional. The Compute Engine accelerator configuration for these - * instances. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $accelerators; - /** - * Optional. Specifies the minimum cpu platform for the Instance Group. - * See [Dataproc -> Minimum CPU - * Platform](https://cloud.google.com/dataproc/docs/concepts/compute/dataproc-min-cpu). - * - * Generated from protobuf field string min_cpu_platform = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $min_cpu_platform = ''; - /** - * Optional. The minimum number of primary worker instances to create. - * If `min_num_instances` is set, cluster creation will succeed if - * the number of primary workers created is at least equal to the - * `min_num_instances` number. - * Example: Cluster creation request with `num_instances` = `5` and - * `min_num_instances` = `3`: - * * If 4 VMs are created and 1 instance fails, - * the failed VM is deleted. The cluster is - * resized to 4 instances and placed in a `RUNNING` state. - * * If 2 instances are created and 3 instances fail, - * the cluster in placed in an `ERROR` state. The failed VMs - * are not deleted. - * - * Generated from protobuf field int32 min_num_instances = 12 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $min_num_instances = 0; - /** - * Optional. Instance flexibility Policy allowing a mixture of VM shapes and - * provisioning models. - * - * Generated from protobuf field .google.cloud.dataproc.v1.InstanceFlexibilityPolicy instance_flexibility_policy = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $instance_flexibility_policy = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $num_instances - * Optional. The number of VM instances in the instance group. - * For [HA - * cluster](/dataproc/docs/concepts/configuring-clusters/high-availability) - * [master_config](#FIELDS.master_config) groups, **must be set to 3**. - * For standard cluster [master_config](#FIELDS.master_config) groups, - * **must be set to 1**. - * @type array|\Google\Protobuf\Internal\RepeatedField $instance_names - * Output only. The list of instance names. Dataproc derives the names - * from `cluster_name`, `num_instances`, and the instance group. - * @type array<\Google\Cloud\Dataproc\V1\InstanceReference>|\Google\Protobuf\Internal\RepeatedField $instance_references - * Output only. List of references to Compute Engine instances. - * @type string $image_uri - * Optional. The Compute Engine image resource used for cluster instances. - * The URI can represent an image or image family. - * Image examples: - * * `https://www.googleapis.com/compute/v1/projects/[project_id]/global/images/[image-id]` - * * `projects/[project_id]/global/images/[image-id]` - * * `image-id` - * Image family examples. Dataproc will use the most recent - * image from the family: - * * `https://www.googleapis.com/compute/v1/projects/[project_id]/global/images/family/[custom-image-family-name]` - * * `projects/[project_id]/global/images/family/[custom-image-family-name]` - * If the URI is unspecified, it will be inferred from - * `SoftwareConfig.image_version` or the system default. - * @type string $machine_type_uri - * Optional. The Compute Engine machine type used for cluster instances. - * A full URL, partial URI, or short name are valid. Examples: - * * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]/machineTypes/n1-standard-2` - * * `projects/[project_id]/zones/[zone]/machineTypes/n1-standard-2` - * * `n1-standard-2` - * **Auto Zone Exception**: If you are using the Dataproc - * [Auto Zone - * Placement](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement) - * feature, you must use the short name of the machine type - * resource, for example, `n1-standard-2`. - * @type \Google\Cloud\Dataproc\V1\DiskConfig $disk_config - * Optional. Disk option config settings. - * @type bool $is_preemptible - * Output only. Specifies that this instance group contains preemptible - * instances. - * @type int $preemptibility - * Optional. Specifies the preemptibility of the instance group. - * The default value for master and worker groups is - * `NON_PREEMPTIBLE`. This default cannot be changed. - * The default value for secondary instances is - * `PREEMPTIBLE`. - * @type \Google\Cloud\Dataproc\V1\ManagedGroupConfig $managed_group_config - * Output only. The config for Compute Engine Instance Group - * Manager that manages this group. - * This is only used for preemptible instance groups. - * @type array<\Google\Cloud\Dataproc\V1\AcceleratorConfig>|\Google\Protobuf\Internal\RepeatedField $accelerators - * Optional. The Compute Engine accelerator configuration for these - * instances. - * @type string $min_cpu_platform - * Optional. Specifies the minimum cpu platform for the Instance Group. - * See [Dataproc -> Minimum CPU - * Platform](https://cloud.google.com/dataproc/docs/concepts/compute/dataproc-min-cpu). - * @type int $min_num_instances - * Optional. The minimum number of primary worker instances to create. - * If `min_num_instances` is set, cluster creation will succeed if - * the number of primary workers created is at least equal to the - * `min_num_instances` number. - * Example: Cluster creation request with `num_instances` = `5` and - * `min_num_instances` = `3`: - * * If 4 VMs are created and 1 instance fails, - * the failed VM is deleted. The cluster is - * resized to 4 instances and placed in a `RUNNING` state. - * * If 2 instances are created and 3 instances fail, - * the cluster in placed in an `ERROR` state. The failed VMs - * are not deleted. - * @type \Google\Cloud\Dataproc\V1\InstanceFlexibilityPolicy $instance_flexibility_policy - * Optional. Instance flexibility Policy allowing a mixture of VM shapes and - * provisioning models. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Clusters::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The number of VM instances in the instance group. - * For [HA - * cluster](/dataproc/docs/concepts/configuring-clusters/high-availability) - * [master_config](#FIELDS.master_config) groups, **must be set to 3**. - * For standard cluster [master_config](#FIELDS.master_config) groups, - * **must be set to 1**. - * - * Generated from protobuf field int32 num_instances = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getNumInstances() - { - return $this->num_instances; - } - - /** - * Optional. The number of VM instances in the instance group. - * For [HA - * cluster](/dataproc/docs/concepts/configuring-clusters/high-availability) - * [master_config](#FIELDS.master_config) groups, **must be set to 3**. - * For standard cluster [master_config](#FIELDS.master_config) groups, - * **must be set to 1**. - * - * Generated from protobuf field int32 num_instances = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setNumInstances($var) - { - GPBUtil::checkInt32($var); - $this->num_instances = $var; - - return $this; - } - - /** - * Output only. The list of instance names. Dataproc derives the names - * from `cluster_name`, `num_instances`, and the instance group. - * - * Generated from protobuf field repeated string instance_names = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInstanceNames() - { - return $this->instance_names; - } - - /** - * Output only. The list of instance names. Dataproc derives the names - * from `cluster_name`, `num_instances`, and the instance group. - * - * Generated from protobuf field repeated string instance_names = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInstanceNames($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->instance_names = $arr; - - return $this; - } - - /** - * Output only. List of references to Compute Engine instances. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.InstanceReference instance_references = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInstanceReferences() - { - return $this->instance_references; - } - - /** - * Output only. List of references to Compute Engine instances. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.InstanceReference instance_references = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\Dataproc\V1\InstanceReference>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInstanceReferences($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataproc\V1\InstanceReference::class); - $this->instance_references = $arr; - - return $this; - } - - /** - * Optional. The Compute Engine image resource used for cluster instances. - * The URI can represent an image or image family. - * Image examples: - * * `https://www.googleapis.com/compute/v1/projects/[project_id]/global/images/[image-id]` - * * `projects/[project_id]/global/images/[image-id]` - * * `image-id` - * Image family examples. Dataproc will use the most recent - * image from the family: - * * `https://www.googleapis.com/compute/v1/projects/[project_id]/global/images/family/[custom-image-family-name]` - * * `projects/[project_id]/global/images/family/[custom-image-family-name]` - * If the URI is unspecified, it will be inferred from - * `SoftwareConfig.image_version` or the system default. - * - * Generated from protobuf field string image_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getImageUri() - { - return $this->image_uri; - } - - /** - * Optional. The Compute Engine image resource used for cluster instances. - * The URI can represent an image or image family. - * Image examples: - * * `https://www.googleapis.com/compute/v1/projects/[project_id]/global/images/[image-id]` - * * `projects/[project_id]/global/images/[image-id]` - * * `image-id` - * Image family examples. Dataproc will use the most recent - * image from the family: - * * `https://www.googleapis.com/compute/v1/projects/[project_id]/global/images/family/[custom-image-family-name]` - * * `projects/[project_id]/global/images/family/[custom-image-family-name]` - * If the URI is unspecified, it will be inferred from - * `SoftwareConfig.image_version` or the system default. - * - * Generated from protobuf field string image_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setImageUri($var) - { - GPBUtil::checkString($var, True); - $this->image_uri = $var; - - return $this; - } - - /** - * Optional. The Compute Engine machine type used for cluster instances. - * A full URL, partial URI, or short name are valid. Examples: - * * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]/machineTypes/n1-standard-2` - * * `projects/[project_id]/zones/[zone]/machineTypes/n1-standard-2` - * * `n1-standard-2` - * **Auto Zone Exception**: If you are using the Dataproc - * [Auto Zone - * Placement](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement) - * feature, you must use the short name of the machine type - * resource, for example, `n1-standard-2`. - * - * Generated from protobuf field string machine_type_uri = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getMachineTypeUri() - { - return $this->machine_type_uri; - } - - /** - * Optional. The Compute Engine machine type used for cluster instances. - * A full URL, partial URI, or short name are valid. Examples: - * * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]/machineTypes/n1-standard-2` - * * `projects/[project_id]/zones/[zone]/machineTypes/n1-standard-2` - * * `n1-standard-2` - * **Auto Zone Exception**: If you are using the Dataproc - * [Auto Zone - * Placement](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement) - * feature, you must use the short name of the machine type - * resource, for example, `n1-standard-2`. - * - * Generated from protobuf field string machine_type_uri = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setMachineTypeUri($var) - { - GPBUtil::checkString($var, True); - $this->machine_type_uri = $var; - - return $this; - } - - /** - * Optional. Disk option config settings. - * - * Generated from protobuf field .google.cloud.dataproc.v1.DiskConfig disk_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\DiskConfig|null - */ - public function getDiskConfig() - { - return $this->disk_config; - } - - public function hasDiskConfig() - { - return isset($this->disk_config); - } - - public function clearDiskConfig() - { - unset($this->disk_config); - } - - /** - * Optional. Disk option config settings. - * - * Generated from protobuf field .google.cloud.dataproc.v1.DiskConfig disk_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\DiskConfig $var - * @return $this - */ - public function setDiskConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\DiskConfig::class); - $this->disk_config = $var; - - return $this; - } - - /** - * Output only. Specifies that this instance group contains preemptible - * instances. - * - * Generated from protobuf field bool is_preemptible = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getIsPreemptible() - { - return $this->is_preemptible; - } - - /** - * Output only. Specifies that this instance group contains preemptible - * instances. - * - * Generated from protobuf field bool is_preemptible = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setIsPreemptible($var) - { - GPBUtil::checkBool($var); - $this->is_preemptible = $var; - - return $this; - } - - /** - * Optional. Specifies the preemptibility of the instance group. - * The default value for master and worker groups is - * `NON_PREEMPTIBLE`. This default cannot be changed. - * The default value for secondary instances is - * `PREEMPTIBLE`. - * - * Generated from protobuf field .google.cloud.dataproc.v1.InstanceGroupConfig.Preemptibility preemptibility = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPreemptibility() - { - return $this->preemptibility; - } - - /** - * Optional. Specifies the preemptibility of the instance group. - * The default value for master and worker groups is - * `NON_PREEMPTIBLE`. This default cannot be changed. - * The default value for secondary instances is - * `PREEMPTIBLE`. - * - * Generated from protobuf field .google.cloud.dataproc.v1.InstanceGroupConfig.Preemptibility preemptibility = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPreemptibility($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataproc\V1\InstanceGroupConfig\Preemptibility::class); - $this->preemptibility = $var; - - return $this; - } - - /** - * Output only. The config for Compute Engine Instance Group - * Manager that manages this group. - * This is only used for preemptible instance groups. - * - * Generated from protobuf field .google.cloud.dataproc.v1.ManagedGroupConfig managed_group_config = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataproc\V1\ManagedGroupConfig|null - */ - public function getManagedGroupConfig() - { - return $this->managed_group_config; - } - - public function hasManagedGroupConfig() - { - return isset($this->managed_group_config); - } - - public function clearManagedGroupConfig() - { - unset($this->managed_group_config); - } - - /** - * Output only. The config for Compute Engine Instance Group - * Manager that manages this group. - * This is only used for preemptible instance groups. - * - * Generated from protobuf field .google.cloud.dataproc.v1.ManagedGroupConfig managed_group_config = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataproc\V1\ManagedGroupConfig $var - * @return $this - */ - public function setManagedGroupConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\ManagedGroupConfig::class); - $this->managed_group_config = $var; - - return $this; - } - - /** - * Optional. The Compute Engine accelerator configuration for these - * instances. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAccelerators() - { - return $this->accelerators; - } - - /** - * Optional. The Compute Engine accelerator configuration for these - * instances. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Dataproc\V1\AcceleratorConfig>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAccelerators($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataproc\V1\AcceleratorConfig::class); - $this->accelerators = $arr; - - return $this; - } - - /** - * Optional. Specifies the minimum cpu platform for the Instance Group. - * See [Dataproc -> Minimum CPU - * Platform](https://cloud.google.com/dataproc/docs/concepts/compute/dataproc-min-cpu). - * - * Generated from protobuf field string min_cpu_platform = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getMinCpuPlatform() - { - return $this->min_cpu_platform; - } - - /** - * Optional. Specifies the minimum cpu platform for the Instance Group. - * See [Dataproc -> Minimum CPU - * Platform](https://cloud.google.com/dataproc/docs/concepts/compute/dataproc-min-cpu). - * - * Generated from protobuf field string min_cpu_platform = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setMinCpuPlatform($var) - { - GPBUtil::checkString($var, True); - $this->min_cpu_platform = $var; - - return $this; - } - - /** - * Optional. The minimum number of primary worker instances to create. - * If `min_num_instances` is set, cluster creation will succeed if - * the number of primary workers created is at least equal to the - * `min_num_instances` number. - * Example: Cluster creation request with `num_instances` = `5` and - * `min_num_instances` = `3`: - * * If 4 VMs are created and 1 instance fails, - * the failed VM is deleted. The cluster is - * resized to 4 instances and placed in a `RUNNING` state. - * * If 2 instances are created and 3 instances fail, - * the cluster in placed in an `ERROR` state. The failed VMs - * are not deleted. - * - * Generated from protobuf field int32 min_num_instances = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getMinNumInstances() - { - return $this->min_num_instances; - } - - /** - * Optional. The minimum number of primary worker instances to create. - * If `min_num_instances` is set, cluster creation will succeed if - * the number of primary workers created is at least equal to the - * `min_num_instances` number. - * Example: Cluster creation request with `num_instances` = `5` and - * `min_num_instances` = `3`: - * * If 4 VMs are created and 1 instance fails, - * the failed VM is deleted. The cluster is - * resized to 4 instances and placed in a `RUNNING` state. - * * If 2 instances are created and 3 instances fail, - * the cluster in placed in an `ERROR` state. The failed VMs - * are not deleted. - * - * Generated from protobuf field int32 min_num_instances = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setMinNumInstances($var) - { - GPBUtil::checkInt32($var); - $this->min_num_instances = $var; - - return $this; - } - - /** - * Optional. Instance flexibility Policy allowing a mixture of VM shapes and - * provisioning models. - * - * Generated from protobuf field .google.cloud.dataproc.v1.InstanceFlexibilityPolicy instance_flexibility_policy = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\InstanceFlexibilityPolicy|null - */ - public function getInstanceFlexibilityPolicy() - { - return $this->instance_flexibility_policy; - } - - public function hasInstanceFlexibilityPolicy() - { - return isset($this->instance_flexibility_policy); - } - - public function clearInstanceFlexibilityPolicy() - { - unset($this->instance_flexibility_policy); - } - - /** - * Optional. Instance flexibility Policy allowing a mixture of VM shapes and - * provisioning models. - * - * Generated from protobuf field .google.cloud.dataproc.v1.InstanceFlexibilityPolicy instance_flexibility_policy = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\InstanceFlexibilityPolicy $var - * @return $this - */ - public function setInstanceFlexibilityPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\InstanceFlexibilityPolicy::class); - $this->instance_flexibility_policy = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/InstanceGroupConfig/Preemptibility.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/InstanceGroupConfig/Preemptibility.php deleted file mode 100644 index cf790907d9c..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/InstanceGroupConfig/Preemptibility.php +++ /dev/null @@ -1,84 +0,0 @@ -google.cloud.dataproc.v1.InstanceGroupConfig.Preemptibility - */ -class Preemptibility -{ - /** - * Preemptibility is unspecified, the system will choose the - * appropriate setting for each instance group. - * - * Generated from protobuf enum PREEMPTIBILITY_UNSPECIFIED = 0; - */ - const PREEMPTIBILITY_UNSPECIFIED = 0; - /** - * Instances are non-preemptible. - * This option is allowed for all instance groups and is the only valid - * value for Master and Worker instance groups. - * - * Generated from protobuf enum NON_PREEMPTIBLE = 1; - */ - const NON_PREEMPTIBLE = 1; - /** - * Instances are [preemptible] - * (https://cloud.google.com/compute/docs/instances/preemptible). - * This option is allowed only for [secondary worker] - * (https://cloud.google.com/dataproc/docs/concepts/compute/secondary-vms) - * groups. - * - * Generated from protobuf enum PREEMPTIBLE = 2; - */ - const PREEMPTIBLE = 2; - /** - * Instances are [Spot VMs] - * (https://cloud.google.com/compute/docs/instances/spot). - * This option is allowed only for [secondary worker] - * (https://cloud.google.com/dataproc/docs/concepts/compute/secondary-vms) - * groups. Spot VMs are the latest version of [preemptible VMs] - * (https://cloud.google.com/compute/docs/instances/preemptible), and - * provide additional features. - * - * Generated from protobuf enum SPOT = 3; - */ - const SPOT = 3; - - private static $valueToName = [ - self::PREEMPTIBILITY_UNSPECIFIED => 'PREEMPTIBILITY_UNSPECIFIED', - self::NON_PREEMPTIBLE => 'NON_PREEMPTIBLE', - self::PREEMPTIBLE => 'PREEMPTIBLE', - self::SPOT => 'SPOT', - ]; - - 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(Preemptibility::class, \Google\Cloud\Dataproc\V1\InstanceGroupConfig_Preemptibility::class); - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/InstanceReference.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/InstanceReference.php deleted file mode 100644 index 7b4c3ce1d82..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/InstanceReference.php +++ /dev/null @@ -1,169 +0,0 @@ -google.cloud.dataproc.v1.InstanceReference - */ -class InstanceReference extends \Google\Protobuf\Internal\Message -{ - /** - * The user-friendly name of the Compute Engine instance. - * - * Generated from protobuf field string instance_name = 1; - */ - protected $instance_name = ''; - /** - * The unique identifier of the Compute Engine instance. - * - * Generated from protobuf field string instance_id = 2; - */ - protected $instance_id = ''; - /** - * The public RSA key used for sharing data with this instance. - * - * Generated from protobuf field string public_key = 3; - */ - protected $public_key = ''; - /** - * The public ECIES key used for sharing data with this instance. - * - * Generated from protobuf field string public_ecies_key = 4; - */ - protected $public_ecies_key = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $instance_name - * The user-friendly name of the Compute Engine instance. - * @type string $instance_id - * The unique identifier of the Compute Engine instance. - * @type string $public_key - * The public RSA key used for sharing data with this instance. - * @type string $public_ecies_key - * The public ECIES key used for sharing data with this instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Clusters::initOnce(); - parent::__construct($data); - } - - /** - * The user-friendly name of the Compute Engine instance. - * - * Generated from protobuf field string instance_name = 1; - * @return string - */ - public function getInstanceName() - { - return $this->instance_name; - } - - /** - * The user-friendly name of the Compute Engine instance. - * - * Generated from protobuf field string instance_name = 1; - * @param string $var - * @return $this - */ - public function setInstanceName($var) - { - GPBUtil::checkString($var, True); - $this->instance_name = $var; - - return $this; - } - - /** - * The unique identifier of the Compute Engine instance. - * - * Generated from protobuf field string instance_id = 2; - * @return string - */ - public function getInstanceId() - { - return $this->instance_id; - } - - /** - * The unique identifier of the Compute Engine instance. - * - * Generated from protobuf field string instance_id = 2; - * @param string $var - * @return $this - */ - public function setInstanceId($var) - { - GPBUtil::checkString($var, True); - $this->instance_id = $var; - - return $this; - } - - /** - * The public RSA key used for sharing data with this instance. - * - * Generated from protobuf field string public_key = 3; - * @return string - */ - public function getPublicKey() - { - return $this->public_key; - } - - /** - * The public RSA key used for sharing data with this instance. - * - * Generated from protobuf field string public_key = 3; - * @param string $var - * @return $this - */ - public function setPublicKey($var) - { - GPBUtil::checkString($var, True); - $this->public_key = $var; - - return $this; - } - - /** - * The public ECIES key used for sharing data with this instance. - * - * Generated from protobuf field string public_ecies_key = 4; - * @return string - */ - public function getPublicEciesKey() - { - return $this->public_ecies_key; - } - - /** - * The public ECIES key used for sharing data with this instance. - * - * Generated from protobuf field string public_ecies_key = 4; - * @param string $var - * @return $this - */ - public function setPublicEciesKey($var) - { - GPBUtil::checkString($var, True); - $this->public_ecies_key = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/InstantiateInlineWorkflowTemplateRequest.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/InstantiateInlineWorkflowTemplateRequest.php deleted file mode 100644 index 5fe1c1f4f0e..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/InstantiateInlineWorkflowTemplateRequest.php +++ /dev/null @@ -1,222 +0,0 @@ -google.cloud.dataproc.v1.InstantiateInlineWorkflowTemplateRequest - */ -class InstantiateInlineWorkflowTemplateRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the region or location, as described - * in https://cloud.google.com/apis/design/resource_names. - * * For `projects.regions.workflowTemplates,instantiateinline`, the resource - * name of the region has the following format: - * `projects/{project_id}/regions/{region}` - * * For `projects.locations.workflowTemplates.instantiateinline`, the - * resource name of the location has the following format: - * `projects/{project_id}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The workflow template to instantiate. - * - * Generated from protobuf field .google.cloud.dataproc.v1.WorkflowTemplate template = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $template = null; - /** - * Optional. A tag that prevents multiple concurrent workflow - * instances with the same tag from running. This mitigates risk of - * concurrent instances started due to retries. - * It is recommended to always set this value to a - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - * The tag must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). The maximum length is 40 characters. - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. The resource name of the region or location, as described - * in https://cloud.google.com/apis/design/resource_names. - * - * * For `projects.regions.workflowTemplates,instantiateinline`, the resource - * name of the region has the following format: - * `projects/{project_id}/regions/{region}` - * - * * For `projects.locations.workflowTemplates.instantiateinline`, the - * resource name of the location has the following format: - * `projects/{project_id}/locations/{location}` - * Please see {@see WorkflowTemplateServiceClient::regionName()} for help formatting this field. - * @param \Google\Cloud\Dataproc\V1\WorkflowTemplate $template Required. The workflow template to instantiate. - * - * @return \Google\Cloud\Dataproc\V1\InstantiateInlineWorkflowTemplateRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Dataproc\V1\WorkflowTemplate $template): self - { - return (new self()) - ->setParent($parent) - ->setTemplate($template); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the region or location, as described - * in https://cloud.google.com/apis/design/resource_names. - * * For `projects.regions.workflowTemplates,instantiateinline`, the resource - * name of the region has the following format: - * `projects/{project_id}/regions/{region}` - * * For `projects.locations.workflowTemplates.instantiateinline`, the - * resource name of the location has the following format: - * `projects/{project_id}/locations/{location}` - * @type \Google\Cloud\Dataproc\V1\WorkflowTemplate $template - * Required. The workflow template to instantiate. - * @type string $request_id - * Optional. A tag that prevents multiple concurrent workflow - * instances with the same tag from running. This mitigates risk of - * concurrent instances started due to retries. - * It is recommended to always set this value to a - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - * The tag must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). The maximum length is 40 characters. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\WorkflowTemplates::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the region or location, as described - * in https://cloud.google.com/apis/design/resource_names. - * * For `projects.regions.workflowTemplates,instantiateinline`, the resource - * name of the region has the following format: - * `projects/{project_id}/regions/{region}` - * * For `projects.locations.workflowTemplates.instantiateinline`, the - * resource name of the location has the following format: - * `projects/{project_id}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the region or location, as described - * in https://cloud.google.com/apis/design/resource_names. - * * For `projects.regions.workflowTemplates,instantiateinline`, the resource - * name of the region has the following format: - * `projects/{project_id}/regions/{region}` - * * For `projects.locations.workflowTemplates.instantiateinline`, the - * resource name of the location has the following format: - * `projects/{project_id}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The workflow template to instantiate. - * - * Generated from protobuf field .google.cloud.dataproc.v1.WorkflowTemplate template = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataproc\V1\WorkflowTemplate|null - */ - public function getTemplate() - { - return $this->template; - } - - public function hasTemplate() - { - return isset($this->template); - } - - public function clearTemplate() - { - unset($this->template); - } - - /** - * Required. The workflow template to instantiate. - * - * Generated from protobuf field .google.cloud.dataproc.v1.WorkflowTemplate template = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataproc\V1\WorkflowTemplate $var - * @return $this - */ - public function setTemplate($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\WorkflowTemplate::class); - $this->template = $var; - - return $this; - } - - /** - * Optional. A tag that prevents multiple concurrent workflow - * instances with the same tag from running. This mitigates risk of - * concurrent instances started due to retries. - * It is recommended to always set this value to a - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - * The tag must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). The maximum length is 40 characters. - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A tag that prevents multiple concurrent workflow - * instances with the same tag from running. This mitigates risk of - * concurrent instances started due to retries. - * It is recommended to always set this value to a - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - * The tag must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). The maximum length is 40 characters. - * - * 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/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/InstantiateWorkflowTemplateRequest.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/InstantiateWorkflowTemplateRequest.php deleted file mode 100644 index a8aacd6befb..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/InstantiateWorkflowTemplateRequest.php +++ /dev/null @@ -1,290 +0,0 @@ -google.cloud.dataproc.v1.InstantiateWorkflowTemplateRequest - */ -class InstantiateWorkflowTemplateRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the workflow template, as described - * in https://cloud.google.com/apis/design/resource_names. - * * For `projects.regions.workflowTemplates.instantiate`, the resource name - * of the template has the following format: - * `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}` - * * For `projects.locations.workflowTemplates.instantiate`, the resource name - * of the template has the following format: - * `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. The version of workflow template to instantiate. If specified, - * the workflow will be instantiated only if the current version of - * the workflow template has the supplied version. - * This option cannot be used to instantiate a previous version of - * workflow template. - * - * Generated from protobuf field int32 version = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $version = 0; - /** - * Optional. A tag that prevents multiple concurrent workflow - * instances with the same tag from running. This mitigates risk of - * concurrent instances started due to retries. - * It is recommended to always set this value to a - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - * The tag must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). The maximum length is 40 characters. - * - * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - /** - * Optional. Map from parameter names to values that should be used for those - * parameters. Values may not exceed 1000 characters. - * - * Generated from protobuf field map parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $parameters; - - /** - * @param string $name Required. The resource name of the workflow template, as described - * in https://cloud.google.com/apis/design/resource_names. - * - * * For `projects.regions.workflowTemplates.instantiate`, the resource name - * of the template has the following format: - * `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}` - * - * * For `projects.locations.workflowTemplates.instantiate`, the resource name - * of the template has the following format: - * `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}` - * Please see {@see WorkflowTemplateServiceClient::workflowTemplateName()} for help formatting this field. - * - * @return \Google\Cloud\Dataproc\V1\InstantiateWorkflowTemplateRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * @param string $name Required. The resource name of the workflow template, as described - * in https://cloud.google.com/apis/design/resource_names. - * - * * For `projects.regions.workflowTemplates.instantiate`, the resource name - * of the template has the following format: - * `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}` - * - * * For `projects.locations.workflowTemplates.instantiate`, the resource name - * of the template has the following format: - * `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}` - * Please see {@see WorkflowTemplateServiceClient::workflowTemplateName()} for help formatting this field. - * @param array $parameters Optional. Map from parameter names to values that should be used for those - * parameters. Values may not exceed 1000 characters. - * - * @return \Google\Cloud\Dataproc\V1\InstantiateWorkflowTemplateRequest - * - * @experimental - */ - public static function buildFromNameParameters(string $name, array $parameters): self - { - return (new self()) - ->setName($name) - ->setParameters($parameters); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the workflow template, as described - * in https://cloud.google.com/apis/design/resource_names. - * * For `projects.regions.workflowTemplates.instantiate`, the resource name - * of the template has the following format: - * `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}` - * * For `projects.locations.workflowTemplates.instantiate`, the resource name - * of the template has the following format: - * `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}` - * @type int $version - * Optional. The version of workflow template to instantiate. If specified, - * the workflow will be instantiated only if the current version of - * the workflow template has the supplied version. - * This option cannot be used to instantiate a previous version of - * workflow template. - * @type string $request_id - * Optional. A tag that prevents multiple concurrent workflow - * instances with the same tag from running. This mitigates risk of - * concurrent instances started due to retries. - * It is recommended to always set this value to a - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - * The tag must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). The maximum length is 40 characters. - * @type array|\Google\Protobuf\Internal\MapField $parameters - * Optional. Map from parameter names to values that should be used for those - * parameters. Values may not exceed 1000 characters. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\WorkflowTemplates::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the workflow template, as described - * in https://cloud.google.com/apis/design/resource_names. - * * For `projects.regions.workflowTemplates.instantiate`, the resource name - * of the template has the following format: - * `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}` - * * For `projects.locations.workflowTemplates.instantiate`, the resource name - * of the template has the following format: - * `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the workflow template, as described - * in https://cloud.google.com/apis/design/resource_names. - * * For `projects.regions.workflowTemplates.instantiate`, the resource name - * of the template has the following format: - * `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}` - * * For `projects.locations.workflowTemplates.instantiate`, the resource name - * of the template has the following format: - * `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. The version of workflow template to instantiate. If specified, - * the workflow will be instantiated only if the current version of - * the workflow template has the supplied version. - * This option cannot be used to instantiate a previous version of - * workflow template. - * - * Generated from protobuf field int32 version = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getVersion() - { - return $this->version; - } - - /** - * Optional. The version of workflow template to instantiate. If specified, - * the workflow will be instantiated only if the current version of - * the workflow template has the supplied version. - * This option cannot be used to instantiate a previous version of - * workflow template. - * - * Generated from protobuf field int32 version = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkInt32($var); - $this->version = $var; - - return $this; - } - - /** - * Optional. A tag that prevents multiple concurrent workflow - * instances with the same tag from running. This mitigates risk of - * concurrent instances started due to retries. - * It is recommended to always set this value to a - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - * The tag must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). The maximum length is 40 characters. - * - * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A tag that prevents multiple concurrent workflow - * instances with the same tag from running. This mitigates risk of - * concurrent instances started due to retries. - * It is recommended to always set this value to a - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - * The tag must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). The maximum length is 40 characters. - * - * Generated from protobuf field string request_id = 5 [(.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. Map from parameter names to values that should be used for those - * parameters. Values may not exceed 1000 characters. - * - * Generated from protobuf field map parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getParameters() - { - return $this->parameters; - } - - /** - * Optional. Map from parameter names to values that should be used for those - * parameters. Values may not exceed 1000 characters. - * - * Generated from protobuf field map parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setParameters($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->parameters = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/Job.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/Job.php deleted file mode 100644 index 7c50484dd72..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/Job.php +++ /dev/null @@ -1,885 +0,0 @@ -google.cloud.dataproc.v1.Job - */ -class Job extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The fully qualified reference to the job, which can be used to - * obtain the equivalent REST path of the job resource. If this property - * is not specified when a job is created, the server generates a - * job_id. - * - * Generated from protobuf field .google.cloud.dataproc.v1.JobReference reference = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $reference = null; - /** - * Required. Job information, including how, when, and where to - * run the job. - * - * Generated from protobuf field .google.cloud.dataproc.v1.JobPlacement placement = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $placement = null; - /** - * Output only. The job status. Additional application-specific - * status information may be contained in the type_job - * and yarn_applications fields. - * - * Generated from protobuf field .google.cloud.dataproc.v1.JobStatus status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $status = null; - /** - * Output only. The previous job status. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.JobStatus status_history = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $status_history; - /** - * Output only. The collection of YARN applications spun up by this job. - * **Beta** Feature: This report is available for testing purposes only. It - * may be changed before final release. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.YarnApplication yarn_applications = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $yarn_applications; - /** - * Output only. A URI pointing to the location of the stdout of the job's - * driver program. - * - * Generated from protobuf field string driver_output_resource_uri = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $driver_output_resource_uri = ''; - /** - * Output only. If present, the location of miscellaneous control files - * which may be used as part of job setup and handling. If not present, - * control files may be placed in the same location as `driver_output_uri`. - * - * Generated from protobuf field string driver_control_files_uri = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $driver_control_files_uri = ''; - /** - * Optional. The labels to associate with this job. - * Label **keys** must contain 1 to 63 characters, and must conform to - * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). - * Label **values** may be empty, but, if present, must contain 1 to 63 - * characters, and must conform to [RFC - * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be - * associated with a job. - * - * Generated from protobuf field map labels = 18 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Optional. Job scheduling configuration. - * - * Generated from protobuf field .google.cloud.dataproc.v1.JobScheduling scheduling = 20 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $scheduling = null; - /** - * Output only. A UUID that uniquely identifies a job within the project - * over time. This is in contrast to a user-settable reference.job_id that - * may be reused over time. - * - * Generated from protobuf field string job_uuid = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $job_uuid = ''; - /** - * Output only. Indicates whether the job is completed. If the value is - * `false`, the job is still in progress. If `true`, the job is completed, and - * `status.state` field will indicate if it was successful, failed, - * or cancelled. - * - * Generated from protobuf field bool done = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $done = false; - /** - * Optional. Driver scheduling configuration. - * - * Generated from protobuf field .google.cloud.dataproc.v1.DriverSchedulingConfig driver_scheduling_config = 27 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $driver_scheduling_config = null; - protected $type_job; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dataproc\V1\JobReference $reference - * Optional. The fully qualified reference to the job, which can be used to - * obtain the equivalent REST path of the job resource. If this property - * is not specified when a job is created, the server generates a - * job_id. - * @type \Google\Cloud\Dataproc\V1\JobPlacement $placement - * Required. Job information, including how, when, and where to - * run the job. - * @type \Google\Cloud\Dataproc\V1\HadoopJob $hadoop_job - * Optional. Job is a Hadoop job. - * @type \Google\Cloud\Dataproc\V1\SparkJob $spark_job - * Optional. Job is a Spark job. - * @type \Google\Cloud\Dataproc\V1\PySparkJob $pyspark_job - * Optional. Job is a PySpark job. - * @type \Google\Cloud\Dataproc\V1\HiveJob $hive_job - * Optional. Job is a Hive job. - * @type \Google\Cloud\Dataproc\V1\PigJob $pig_job - * Optional. Job is a Pig job. - * @type \Google\Cloud\Dataproc\V1\SparkRJob $spark_r_job - * Optional. Job is a SparkR job. - * @type \Google\Cloud\Dataproc\V1\SparkSqlJob $spark_sql_job - * Optional. Job is a SparkSql job. - * @type \Google\Cloud\Dataproc\V1\PrestoJob $presto_job - * Optional. Job is a Presto job. - * @type \Google\Cloud\Dataproc\V1\TrinoJob $trino_job - * Optional. Job is a Trino job. - * @type \Google\Cloud\Dataproc\V1\JobStatus $status - * Output only. The job status. Additional application-specific - * status information may be contained in the type_job - * and yarn_applications fields. - * @type array<\Google\Cloud\Dataproc\V1\JobStatus>|\Google\Protobuf\Internal\RepeatedField $status_history - * Output only. The previous job status. - * @type array<\Google\Cloud\Dataproc\V1\YarnApplication>|\Google\Protobuf\Internal\RepeatedField $yarn_applications - * Output only. The collection of YARN applications spun up by this job. - * **Beta** Feature: This report is available for testing purposes only. It - * may be changed before final release. - * @type string $driver_output_resource_uri - * Output only. A URI pointing to the location of the stdout of the job's - * driver program. - * @type string $driver_control_files_uri - * Output only. If present, the location of miscellaneous control files - * which may be used as part of job setup and handling. If not present, - * control files may be placed in the same location as `driver_output_uri`. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. The labels to associate with this job. - * Label **keys** must contain 1 to 63 characters, and must conform to - * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). - * Label **values** may be empty, but, if present, must contain 1 to 63 - * characters, and must conform to [RFC - * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be - * associated with a job. - * @type \Google\Cloud\Dataproc\V1\JobScheduling $scheduling - * Optional. Job scheduling configuration. - * @type string $job_uuid - * Output only. A UUID that uniquely identifies a job within the project - * over time. This is in contrast to a user-settable reference.job_id that - * may be reused over time. - * @type bool $done - * Output only. Indicates whether the job is completed. If the value is - * `false`, the job is still in progress. If `true`, the job is completed, and - * `status.state` field will indicate if it was successful, failed, - * or cancelled. - * @type \Google\Cloud\Dataproc\V1\DriverSchedulingConfig $driver_scheduling_config - * Optional. Driver scheduling configuration. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Jobs::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The fully qualified reference to the job, which can be used to - * obtain the equivalent REST path of the job resource. If this property - * is not specified when a job is created, the server generates a - * job_id. - * - * Generated from protobuf field .google.cloud.dataproc.v1.JobReference reference = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\JobReference|null - */ - public function getReference() - { - return $this->reference; - } - - public function hasReference() - { - return isset($this->reference); - } - - public function clearReference() - { - unset($this->reference); - } - - /** - * Optional. The fully qualified reference to the job, which can be used to - * obtain the equivalent REST path of the job resource. If this property - * is not specified when a job is created, the server generates a - * job_id. - * - * Generated from protobuf field .google.cloud.dataproc.v1.JobReference reference = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\JobReference $var - * @return $this - */ - public function setReference($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\JobReference::class); - $this->reference = $var; - - return $this; - } - - /** - * Required. Job information, including how, when, and where to - * run the job. - * - * Generated from protobuf field .google.cloud.dataproc.v1.JobPlacement placement = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataproc\V1\JobPlacement|null - */ - public function getPlacement() - { - return $this->placement; - } - - public function hasPlacement() - { - return isset($this->placement); - } - - public function clearPlacement() - { - unset($this->placement); - } - - /** - * Required. Job information, including how, when, and where to - * run the job. - * - * Generated from protobuf field .google.cloud.dataproc.v1.JobPlacement placement = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataproc\V1\JobPlacement $var - * @return $this - */ - public function setPlacement($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\JobPlacement::class); - $this->placement = $var; - - return $this; - } - - /** - * Optional. Job is a Hadoop job. - * - * Generated from protobuf field .google.cloud.dataproc.v1.HadoopJob hadoop_job = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\HadoopJob|null - */ - public function getHadoopJob() - { - return $this->readOneof(3); - } - - public function hasHadoopJob() - { - return $this->hasOneof(3); - } - - /** - * Optional. Job is a Hadoop job. - * - * Generated from protobuf field .google.cloud.dataproc.v1.HadoopJob hadoop_job = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\HadoopJob $var - * @return $this - */ - public function setHadoopJob($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\HadoopJob::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Optional. Job is a Spark job. - * - * Generated from protobuf field .google.cloud.dataproc.v1.SparkJob spark_job = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\SparkJob|null - */ - public function getSparkJob() - { - return $this->readOneof(4); - } - - public function hasSparkJob() - { - return $this->hasOneof(4); - } - - /** - * Optional. Job is a Spark job. - * - * Generated from protobuf field .google.cloud.dataproc.v1.SparkJob spark_job = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\SparkJob $var - * @return $this - */ - public function setSparkJob($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\SparkJob::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Optional. Job is a PySpark job. - * - * Generated from protobuf field .google.cloud.dataproc.v1.PySparkJob pyspark_job = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\PySparkJob|null - */ - public function getPysparkJob() - { - return $this->readOneof(5); - } - - public function hasPysparkJob() - { - return $this->hasOneof(5); - } - - /** - * Optional. Job is a PySpark job. - * - * Generated from protobuf field .google.cloud.dataproc.v1.PySparkJob pyspark_job = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\PySparkJob $var - * @return $this - */ - public function setPysparkJob($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\PySparkJob::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Optional. Job is a Hive job. - * - * Generated from protobuf field .google.cloud.dataproc.v1.HiveJob hive_job = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\HiveJob|null - */ - public function getHiveJob() - { - return $this->readOneof(6); - } - - public function hasHiveJob() - { - return $this->hasOneof(6); - } - - /** - * Optional. Job is a Hive job. - * - * Generated from protobuf field .google.cloud.dataproc.v1.HiveJob hive_job = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\HiveJob $var - * @return $this - */ - public function setHiveJob($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\HiveJob::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Optional. Job is a Pig job. - * - * Generated from protobuf field .google.cloud.dataproc.v1.PigJob pig_job = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\PigJob|null - */ - public function getPigJob() - { - return $this->readOneof(7); - } - - public function hasPigJob() - { - return $this->hasOneof(7); - } - - /** - * Optional. Job is a Pig job. - * - * Generated from protobuf field .google.cloud.dataproc.v1.PigJob pig_job = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\PigJob $var - * @return $this - */ - public function setPigJob($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\PigJob::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * Optional. Job is a SparkR job. - * - * Generated from protobuf field .google.cloud.dataproc.v1.SparkRJob spark_r_job = 21 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\SparkRJob|null - */ - public function getSparkRJob() - { - return $this->readOneof(21); - } - - public function hasSparkRJob() - { - return $this->hasOneof(21); - } - - /** - * Optional. Job is a SparkR job. - * - * Generated from protobuf field .google.cloud.dataproc.v1.SparkRJob spark_r_job = 21 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\SparkRJob $var - * @return $this - */ - public function setSparkRJob($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\SparkRJob::class); - $this->writeOneof(21, $var); - - return $this; - } - - /** - * Optional. Job is a SparkSql job. - * - * Generated from protobuf field .google.cloud.dataproc.v1.SparkSqlJob spark_sql_job = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\SparkSqlJob|null - */ - public function getSparkSqlJob() - { - return $this->readOneof(12); - } - - public function hasSparkSqlJob() - { - return $this->hasOneof(12); - } - - /** - * Optional. Job is a SparkSql job. - * - * Generated from protobuf field .google.cloud.dataproc.v1.SparkSqlJob spark_sql_job = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\SparkSqlJob $var - * @return $this - */ - public function setSparkSqlJob($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\SparkSqlJob::class); - $this->writeOneof(12, $var); - - return $this; - } - - /** - * Optional. Job is a Presto job. - * - * Generated from protobuf field .google.cloud.dataproc.v1.PrestoJob presto_job = 23 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\PrestoJob|null - */ - public function getPrestoJob() - { - return $this->readOneof(23); - } - - public function hasPrestoJob() - { - return $this->hasOneof(23); - } - - /** - * Optional. Job is a Presto job. - * - * Generated from protobuf field .google.cloud.dataproc.v1.PrestoJob presto_job = 23 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\PrestoJob $var - * @return $this - */ - public function setPrestoJob($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\PrestoJob::class); - $this->writeOneof(23, $var); - - return $this; - } - - /** - * Optional. Job is a Trino job. - * - * Generated from protobuf field .google.cloud.dataproc.v1.TrinoJob trino_job = 28 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\TrinoJob|null - */ - public function getTrinoJob() - { - return $this->readOneof(28); - } - - public function hasTrinoJob() - { - return $this->hasOneof(28); - } - - /** - * Optional. Job is a Trino job. - * - * Generated from protobuf field .google.cloud.dataproc.v1.TrinoJob trino_job = 28 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\TrinoJob $var - * @return $this - */ - public function setTrinoJob($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\TrinoJob::class); - $this->writeOneof(28, $var); - - return $this; - } - - /** - * Output only. The job status. Additional application-specific - * status information may be contained in the type_job - * and yarn_applications fields. - * - * Generated from protobuf field .google.cloud.dataproc.v1.JobStatus status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataproc\V1\JobStatus|null - */ - public function getStatus() - { - return $this->status; - } - - public function hasStatus() - { - return isset($this->status); - } - - public function clearStatus() - { - unset($this->status); - } - - /** - * Output only. The job status. Additional application-specific - * status information may be contained in the type_job - * and yarn_applications fields. - * - * Generated from protobuf field .google.cloud.dataproc.v1.JobStatus status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataproc\V1\JobStatus $var - * @return $this - */ - public function setStatus($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\JobStatus::class); - $this->status = $var; - - return $this; - } - - /** - * Output only. The previous job status. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.JobStatus status_history = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getStatusHistory() - { - return $this->status_history; - } - - /** - * Output only. The previous job status. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.JobStatus status_history = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\Dataproc\V1\JobStatus>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setStatusHistory($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataproc\V1\JobStatus::class); - $this->status_history = $arr; - - return $this; - } - - /** - * Output only. The collection of YARN applications spun up by this job. - * **Beta** Feature: This report is available for testing purposes only. It - * may be changed before final release. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.YarnApplication yarn_applications = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getYarnApplications() - { - return $this->yarn_applications; - } - - /** - * Output only. The collection of YARN applications spun up by this job. - * **Beta** Feature: This report is available for testing purposes only. It - * may be changed before final release. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.YarnApplication yarn_applications = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\Dataproc\V1\YarnApplication>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setYarnApplications($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataproc\V1\YarnApplication::class); - $this->yarn_applications = $arr; - - return $this; - } - - /** - * Output only. A URI pointing to the location of the stdout of the job's - * driver program. - * - * Generated from protobuf field string driver_output_resource_uri = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDriverOutputResourceUri() - { - return $this->driver_output_resource_uri; - } - - /** - * Output only. A URI pointing to the location of the stdout of the job's - * driver program. - * - * Generated from protobuf field string driver_output_resource_uri = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDriverOutputResourceUri($var) - { - GPBUtil::checkString($var, True); - $this->driver_output_resource_uri = $var; - - return $this; - } - - /** - * Output only. If present, the location of miscellaneous control files - * which may be used as part of job setup and handling. If not present, - * control files may be placed in the same location as `driver_output_uri`. - * - * Generated from protobuf field string driver_control_files_uri = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDriverControlFilesUri() - { - return $this->driver_control_files_uri; - } - - /** - * Output only. If present, the location of miscellaneous control files - * which may be used as part of job setup and handling. If not present, - * control files may be placed in the same location as `driver_output_uri`. - * - * Generated from protobuf field string driver_control_files_uri = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDriverControlFilesUri($var) - { - GPBUtil::checkString($var, True); - $this->driver_control_files_uri = $var; - - return $this; - } - - /** - * Optional. The labels to associate with this job. - * Label **keys** must contain 1 to 63 characters, and must conform to - * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). - * Label **values** may be empty, but, if present, must contain 1 to 63 - * characters, and must conform to [RFC - * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be - * associated with a job. - * - * Generated from protobuf field map labels = 18 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. The labels to associate with this job. - * Label **keys** must contain 1 to 63 characters, and must conform to - * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). - * Label **values** may be empty, but, if present, must contain 1 to 63 - * characters, and must conform to [RFC - * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be - * associated with a job. - * - * Generated from protobuf field map labels = 18 [(.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; - } - - /** - * Optional. Job scheduling configuration. - * - * Generated from protobuf field .google.cloud.dataproc.v1.JobScheduling scheduling = 20 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\JobScheduling|null - */ - public function getScheduling() - { - return $this->scheduling; - } - - public function hasScheduling() - { - return isset($this->scheduling); - } - - public function clearScheduling() - { - unset($this->scheduling); - } - - /** - * Optional. Job scheduling configuration. - * - * Generated from protobuf field .google.cloud.dataproc.v1.JobScheduling scheduling = 20 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\JobScheduling $var - * @return $this - */ - public function setScheduling($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\JobScheduling::class); - $this->scheduling = $var; - - return $this; - } - - /** - * Output only. A UUID that uniquely identifies a job within the project - * over time. This is in contrast to a user-settable reference.job_id that - * may be reused over time. - * - * Generated from protobuf field string job_uuid = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getJobUuid() - { - return $this->job_uuid; - } - - /** - * Output only. A UUID that uniquely identifies a job within the project - * over time. This is in contrast to a user-settable reference.job_id that - * may be reused over time. - * - * Generated from protobuf field string job_uuid = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setJobUuid($var) - { - GPBUtil::checkString($var, True); - $this->job_uuid = $var; - - return $this; - } - - /** - * Output only. Indicates whether the job is completed. If the value is - * `false`, the job is still in progress. If `true`, the job is completed, and - * `status.state` field will indicate if it was successful, failed, - * or cancelled. - * - * Generated from protobuf field bool done = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getDone() - { - return $this->done; - } - - /** - * Output only. Indicates whether the job is completed. If the value is - * `false`, the job is still in progress. If `true`, the job is completed, and - * `status.state` field will indicate if it was successful, failed, - * or cancelled. - * - * Generated from protobuf field bool done = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setDone($var) - { - GPBUtil::checkBool($var); - $this->done = $var; - - return $this; - } - - /** - * Optional. Driver scheduling configuration. - * - * Generated from protobuf field .google.cloud.dataproc.v1.DriverSchedulingConfig driver_scheduling_config = 27 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\DriverSchedulingConfig|null - */ - public function getDriverSchedulingConfig() - { - return $this->driver_scheduling_config; - } - - public function hasDriverSchedulingConfig() - { - return isset($this->driver_scheduling_config); - } - - public function clearDriverSchedulingConfig() - { - unset($this->driver_scheduling_config); - } - - /** - * Optional. Driver scheduling configuration. - * - * Generated from protobuf field .google.cloud.dataproc.v1.DriverSchedulingConfig driver_scheduling_config = 27 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\DriverSchedulingConfig $var - * @return $this - */ - public function setDriverSchedulingConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\DriverSchedulingConfig::class); - $this->driver_scheduling_config = $var; - - return $this; - } - - /** - * @return string - */ - public function getTypeJob() - { - return $this->whichOneof("type_job"); - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/JobMetadata.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/JobMetadata.php deleted file mode 100644 index f7c0393acb8..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/JobMetadata.php +++ /dev/null @@ -1,189 +0,0 @@ -google.cloud.dataproc.v1.JobMetadata - */ -class JobMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The job id. - * - * Generated from protobuf field string job_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $job_id = ''; - /** - * Output only. Most recent job status. - * - * Generated from protobuf field .google.cloud.dataproc.v1.JobStatus status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $status = null; - /** - * Output only. Operation type. - * - * Generated from protobuf field string operation_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $operation_type = ''; - /** - * Output only. Job submission time. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $start_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $job_id - * Output only. The job id. - * @type \Google\Cloud\Dataproc\V1\JobStatus $status - * Output only. Most recent job status. - * @type string $operation_type - * Output only. Operation type. - * @type \Google\Protobuf\Timestamp $start_time - * Output only. Job submission time. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Jobs::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The job id. - * - * Generated from protobuf field string job_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getJobId() - { - return $this->job_id; - } - - /** - * Output only. The job id. - * - * Generated from protobuf field string job_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setJobId($var) - { - GPBUtil::checkString($var, True); - $this->job_id = $var; - - return $this; - } - - /** - * Output only. Most recent job status. - * - * Generated from protobuf field .google.cloud.dataproc.v1.JobStatus status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataproc\V1\JobStatus|null - */ - public function getStatus() - { - return $this->status; - } - - public function hasStatus() - { - return isset($this->status); - } - - public function clearStatus() - { - unset($this->status); - } - - /** - * Output only. Most recent job status. - * - * Generated from protobuf field .google.cloud.dataproc.v1.JobStatus status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataproc\V1\JobStatus $var - * @return $this - */ - public function setStatus($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\JobStatus::class); - $this->status = $var; - - return $this; - } - - /** - * Output only. Operation type. - * - * Generated from protobuf field string operation_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getOperationType() - { - return $this->operation_type; - } - - /** - * Output only. Operation type. - * - * Generated from protobuf field string operation_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setOperationType($var) - { - GPBUtil::checkString($var, True); - $this->operation_type = $var; - - return $this; - } - - /** - * Output only. Job submission time. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * Output only. Job submission time. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/JobPlacement.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/JobPlacement.php deleted file mode 100644 index 3e2f3be0343..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/JobPlacement.php +++ /dev/null @@ -1,143 +0,0 @@ -google.cloud.dataproc.v1.JobPlacement - */ -class JobPlacement extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the cluster where the job will be submitted. - * - * Generated from protobuf field string cluster_name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $cluster_name = ''; - /** - * Output only. A cluster UUID generated by the Dataproc service when - * the job is submitted. - * - * Generated from protobuf field string cluster_uuid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $cluster_uuid = ''; - /** - * Optional. Cluster labels to identify a cluster where the job will be - * submitted. - * - * Generated from protobuf field map cluster_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $cluster_labels; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $cluster_name - * Required. The name of the cluster where the job will be submitted. - * @type string $cluster_uuid - * Output only. A cluster UUID generated by the Dataproc service when - * the job is submitted. - * @type array|\Google\Protobuf\Internal\MapField $cluster_labels - * Optional. Cluster labels to identify a cluster where the job will be - * submitted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Jobs::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the cluster where the job will be submitted. - * - * Generated from protobuf field string cluster_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getClusterName() - { - return $this->cluster_name; - } - - /** - * Required. The name of the cluster where the job will be submitted. - * - * Generated from protobuf field string cluster_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setClusterName($var) - { - GPBUtil::checkString($var, True); - $this->cluster_name = $var; - - return $this; - } - - /** - * Output only. A cluster UUID generated by the Dataproc service when - * the job is submitted. - * - * Generated from protobuf field string cluster_uuid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getClusterUuid() - { - return $this->cluster_uuid; - } - - /** - * Output only. A cluster UUID generated by the Dataproc service when - * the job is submitted. - * - * Generated from protobuf field string cluster_uuid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setClusterUuid($var) - { - GPBUtil::checkString($var, True); - $this->cluster_uuid = $var; - - return $this; - } - - /** - * Optional. Cluster labels to identify a cluster where the job will be - * submitted. - * - * Generated from protobuf field map cluster_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getClusterLabels() - { - return $this->cluster_labels; - } - - /** - * Optional. Cluster labels to identify a cluster where the job will be - * submitted. - * - * Generated from protobuf field map cluster_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setClusterLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->cluster_labels = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/JobReference.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/JobReference.php deleted file mode 100644 index 97004c388e8..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/JobReference.php +++ /dev/null @@ -1,117 +0,0 @@ -google.cloud.dataproc.v1.JobReference - */ -class JobReference extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The ID of the Google Cloud Platform project that the job belongs - * to. If specified, must match the request project ID. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $project_id = ''; - /** - * Optional. The job ID, which must be unique within the project. - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), or hyphens (-). The maximum length is 100 characters. - * If not specified by the caller, the job ID will be provided by the server. - * - * Generated from protobuf field string job_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $job_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $project_id - * Optional. The ID of the Google Cloud Platform project that the job belongs - * to. If specified, must match the request project ID. - * @type string $job_id - * Optional. The job ID, which must be unique within the project. - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), or hyphens (-). The maximum length is 100 characters. - * If not specified by the caller, the job ID will be provided by the server. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Jobs::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The ID of the Google Cloud Platform project that the job belongs - * to. If specified, must match the request project ID. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * Optional. The ID of the Google Cloud Platform project that the job belongs - * to. If specified, must match the request project ID. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - - /** - * Optional. The job ID, which must be unique within the project. - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), or hyphens (-). The maximum length is 100 characters. - * If not specified by the caller, the job ID will be provided by the server. - * - * Generated from protobuf field string job_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getJobId() - { - return $this->job_id; - } - - /** - * Optional. The job ID, which must be unique within the project. - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), or hyphens (-). The maximum length is 100 characters. - * If not specified by the caller, the job ID will be provided by the server. - * - * Generated from protobuf field string job_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setJobId($var) - { - GPBUtil::checkString($var, True); - $this->job_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/JobScheduling.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/JobScheduling.php deleted file mode 100644 index 84563b4503c..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/JobScheduling.php +++ /dev/null @@ -1,161 +0,0 @@ -google.cloud.dataproc.v1.JobScheduling - */ -class JobScheduling extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Maximum number of times per hour a driver may be restarted as - * a result of driver exiting with non-zero code before job is - * reported failed. - * A job may be reported as thrashing if the driver exits with a non-zero code - * four times within a 10-minute window. - * Maximum value is 10. - * **Note:** This restartable job option is not supported in Dataproc - * [workflow templates] - * (https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template). - * - * Generated from protobuf field int32 max_failures_per_hour = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $max_failures_per_hour = 0; - /** - * Optional. Maximum total number of times a driver may be restarted as a - * result of the driver exiting with a non-zero code. After the maximum number - * is reached, the job will be reported as failed. - * Maximum value is 240. - * **Note:** Currently, this restartable job option is - * not supported in Dataproc - * [workflow - * templates](https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template). - * - * Generated from protobuf field int32 max_failures_total = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $max_failures_total = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $max_failures_per_hour - * Optional. Maximum number of times per hour a driver may be restarted as - * a result of driver exiting with non-zero code before job is - * reported failed. - * A job may be reported as thrashing if the driver exits with a non-zero code - * four times within a 10-minute window. - * Maximum value is 10. - * **Note:** This restartable job option is not supported in Dataproc - * [workflow templates] - * (https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template). - * @type int $max_failures_total - * Optional. Maximum total number of times a driver may be restarted as a - * result of the driver exiting with a non-zero code. After the maximum number - * is reached, the job will be reported as failed. - * Maximum value is 240. - * **Note:** Currently, this restartable job option is - * not supported in Dataproc - * [workflow - * templates](https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Jobs::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Maximum number of times per hour a driver may be restarted as - * a result of driver exiting with non-zero code before job is - * reported failed. - * A job may be reported as thrashing if the driver exits with a non-zero code - * four times within a 10-minute window. - * Maximum value is 10. - * **Note:** This restartable job option is not supported in Dataproc - * [workflow templates] - * (https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template). - * - * Generated from protobuf field int32 max_failures_per_hour = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getMaxFailuresPerHour() - { - return $this->max_failures_per_hour; - } - - /** - * Optional. Maximum number of times per hour a driver may be restarted as - * a result of driver exiting with non-zero code before job is - * reported failed. - * A job may be reported as thrashing if the driver exits with a non-zero code - * four times within a 10-minute window. - * Maximum value is 10. - * **Note:** This restartable job option is not supported in Dataproc - * [workflow templates] - * (https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template). - * - * Generated from protobuf field int32 max_failures_per_hour = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setMaxFailuresPerHour($var) - { - GPBUtil::checkInt32($var); - $this->max_failures_per_hour = $var; - - return $this; - } - - /** - * Optional. Maximum total number of times a driver may be restarted as a - * result of the driver exiting with a non-zero code. After the maximum number - * is reached, the job will be reported as failed. - * Maximum value is 240. - * **Note:** Currently, this restartable job option is - * not supported in Dataproc - * [workflow - * templates](https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template). - * - * Generated from protobuf field int32 max_failures_total = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getMaxFailuresTotal() - { - return $this->max_failures_total; - } - - /** - * Optional. Maximum total number of times a driver may be restarted as a - * result of the driver exiting with a non-zero code. After the maximum number - * is reached, the job will be reported as failed. - * Maximum value is 240. - * **Note:** Currently, this restartable job option is - * not supported in Dataproc - * [workflow - * templates](https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template). - * - * Generated from protobuf field int32 max_failures_total = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setMaxFailuresTotal($var) - { - GPBUtil::checkInt32($var); - $this->max_failures_total = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/JobStatus.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/JobStatus.php deleted file mode 100644 index a543d6cba10..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/JobStatus.php +++ /dev/null @@ -1,187 +0,0 @@ -google.cloud.dataproc.v1.JobStatus - */ -class JobStatus extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. A state message specifying the overall job state. - * - * Generated from protobuf field .google.cloud.dataproc.v1.JobStatus.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Optional. Output only. Job state details, such as an error - * description if the state is ERROR. - * - * Generated from protobuf field string details = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - */ - protected $details = ''; - /** - * Output only. The time when this state was entered. - * - * Generated from protobuf field .google.protobuf.Timestamp state_start_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state_start_time = null; - /** - * Output only. Additional state information, which includes - * status reported by the agent. - * - * Generated from protobuf field .google.cloud.dataproc.v1.JobStatus.Substate substate = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $substate = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state - * Output only. A state message specifying the overall job state. - * @type string $details - * Optional. Output only. Job state details, such as an error - * description if the state is ERROR. - * @type \Google\Protobuf\Timestamp $state_start_time - * Output only. The time when this state was entered. - * @type int $substate - * Output only. Additional state information, which includes - * status reported by the agent. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Jobs::initOnce(); - parent::__construct($data); - } - - /** - * Output only. A state message specifying the overall job state. - * - * Generated from protobuf field .google.cloud.dataproc.v1.JobStatus.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. A state message specifying the overall job state. - * - * Generated from protobuf field .google.cloud.dataproc.v1.JobStatus.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataproc\V1\JobStatus\State::class); - $this->state = $var; - - return $this; - } - - /** - * Optional. Output only. Job state details, such as an error - * description if the state is ERROR. - * - * Generated from protobuf field string details = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDetails() - { - return $this->details; - } - - /** - * Optional. Output only. Job state details, such as an error - * description if the state is ERROR. - * - * Generated from protobuf field string details = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDetails($var) - { - GPBUtil::checkString($var, True); - $this->details = $var; - - return $this; - } - - /** - * Output only. The time when this state was entered. - * - * Generated from protobuf field .google.protobuf.Timestamp state_start_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStateStartTime() - { - return $this->state_start_time; - } - - public function hasStateStartTime() - { - return isset($this->state_start_time); - } - - public function clearStateStartTime() - { - unset($this->state_start_time); - } - - /** - * Output only. The time when this state was entered. - * - * Generated from protobuf field .google.protobuf.Timestamp state_start_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStateStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->state_start_time = $var; - - return $this; - } - - /** - * Output only. Additional state information, which includes - * status reported by the agent. - * - * Generated from protobuf field .google.cloud.dataproc.v1.JobStatus.Substate substate = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getSubstate() - { - return $this->substate; - } - - /** - * Output only. Additional state information, which includes - * status reported by the agent. - * - * Generated from protobuf field .google.cloud.dataproc.v1.JobStatus.Substate substate = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setSubstate($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataproc\V1\JobStatus\Substate::class); - $this->substate = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/JobStatus/State.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/JobStatus/State.php deleted file mode 100644 index 1a9412ce352..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/JobStatus/State.php +++ /dev/null @@ -1,117 +0,0 @@ -google.cloud.dataproc.v1.JobStatus.State - */ -class State -{ - /** - * The job state is unknown. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The job is pending; it has been submitted, but is not yet running. - * - * Generated from protobuf enum PENDING = 1; - */ - const PENDING = 1; - /** - * Job has been received by the service and completed initial setup; - * it will soon be submitted to the cluster. - * - * Generated from protobuf enum SETUP_DONE = 8; - */ - const SETUP_DONE = 8; - /** - * The job is running on the cluster. - * - * Generated from protobuf enum RUNNING = 2; - */ - const RUNNING = 2; - /** - * A CancelJob request has been received, but is pending. - * - * Generated from protobuf enum CANCEL_PENDING = 3; - */ - const CANCEL_PENDING = 3; - /** - * Transient in-flight resources have been canceled, and the request to - * cancel the running job has been issued to the cluster. - * - * Generated from protobuf enum CANCEL_STARTED = 7; - */ - const CANCEL_STARTED = 7; - /** - * The job cancellation was successful. - * - * Generated from protobuf enum CANCELLED = 4; - */ - const CANCELLED = 4; - /** - * The job has completed successfully. - * - * Generated from protobuf enum DONE = 5; - */ - const DONE = 5; - /** - * The job has completed, but encountered an error. - * - * Generated from protobuf enum ERROR = 6; - */ - const ERROR = 6; - /** - * Job attempt has failed. The detail field contains failure details for - * this attempt. - * Applies to restartable jobs only. - * - * Generated from protobuf enum ATTEMPT_FAILURE = 9; - */ - const ATTEMPT_FAILURE = 9; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::PENDING => 'PENDING', - self::SETUP_DONE => 'SETUP_DONE', - self::RUNNING => 'RUNNING', - self::CANCEL_PENDING => 'CANCEL_PENDING', - self::CANCEL_STARTED => 'CANCEL_STARTED', - self::CANCELLED => 'CANCELLED', - self::DONE => 'DONE', - self::ERROR => 'ERROR', - self::ATTEMPT_FAILURE => 'ATTEMPT_FAILURE', - ]; - - 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\Dataproc\V1\JobStatus_State::class); - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/JobStatus/Substate.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/JobStatus/Substate.php deleted file mode 100644 index 460f5afee6c..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/JobStatus/Substate.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.dataproc.v1.JobStatus.Substate - */ -class Substate -{ - /** - * The job substate is unknown. - * - * Generated from protobuf enum UNSPECIFIED = 0; - */ - const UNSPECIFIED = 0; - /** - * The Job is submitted to the agent. - * Applies to RUNNING state. - * - * Generated from protobuf enum SUBMITTED = 1; - */ - const SUBMITTED = 1; - /** - * The Job has been received and is awaiting execution (it may be waiting - * for a condition to be met). See the "details" field for the reason for - * the delay. - * Applies to RUNNING state. - * - * Generated from protobuf enum QUEUED = 2; - */ - const QUEUED = 2; - /** - * The agent-reported status is out of date, which may be caused by a - * loss of communication between the agent and Dataproc. If the - * agent does not send a timely update, the job will fail. - * Applies to RUNNING state. - * - * Generated from protobuf enum STALE_STATUS = 3; - */ - const STALE_STATUS = 3; - - private static $valueToName = [ - self::UNSPECIFIED => 'UNSPECIFIED', - self::SUBMITTED => 'SUBMITTED', - self::QUEUED => 'QUEUED', - self::STALE_STATUS => 'STALE_STATUS', - ]; - - 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(Substate::class, \Google\Cloud\Dataproc\V1\JobStatus_Substate::class); - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/KerberosConfig.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/KerberosConfig.php deleted file mode 100644 index af629359087..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/KerberosConfig.php +++ /dev/null @@ -1,631 +0,0 @@ -google.cloud.dataproc.v1.KerberosConfig - */ -class KerberosConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Flag to indicate whether to Kerberize the cluster (default: - * false). Set this field to true to enable Kerberos on a cluster. - * - * Generated from protobuf field bool enable_kerberos = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $enable_kerberos = false; - /** - * Optional. The Cloud Storage URI of a KMS encrypted file containing the root - * principal password. - * - * Generated from protobuf field string root_principal_password_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $root_principal_password_uri = ''; - /** - * Optional. The uri of the KMS key used to encrypt various sensitive - * files. - * - * Generated from protobuf field string kms_key_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $kms_key_uri = ''; - /** - * Optional. The Cloud Storage URI of the keystore file used for SSL - * encryption. If not provided, Dataproc will provide a self-signed - * certificate. - * - * Generated from protobuf field string keystore_uri = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $keystore_uri = ''; - /** - * Optional. The Cloud Storage URI of the truststore file used for SSL - * encryption. If not provided, Dataproc will provide a self-signed - * certificate. - * - * Generated from protobuf field string truststore_uri = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $truststore_uri = ''; - /** - * Optional. The Cloud Storage URI of a KMS encrypted file containing the - * password to the user provided keystore. For the self-signed certificate, - * this password is generated by Dataproc. - * - * Generated from protobuf field string keystore_password_uri = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $keystore_password_uri = ''; - /** - * Optional. The Cloud Storage URI of a KMS encrypted file containing the - * password to the user provided key. For the self-signed certificate, this - * password is generated by Dataproc. - * - * Generated from protobuf field string key_password_uri = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $key_password_uri = ''; - /** - * Optional. The Cloud Storage URI of a KMS encrypted file containing the - * password to the user provided truststore. For the self-signed certificate, - * this password is generated by Dataproc. - * - * Generated from protobuf field string truststore_password_uri = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $truststore_password_uri = ''; - /** - * Optional. The remote realm the Dataproc on-cluster KDC will trust, should - * the user enable cross realm trust. - * - * Generated from protobuf field string cross_realm_trust_realm = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $cross_realm_trust_realm = ''; - /** - * Optional. The KDC (IP or hostname) for the remote trusted realm in a cross - * realm trust relationship. - * - * Generated from protobuf field string cross_realm_trust_kdc = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $cross_realm_trust_kdc = ''; - /** - * Optional. The admin server (IP or hostname) for the remote trusted realm in - * a cross realm trust relationship. - * - * Generated from protobuf field string cross_realm_trust_admin_server = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $cross_realm_trust_admin_server = ''; - /** - * Optional. The Cloud Storage URI of a KMS encrypted file containing the - * shared password between the on-cluster Kerberos realm and the remote - * trusted realm, in a cross realm trust relationship. - * - * Generated from protobuf field string cross_realm_trust_shared_password_uri = 12 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $cross_realm_trust_shared_password_uri = ''; - /** - * Optional. The Cloud Storage URI of a KMS encrypted file containing the - * master key of the KDC database. - * - * Generated from protobuf field string kdc_db_key_uri = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $kdc_db_key_uri = ''; - /** - * Optional. The lifetime of the ticket granting ticket, in hours. - * If not specified, or user specifies 0, then default value 10 - * will be used. - * - * Generated from protobuf field int32 tgt_lifetime_hours = 14 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $tgt_lifetime_hours = 0; - /** - * Optional. The name of the on-cluster Kerberos realm. - * If not specified, the uppercased domain of hostnames will be the realm. - * - * Generated from protobuf field string realm = 15 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $realm = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $enable_kerberos - * Optional. Flag to indicate whether to Kerberize the cluster (default: - * false). Set this field to true to enable Kerberos on a cluster. - * @type string $root_principal_password_uri - * Optional. The Cloud Storage URI of a KMS encrypted file containing the root - * principal password. - * @type string $kms_key_uri - * Optional. The uri of the KMS key used to encrypt various sensitive - * files. - * @type string $keystore_uri - * Optional. The Cloud Storage URI of the keystore file used for SSL - * encryption. If not provided, Dataproc will provide a self-signed - * certificate. - * @type string $truststore_uri - * Optional. The Cloud Storage URI of the truststore file used for SSL - * encryption. If not provided, Dataproc will provide a self-signed - * certificate. - * @type string $keystore_password_uri - * Optional. The Cloud Storage URI of a KMS encrypted file containing the - * password to the user provided keystore. For the self-signed certificate, - * this password is generated by Dataproc. - * @type string $key_password_uri - * Optional. The Cloud Storage URI of a KMS encrypted file containing the - * password to the user provided key. For the self-signed certificate, this - * password is generated by Dataproc. - * @type string $truststore_password_uri - * Optional. The Cloud Storage URI of a KMS encrypted file containing the - * password to the user provided truststore. For the self-signed certificate, - * this password is generated by Dataproc. - * @type string $cross_realm_trust_realm - * Optional. The remote realm the Dataproc on-cluster KDC will trust, should - * the user enable cross realm trust. - * @type string $cross_realm_trust_kdc - * Optional. The KDC (IP or hostname) for the remote trusted realm in a cross - * realm trust relationship. - * @type string $cross_realm_trust_admin_server - * Optional. The admin server (IP or hostname) for the remote trusted realm in - * a cross realm trust relationship. - * @type string $cross_realm_trust_shared_password_uri - * Optional. The Cloud Storage URI of a KMS encrypted file containing the - * shared password between the on-cluster Kerberos realm and the remote - * trusted realm, in a cross realm trust relationship. - * @type string $kdc_db_key_uri - * Optional. The Cloud Storage URI of a KMS encrypted file containing the - * master key of the KDC database. - * @type int $tgt_lifetime_hours - * Optional. The lifetime of the ticket granting ticket, in hours. - * If not specified, or user specifies 0, then default value 10 - * will be used. - * @type string $realm - * Optional. The name of the on-cluster Kerberos realm. - * If not specified, the uppercased domain of hostnames will be the realm. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Clusters::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Flag to indicate whether to Kerberize the cluster (default: - * false). Set this field to true to enable Kerberos on a cluster. - * - * Generated from protobuf field bool enable_kerberos = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEnableKerberos() - { - return $this->enable_kerberos; - } - - /** - * Optional. Flag to indicate whether to Kerberize the cluster (default: - * false). Set this field to true to enable Kerberos on a cluster. - * - * Generated from protobuf field bool enable_kerberos = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEnableKerberos($var) - { - GPBUtil::checkBool($var); - $this->enable_kerberos = $var; - - return $this; - } - - /** - * Optional. The Cloud Storage URI of a KMS encrypted file containing the root - * principal password. - * - * Generated from protobuf field string root_principal_password_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRootPrincipalPasswordUri() - { - return $this->root_principal_password_uri; - } - - /** - * Optional. The Cloud Storage URI of a KMS encrypted file containing the root - * principal password. - * - * Generated from protobuf field string root_principal_password_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRootPrincipalPasswordUri($var) - { - GPBUtil::checkString($var, True); - $this->root_principal_password_uri = $var; - - return $this; - } - - /** - * Optional. The uri of the KMS key used to encrypt various sensitive - * files. - * - * Generated from protobuf field string kms_key_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getKmsKeyUri() - { - return $this->kms_key_uri; - } - - /** - * Optional. The uri of the KMS key used to encrypt various sensitive - * files. - * - * Generated from protobuf field string kms_key_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setKmsKeyUri($var) - { - GPBUtil::checkString($var, True); - $this->kms_key_uri = $var; - - return $this; - } - - /** - * Optional. The Cloud Storage URI of the keystore file used for SSL - * encryption. If not provided, Dataproc will provide a self-signed - * certificate. - * - * Generated from protobuf field string keystore_uri = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getKeystoreUri() - { - return $this->keystore_uri; - } - - /** - * Optional. The Cloud Storage URI of the keystore file used for SSL - * encryption. If not provided, Dataproc will provide a self-signed - * certificate. - * - * Generated from protobuf field string keystore_uri = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setKeystoreUri($var) - { - GPBUtil::checkString($var, True); - $this->keystore_uri = $var; - - return $this; - } - - /** - * Optional. The Cloud Storage URI of the truststore file used for SSL - * encryption. If not provided, Dataproc will provide a self-signed - * certificate. - * - * Generated from protobuf field string truststore_uri = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getTruststoreUri() - { - return $this->truststore_uri; - } - - /** - * Optional. The Cloud Storage URI of the truststore file used for SSL - * encryption. If not provided, Dataproc will provide a self-signed - * certificate. - * - * Generated from protobuf field string truststore_uri = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setTruststoreUri($var) - { - GPBUtil::checkString($var, True); - $this->truststore_uri = $var; - - return $this; - } - - /** - * Optional. The Cloud Storage URI of a KMS encrypted file containing the - * password to the user provided keystore. For the self-signed certificate, - * this password is generated by Dataproc. - * - * Generated from protobuf field string keystore_password_uri = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getKeystorePasswordUri() - { - return $this->keystore_password_uri; - } - - /** - * Optional. The Cloud Storage URI of a KMS encrypted file containing the - * password to the user provided keystore. For the self-signed certificate, - * this password is generated by Dataproc. - * - * Generated from protobuf field string keystore_password_uri = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setKeystorePasswordUri($var) - { - GPBUtil::checkString($var, True); - $this->keystore_password_uri = $var; - - return $this; - } - - /** - * Optional. The Cloud Storage URI of a KMS encrypted file containing the - * password to the user provided key. For the self-signed certificate, this - * password is generated by Dataproc. - * - * Generated from protobuf field string key_password_uri = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getKeyPasswordUri() - { - return $this->key_password_uri; - } - - /** - * Optional. The Cloud Storage URI of a KMS encrypted file containing the - * password to the user provided key. For the self-signed certificate, this - * password is generated by Dataproc. - * - * Generated from protobuf field string key_password_uri = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setKeyPasswordUri($var) - { - GPBUtil::checkString($var, True); - $this->key_password_uri = $var; - - return $this; - } - - /** - * Optional. The Cloud Storage URI of a KMS encrypted file containing the - * password to the user provided truststore. For the self-signed certificate, - * this password is generated by Dataproc. - * - * Generated from protobuf field string truststore_password_uri = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getTruststorePasswordUri() - { - return $this->truststore_password_uri; - } - - /** - * Optional. The Cloud Storage URI of a KMS encrypted file containing the - * password to the user provided truststore. For the self-signed certificate, - * this password is generated by Dataproc. - * - * Generated from protobuf field string truststore_password_uri = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setTruststorePasswordUri($var) - { - GPBUtil::checkString($var, True); - $this->truststore_password_uri = $var; - - return $this; - } - - /** - * Optional. The remote realm the Dataproc on-cluster KDC will trust, should - * the user enable cross realm trust. - * - * Generated from protobuf field string cross_realm_trust_realm = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getCrossRealmTrustRealm() - { - return $this->cross_realm_trust_realm; - } - - /** - * Optional. The remote realm the Dataproc on-cluster KDC will trust, should - * the user enable cross realm trust. - * - * Generated from protobuf field string cross_realm_trust_realm = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setCrossRealmTrustRealm($var) - { - GPBUtil::checkString($var, True); - $this->cross_realm_trust_realm = $var; - - return $this; - } - - /** - * Optional. The KDC (IP or hostname) for the remote trusted realm in a cross - * realm trust relationship. - * - * Generated from protobuf field string cross_realm_trust_kdc = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getCrossRealmTrustKdc() - { - return $this->cross_realm_trust_kdc; - } - - /** - * Optional. The KDC (IP or hostname) for the remote trusted realm in a cross - * realm trust relationship. - * - * Generated from protobuf field string cross_realm_trust_kdc = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setCrossRealmTrustKdc($var) - { - GPBUtil::checkString($var, True); - $this->cross_realm_trust_kdc = $var; - - return $this; - } - - /** - * Optional. The admin server (IP or hostname) for the remote trusted realm in - * a cross realm trust relationship. - * - * Generated from protobuf field string cross_realm_trust_admin_server = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getCrossRealmTrustAdminServer() - { - return $this->cross_realm_trust_admin_server; - } - - /** - * Optional. The admin server (IP or hostname) for the remote trusted realm in - * a cross realm trust relationship. - * - * Generated from protobuf field string cross_realm_trust_admin_server = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setCrossRealmTrustAdminServer($var) - { - GPBUtil::checkString($var, True); - $this->cross_realm_trust_admin_server = $var; - - return $this; - } - - /** - * Optional. The Cloud Storage URI of a KMS encrypted file containing the - * shared password between the on-cluster Kerberos realm and the remote - * trusted realm, in a cross realm trust relationship. - * - * Generated from protobuf field string cross_realm_trust_shared_password_uri = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getCrossRealmTrustSharedPasswordUri() - { - return $this->cross_realm_trust_shared_password_uri; - } - - /** - * Optional. The Cloud Storage URI of a KMS encrypted file containing the - * shared password between the on-cluster Kerberos realm and the remote - * trusted realm, in a cross realm trust relationship. - * - * Generated from protobuf field string cross_realm_trust_shared_password_uri = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setCrossRealmTrustSharedPasswordUri($var) - { - GPBUtil::checkString($var, True); - $this->cross_realm_trust_shared_password_uri = $var; - - return $this; - } - - /** - * Optional. The Cloud Storage URI of a KMS encrypted file containing the - * master key of the KDC database. - * - * Generated from protobuf field string kdc_db_key_uri = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getKdcDbKeyUri() - { - return $this->kdc_db_key_uri; - } - - /** - * Optional. The Cloud Storage URI of a KMS encrypted file containing the - * master key of the KDC database. - * - * Generated from protobuf field string kdc_db_key_uri = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setKdcDbKeyUri($var) - { - GPBUtil::checkString($var, True); - $this->kdc_db_key_uri = $var; - - return $this; - } - - /** - * Optional. The lifetime of the ticket granting ticket, in hours. - * If not specified, or user specifies 0, then default value 10 - * will be used. - * - * Generated from protobuf field int32 tgt_lifetime_hours = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getTgtLifetimeHours() - { - return $this->tgt_lifetime_hours; - } - - /** - * Optional. The lifetime of the ticket granting ticket, in hours. - * If not specified, or user specifies 0, then default value 10 - * will be used. - * - * Generated from protobuf field int32 tgt_lifetime_hours = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setTgtLifetimeHours($var) - { - GPBUtil::checkInt32($var); - $this->tgt_lifetime_hours = $var; - - return $this; - } - - /** - * Optional. The name of the on-cluster Kerberos realm. - * If not specified, the uppercased domain of hostnames will be the realm. - * - * Generated from protobuf field string realm = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRealm() - { - return $this->realm; - } - - /** - * Optional. The name of the on-cluster Kerberos realm. - * If not specified, the uppercased domain of hostnames will be the realm. - * - * Generated from protobuf field string realm = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRealm($var) - { - GPBUtil::checkString($var, True); - $this->realm = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/KubernetesClusterConfig.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/KubernetesClusterConfig.php deleted file mode 100644 index f0b276a7f95..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/KubernetesClusterConfig.php +++ /dev/null @@ -1,169 +0,0 @@ -google.cloud.dataproc.v1.KubernetesClusterConfig - */ -class KubernetesClusterConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. A namespace within the Kubernetes cluster to deploy into. If this - * namespace does not exist, it is created. If it exists, Dataproc verifies - * that another Dataproc VirtualCluster is not installed into it. If not - * specified, the name of the Dataproc Cluster is used. - * - * Generated from protobuf field string kubernetes_namespace = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $kubernetes_namespace = ''; - /** - * Optional. The software configuration for this Dataproc cluster running on - * Kubernetes. - * - * Generated from protobuf field .google.cloud.dataproc.v1.KubernetesSoftwareConfig kubernetes_software_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $kubernetes_software_config = null; - protected $config; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $kubernetes_namespace - * Optional. A namespace within the Kubernetes cluster to deploy into. If this - * namespace does not exist, it is created. If it exists, Dataproc verifies - * that another Dataproc VirtualCluster is not installed into it. If not - * specified, the name of the Dataproc Cluster is used. - * @type \Google\Cloud\Dataproc\V1\GkeClusterConfig $gke_cluster_config - * Required. The configuration for running the Dataproc cluster on GKE. - * @type \Google\Cloud\Dataproc\V1\KubernetesSoftwareConfig $kubernetes_software_config - * Optional. The software configuration for this Dataproc cluster running on - * Kubernetes. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Shared::initOnce(); - parent::__construct($data); - } - - /** - * Optional. A namespace within the Kubernetes cluster to deploy into. If this - * namespace does not exist, it is created. If it exists, Dataproc verifies - * that another Dataproc VirtualCluster is not installed into it. If not - * specified, the name of the Dataproc Cluster is used. - * - * Generated from protobuf field string kubernetes_namespace = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getKubernetesNamespace() - { - return $this->kubernetes_namespace; - } - - /** - * Optional. A namespace within the Kubernetes cluster to deploy into. If this - * namespace does not exist, it is created. If it exists, Dataproc verifies - * that another Dataproc VirtualCluster is not installed into it. If not - * specified, the name of the Dataproc Cluster is used. - * - * Generated from protobuf field string kubernetes_namespace = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setKubernetesNamespace($var) - { - GPBUtil::checkString($var, True); - $this->kubernetes_namespace = $var; - - return $this; - } - - /** - * Required. The configuration for running the Dataproc cluster on GKE. - * - * Generated from protobuf field .google.cloud.dataproc.v1.GkeClusterConfig gke_cluster_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataproc\V1\GkeClusterConfig|null - */ - public function getGkeClusterConfig() - { - return $this->readOneof(2); - } - - public function hasGkeClusterConfig() - { - return $this->hasOneof(2); - } - - /** - * Required. The configuration for running the Dataproc cluster on GKE. - * - * Generated from protobuf field .google.cloud.dataproc.v1.GkeClusterConfig gke_cluster_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataproc\V1\GkeClusterConfig $var - * @return $this - */ - public function setGkeClusterConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\GkeClusterConfig::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Optional. The software configuration for this Dataproc cluster running on - * Kubernetes. - * - * Generated from protobuf field .google.cloud.dataproc.v1.KubernetesSoftwareConfig kubernetes_software_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\KubernetesSoftwareConfig|null - */ - public function getKubernetesSoftwareConfig() - { - return $this->kubernetes_software_config; - } - - public function hasKubernetesSoftwareConfig() - { - return isset($this->kubernetes_software_config); - } - - public function clearKubernetesSoftwareConfig() - { - unset($this->kubernetes_software_config); - } - - /** - * Optional. The software configuration for this Dataproc cluster running on - * Kubernetes. - * - * Generated from protobuf field .google.cloud.dataproc.v1.KubernetesSoftwareConfig kubernetes_software_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\KubernetesSoftwareConfig $var - * @return $this - */ - public function setKubernetesSoftwareConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\KubernetesSoftwareConfig::class); - $this->kubernetes_software_config = $var; - - return $this; - } - - /** - * @return string - */ - public function getConfig() - { - return $this->whichOneof("config"); - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/KubernetesSoftwareConfig.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/KubernetesSoftwareConfig.php deleted file mode 100644 index 635bc891b2d..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/KubernetesSoftwareConfig.php +++ /dev/null @@ -1,137 +0,0 @@ -google.cloud.dataproc.v1.KubernetesSoftwareConfig - */ -class KubernetesSoftwareConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The components that should be installed in this Dataproc cluster. The key - * must be a string from the KubernetesComponent enumeration. The value is - * the version of the software to be installed. - * At least one entry must be specified. - * - * Generated from protobuf field map component_version = 1; - */ - private $component_version; - /** - * The properties to set on daemon config files. - * Property keys are specified in `prefix:property` format, for example - * `spark:spark.kubernetes.container.image`. The following are supported - * prefixes and their mappings: - * * spark: `spark-defaults.conf` - * For more information, see [Cluster - * properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties). - * - * Generated from protobuf field map properties = 2; - */ - private $properties; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\MapField $component_version - * The components that should be installed in this Dataproc cluster. The key - * must be a string from the KubernetesComponent enumeration. The value is - * the version of the software to be installed. - * At least one entry must be specified. - * @type array|\Google\Protobuf\Internal\MapField $properties - * The properties to set on daemon config files. - * Property keys are specified in `prefix:property` format, for example - * `spark:spark.kubernetes.container.image`. The following are supported - * prefixes and their mappings: - * * spark: `spark-defaults.conf` - * For more information, see [Cluster - * properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Shared::initOnce(); - parent::__construct($data); - } - - /** - * The components that should be installed in this Dataproc cluster. The key - * must be a string from the KubernetesComponent enumeration. The value is - * the version of the software to be installed. - * At least one entry must be specified. - * - * Generated from protobuf field map component_version = 1; - * @return \Google\Protobuf\Internal\MapField - */ - public function getComponentVersion() - { - return $this->component_version; - } - - /** - * The components that should be installed in this Dataproc cluster. The key - * must be a string from the KubernetesComponent enumeration. The value is - * the version of the software to be installed. - * At least one entry must be specified. - * - * Generated from protobuf field map component_version = 1; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setComponentVersion($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->component_version = $arr; - - return $this; - } - - /** - * The properties to set on daemon config files. - * Property keys are specified in `prefix:property` format, for example - * `spark:spark.kubernetes.container.image`. The following are supported - * prefixes and their mappings: - * * spark: `spark-defaults.conf` - * For more information, see [Cluster - * properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties). - * - * Generated from protobuf field map properties = 2; - * @return \Google\Protobuf\Internal\MapField - */ - public function getProperties() - { - return $this->properties; - } - - /** - * The properties to set on daemon config files. - * Property keys are specified in `prefix:property` format, for example - * `spark:spark.kubernetes.container.image`. The following are supported - * prefixes and their mappings: - * * spark: `spark-defaults.conf` - * For more information, see [Cluster - * properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties). - * - * Generated from protobuf field map properties = 2; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setProperties($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->properties = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/LifecycleConfig.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/LifecycleConfig.php deleted file mode 100644 index 8e8de9ec351..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/LifecycleConfig.php +++ /dev/null @@ -1,239 +0,0 @@ -google.cloud.dataproc.v1.LifecycleConfig - */ -class LifecycleConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The duration to keep the cluster alive while idling (when no jobs - * are running). Passing this threshold will cause the cluster to be - * deleted. Minimum value is 5 minutes; maximum value is 14 days (see JSON - * representation of - * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). - * - * Generated from protobuf field .google.protobuf.Duration idle_delete_ttl = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $idle_delete_ttl = null; - /** - * Output only. The time when cluster became idle (most recent job finished) - * and became eligible for deletion due to idleness (see JSON representation - * of - * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)). - * - * Generated from protobuf field .google.protobuf.Timestamp idle_start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $idle_start_time = null; - protected $ttl; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $idle_delete_ttl - * Optional. The duration to keep the cluster alive while idling (when no jobs - * are running). Passing this threshold will cause the cluster to be - * deleted. Minimum value is 5 minutes; maximum value is 14 days (see JSON - * representation of - * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). - * @type \Google\Protobuf\Timestamp $auto_delete_time - * Optional. The time when cluster will be auto-deleted (see JSON - * representation of - * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)). - * @type \Google\Protobuf\Duration $auto_delete_ttl - * Optional. The lifetime duration of cluster. The cluster will be - * auto-deleted at the end of this period. Minimum value is 10 minutes; - * maximum value is 14 days (see JSON representation of - * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). - * @type \Google\Protobuf\Timestamp $idle_start_time - * Output only. The time when cluster became idle (most recent job finished) - * and became eligible for deletion due to idleness (see JSON representation - * of - * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Clusters::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The duration to keep the cluster alive while idling (when no jobs - * are running). Passing this threshold will cause the cluster to be - * deleted. Minimum value is 5 minutes; maximum value is 14 days (see JSON - * representation of - * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). - * - * Generated from protobuf field .google.protobuf.Duration idle_delete_ttl = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Duration|null - */ - public function getIdleDeleteTtl() - { - return $this->idle_delete_ttl; - } - - public function hasIdleDeleteTtl() - { - return isset($this->idle_delete_ttl); - } - - public function clearIdleDeleteTtl() - { - unset($this->idle_delete_ttl); - } - - /** - * Optional. The duration to keep the cluster alive while idling (when no jobs - * are running). Passing this threshold will cause the cluster to be - * deleted. Minimum value is 5 minutes; maximum value is 14 days (see JSON - * representation of - * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). - * - * Generated from protobuf field .google.protobuf.Duration idle_delete_ttl = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setIdleDeleteTtl($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->idle_delete_ttl = $var; - - return $this; - } - - /** - * Optional. The time when cluster will be auto-deleted (see JSON - * representation of - * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)). - * - * Generated from protobuf field .google.protobuf.Timestamp auto_delete_time = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getAutoDeleteTime() - { - return $this->readOneof(2); - } - - public function hasAutoDeleteTime() - { - return $this->hasOneof(2); - } - - /** - * Optional. The time when cluster will be auto-deleted (see JSON - * representation of - * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)). - * - * Generated from protobuf field .google.protobuf.Timestamp auto_delete_time = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setAutoDeleteTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Optional. The lifetime duration of cluster. The cluster will be - * auto-deleted at the end of this period. Minimum value is 10 minutes; - * maximum value is 14 days (see JSON representation of - * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). - * - * Generated from protobuf field .google.protobuf.Duration auto_delete_ttl = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Duration|null - */ - public function getAutoDeleteTtl() - { - return $this->readOneof(3); - } - - public function hasAutoDeleteTtl() - { - return $this->hasOneof(3); - } - - /** - * Optional. The lifetime duration of cluster. The cluster will be - * auto-deleted at the end of this period. Minimum value is 10 minutes; - * maximum value is 14 days (see JSON representation of - * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). - * - * Generated from protobuf field .google.protobuf.Duration auto_delete_ttl = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setAutoDeleteTtl($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Output only. The time when cluster became idle (most recent job finished) - * and became eligible for deletion due to idleness (see JSON representation - * of - * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)). - * - * Generated from protobuf field .google.protobuf.Timestamp idle_start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getIdleStartTime() - { - return $this->idle_start_time; - } - - public function hasIdleStartTime() - { - return isset($this->idle_start_time); - } - - public function clearIdleStartTime() - { - unset($this->idle_start_time); - } - - /** - * Output only. The time when cluster became idle (most recent job finished) - * and became eligible for deletion due to idleness (see JSON representation - * of - * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)). - * - * Generated from protobuf field .google.protobuf.Timestamp idle_start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setIdleStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->idle_start_time = $var; - - return $this; - } - - /** - * @return string - */ - public function getTtl() - { - return $this->whichOneof("ttl"); - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListAutoscalingPoliciesRequest.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListAutoscalingPoliciesRequest.php deleted file mode 100644 index 5a392f5cd1c..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListAutoscalingPoliciesRequest.php +++ /dev/null @@ -1,194 +0,0 @@ -google.cloud.dataproc.v1.ListAutoscalingPoliciesRequest - */ -class ListAutoscalingPoliciesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The "resource name" of the region or location, as described - * in https://cloud.google.com/apis/design/resource_names. - * * For `projects.regions.autoscalingPolicies.list`, the resource name - * of the region has the following format: - * `projects/{project_id}/regions/{region}` - * * For `projects.locations.autoscalingPolicies.list`, the resource name - * of the location has the following format: - * `projects/{project_id}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of results to return in each response. - * Must be less than or equal to 1000. Defaults to 100. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. The page token, returned by a previous call, to request the - * next page of results. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The "resource name" of the region or location, as described - * in https://cloud.google.com/apis/design/resource_names. - * - * * For `projects.regions.autoscalingPolicies.list`, the resource name - * of the region has the following format: - * `projects/{project_id}/regions/{region}` - * - * * For `projects.locations.autoscalingPolicies.list`, the resource name - * of the location has the following format: - * `projects/{project_id}/locations/{location}` - * Please see {@see AutoscalingPolicyServiceClient::regionName()} for help formatting this field. - * - * @return \Google\Cloud\Dataproc\V1\ListAutoscalingPoliciesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The "resource name" of the region or location, as described - * in https://cloud.google.com/apis/design/resource_names. - * * For `projects.regions.autoscalingPolicies.list`, the resource name - * of the region has the following format: - * `projects/{project_id}/regions/{region}` - * * For `projects.locations.autoscalingPolicies.list`, the resource name - * of the location has the following format: - * `projects/{project_id}/locations/{location}` - * @type int $page_size - * Optional. The maximum number of results to return in each response. - * Must be less than or equal to 1000. Defaults to 100. - * @type string $page_token - * Optional. The page token, returned by a previous call, to request the - * next page of results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\AutoscalingPolicies::initOnce(); - parent::__construct($data); - } - - /** - * Required. The "resource name" of the region or location, as described - * in https://cloud.google.com/apis/design/resource_names. - * * For `projects.regions.autoscalingPolicies.list`, the resource name - * of the region has the following format: - * `projects/{project_id}/regions/{region}` - * * For `projects.locations.autoscalingPolicies.list`, the resource name - * of the location has the following format: - * `projects/{project_id}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The "resource name" of the region or location, as described - * in https://cloud.google.com/apis/design/resource_names. - * * For `projects.regions.autoscalingPolicies.list`, the resource name - * of the region has the following format: - * `projects/{project_id}/regions/{region}` - * * For `projects.locations.autoscalingPolicies.list`, the resource name - * of the location has the following format: - * `projects/{project_id}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The maximum number of results to return in each response. - * Must be less than or equal to 1000. Defaults to 100. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of results to return in each response. - * Must be less than or equal to 1000. Defaults to 100. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. The page token, returned by a previous call, to request the - * next page of results. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. The page token, returned by a previous call, to request the - * next page of results. - * - * 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/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListAutoscalingPoliciesResponse.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListAutoscalingPoliciesResponse.php deleted file mode 100644 index 8948f3e6861..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListAutoscalingPoliciesResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.dataproc.v1.ListAutoscalingPoliciesResponse - */ -class ListAutoscalingPoliciesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Autoscaling policies list. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.AutoscalingPolicy policies = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $policies; - /** - * Output only. This token is included in the response if there are more - * results to fetch. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dataproc\V1\AutoscalingPolicy>|\Google\Protobuf\Internal\RepeatedField $policies - * Output only. Autoscaling policies list. - * @type string $next_page_token - * Output only. This token is included in the response if there are more - * results to fetch. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\AutoscalingPolicies::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Autoscaling policies list. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.AutoscalingPolicy policies = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPolicies() - { - return $this->policies; - } - - /** - * Output only. Autoscaling policies list. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.AutoscalingPolicy policies = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\Dataproc\V1\AutoscalingPolicy>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPolicies($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataproc\V1\AutoscalingPolicy::class); - $this->policies = $arr; - - return $this; - } - - /** - * Output only. This token is included in the response if there are more - * results to fetch. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Output only. This token is included in the response if there are more - * results to fetch. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListBatchesRequest.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListBatchesRequest.php deleted file mode 100644 index e732bf4b181..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListBatchesRequest.php +++ /dev/null @@ -1,273 +0,0 @@ -google.cloud.dataproc.v1.ListBatchesRequest - */ -class ListBatchesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent, which owns this collection of batches. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of batches to return in each response. - * The service may return fewer than this value. - * The default page size is 20; the maximum page size is 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A page token received from a previous `ListBatches` call. - * Provide this token to retrieve the subsequent page. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. A filter for the batches to return in the response. - * A filter is a logical expression constraining the values of various fields - * in each batch resource. Filters are case sensitive, and may contain - * multiple clauses combined with logical operators (AND/OR). - * Supported fields are `batch_id`, `batch_uuid`, `state`, and `create_time`. - * e.g. `state = RUNNING and create_time < "2023-01-01T00:00:00Z"` - * filters for batches in state RUNNING that were created before 2023-01-01 - * See https://google.aip.dev/assets/misc/ebnf-filtering.txt for a detailed - * description of the filter syntax and a list of supported comparisons. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Field(s) on which to sort the list of batches. - * Currently the only supported sort orders are unspecified (empty) and - * `create_time desc` to sort by most recently created batches first. - * See https://google.aip.dev/132#ordering for more details. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The parent, which owns this collection of batches. Please see - * {@see BatchControllerClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Dataproc\V1\ListBatchesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent, which owns this collection of batches. - * @type int $page_size - * Optional. The maximum number of batches to return in each response. - * The service may return fewer than this value. - * The default page size is 20; the maximum page size is 1000. - * @type string $page_token - * Optional. A page token received from a previous `ListBatches` call. - * Provide this token to retrieve the subsequent page. - * @type string $filter - * Optional. A filter for the batches to return in the response. - * A filter is a logical expression constraining the values of various fields - * in each batch resource. Filters are case sensitive, and may contain - * multiple clauses combined with logical operators (AND/OR). - * Supported fields are `batch_id`, `batch_uuid`, `state`, and `create_time`. - * e.g. `state = RUNNING and create_time < "2023-01-01T00:00:00Z"` - * filters for batches in state RUNNING that were created before 2023-01-01 - * See https://google.aip.dev/assets/misc/ebnf-filtering.txt for a detailed - * description of the filter syntax and a list of supported comparisons. - * @type string $order_by - * Optional. Field(s) on which to sort the list of batches. - * Currently the only supported sort orders are unspecified (empty) and - * `create_time desc` to sort by most recently created batches first. - * See https://google.aip.dev/132#ordering for more details. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Batches::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent, which owns this collection of batches. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent, which owns this collection of batches. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The maximum number of batches to return in each response. - * The service may return fewer than this value. - * The default page size is 20; the maximum page size is 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of batches to return in each response. - * The service may return fewer than this value. - * The default page size is 20; the maximum page size is 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. A page token received from a previous `ListBatches` call. - * Provide this token to retrieve the subsequent page. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A page token received from a previous `ListBatches` call. - * Provide this token to retrieve the subsequent page. - * - * 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. A filter for the batches to return in the response. - * A filter is a logical expression constraining the values of various fields - * in each batch resource. Filters are case sensitive, and may contain - * multiple clauses combined with logical operators (AND/OR). - * Supported fields are `batch_id`, `batch_uuid`, `state`, and `create_time`. - * e.g. `state = RUNNING and create_time < "2023-01-01T00:00:00Z"` - * filters for batches in state RUNNING that were created before 2023-01-01 - * See https://google.aip.dev/assets/misc/ebnf-filtering.txt for a detailed - * description of the filter syntax and a list of supported comparisons. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. A filter for the batches to return in the response. - * A filter is a logical expression constraining the values of various fields - * in each batch resource. Filters are case sensitive, and may contain - * multiple clauses combined with logical operators (AND/OR). - * Supported fields are `batch_id`, `batch_uuid`, `state`, and `create_time`. - * e.g. `state = RUNNING and create_time < "2023-01-01T00:00:00Z"` - * filters for batches in state RUNNING that were created before 2023-01-01 - * See https://google.aip.dev/assets/misc/ebnf-filtering.txt for a detailed - * description of the filter syntax and a list of supported comparisons. - * - * 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. Field(s) on which to sort the list of batches. - * Currently the only supported sort orders are unspecified (empty) and - * `create_time desc` to sort by most recently created batches first. - * See https://google.aip.dev/132#ordering for more details. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. Field(s) on which to sort the list of batches. - * Currently the only supported sort orders are unspecified (empty) and - * `create_time desc` to sort by most recently created batches first. - * See https://google.aip.dev/132#ordering for more details. - * - * 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/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListBatchesResponse.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListBatchesResponse.php deleted file mode 100644 index a860c668082..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListBatchesResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.dataproc.v1.ListBatchesResponse - */ -class ListBatchesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The batches from the specified collection. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.Batch batches = 1; - */ - private $batches; - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dataproc\V1\Batch>|\Google\Protobuf\Internal\RepeatedField $batches - * The batches from the specified collection. - * @type string $next_page_token - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Batches::initOnce(); - parent::__construct($data); - } - - /** - * The batches from the specified collection. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.Batch batches = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getBatches() - { - return $this->batches; - } - - /** - * The batches from the specified collection. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.Batch batches = 1; - * @param array<\Google\Cloud\Dataproc\V1\Batch>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setBatches($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataproc\V1\Batch::class); - $this->batches = $arr; - - return $this; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListClustersRequest.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListClustersRequest.php deleted file mode 100644 index f5e24e9240c..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListClustersRequest.php +++ /dev/null @@ -1,315 +0,0 @@ -google.cloud.dataproc.v1.ListClustersRequest - */ -class ListClustersRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The ID of the Google Cloud Platform project that the cluster - * belongs to. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $project_id = ''; - /** - * Required. The Dataproc region in which to handle the request. - * - * Generated from protobuf field string region = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $region = ''; - /** - * Optional. A filter constraining the clusters to list. Filters are - * case-sensitive and have the following syntax: - * field = value [AND [field = value]] ... - * where **field** is one of `status.state`, `clusterName`, or `labels.[KEY]`, - * and `[KEY]` is a label key. **value** can be `*` to match all values. - * `status.state` can be one of the following: `ACTIVE`, `INACTIVE`, - * `CREATING`, `RUNNING`, `ERROR`, `DELETING`, or `UPDATING`. `ACTIVE` - * contains the `CREATING`, `UPDATING`, and `RUNNING` states. `INACTIVE` - * contains the `DELETING` and `ERROR` states. - * `clusterName` is the name of the cluster provided at creation time. - * Only the logical `AND` operator is supported; space-separated items are - * treated as having an implicit `AND` operator. - * Example filter: - * status.state = ACTIVE AND clusterName = mycluster - * AND labels.env = staging AND labels.starred = * - * - * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. The standard List page size. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. The standard List page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $projectId Required. The ID of the Google Cloud Platform project that the cluster - * belongs to. - * @param string $region Required. The Dataproc region in which to handle the request. - * - * @return \Google\Cloud\Dataproc\V1\ListClustersRequest - * - * @experimental - */ - public static function build(string $projectId, string $region): self - { - return (new self()) - ->setProjectId($projectId) - ->setRegion($region); - } - - /** - * @param string $projectId Required. The ID of the Google Cloud Platform project that the cluster - * belongs to. - * @param string $region Required. The Dataproc region in which to handle the request. - * @param string $filter Optional. A filter constraining the clusters to list. Filters are - * case-sensitive and have the following syntax: - * - * field = value [AND [field = value]] ... - * - * where **field** is one of `status.state`, `clusterName`, or `labels.[KEY]`, - * and `[KEY]` is a label key. **value** can be `*` to match all values. - * `status.state` can be one of the following: `ACTIVE`, `INACTIVE`, - * `CREATING`, `RUNNING`, `ERROR`, `DELETING`, or `UPDATING`. `ACTIVE` - * contains the `CREATING`, `UPDATING`, and `RUNNING` states. `INACTIVE` - * contains the `DELETING` and `ERROR` states. - * `clusterName` is the name of the cluster provided at creation time. - * Only the logical `AND` operator is supported; space-separated items are - * treated as having an implicit `AND` operator. - * - * Example filter: - * - * status.state = ACTIVE AND clusterName = mycluster - * AND labels.env = staging AND labels.starred = * - * - * @return \Google\Cloud\Dataproc\V1\ListClustersRequest - * - * @experimental - */ - public static function buildFromProjectIdRegionFilter(string $projectId, string $region, string $filter): self - { - return (new self()) - ->setProjectId($projectId) - ->setRegion($region) - ->setFilter($filter); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $project_id - * Required. The ID of the Google Cloud Platform project that the cluster - * belongs to. - * @type string $region - * Required. The Dataproc region in which to handle the request. - * @type string $filter - * Optional. A filter constraining the clusters to list. Filters are - * case-sensitive and have the following syntax: - * field = value [AND [field = value]] ... - * where **field** is one of `status.state`, `clusterName`, or `labels.[KEY]`, - * and `[KEY]` is a label key. **value** can be `*` to match all values. - * `status.state` can be one of the following: `ACTIVE`, `INACTIVE`, - * `CREATING`, `RUNNING`, `ERROR`, `DELETING`, or `UPDATING`. `ACTIVE` - * contains the `CREATING`, `UPDATING`, and `RUNNING` states. `INACTIVE` - * contains the `DELETING` and `ERROR` states. - * `clusterName` is the name of the cluster provided at creation time. - * Only the logical `AND` operator is supported; space-separated items are - * treated as having an implicit `AND` operator. - * Example filter: - * status.state = ACTIVE AND clusterName = mycluster - * AND labels.env = staging AND labels.starred = * - * @type int $page_size - * Optional. The standard List page size. - * @type string $page_token - * Optional. The standard List page token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Clusters::initOnce(); - parent::__construct($data); - } - - /** - * Required. The ID of the Google Cloud Platform project that the cluster - * belongs to. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * Required. The ID of the Google Cloud Platform project that the cluster - * belongs to. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - - /** - * Required. The Dataproc region in which to handle the request. - * - * Generated from protobuf field string region = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getRegion() - { - return $this->region; - } - - /** - * Required. The Dataproc region in which to handle the request. - * - * Generated from protobuf field string region = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setRegion($var) - { - GPBUtil::checkString($var, True); - $this->region = $var; - - return $this; - } - - /** - * Optional. A filter constraining the clusters to list. Filters are - * case-sensitive and have the following syntax: - * field = value [AND [field = value]] ... - * where **field** is one of `status.state`, `clusterName`, or `labels.[KEY]`, - * and `[KEY]` is a label key. **value** can be `*` to match all values. - * `status.state` can be one of the following: `ACTIVE`, `INACTIVE`, - * `CREATING`, `RUNNING`, `ERROR`, `DELETING`, or `UPDATING`. `ACTIVE` - * contains the `CREATING`, `UPDATING`, and `RUNNING` states. `INACTIVE` - * contains the `DELETING` and `ERROR` states. - * `clusterName` is the name of the cluster provided at creation time. - * Only the logical `AND` operator is supported; space-separated items are - * treated as having an implicit `AND` operator. - * Example filter: - * status.state = ACTIVE AND clusterName = mycluster - * AND labels.env = staging AND labels.starred = * - * - * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. A filter constraining the clusters to list. Filters are - * case-sensitive and have the following syntax: - * field = value [AND [field = value]] ... - * where **field** is one of `status.state`, `clusterName`, or `labels.[KEY]`, - * and `[KEY]` is a label key. **value** can be `*` to match all values. - * `status.state` can be one of the following: `ACTIVE`, `INACTIVE`, - * `CREATING`, `RUNNING`, `ERROR`, `DELETING`, or `UPDATING`. `ACTIVE` - * contains the `CREATING`, `UPDATING`, and `RUNNING` states. `INACTIVE` - * contains the `DELETING` and `ERROR` states. - * `clusterName` is the name of the cluster provided at creation time. - * Only the logical `AND` operator is supported; space-separated items are - * treated as having an implicit `AND` operator. - * Example filter: - * status.state = ACTIVE AND clusterName = mycluster - * AND labels.env = staging AND labels.starred = * - * - * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. The standard List page size. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The standard List page size. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. The standard List page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. The standard List page token. - * - * 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/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListClustersResponse.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListClustersResponse.php deleted file mode 100644 index 1bf146d4ec3..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListClustersResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.dataproc.v1.ListClustersResponse - */ -class ListClustersResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The clusters in the project. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.Cluster clusters = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $clusters; - /** - * Output only. This token is included in the response if there are more - * results to fetch. To fetch additional results, provide this value as the - * `page_token` in a subsequent `ListClustersRequest`. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dataproc\V1\Cluster>|\Google\Protobuf\Internal\RepeatedField $clusters - * Output only. The clusters in the project. - * @type string $next_page_token - * Output only. This token is included in the response if there are more - * results to fetch. To fetch additional results, provide this value as the - * `page_token` in a subsequent `ListClustersRequest`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Clusters::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The clusters in the project. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.Cluster clusters = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getClusters() - { - return $this->clusters; - } - - /** - * Output only. The clusters in the project. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.Cluster clusters = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\Dataproc\V1\Cluster>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setClusters($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataproc\V1\Cluster::class); - $this->clusters = $arr; - - return $this; - } - - /** - * Output only. This token is included in the response if there are more - * results to fetch. To fetch additional results, provide this value as the - * `page_token` in a subsequent `ListClustersRequest`. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Output only. This token is included in the response if there are more - * results to fetch. To fetch additional results, provide this value as the - * `page_token` in a subsequent `ListClustersRequest`. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListJobsRequest.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListJobsRequest.php deleted file mode 100644 index 3edadf58a5e..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListJobsRequest.php +++ /dev/null @@ -1,374 +0,0 @@ -google.cloud.dataproc.v1.ListJobsRequest - */ -class ListJobsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The ID of the Google Cloud Platform project that the job - * belongs to. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $project_id = ''; - /** - * Required. The Dataproc region in which to handle the request. - * - * Generated from protobuf field string region = 6 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $region = ''; - /** - * Optional. The number of results to return in each response. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. The page token, returned by a previous call, to request the - * next page of results. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. If set, the returned jobs list includes only jobs that were - * submitted to the named cluster. - * - * Generated from protobuf field string cluster_name = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $cluster_name = ''; - /** - * Optional. Specifies enumerated categories of jobs to list. - * (default = match ALL jobs). - * If `filter` is provided, `jobStateMatcher` will be ignored. - * - * Generated from protobuf field .google.cloud.dataproc.v1.ListJobsRequest.JobStateMatcher job_state_matcher = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $job_state_matcher = 0; - /** - * Optional. A filter constraining the jobs to list. Filters are - * case-sensitive and have the following syntax: - * [field = value] AND [field [= value]] ... - * where **field** is `status.state` or `labels.[KEY]`, and `[KEY]` is a label - * key. **value** can be `*` to match all values. - * `status.state` can be either `ACTIVE` or `NON_ACTIVE`. - * Only the logical `AND` operator is supported; space-separated items are - * treated as having an implicit `AND` operator. - * Example filter: - * status.state = ACTIVE AND labels.env = staging AND labels.starred = * - * - * Generated from protobuf field string filter = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - - /** - * @param string $projectId Required. The ID of the Google Cloud Platform project that the job - * belongs to. - * @param string $region Required. The Dataproc region in which to handle the request. - * - * @return \Google\Cloud\Dataproc\V1\ListJobsRequest - * - * @experimental - */ - public static function build(string $projectId, string $region): self - { - return (new self()) - ->setProjectId($projectId) - ->setRegion($region); - } - - /** - * @param string $projectId Required. The ID of the Google Cloud Platform project that the job - * belongs to. - * @param string $region Required. The Dataproc region in which to handle the request. - * @param string $filter Optional. A filter constraining the jobs to list. Filters are - * case-sensitive and have the following syntax: - * - * [field = value] AND [field [= value]] ... - * - * where **field** is `status.state` or `labels.[KEY]`, and `[KEY]` is a label - * key. **value** can be `*` to match all values. - * `status.state` can be either `ACTIVE` or `NON_ACTIVE`. - * Only the logical `AND` operator is supported; space-separated items are - * treated as having an implicit `AND` operator. - * - * Example filter: - * - * status.state = ACTIVE AND labels.env = staging AND labels.starred = * - * - * @return \Google\Cloud\Dataproc\V1\ListJobsRequest - * - * @experimental - */ - public static function buildFromProjectIdRegionFilter(string $projectId, string $region, string $filter): self - { - return (new self()) - ->setProjectId($projectId) - ->setRegion($region) - ->setFilter($filter); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $project_id - * Required. The ID of the Google Cloud Platform project that the job - * belongs to. - * @type string $region - * Required. The Dataproc region in which to handle the request. - * @type int $page_size - * Optional. The number of results to return in each response. - * @type string $page_token - * Optional. The page token, returned by a previous call, to request the - * next page of results. - * @type string $cluster_name - * Optional. If set, the returned jobs list includes only jobs that were - * submitted to the named cluster. - * @type int $job_state_matcher - * Optional. Specifies enumerated categories of jobs to list. - * (default = match ALL jobs). - * If `filter` is provided, `jobStateMatcher` will be ignored. - * @type string $filter - * Optional. A filter constraining the jobs to list. Filters are - * case-sensitive and have the following syntax: - * [field = value] AND [field [= value]] ... - * where **field** is `status.state` or `labels.[KEY]`, and `[KEY]` is a label - * key. **value** can be `*` to match all values. - * `status.state` can be either `ACTIVE` or `NON_ACTIVE`. - * Only the logical `AND` operator is supported; space-separated items are - * treated as having an implicit `AND` operator. - * Example filter: - * status.state = ACTIVE AND labels.env = staging AND labels.starred = * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Jobs::initOnce(); - parent::__construct($data); - } - - /** - * Required. The ID of the Google Cloud Platform project that the job - * belongs to. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * Required. The ID of the Google Cloud Platform project that the job - * belongs to. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - - /** - * Required. The Dataproc region in which to handle the request. - * - * Generated from protobuf field string region = 6 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getRegion() - { - return $this->region; - } - - /** - * Required. The Dataproc region in which to handle the request. - * - * Generated from protobuf field string region = 6 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setRegion($var) - { - GPBUtil::checkString($var, True); - $this->region = $var; - - return $this; - } - - /** - * Optional. The number of results to return in each response. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The number of results to return in each response. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. The page token, returned by a previous call, to request the - * next page of results. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. The page token, returned by a previous call, to request the - * next page of results. - * - * 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. If set, the returned jobs list includes only jobs that were - * submitted to the named cluster. - * - * Generated from protobuf field string cluster_name = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getClusterName() - { - return $this->cluster_name; - } - - /** - * Optional. If set, the returned jobs list includes only jobs that were - * submitted to the named cluster. - * - * Generated from protobuf field string cluster_name = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setClusterName($var) - { - GPBUtil::checkString($var, True); - $this->cluster_name = $var; - - return $this; - } - - /** - * Optional. Specifies enumerated categories of jobs to list. - * (default = match ALL jobs). - * If `filter` is provided, `jobStateMatcher` will be ignored. - * - * Generated from protobuf field .google.cloud.dataproc.v1.ListJobsRequest.JobStateMatcher job_state_matcher = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getJobStateMatcher() - { - return $this->job_state_matcher; - } - - /** - * Optional. Specifies enumerated categories of jobs to list. - * (default = match ALL jobs). - * If `filter` is provided, `jobStateMatcher` will be ignored. - * - * Generated from protobuf field .google.cloud.dataproc.v1.ListJobsRequest.JobStateMatcher job_state_matcher = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setJobStateMatcher($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataproc\V1\ListJobsRequest\JobStateMatcher::class); - $this->job_state_matcher = $var; - - return $this; - } - - /** - * Optional. A filter constraining the jobs to list. Filters are - * case-sensitive and have the following syntax: - * [field = value] AND [field [= value]] ... - * where **field** is `status.state` or `labels.[KEY]`, and `[KEY]` is a label - * key. **value** can be `*` to match all values. - * `status.state` can be either `ACTIVE` or `NON_ACTIVE`. - * Only the logical `AND` operator is supported; space-separated items are - * treated as having an implicit `AND` operator. - * Example filter: - * status.state = ACTIVE AND labels.env = staging AND labels.starred = * - * - * Generated from protobuf field string filter = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. A filter constraining the jobs to list. Filters are - * case-sensitive and have the following syntax: - * [field = value] AND [field [= value]] ... - * where **field** is `status.state` or `labels.[KEY]`, and `[KEY]` is a label - * key. **value** can be `*` to match all values. - * `status.state` can be either `ACTIVE` or `NON_ACTIVE`. - * Only the logical `AND` operator is supported; space-separated items are - * treated as having an implicit `AND` operator. - * Example filter: - * status.state = ACTIVE AND labels.env = staging AND labels.starred = * - * - * Generated from protobuf field string filter = 7 [(.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/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListJobsRequest/JobStateMatcher.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListJobsRequest/JobStateMatcher.php deleted file mode 100644 index adfef5aece1..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListJobsRequest/JobStateMatcher.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.dataproc.v1.ListJobsRequest.JobStateMatcher - */ -class JobStateMatcher -{ - /** - * Match all jobs, regardless of state. - * - * Generated from protobuf enum ALL = 0; - */ - const ALL = 0; - /** - * Only match jobs in non-terminal states: PENDING, RUNNING, or - * CANCEL_PENDING. - * - * Generated from protobuf enum ACTIVE = 1; - */ - const ACTIVE = 1; - /** - * Only match jobs in terminal states: CANCELLED, DONE, or ERROR. - * - * Generated from protobuf enum NON_ACTIVE = 2; - */ - const NON_ACTIVE = 2; - - private static $valueToName = [ - self::ALL => 'ALL', - self::ACTIVE => 'ACTIVE', - self::NON_ACTIVE => 'NON_ACTIVE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(JobStateMatcher::class, \Google\Cloud\Dataproc\V1\ListJobsRequest_JobStateMatcher::class); - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListJobsResponse.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListJobsResponse.php deleted file mode 100644 index 442a32d9bbb..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListJobsResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.dataproc.v1.ListJobsResponse - */ -class ListJobsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Jobs list. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.Job jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $jobs; - /** - * Optional. This token is included in the response if there are more results - * to fetch. To fetch additional results, provide this value as the - * `page_token` in a subsequent ListJobsRequest. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dataproc\V1\Job>|\Google\Protobuf\Internal\RepeatedField $jobs - * Output only. Jobs list. - * @type string $next_page_token - * Optional. This token is included in the response if there are more results - * to fetch. To fetch additional results, provide this value as the - * `page_token` in a subsequent ListJobsRequest. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Jobs::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Jobs list. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.Job jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getJobs() - { - return $this->jobs; - } - - /** - * Output only. Jobs list. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.Job jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\Dataproc\V1\Job>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setJobs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataproc\V1\Job::class); - $this->jobs = $arr; - - return $this; - } - - /** - * Optional. This token is included in the response if there are more results - * to fetch. To fetch additional results, provide this value as the - * `page_token` in a subsequent ListJobsRequest. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Optional. This token is included in the response if there are more results - * to fetch. To fetch additional results, provide this value as the - * `page_token` in a subsequent ListJobsRequest. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @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/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListWorkflowTemplatesRequest.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListWorkflowTemplatesRequest.php deleted file mode 100644 index d5fb760a228..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListWorkflowTemplatesRequest.php +++ /dev/null @@ -1,190 +0,0 @@ -google.cloud.dataproc.v1.ListWorkflowTemplatesRequest - */ -class ListWorkflowTemplatesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the region or location, as described - * in https://cloud.google.com/apis/design/resource_names. - * * For `projects.regions.workflowTemplates,list`, the resource - * name of the region has the following format: - * `projects/{project_id}/regions/{region}` - * * For `projects.locations.workflowTemplates.list`, the - * resource name of the location has the following format: - * `projects/{project_id}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of results to return in each response. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. The page token, returned by a previous call, to request the - * next page of results. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The resource name of the region or location, as described - * in https://cloud.google.com/apis/design/resource_names. - * - * * For `projects.regions.workflowTemplates,list`, the resource - * name of the region has the following format: - * `projects/{project_id}/regions/{region}` - * - * * For `projects.locations.workflowTemplates.list`, the - * resource name of the location has the following format: - * `projects/{project_id}/locations/{location}` - * Please see {@see WorkflowTemplateServiceClient::regionName()} for help formatting this field. - * - * @return \Google\Cloud\Dataproc\V1\ListWorkflowTemplatesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the region or location, as described - * in https://cloud.google.com/apis/design/resource_names. - * * For `projects.regions.workflowTemplates,list`, the resource - * name of the region has the following format: - * `projects/{project_id}/regions/{region}` - * * For `projects.locations.workflowTemplates.list`, the - * resource name of the location has the following format: - * `projects/{project_id}/locations/{location}` - * @type int $page_size - * Optional. The maximum number of results to return in each response. - * @type string $page_token - * Optional. The page token, returned by a previous call, to request the - * next page of results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\WorkflowTemplates::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the region or location, as described - * in https://cloud.google.com/apis/design/resource_names. - * * For `projects.regions.workflowTemplates,list`, the resource - * name of the region has the following format: - * `projects/{project_id}/regions/{region}` - * * For `projects.locations.workflowTemplates.list`, the - * resource name of the location has the following format: - * `projects/{project_id}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the region or location, as described - * in https://cloud.google.com/apis/design/resource_names. - * * For `projects.regions.workflowTemplates,list`, the resource - * name of the region has the following format: - * `projects/{project_id}/regions/{region}` - * * For `projects.locations.workflowTemplates.list`, the - * resource name of the location has the following format: - * `projects/{project_id}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The maximum number of results to return in each response. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of results to return in each response. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. The page token, returned by a previous call, to request the - * next page of results. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. The page token, returned by a previous call, to request the - * next page of results. - * - * 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/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListWorkflowTemplatesResponse.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListWorkflowTemplatesResponse.php deleted file mode 100644 index 27a59790d1e..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListWorkflowTemplatesResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.dataproc.v1.ListWorkflowTemplatesResponse - */ -class ListWorkflowTemplatesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. WorkflowTemplates list. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.WorkflowTemplate templates = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $templates; - /** - * Output only. This token is included in the response if there are more - * results to fetch. To fetch additional results, provide this value as the - * page_token in a subsequent ListWorkflowTemplatesRequest. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dataproc\V1\WorkflowTemplate>|\Google\Protobuf\Internal\RepeatedField $templates - * Output only. WorkflowTemplates list. - * @type string $next_page_token - * Output only. This token is included in the response if there are more - * results to fetch. To fetch additional results, provide this value as the - * page_token in a subsequent ListWorkflowTemplatesRequest. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\WorkflowTemplates::initOnce(); - parent::__construct($data); - } - - /** - * Output only. WorkflowTemplates list. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.WorkflowTemplate templates = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTemplates() - { - return $this->templates; - } - - /** - * Output only. WorkflowTemplates list. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.WorkflowTemplate templates = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\Dataproc\V1\WorkflowTemplate>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTemplates($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataproc\V1\WorkflowTemplate::class); - $this->templates = $arr; - - return $this; - } - - /** - * Output only. This token is included in the response if there are more - * results to fetch. To fetch additional results, provide this value as the - * page_token in a subsequent ListWorkflowTemplatesRequest. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Output only. This token is included in the response if there are more - * results to fetch. To fetch additional results, provide this value as the - * page_token in a subsequent ListWorkflowTemplatesRequest. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/LoggingConfig.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/LoggingConfig.php deleted file mode 100644 index fc0e3ce7dd9..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/LoggingConfig.php +++ /dev/null @@ -1,87 +0,0 @@ -google.cloud.dataproc.v1.LoggingConfig - */ -class LoggingConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The per-package log levels for the driver. This may include - * "root" package name to configure rootLogger. - * Examples: - * - 'com.google = FATAL' - * - 'root = INFO' - * - 'org.apache = DEBUG' - * - * Generated from protobuf field map driver_log_levels = 2; - */ - private $driver_log_levels; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\MapField $driver_log_levels - * The per-package log levels for the driver. This may include - * "root" package name to configure rootLogger. - * Examples: - * - 'com.google = FATAL' - * - 'root = INFO' - * - 'org.apache = DEBUG' - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Jobs::initOnce(); - parent::__construct($data); - } - - /** - * The per-package log levels for the driver. This may include - * "root" package name to configure rootLogger. - * Examples: - * - 'com.google = FATAL' - * - 'root = INFO' - * - 'org.apache = DEBUG' - * - * Generated from protobuf field map driver_log_levels = 2; - * @return \Google\Protobuf\Internal\MapField - */ - public function getDriverLogLevels() - { - return $this->driver_log_levels; - } - - /** - * The per-package log levels for the driver. This may include - * "root" package name to configure rootLogger. - * Examples: - * - 'com.google = FATAL' - * - 'root = INFO' - * - 'org.apache = DEBUG' - * - * Generated from protobuf field map driver_log_levels = 2; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setDriverLogLevels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Dataproc\V1\LoggingConfig\Level::class); - $this->driver_log_levels = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/LoggingConfig/Level.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/LoggingConfig/Level.php deleted file mode 100644 index c5716a27bb3..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/LoggingConfig/Level.php +++ /dev/null @@ -1,108 +0,0 @@ -google.cloud.dataproc.v1.LoggingConfig.Level - */ -class Level -{ - /** - * Level is unspecified. Use default level for log4j. - * - * Generated from protobuf enum LEVEL_UNSPECIFIED = 0; - */ - const LEVEL_UNSPECIFIED = 0; - /** - * Use ALL level for log4j. - * - * Generated from protobuf enum ALL = 1; - */ - const ALL = 1; - /** - * Use TRACE level for log4j. - * - * Generated from protobuf enum TRACE = 2; - */ - const TRACE = 2; - /** - * Use DEBUG level for log4j. - * - * Generated from protobuf enum DEBUG = 3; - */ - const DEBUG = 3; - /** - * Use INFO level for log4j. - * - * Generated from protobuf enum INFO = 4; - */ - const INFO = 4; - /** - * Use WARN level for log4j. - * - * Generated from protobuf enum WARN = 5; - */ - const WARN = 5; - /** - * Use ERROR level for log4j. - * - * Generated from protobuf enum ERROR = 6; - */ - const ERROR = 6; - /** - * Use FATAL level for log4j. - * - * Generated from protobuf enum FATAL = 7; - */ - const FATAL = 7; - /** - * Turn off log4j. - * - * Generated from protobuf enum OFF = 8; - */ - const OFF = 8; - - private static $valueToName = [ - self::LEVEL_UNSPECIFIED => 'LEVEL_UNSPECIFIED', - self::ALL => 'ALL', - self::TRACE => 'TRACE', - self::DEBUG => 'DEBUG', - self::INFO => 'INFO', - self::WARN => 'WARN', - self::ERROR => 'ERROR', - self::FATAL => 'FATAL', - self::OFF => 'OFF', - ]; - - 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(Level::class, \Google\Cloud\Dataproc\V1\LoggingConfig_Level::class); - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ManagedCluster.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ManagedCluster.php deleted file mode 100644 index 4a8d6c00665..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ManagedCluster.php +++ /dev/null @@ -1,185 +0,0 @@ -google.cloud.dataproc.v1.ManagedCluster - */ -class ManagedCluster extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The cluster name prefix. A unique cluster name will be formed by - * appending a random suffix. - * The name must contain only lower-case letters (a-z), numbers (0-9), - * and hyphens (-). Must begin with a letter. Cannot begin or end with - * hyphen. Must consist of between 2 and 35 characters. - * - * Generated from protobuf field string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $cluster_name = ''; - /** - * Required. The cluster configuration. - * - * Generated from protobuf field .google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $config = null; - /** - * Optional. The labels to associate with this cluster. - * Label keys must be between 1 and 63 characters long, and must conform to - * the following PCRE regular expression: - * [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62} - * Label values must be between 1 and 63 characters long, and must conform to - * the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63} - * No more than 32 labels can be associated with a given cluster. - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $cluster_name - * Required. The cluster name prefix. A unique cluster name will be formed by - * appending a random suffix. - * The name must contain only lower-case letters (a-z), numbers (0-9), - * and hyphens (-). Must begin with a letter. Cannot begin or end with - * hyphen. Must consist of between 2 and 35 characters. - * @type \Google\Cloud\Dataproc\V1\ClusterConfig $config - * Required. The cluster configuration. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. The labels to associate with this cluster. - * Label keys must be between 1 and 63 characters long, and must conform to - * the following PCRE regular expression: - * [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62} - * Label values must be between 1 and 63 characters long, and must conform to - * the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63} - * No more than 32 labels can be associated with a given cluster. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\WorkflowTemplates::initOnce(); - parent::__construct($data); - } - - /** - * Required. The cluster name prefix. A unique cluster name will be formed by - * appending a random suffix. - * The name must contain only lower-case letters (a-z), numbers (0-9), - * and hyphens (-). Must begin with a letter. Cannot begin or end with - * hyphen. Must consist of between 2 and 35 characters. - * - * Generated from protobuf field string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getClusterName() - { - return $this->cluster_name; - } - - /** - * Required. The cluster name prefix. A unique cluster name will be formed by - * appending a random suffix. - * The name must contain only lower-case letters (a-z), numbers (0-9), - * and hyphens (-). Must begin with a letter. Cannot begin or end with - * hyphen. Must consist of between 2 and 35 characters. - * - * Generated from protobuf field string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setClusterName($var) - { - GPBUtil::checkString($var, True); - $this->cluster_name = $var; - - return $this; - } - - /** - * Required. The cluster configuration. - * - * Generated from protobuf field .google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataproc\V1\ClusterConfig|null - */ - public function getConfig() - { - return $this->config; - } - - public function hasConfig() - { - return isset($this->config); - } - - public function clearConfig() - { - unset($this->config); - } - - /** - * Required. The cluster configuration. - * - * Generated from protobuf field .google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataproc\V1\ClusterConfig $var - * @return $this - */ - public function setConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\ClusterConfig::class); - $this->config = $var; - - return $this; - } - - /** - * Optional. The labels to associate with this cluster. - * Label keys must be between 1 and 63 characters long, and must conform to - * the following PCRE regular expression: - * [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62} - * Label values must be between 1 and 63 characters long, and must conform to - * the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63} - * No more than 32 labels can be associated with a given cluster. - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. The labels to associate with this cluster. - * Label keys must be between 1 and 63 characters long, and must conform to - * the following PCRE regular expression: - * [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62} - * Label values must be between 1 and 63 characters long, and must conform to - * the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63} - * No more than 32 labels can be associated with a given cluster. - * - * Generated from protobuf field map labels = 4 [(.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/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ManagedGroupConfig.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ManagedGroupConfig.php deleted file mode 100644 index 5b478879505..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ManagedGroupConfig.php +++ /dev/null @@ -1,143 +0,0 @@ -google.cloud.dataproc.v1.ManagedGroupConfig - */ -class ManagedGroupConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The name of the Instance Template used for the Managed - * Instance Group. - * - * Generated from protobuf field string instance_template_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $instance_template_name = ''; - /** - * Output only. The name of the Instance Group Manager for this group. - * - * Generated from protobuf field string instance_group_manager_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $instance_group_manager_name = ''; - /** - * Output only. The partial URI to the instance group manager for this group. - * E.g. projects/my-project/regions/us-central1/instanceGroupManagers/my-igm. - * - * Generated from protobuf field string instance_group_manager_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $instance_group_manager_uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $instance_template_name - * Output only. The name of the Instance Template used for the Managed - * Instance Group. - * @type string $instance_group_manager_name - * Output only. The name of the Instance Group Manager for this group. - * @type string $instance_group_manager_uri - * Output only. The partial URI to the instance group manager for this group. - * E.g. projects/my-project/regions/us-central1/instanceGroupManagers/my-igm. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Clusters::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The name of the Instance Template used for the Managed - * Instance Group. - * - * Generated from protobuf field string instance_template_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getInstanceTemplateName() - { - return $this->instance_template_name; - } - - /** - * Output only. The name of the Instance Template used for the Managed - * Instance Group. - * - * Generated from protobuf field string instance_template_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setInstanceTemplateName($var) - { - GPBUtil::checkString($var, True); - $this->instance_template_name = $var; - - return $this; - } - - /** - * Output only. The name of the Instance Group Manager for this group. - * - * Generated from protobuf field string instance_group_manager_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getInstanceGroupManagerName() - { - return $this->instance_group_manager_name; - } - - /** - * Output only. The name of the Instance Group Manager for this group. - * - * Generated from protobuf field string instance_group_manager_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setInstanceGroupManagerName($var) - { - GPBUtil::checkString($var, True); - $this->instance_group_manager_name = $var; - - return $this; - } - - /** - * Output only. The partial URI to the instance group manager for this group. - * E.g. projects/my-project/regions/us-central1/instanceGroupManagers/my-igm. - * - * Generated from protobuf field string instance_group_manager_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getInstanceGroupManagerUri() - { - return $this->instance_group_manager_uri; - } - - /** - * Output only. The partial URI to the instance group manager for this group. - * E.g. projects/my-project/regions/us-central1/instanceGroupManagers/my-igm. - * - * Generated from protobuf field string instance_group_manager_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setInstanceGroupManagerUri($var) - { - GPBUtil::checkString($var, True); - $this->instance_group_manager_uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/MetastoreConfig.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/MetastoreConfig.php deleted file mode 100644 index 3ea1359c20b..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/MetastoreConfig.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.dataproc.v1.MetastoreConfig - */ -class MetastoreConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of an existing Dataproc Metastore service. - * Example: - * * `projects/[project_id]/locations/[dataproc_region]/services/[service-name]` - * - * Generated from protobuf field string dataproc_metastore_service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $dataproc_metastore_service = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $dataproc_metastore_service - * Required. Resource name of an existing Dataproc Metastore service. - * Example: - * * `projects/[project_id]/locations/[dataproc_region]/services/[service-name]` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Clusters::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of an existing Dataproc Metastore service. - * Example: - * * `projects/[project_id]/locations/[dataproc_region]/services/[service-name]` - * - * Generated from protobuf field string dataproc_metastore_service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getDataprocMetastoreService() - { - return $this->dataproc_metastore_service; - } - - /** - * Required. Resource name of an existing Dataproc Metastore service. - * Example: - * * `projects/[project_id]/locations/[dataproc_region]/services/[service-name]` - * - * Generated from protobuf field string dataproc_metastore_service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setDataprocMetastoreService($var) - { - GPBUtil::checkString($var, True); - $this->dataproc_metastore_service = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/NodeGroup.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/NodeGroup.php deleted file mode 100644 index 8a22a7a3937..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/NodeGroup.php +++ /dev/null @@ -1,206 +0,0 @@ -google.cloud.dataproc.v1.NodeGroup - */ -class NodeGroup extends \Google\Protobuf\Internal\Message -{ - /** - * The Node group [resource name](https://aip.dev/122). - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Required. Node group roles. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.NodeGroup.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $roles; - /** - * Optional. The node group instance group configuration. - * - * Generated from protobuf field .google.cloud.dataproc.v1.InstanceGroupConfig node_group_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $node_group_config = null; - /** - * Optional. Node group labels. - * * Label **keys** must consist of from 1 to 63 characters and conform to - * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). - * * Label **values** can be empty. If specified, they must consist of from - * 1 to 63 characters and conform to [RFC 1035] - * (https://www.ietf.org/rfc/rfc1035.txt). - * * The node group must have no more than 32 labels. - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The Node group [resource name](https://aip.dev/122). - * @type array|\Google\Protobuf\Internal\RepeatedField $roles - * Required. Node group roles. - * @type \Google\Cloud\Dataproc\V1\InstanceGroupConfig $node_group_config - * Optional. The node group instance group configuration. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. Node group labels. - * * Label **keys** must consist of from 1 to 63 characters and conform to - * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). - * * Label **values** can be empty. If specified, they must consist of from - * 1 to 63 characters and conform to [RFC 1035] - * (https://www.ietf.org/rfc/rfc1035.txt). - * * The node group must have no more than 32 labels. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Clusters::initOnce(); - parent::__construct($data); - } - - /** - * The Node group [resource name](https://aip.dev/122). - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The Node group [resource name](https://aip.dev/122). - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. Node group roles. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.NodeGroup.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRoles() - { - return $this->roles; - } - - /** - * Required. Node group roles. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.NodeGroup.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRoles($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Dataproc\V1\NodeGroup\Role::class); - $this->roles = $arr; - - return $this; - } - - /** - * Optional. The node group instance group configuration. - * - * Generated from protobuf field .google.cloud.dataproc.v1.InstanceGroupConfig node_group_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\InstanceGroupConfig|null - */ - public function getNodeGroupConfig() - { - return $this->node_group_config; - } - - public function hasNodeGroupConfig() - { - return isset($this->node_group_config); - } - - public function clearNodeGroupConfig() - { - unset($this->node_group_config); - } - - /** - * Optional. The node group instance group configuration. - * - * Generated from protobuf field .google.cloud.dataproc.v1.InstanceGroupConfig node_group_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\InstanceGroupConfig $var - * @return $this - */ - public function setNodeGroupConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\InstanceGroupConfig::class); - $this->node_group_config = $var; - - return $this; - } - - /** - * Optional. Node group labels. - * * Label **keys** must consist of from 1 to 63 characters and conform to - * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). - * * Label **values** can be empty. If specified, they must consist of from - * 1 to 63 characters and conform to [RFC 1035] - * (https://www.ietf.org/rfc/rfc1035.txt). - * * The node group must have no more than 32 labels. - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. Node group labels. - * * Label **keys** must consist of from 1 to 63 characters and conform to - * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). - * * Label **values** can be empty. If specified, they must consist of from - * 1 to 63 characters and conform to [RFC 1035] - * (https://www.ietf.org/rfc/rfc1035.txt). - * * The node group must have no more than 32 labels. - * - * Generated from protobuf field map labels = 4 [(.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/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/NodeGroup/Role.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/NodeGroup/Role.php deleted file mode 100644 index f338f061458..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/NodeGroup/Role.php +++ /dev/null @@ -1,57 +0,0 @@ -google.cloud.dataproc.v1.NodeGroup.Role - */ -class Role -{ - /** - * Required unspecified role. - * - * Generated from protobuf enum ROLE_UNSPECIFIED = 0; - */ - const ROLE_UNSPECIFIED = 0; - /** - * Job drivers run on the node pool. - * - * Generated from protobuf enum DRIVER = 1; - */ - const DRIVER = 1; - - private static $valueToName = [ - self::ROLE_UNSPECIFIED => 'ROLE_UNSPECIFIED', - self::DRIVER => 'DRIVER', - ]; - - 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(Role::class, \Google\Cloud\Dataproc\V1\NodeGroup_Role::class); - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/NodeGroupAffinity.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/NodeGroupAffinity.php deleted file mode 100644 index 83c1b6ae648..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/NodeGroupAffinity.php +++ /dev/null @@ -1,97 +0,0 @@ -google.cloud.dataproc.v1.NodeGroupAffinity - */ -class NodeGroupAffinity extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The URI of a - * sole-tenant [node group - * resource](https://cloud.google.com/compute/docs/reference/rest/v1/nodeGroups) - * that the cluster will be created on. - * A full URL, partial URI, or node group name are valid. Examples: - * * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]/nodeGroups/node-group-1` - * * `projects/[project_id]/zones/[zone]/nodeGroups/node-group-1` - * * `node-group-1` - * - * Generated from protobuf field string node_group_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $node_group_uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $node_group_uri - * Required. The URI of a - * sole-tenant [node group - * resource](https://cloud.google.com/compute/docs/reference/rest/v1/nodeGroups) - * that the cluster will be created on. - * A full URL, partial URI, or node group name are valid. Examples: - * * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]/nodeGroups/node-group-1` - * * `projects/[project_id]/zones/[zone]/nodeGroups/node-group-1` - * * `node-group-1` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Clusters::initOnce(); - parent::__construct($data); - } - - /** - * Required. The URI of a - * sole-tenant [node group - * resource](https://cloud.google.com/compute/docs/reference/rest/v1/nodeGroups) - * that the cluster will be created on. - * A full URL, partial URI, or node group name are valid. Examples: - * * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]/nodeGroups/node-group-1` - * * `projects/[project_id]/zones/[zone]/nodeGroups/node-group-1` - * * `node-group-1` - * - * Generated from protobuf field string node_group_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getNodeGroupUri() - { - return $this->node_group_uri; - } - - /** - * Required. The URI of a - * sole-tenant [node group - * resource](https://cloud.google.com/compute/docs/reference/rest/v1/nodeGroups) - * that the cluster will be created on. - * A full URL, partial URI, or node group name are valid. Examples: - * * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]/nodeGroups/node-group-1` - * * `projects/[project_id]/zones/[zone]/nodeGroups/node-group-1` - * * `node-group-1` - * - * Generated from protobuf field string node_group_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setNodeGroupUri($var) - { - GPBUtil::checkString($var, True); - $this->node_group_uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/NodeGroupOperationMetadata.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/NodeGroupOperationMetadata.php deleted file mode 100644 index 9fe80bbd300..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/NodeGroupOperationMetadata.php +++ /dev/null @@ -1,315 +0,0 @@ -google.cloud.dataproc.v1.NodeGroupOperationMetadata - */ -class NodeGroupOperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Node group ID for the operation. - * - * Generated from protobuf field string node_group_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $node_group_id = ''; - /** - * Output only. Cluster UUID associated with the node group operation. - * - * Generated from protobuf field string cluster_uuid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $cluster_uuid = ''; - /** - * Output only. Current operation status. - * - * Generated from protobuf field .google.cloud.dataproc.v1.ClusterOperationStatus status = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $status = null; - /** - * Output only. The previous operation status. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.ClusterOperationStatus status_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $status_history; - /** - * The operation type. - * - * Generated from protobuf field .google.cloud.dataproc.v1.NodeGroupOperationMetadata.NodeGroupOperationType operation_type = 5; - */ - protected $operation_type = 0; - /** - * Output only. Short description of operation. - * - * Generated from protobuf field string description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $description = ''; - /** - * Output only. Labels associated with the operation. - * - * Generated from protobuf field map labels = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $labels; - /** - * Output only. Errors encountered during operation execution. - * - * Generated from protobuf field repeated string warnings = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $warnings; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $node_group_id - * Output only. Node group ID for the operation. - * @type string $cluster_uuid - * Output only. Cluster UUID associated with the node group operation. - * @type \Google\Cloud\Dataproc\V1\ClusterOperationStatus $status - * Output only. Current operation status. - * @type array<\Google\Cloud\Dataproc\V1\ClusterOperationStatus>|\Google\Protobuf\Internal\RepeatedField $status_history - * Output only. The previous operation status. - * @type int $operation_type - * The operation type. - * @type string $description - * Output only. Short description of operation. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Output only. Labels associated with the operation. - * @type array|\Google\Protobuf\Internal\RepeatedField $warnings - * Output only. Errors encountered during operation execution. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Operations::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Node group ID for the operation. - * - * Generated from protobuf field string node_group_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getNodeGroupId() - { - return $this->node_group_id; - } - - /** - * Output only. Node group ID for the operation. - * - * Generated from protobuf field string node_group_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setNodeGroupId($var) - { - GPBUtil::checkString($var, True); - $this->node_group_id = $var; - - return $this; - } - - /** - * Output only. Cluster UUID associated with the node group operation. - * - * Generated from protobuf field string cluster_uuid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getClusterUuid() - { - return $this->cluster_uuid; - } - - /** - * Output only. Cluster UUID associated with the node group operation. - * - * Generated from protobuf field string cluster_uuid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setClusterUuid($var) - { - GPBUtil::checkString($var, True); - $this->cluster_uuid = $var; - - return $this; - } - - /** - * Output only. Current operation status. - * - * Generated from protobuf field .google.cloud.dataproc.v1.ClusterOperationStatus status = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataproc\V1\ClusterOperationStatus|null - */ - public function getStatus() - { - return $this->status; - } - - public function hasStatus() - { - return isset($this->status); - } - - public function clearStatus() - { - unset($this->status); - } - - /** - * Output only. Current operation status. - * - * Generated from protobuf field .google.cloud.dataproc.v1.ClusterOperationStatus status = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataproc\V1\ClusterOperationStatus $var - * @return $this - */ - public function setStatus($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\ClusterOperationStatus::class); - $this->status = $var; - - return $this; - } - - /** - * Output only. The previous operation status. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.ClusterOperationStatus status_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getStatusHistory() - { - return $this->status_history; - } - - /** - * Output only. The previous operation status. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.ClusterOperationStatus status_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\Dataproc\V1\ClusterOperationStatus>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setStatusHistory($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataproc\V1\ClusterOperationStatus::class); - $this->status_history = $arr; - - return $this; - } - - /** - * The operation type. - * - * Generated from protobuf field .google.cloud.dataproc.v1.NodeGroupOperationMetadata.NodeGroupOperationType operation_type = 5; - * @return int - */ - public function getOperationType() - { - return $this->operation_type; - } - - /** - * The operation type. - * - * Generated from protobuf field .google.cloud.dataproc.v1.NodeGroupOperationMetadata.NodeGroupOperationType operation_type = 5; - * @param int $var - * @return $this - */ - public function setOperationType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataproc\V1\NodeGroupOperationMetadata\NodeGroupOperationType::class); - $this->operation_type = $var; - - return $this; - } - - /** - * Output only. Short description of operation. - * - * Generated from protobuf field string description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Output only. Short description of operation. - * - * Generated from protobuf field string description = 6 [(.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. Labels associated with the operation. - * - * Generated from protobuf field map labels = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Output only. Labels associated with the operation. - * - * Generated from protobuf field map labels = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @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. Errors encountered during operation execution. - * - * Generated from protobuf field repeated string warnings = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getWarnings() - { - return $this->warnings; - } - - /** - * Output only. Errors encountered during operation execution. - * - * Generated from protobuf field repeated string warnings = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setWarnings($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->warnings = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/NodeGroupOperationMetadata/NodeGroupOperationType.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/NodeGroupOperationMetadata/NodeGroupOperationType.php deleted file mode 100644 index 4d13ed48a9b..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/NodeGroupOperationMetadata/NodeGroupOperationType.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.dataproc.v1.NodeGroupOperationMetadata.NodeGroupOperationType - */ -class NodeGroupOperationType -{ - /** - * Node group operation type is unknown. - * - * Generated from protobuf enum NODE_GROUP_OPERATION_TYPE_UNSPECIFIED = 0; - */ - const NODE_GROUP_OPERATION_TYPE_UNSPECIFIED = 0; - /** - * Create node group operation type. - * - * Generated from protobuf enum CREATE = 1; - */ - const CREATE = 1; - /** - * Update node group operation type. - * - * Generated from protobuf enum UPDATE = 2; - */ - const UPDATE = 2; - /** - * Delete node group operation type. - * - * Generated from protobuf enum DELETE = 3; - */ - const DELETE = 3; - /** - * Resize node group operation type. - * - * Generated from protobuf enum RESIZE = 4; - */ - const RESIZE = 4; - - private static $valueToName = [ - self::NODE_GROUP_OPERATION_TYPE_UNSPECIFIED => 'NODE_GROUP_OPERATION_TYPE_UNSPECIFIED', - self::CREATE => 'CREATE', - self::UPDATE => 'UPDATE', - self::DELETE => 'DELETE', - self::RESIZE => 'RESIZE', - ]; - - 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(NodeGroupOperationType::class, \Google\Cloud\Dataproc\V1\NodeGroupOperationMetadata_NodeGroupOperationType::class); - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/NodeInitializationAction.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/NodeInitializationAction.php deleted file mode 100644 index 86c1f470e5e..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/NodeInitializationAction.php +++ /dev/null @@ -1,132 +0,0 @@ -google.cloud.dataproc.v1.NodeInitializationAction - */ -class NodeInitializationAction extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Cloud Storage URI of executable file. - * - * Generated from protobuf field string executable_file = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $executable_file = ''; - /** - * Optional. Amount of time executable has to complete. Default is - * 10 minutes (see JSON representation of - * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). - * Cluster creation fails with an explanatory error message (the - * name of the executable that caused the error and the exceeded timeout - * period) if the executable is not completed at end of the timeout period. - * - * Generated from protobuf field .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $execution_timeout = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $executable_file - * Required. Cloud Storage URI of executable file. - * @type \Google\Protobuf\Duration $execution_timeout - * Optional. Amount of time executable has to complete. Default is - * 10 minutes (see JSON representation of - * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). - * Cluster creation fails with an explanatory error message (the - * name of the executable that caused the error and the exceeded timeout - * period) if the executable is not completed at end of the timeout period. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Clusters::initOnce(); - parent::__construct($data); - } - - /** - * Required. Cloud Storage URI of executable file. - * - * Generated from protobuf field string executable_file = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getExecutableFile() - { - return $this->executable_file; - } - - /** - * Required. Cloud Storage URI of executable file. - * - * Generated from protobuf field string executable_file = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setExecutableFile($var) - { - GPBUtil::checkString($var, True); - $this->executable_file = $var; - - return $this; - } - - /** - * Optional. Amount of time executable has to complete. Default is - * 10 minutes (see JSON representation of - * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). - * Cluster creation fails with an explanatory error message (the - * name of the executable that caused the error and the exceeded timeout - * period) if the executable is not completed at end of the timeout period. - * - * Generated from protobuf field .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Duration|null - */ - public function getExecutionTimeout() - { - return $this->execution_timeout; - } - - public function hasExecutionTimeout() - { - return isset($this->execution_timeout); - } - - public function clearExecutionTimeout() - { - unset($this->execution_timeout); - } - - /** - * Optional. Amount of time executable has to complete. Default is - * 10 minutes (see JSON representation of - * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). - * Cluster creation fails with an explanatory error message (the - * name of the executable that caused the error and the exceeded timeout - * period) if the executable is not completed at end of the timeout period. - * - * Generated from protobuf field .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setExecutionTimeout($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->execution_timeout = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/OrderedJob.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/OrderedJob.php deleted file mode 100644 index 17a2f3490ce..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/OrderedJob.php +++ /dev/null @@ -1,512 +0,0 @@ -google.cloud.dataproc.v1.OrderedJob - */ -class OrderedJob extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The step id. The id must be unique among all jobs - * within the template. - * The step id is used as prefix for job id, as job - * `goog-dataproc-workflow-step-id` label, and in - * [prerequisiteStepIds][google.cloud.dataproc.v1.OrderedJob.prerequisite_step_ids] - * field from other steps. - * The id must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). Cannot begin or end with underscore - * or hyphen. Must consist of between 3 and 50 characters. - * - * Generated from protobuf field string step_id = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $step_id = ''; - /** - * Optional. The labels to associate with this job. - * Label keys must be between 1 and 63 characters long, and must conform to - * the following regular expression: - * [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62} - * Label values must be between 1 and 63 characters long, and must conform to - * the following regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63} - * No more than 32 labels can be associated with a given job. - * - * Generated from protobuf field map labels = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Optional. Job scheduling configuration. - * - * Generated from protobuf field .google.cloud.dataproc.v1.JobScheduling scheduling = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $scheduling = null; - /** - * Optional. The optional list of prerequisite job step_ids. - * If not specified, the job will start at the beginning of workflow. - * - * Generated from protobuf field repeated string prerequisite_step_ids = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $prerequisite_step_ids; - protected $job_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $step_id - * Required. The step id. The id must be unique among all jobs - * within the template. - * The step id is used as prefix for job id, as job - * `goog-dataproc-workflow-step-id` label, and in - * [prerequisiteStepIds][google.cloud.dataproc.v1.OrderedJob.prerequisite_step_ids] - * field from other steps. - * The id must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). Cannot begin or end with underscore - * or hyphen. Must consist of between 3 and 50 characters. - * @type \Google\Cloud\Dataproc\V1\HadoopJob $hadoop_job - * Optional. Job is a Hadoop job. - * @type \Google\Cloud\Dataproc\V1\SparkJob $spark_job - * Optional. Job is a Spark job. - * @type \Google\Cloud\Dataproc\V1\PySparkJob $pyspark_job - * Optional. Job is a PySpark job. - * @type \Google\Cloud\Dataproc\V1\HiveJob $hive_job - * Optional. Job is a Hive job. - * @type \Google\Cloud\Dataproc\V1\PigJob $pig_job - * Optional. Job is a Pig job. - * @type \Google\Cloud\Dataproc\V1\SparkRJob $spark_r_job - * Optional. Job is a SparkR job. - * @type \Google\Cloud\Dataproc\V1\SparkSqlJob $spark_sql_job - * Optional. Job is a SparkSql job. - * @type \Google\Cloud\Dataproc\V1\PrestoJob $presto_job - * Optional. Job is a Presto job. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. The labels to associate with this job. - * Label keys must be between 1 and 63 characters long, and must conform to - * the following regular expression: - * [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62} - * Label values must be between 1 and 63 characters long, and must conform to - * the following regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63} - * No more than 32 labels can be associated with a given job. - * @type \Google\Cloud\Dataproc\V1\JobScheduling $scheduling - * Optional. Job scheduling configuration. - * @type array|\Google\Protobuf\Internal\RepeatedField $prerequisite_step_ids - * Optional. The optional list of prerequisite job step_ids. - * If not specified, the job will start at the beginning of workflow. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\WorkflowTemplates::initOnce(); - parent::__construct($data); - } - - /** - * Required. The step id. The id must be unique among all jobs - * within the template. - * The step id is used as prefix for job id, as job - * `goog-dataproc-workflow-step-id` label, and in - * [prerequisiteStepIds][google.cloud.dataproc.v1.OrderedJob.prerequisite_step_ids] - * field from other steps. - * The id must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). Cannot begin or end with underscore - * or hyphen. Must consist of between 3 and 50 characters. - * - * Generated from protobuf field string step_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getStepId() - { - return $this->step_id; - } - - /** - * Required. The step id. The id must be unique among all jobs - * within the template. - * The step id is used as prefix for job id, as job - * `goog-dataproc-workflow-step-id` label, and in - * [prerequisiteStepIds][google.cloud.dataproc.v1.OrderedJob.prerequisite_step_ids] - * field from other steps. - * The id must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). Cannot begin or end with underscore - * or hyphen. Must consist of between 3 and 50 characters. - * - * Generated from protobuf field string step_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setStepId($var) - { - GPBUtil::checkString($var, True); - $this->step_id = $var; - - return $this; - } - - /** - * Optional. Job is a Hadoop job. - * - * Generated from protobuf field .google.cloud.dataproc.v1.HadoopJob hadoop_job = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\HadoopJob|null - */ - public function getHadoopJob() - { - return $this->readOneof(2); - } - - public function hasHadoopJob() - { - return $this->hasOneof(2); - } - - /** - * Optional. Job is a Hadoop job. - * - * Generated from protobuf field .google.cloud.dataproc.v1.HadoopJob hadoop_job = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\HadoopJob $var - * @return $this - */ - public function setHadoopJob($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\HadoopJob::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Optional. Job is a Spark job. - * - * Generated from protobuf field .google.cloud.dataproc.v1.SparkJob spark_job = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\SparkJob|null - */ - public function getSparkJob() - { - return $this->readOneof(3); - } - - public function hasSparkJob() - { - return $this->hasOneof(3); - } - - /** - * Optional. Job is a Spark job. - * - * Generated from protobuf field .google.cloud.dataproc.v1.SparkJob spark_job = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\SparkJob $var - * @return $this - */ - public function setSparkJob($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\SparkJob::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Optional. Job is a PySpark job. - * - * Generated from protobuf field .google.cloud.dataproc.v1.PySparkJob pyspark_job = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\PySparkJob|null - */ - public function getPysparkJob() - { - return $this->readOneof(4); - } - - public function hasPysparkJob() - { - return $this->hasOneof(4); - } - - /** - * Optional. Job is a PySpark job. - * - * Generated from protobuf field .google.cloud.dataproc.v1.PySparkJob pyspark_job = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\PySparkJob $var - * @return $this - */ - public function setPysparkJob($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\PySparkJob::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Optional. Job is a Hive job. - * - * Generated from protobuf field .google.cloud.dataproc.v1.HiveJob hive_job = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\HiveJob|null - */ - public function getHiveJob() - { - return $this->readOneof(5); - } - - public function hasHiveJob() - { - return $this->hasOneof(5); - } - - /** - * Optional. Job is a Hive job. - * - * Generated from protobuf field .google.cloud.dataproc.v1.HiveJob hive_job = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\HiveJob $var - * @return $this - */ - public function setHiveJob($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\HiveJob::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Optional. Job is a Pig job. - * - * Generated from protobuf field .google.cloud.dataproc.v1.PigJob pig_job = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\PigJob|null - */ - public function getPigJob() - { - return $this->readOneof(6); - } - - public function hasPigJob() - { - return $this->hasOneof(6); - } - - /** - * Optional. Job is a Pig job. - * - * Generated from protobuf field .google.cloud.dataproc.v1.PigJob pig_job = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\PigJob $var - * @return $this - */ - public function setPigJob($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\PigJob::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Optional. Job is a SparkR job. - * - * Generated from protobuf field .google.cloud.dataproc.v1.SparkRJob spark_r_job = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\SparkRJob|null - */ - public function getSparkRJob() - { - return $this->readOneof(11); - } - - public function hasSparkRJob() - { - return $this->hasOneof(11); - } - - /** - * Optional. Job is a SparkR job. - * - * Generated from protobuf field .google.cloud.dataproc.v1.SparkRJob spark_r_job = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\SparkRJob $var - * @return $this - */ - public function setSparkRJob($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\SparkRJob::class); - $this->writeOneof(11, $var); - - return $this; - } - - /** - * Optional. Job is a SparkSql job. - * - * Generated from protobuf field .google.cloud.dataproc.v1.SparkSqlJob spark_sql_job = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\SparkSqlJob|null - */ - public function getSparkSqlJob() - { - return $this->readOneof(7); - } - - public function hasSparkSqlJob() - { - return $this->hasOneof(7); - } - - /** - * Optional. Job is a SparkSql job. - * - * Generated from protobuf field .google.cloud.dataproc.v1.SparkSqlJob spark_sql_job = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\SparkSqlJob $var - * @return $this - */ - public function setSparkSqlJob($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\SparkSqlJob::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * Optional. Job is a Presto job. - * - * Generated from protobuf field .google.cloud.dataproc.v1.PrestoJob presto_job = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\PrestoJob|null - */ - public function getPrestoJob() - { - return $this->readOneof(12); - } - - public function hasPrestoJob() - { - return $this->hasOneof(12); - } - - /** - * Optional. Job is a Presto job. - * - * Generated from protobuf field .google.cloud.dataproc.v1.PrestoJob presto_job = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\PrestoJob $var - * @return $this - */ - public function setPrestoJob($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\PrestoJob::class); - $this->writeOneof(12, $var); - - return $this; - } - - /** - * Optional. The labels to associate with this job. - * Label keys must be between 1 and 63 characters long, and must conform to - * the following regular expression: - * [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62} - * Label values must be between 1 and 63 characters long, and must conform to - * the following regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63} - * No more than 32 labels can be associated with a given job. - * - * Generated from protobuf field map labels = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. The labels to associate with this job. - * Label keys must be between 1 and 63 characters long, and must conform to - * the following regular expression: - * [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62} - * Label values must be between 1 and 63 characters long, and must conform to - * the following regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63} - * No more than 32 labels can be associated with a given job. - * - * Generated from protobuf field map labels = 8 [(.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; - } - - /** - * Optional. Job scheduling configuration. - * - * Generated from protobuf field .google.cloud.dataproc.v1.JobScheduling scheduling = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\JobScheduling|null - */ - public function getScheduling() - { - return $this->scheduling; - } - - public function hasScheduling() - { - return isset($this->scheduling); - } - - public function clearScheduling() - { - unset($this->scheduling); - } - - /** - * Optional. Job scheduling configuration. - * - * Generated from protobuf field .google.cloud.dataproc.v1.JobScheduling scheduling = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\JobScheduling $var - * @return $this - */ - public function setScheduling($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\JobScheduling::class); - $this->scheduling = $var; - - return $this; - } - - /** - * Optional. The optional list of prerequisite job step_ids. - * If not specified, the job will start at the beginning of workflow. - * - * Generated from protobuf field repeated string prerequisite_step_ids = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPrerequisiteStepIds() - { - return $this->prerequisite_step_ids; - } - - /** - * Optional. The optional list of prerequisite job step_ids. - * If not specified, the job will start at the beginning of workflow. - * - * Generated from protobuf field repeated string prerequisite_step_ids = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPrerequisiteStepIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->prerequisite_step_ids = $arr; - - return $this; - } - - /** - * @return string - */ - public function getJobType() - { - return $this->whichOneof("job_type"); - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ParameterValidation.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ParameterValidation.php deleted file mode 100644 index 2933604062b..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ParameterValidation.php +++ /dev/null @@ -1,108 +0,0 @@ -google.cloud.dataproc.v1.ParameterValidation - */ -class ParameterValidation extends \Google\Protobuf\Internal\Message -{ - protected $validation_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dataproc\V1\RegexValidation $regex - * Validation based on regular expressions. - * @type \Google\Cloud\Dataproc\V1\ValueValidation $values - * Validation based on a list of allowed values. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\WorkflowTemplates::initOnce(); - parent::__construct($data); - } - - /** - * Validation based on regular expressions. - * - * Generated from protobuf field .google.cloud.dataproc.v1.RegexValidation regex = 1; - * @return \Google\Cloud\Dataproc\V1\RegexValidation|null - */ - public function getRegex() - { - return $this->readOneof(1); - } - - public function hasRegex() - { - return $this->hasOneof(1); - } - - /** - * Validation based on regular expressions. - * - * Generated from protobuf field .google.cloud.dataproc.v1.RegexValidation regex = 1; - * @param \Google\Cloud\Dataproc\V1\RegexValidation $var - * @return $this - */ - public function setRegex($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\RegexValidation::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Validation based on a list of allowed values. - * - * Generated from protobuf field .google.cloud.dataproc.v1.ValueValidation values = 2; - * @return \Google\Cloud\Dataproc\V1\ValueValidation|null - */ - public function getValues() - { - return $this->readOneof(2); - } - - public function hasValues() - { - return $this->hasOneof(2); - } - - /** - * Validation based on a list of allowed values. - * - * Generated from protobuf field .google.cloud.dataproc.v1.ValueValidation values = 2; - * @param \Google\Cloud\Dataproc\V1\ValueValidation $var - * @return $this - */ - public function setValues($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\ValueValidation::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getValidationType() - { - return $this->whichOneof("validation_type"); - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/PeripheralsConfig.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/PeripheralsConfig.php deleted file mode 100644 index 0964f0f90c0..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/PeripheralsConfig.php +++ /dev/null @@ -1,119 +0,0 @@ -google.cloud.dataproc.v1.PeripheralsConfig - */ -class PeripheralsConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Resource name of an existing Dataproc Metastore service. - * Example: - * * `projects/[project_id]/locations/[region]/services/[service_id]` - * - * Generated from protobuf field string metastore_service = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $metastore_service = ''; - /** - * Optional. The Spark History Server configuration for the workload. - * - * Generated from protobuf field .google.cloud.dataproc.v1.SparkHistoryServerConfig spark_history_server_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $spark_history_server_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $metastore_service - * Optional. Resource name of an existing Dataproc Metastore service. - * Example: - * * `projects/[project_id]/locations/[region]/services/[service_id]` - * @type \Google\Cloud\Dataproc\V1\SparkHistoryServerConfig $spark_history_server_config - * Optional. The Spark History Server configuration for the workload. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Shared::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Resource name of an existing Dataproc Metastore service. - * Example: - * * `projects/[project_id]/locations/[region]/services/[service_id]` - * - * Generated from protobuf field string metastore_service = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getMetastoreService() - { - return $this->metastore_service; - } - - /** - * Optional. Resource name of an existing Dataproc Metastore service. - * Example: - * * `projects/[project_id]/locations/[region]/services/[service_id]` - * - * Generated from protobuf field string metastore_service = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setMetastoreService($var) - { - GPBUtil::checkString($var, True); - $this->metastore_service = $var; - - return $this; - } - - /** - * Optional. The Spark History Server configuration for the workload. - * - * Generated from protobuf field .google.cloud.dataproc.v1.SparkHistoryServerConfig spark_history_server_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\SparkHistoryServerConfig|null - */ - public function getSparkHistoryServerConfig() - { - return $this->spark_history_server_config; - } - - public function hasSparkHistoryServerConfig() - { - return isset($this->spark_history_server_config); - } - - public function clearSparkHistoryServerConfig() - { - unset($this->spark_history_server_config); - } - - /** - * Optional. The Spark History Server configuration for the workload. - * - * Generated from protobuf field .google.cloud.dataproc.v1.SparkHistoryServerConfig spark_history_server_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\SparkHistoryServerConfig $var - * @return $this - */ - public function setSparkHistoryServerConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\SparkHistoryServerConfig::class); - $this->spark_history_server_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/PigJob.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/PigJob.php deleted file mode 100644 index 91bf4c7fb12..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/PigJob.php +++ /dev/null @@ -1,317 +0,0 @@ -google.cloud.dataproc.v1.PigJob - */ -class PigJob extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Whether to continue executing queries if a query fails. - * The default value is `false`. Setting to `true` can be useful when - * executing independent parallel queries. - * - * Generated from protobuf field bool continue_on_failure = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $continue_on_failure = false; - /** - * Optional. Mapping of query variable names to values (equivalent to the Pig - * command: `name=[value]`). - * - * Generated from protobuf field map script_variables = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $script_variables; - /** - * Optional. A mapping of property names to values, used to configure Pig. - * Properties that conflict with values set by the Dataproc API may be - * overwritten. Can include properties set in `/etc/hadoop/conf/*-site.xml`, - * /etc/pig/conf/pig.properties, and classes in user code. - * - * Generated from protobuf field map properties = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $properties; - /** - * Optional. HCFS URIs of jar files to add to the CLASSPATH of - * the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig UDFs. - * - * Generated from protobuf field repeated string jar_file_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $jar_file_uris; - /** - * Optional. The runtime log config for job execution. - * - * Generated from protobuf field .google.cloud.dataproc.v1.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $logging_config = null; - protected $queries; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $query_file_uri - * The HCFS URI of the script that contains the Pig queries. - * @type \Google\Cloud\Dataproc\V1\QueryList $query_list - * A list of queries. - * @type bool $continue_on_failure - * Optional. Whether to continue executing queries if a query fails. - * The default value is `false`. Setting to `true` can be useful when - * executing independent parallel queries. - * @type array|\Google\Protobuf\Internal\MapField $script_variables - * Optional. Mapping of query variable names to values (equivalent to the Pig - * command: `name=[value]`). - * @type array|\Google\Protobuf\Internal\MapField $properties - * Optional. A mapping of property names to values, used to configure Pig. - * Properties that conflict with values set by the Dataproc API may be - * overwritten. Can include properties set in `/etc/hadoop/conf/*-site.xml`, - * /etc/pig/conf/pig.properties, and classes in user code. - * @type array|\Google\Protobuf\Internal\RepeatedField $jar_file_uris - * Optional. HCFS URIs of jar files to add to the CLASSPATH of - * the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig UDFs. - * @type \Google\Cloud\Dataproc\V1\LoggingConfig $logging_config - * Optional. The runtime log config for job execution. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Jobs::initOnce(); - parent::__construct($data); - } - - /** - * The HCFS URI of the script that contains the Pig queries. - * - * Generated from protobuf field string query_file_uri = 1; - * @return string - */ - public function getQueryFileUri() - { - return $this->readOneof(1); - } - - public function hasQueryFileUri() - { - return $this->hasOneof(1); - } - - /** - * The HCFS URI of the script that contains the Pig queries. - * - * Generated from protobuf field string query_file_uri = 1; - * @param string $var - * @return $this - */ - public function setQueryFileUri($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * A list of queries. - * - * Generated from protobuf field .google.cloud.dataproc.v1.QueryList query_list = 2; - * @return \Google\Cloud\Dataproc\V1\QueryList|null - */ - public function getQueryList() - { - return $this->readOneof(2); - } - - public function hasQueryList() - { - return $this->hasOneof(2); - } - - /** - * A list of queries. - * - * Generated from protobuf field .google.cloud.dataproc.v1.QueryList query_list = 2; - * @param \Google\Cloud\Dataproc\V1\QueryList $var - * @return $this - */ - public function setQueryList($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\QueryList::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Optional. Whether to continue executing queries if a query fails. - * The default value is `false`. Setting to `true` can be useful when - * executing independent parallel queries. - * - * Generated from protobuf field bool continue_on_failure = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getContinueOnFailure() - { - return $this->continue_on_failure; - } - - /** - * Optional. Whether to continue executing queries if a query fails. - * The default value is `false`. Setting to `true` can be useful when - * executing independent parallel queries. - * - * Generated from protobuf field bool continue_on_failure = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setContinueOnFailure($var) - { - GPBUtil::checkBool($var); - $this->continue_on_failure = $var; - - return $this; - } - - /** - * Optional. Mapping of query variable names to values (equivalent to the Pig - * command: `name=[value]`). - * - * Generated from protobuf field map script_variables = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getScriptVariables() - { - return $this->script_variables; - } - - /** - * Optional. Mapping of query variable names to values (equivalent to the Pig - * command: `name=[value]`). - * - * Generated from protobuf field map script_variables = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setScriptVariables($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->script_variables = $arr; - - return $this; - } - - /** - * Optional. A mapping of property names to values, used to configure Pig. - * Properties that conflict with values set by the Dataproc API may be - * overwritten. Can include properties set in `/etc/hadoop/conf/*-site.xml`, - * /etc/pig/conf/pig.properties, and classes in user code. - * - * Generated from protobuf field map properties = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getProperties() - { - return $this->properties; - } - - /** - * Optional. A mapping of property names to values, used to configure Pig. - * Properties that conflict with values set by the Dataproc API may be - * overwritten. Can include properties set in `/etc/hadoop/conf/*-site.xml`, - * /etc/pig/conf/pig.properties, and classes in user code. - * - * Generated from protobuf field map properties = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setProperties($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->properties = $arr; - - return $this; - } - - /** - * Optional. HCFS URIs of jar files to add to the CLASSPATH of - * the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig UDFs. - * - * Generated from protobuf field repeated string jar_file_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getJarFileUris() - { - return $this->jar_file_uris; - } - - /** - * Optional. HCFS URIs of jar files to add to the CLASSPATH of - * the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig UDFs. - * - * Generated from protobuf field repeated string jar_file_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setJarFileUris($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->jar_file_uris = $arr; - - return $this; - } - - /** - * Optional. The runtime log config for job execution. - * - * Generated from protobuf field .google.cloud.dataproc.v1.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\LoggingConfig|null - */ - public function getLoggingConfig() - { - return $this->logging_config; - } - - public function hasLoggingConfig() - { - return isset($this->logging_config); - } - - public function clearLoggingConfig() - { - unset($this->logging_config); - } - - /** - * Optional. The runtime log config for job execution. - * - * Generated from protobuf field .google.cloud.dataproc.v1.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\LoggingConfig $var - * @return $this - */ - public function setLoggingConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\LoggingConfig::class); - $this->logging_config = $var; - - return $this; - } - - /** - * @return string - */ - public function getQueries() - { - return $this->whichOneof("queries"); - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/PrestoJob.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/PrestoJob.php deleted file mode 100644 index 91086e0edea..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/PrestoJob.php +++ /dev/null @@ -1,312 +0,0 @@ -google.cloud.dataproc.v1.PrestoJob - */ -class PrestoJob extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Whether to continue executing queries if a query fails. - * The default value is `false`. Setting to `true` can be useful when - * executing independent parallel queries. - * - * Generated from protobuf field bool continue_on_failure = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $continue_on_failure = false; - /** - * Optional. The format in which query output will be displayed. See the - * Presto documentation for supported output formats - * - * Generated from protobuf field string output_format = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $output_format = ''; - /** - * Optional. Presto client tags to attach to this query - * - * Generated from protobuf field repeated string client_tags = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $client_tags; - /** - * Optional. A mapping of property names to values. Used to set Presto - * [session properties](https://prestodb.io/docs/current/sql/set-session.html) - * Equivalent to using the --session flag in the Presto CLI - * - * Generated from protobuf field map properties = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $properties; - /** - * Optional. The runtime log config for job execution. - * - * Generated from protobuf field .google.cloud.dataproc.v1.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $logging_config = null; - protected $queries; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $query_file_uri - * The HCFS URI of the script that contains SQL queries. - * @type \Google\Cloud\Dataproc\V1\QueryList $query_list - * A list of queries. - * @type bool $continue_on_failure - * Optional. Whether to continue executing queries if a query fails. - * The default value is `false`. Setting to `true` can be useful when - * executing independent parallel queries. - * @type string $output_format - * Optional. The format in which query output will be displayed. See the - * Presto documentation for supported output formats - * @type array|\Google\Protobuf\Internal\RepeatedField $client_tags - * Optional. Presto client tags to attach to this query - * @type array|\Google\Protobuf\Internal\MapField $properties - * Optional. A mapping of property names to values. Used to set Presto - * [session properties](https://prestodb.io/docs/current/sql/set-session.html) - * Equivalent to using the --session flag in the Presto CLI - * @type \Google\Cloud\Dataproc\V1\LoggingConfig $logging_config - * Optional. The runtime log config for job execution. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Jobs::initOnce(); - parent::__construct($data); - } - - /** - * The HCFS URI of the script that contains SQL queries. - * - * Generated from protobuf field string query_file_uri = 1; - * @return string - */ - public function getQueryFileUri() - { - return $this->readOneof(1); - } - - public function hasQueryFileUri() - { - return $this->hasOneof(1); - } - - /** - * The HCFS URI of the script that contains SQL queries. - * - * Generated from protobuf field string query_file_uri = 1; - * @param string $var - * @return $this - */ - public function setQueryFileUri($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * A list of queries. - * - * Generated from protobuf field .google.cloud.dataproc.v1.QueryList query_list = 2; - * @return \Google\Cloud\Dataproc\V1\QueryList|null - */ - public function getQueryList() - { - return $this->readOneof(2); - } - - public function hasQueryList() - { - return $this->hasOneof(2); - } - - /** - * A list of queries. - * - * Generated from protobuf field .google.cloud.dataproc.v1.QueryList query_list = 2; - * @param \Google\Cloud\Dataproc\V1\QueryList $var - * @return $this - */ - public function setQueryList($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\QueryList::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Optional. Whether to continue executing queries if a query fails. - * The default value is `false`. Setting to `true` can be useful when - * executing independent parallel queries. - * - * Generated from protobuf field bool continue_on_failure = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getContinueOnFailure() - { - return $this->continue_on_failure; - } - - /** - * Optional. Whether to continue executing queries if a query fails. - * The default value is `false`. Setting to `true` can be useful when - * executing independent parallel queries. - * - * Generated from protobuf field bool continue_on_failure = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setContinueOnFailure($var) - { - GPBUtil::checkBool($var); - $this->continue_on_failure = $var; - - return $this; - } - - /** - * Optional. The format in which query output will be displayed. See the - * Presto documentation for supported output formats - * - * Generated from protobuf field string output_format = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOutputFormat() - { - return $this->output_format; - } - - /** - * Optional. The format in which query output will be displayed. See the - * Presto documentation for supported output formats - * - * Generated from protobuf field string output_format = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOutputFormat($var) - { - GPBUtil::checkString($var, True); - $this->output_format = $var; - - return $this; - } - - /** - * Optional. Presto client tags to attach to this query - * - * Generated from protobuf field repeated string client_tags = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getClientTags() - { - return $this->client_tags; - } - - /** - * Optional. Presto client tags to attach to this query - * - * Generated from protobuf field repeated string client_tags = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setClientTags($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->client_tags = $arr; - - return $this; - } - - /** - * Optional. A mapping of property names to values. Used to set Presto - * [session properties](https://prestodb.io/docs/current/sql/set-session.html) - * Equivalent to using the --session flag in the Presto CLI - * - * Generated from protobuf field map properties = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getProperties() - { - return $this->properties; - } - - /** - * Optional. A mapping of property names to values. Used to set Presto - * [session properties](https://prestodb.io/docs/current/sql/set-session.html) - * Equivalent to using the --session flag in the Presto CLI - * - * Generated from protobuf field map properties = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setProperties($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->properties = $arr; - - return $this; - } - - /** - * Optional. The runtime log config for job execution. - * - * Generated from protobuf field .google.cloud.dataproc.v1.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\LoggingConfig|null - */ - public function getLoggingConfig() - { - return $this->logging_config; - } - - public function hasLoggingConfig() - { - return isset($this->logging_config); - } - - public function clearLoggingConfig() - { - unset($this->logging_config); - } - - /** - * Optional. The runtime log config for job execution. - * - * Generated from protobuf field .google.cloud.dataproc.v1.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\LoggingConfig $var - * @return $this - */ - public function setLoggingConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\LoggingConfig::class); - $this->logging_config = $var; - - return $this; - } - - /** - * @return string - */ - public function getQueries() - { - return $this->whichOneof("queries"); - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/PySparkBatch.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/PySparkBatch.php deleted file mode 100644 index 6cf061fbc31..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/PySparkBatch.php +++ /dev/null @@ -1,272 +0,0 @@ -google.cloud.dataproc.v1.PySparkBatch - */ -class PySparkBatch extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The HCFS URI of the main Python file to use as the Spark driver. - * Must be a .py file. - * - * Generated from protobuf field string main_python_file_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $main_python_file_uri = ''; - /** - * Optional. The arguments to pass to the driver. Do not include arguments - * that can be set as batch properties, such as `--conf`, since a collision - * can occur that causes an incorrect batch submission. - * - * Generated from protobuf field repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $args; - /** - * Optional. HCFS file URIs of Python files to pass to the PySpark - * framework. Supported file types: `.py`, `.egg`, and `.zip`. - * - * Generated from protobuf field repeated string python_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $python_file_uris; - /** - * Optional. HCFS URIs of jar files to add to the classpath of the - * Spark driver and tasks. - * - * Generated from protobuf field repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $jar_file_uris; - /** - * Optional. HCFS URIs of files to be placed in the working directory of - * each executor. - * - * Generated from protobuf field repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $file_uris; - /** - * Optional. HCFS URIs of archives to be extracted into the working directory - * of each executor. Supported file types: - * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`. - * - * Generated from protobuf field repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $archive_uris; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $main_python_file_uri - * Required. The HCFS URI of the main Python file to use as the Spark driver. - * Must be a .py file. - * @type array|\Google\Protobuf\Internal\RepeatedField $args - * Optional. The arguments to pass to the driver. Do not include arguments - * that can be set as batch properties, such as `--conf`, since a collision - * can occur that causes an incorrect batch submission. - * @type array|\Google\Protobuf\Internal\RepeatedField $python_file_uris - * Optional. HCFS file URIs of Python files to pass to the PySpark - * framework. Supported file types: `.py`, `.egg`, and `.zip`. - * @type array|\Google\Protobuf\Internal\RepeatedField $jar_file_uris - * Optional. HCFS URIs of jar files to add to the classpath of the - * Spark driver and tasks. - * @type array|\Google\Protobuf\Internal\RepeatedField $file_uris - * Optional. HCFS URIs of files to be placed in the working directory of - * each executor. - * @type array|\Google\Protobuf\Internal\RepeatedField $archive_uris - * Optional. HCFS URIs of archives to be extracted into the working directory - * of each executor. Supported file types: - * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Batches::initOnce(); - parent::__construct($data); - } - - /** - * Required. The HCFS URI of the main Python file to use as the Spark driver. - * Must be a .py file. - * - * Generated from protobuf field string main_python_file_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getMainPythonFileUri() - { - return $this->main_python_file_uri; - } - - /** - * Required. The HCFS URI of the main Python file to use as the Spark driver. - * Must be a .py file. - * - * Generated from protobuf field string main_python_file_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setMainPythonFileUri($var) - { - GPBUtil::checkString($var, True); - $this->main_python_file_uri = $var; - - return $this; - } - - /** - * Optional. The arguments to pass to the driver. Do not include arguments - * that can be set as batch properties, such as `--conf`, since a collision - * can occur that causes an incorrect batch submission. - * - * Generated from protobuf field repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getArgs() - { - return $this->args; - } - - /** - * Optional. The arguments to pass to the driver. Do not include arguments - * that can be set as batch properties, such as `--conf`, since a collision - * can occur that causes an incorrect batch submission. - * - * Generated from protobuf field repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setArgs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->args = $arr; - - return $this; - } - - /** - * Optional. HCFS file URIs of Python files to pass to the PySpark - * framework. Supported file types: `.py`, `.egg`, and `.zip`. - * - * Generated from protobuf field repeated string python_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPythonFileUris() - { - return $this->python_file_uris; - } - - /** - * Optional. HCFS file URIs of Python files to pass to the PySpark - * framework. Supported file types: `.py`, `.egg`, and `.zip`. - * - * Generated from protobuf field repeated string python_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPythonFileUris($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->python_file_uris = $arr; - - return $this; - } - - /** - * Optional. HCFS URIs of jar files to add to the classpath of the - * Spark driver and tasks. - * - * Generated from protobuf field repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getJarFileUris() - { - return $this->jar_file_uris; - } - - /** - * Optional. HCFS URIs of jar files to add to the classpath of the - * Spark driver and tasks. - * - * Generated from protobuf field repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setJarFileUris($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->jar_file_uris = $arr; - - return $this; - } - - /** - * Optional. HCFS URIs of files to be placed in the working directory of - * each executor. - * - * Generated from protobuf field repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFileUris() - { - return $this->file_uris; - } - - /** - * Optional. HCFS URIs of files to be placed in the working directory of - * each executor. - * - * Generated from protobuf field repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFileUris($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->file_uris = $arr; - - return $this; - } - - /** - * Optional. HCFS URIs of archives to be extracted into the working directory - * of each executor. Supported file types: - * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`. - * - * Generated from protobuf field repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getArchiveUris() - { - return $this->archive_uris; - } - - /** - * Optional. HCFS URIs of archives to be extracted into the working directory - * of each executor. Supported file types: - * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`. - * - * Generated from protobuf field repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setArchiveUris($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->archive_uris = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/PySparkJob.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/PySparkJob.php deleted file mode 100644 index 12c7dfd00b3..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/PySparkJob.php +++ /dev/null @@ -1,362 +0,0 @@ -google.cloud.dataproc.v1.PySparkJob - */ -class PySparkJob extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The HCFS URI of the main Python file to use as the driver. Must - * be a .py file. - * - * Generated from protobuf field string main_python_file_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $main_python_file_uri = ''; - /** - * Optional. The arguments to pass to the driver. Do not include arguments, - * such as `--conf`, that can be set as job properties, since a collision may - * occur that causes an incorrect job submission. - * - * Generated from protobuf field repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $args; - /** - * Optional. HCFS file URIs of Python files to pass to the PySpark - * framework. Supported file types: .py, .egg, and .zip. - * - * Generated from protobuf field repeated string python_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $python_file_uris; - /** - * Optional. HCFS URIs of jar files to add to the CLASSPATHs of the - * Python driver and tasks. - * - * Generated from protobuf field repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $jar_file_uris; - /** - * Optional. HCFS URIs of files to be placed in the working directory of - * each executor. Useful for naively parallel tasks. - * - * Generated from protobuf field repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $file_uris; - /** - * Optional. HCFS URIs of archives to be extracted into the working directory - * of each executor. Supported file types: - * .jar, .tar, .tar.gz, .tgz, and .zip. - * - * Generated from protobuf field repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $archive_uris; - /** - * Optional. A mapping of property names to values, used to configure PySpark. - * Properties that conflict with values set by the Dataproc API may be - * overwritten. Can include properties set in - * /etc/spark/conf/spark-defaults.conf and classes in user code. - * - * Generated from protobuf field map properties = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $properties; - /** - * Optional. The runtime log config for job execution. - * - * Generated from protobuf field .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $logging_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $main_python_file_uri - * Required. The HCFS URI of the main Python file to use as the driver. Must - * be a .py file. - * @type array|\Google\Protobuf\Internal\RepeatedField $args - * Optional. The arguments to pass to the driver. Do not include arguments, - * such as `--conf`, that can be set as job properties, since a collision may - * occur that causes an incorrect job submission. - * @type array|\Google\Protobuf\Internal\RepeatedField $python_file_uris - * Optional. HCFS file URIs of Python files to pass to the PySpark - * framework. Supported file types: .py, .egg, and .zip. - * @type array|\Google\Protobuf\Internal\RepeatedField $jar_file_uris - * Optional. HCFS URIs of jar files to add to the CLASSPATHs of the - * Python driver and tasks. - * @type array|\Google\Protobuf\Internal\RepeatedField $file_uris - * Optional. HCFS URIs of files to be placed in the working directory of - * each executor. Useful for naively parallel tasks. - * @type array|\Google\Protobuf\Internal\RepeatedField $archive_uris - * Optional. HCFS URIs of archives to be extracted into the working directory - * of each executor. Supported file types: - * .jar, .tar, .tar.gz, .tgz, and .zip. - * @type array|\Google\Protobuf\Internal\MapField $properties - * Optional. A mapping of property names to values, used to configure PySpark. - * Properties that conflict with values set by the Dataproc API may be - * overwritten. Can include properties set in - * /etc/spark/conf/spark-defaults.conf and classes in user code. - * @type \Google\Cloud\Dataproc\V1\LoggingConfig $logging_config - * Optional. The runtime log config for job execution. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Jobs::initOnce(); - parent::__construct($data); - } - - /** - * Required. The HCFS URI of the main Python file to use as the driver. Must - * be a .py file. - * - * Generated from protobuf field string main_python_file_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getMainPythonFileUri() - { - return $this->main_python_file_uri; - } - - /** - * Required. The HCFS URI of the main Python file to use as the driver. Must - * be a .py file. - * - * Generated from protobuf field string main_python_file_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setMainPythonFileUri($var) - { - GPBUtil::checkString($var, True); - $this->main_python_file_uri = $var; - - return $this; - } - - /** - * Optional. The arguments to pass to the driver. Do not include arguments, - * such as `--conf`, that can be set as job properties, since a collision may - * occur that causes an incorrect job submission. - * - * Generated from protobuf field repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getArgs() - { - return $this->args; - } - - /** - * Optional. The arguments to pass to the driver. Do not include arguments, - * such as `--conf`, that can be set as job properties, since a collision may - * occur that causes an incorrect job submission. - * - * Generated from protobuf field repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setArgs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->args = $arr; - - return $this; - } - - /** - * Optional. HCFS file URIs of Python files to pass to the PySpark - * framework. Supported file types: .py, .egg, and .zip. - * - * Generated from protobuf field repeated string python_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPythonFileUris() - { - return $this->python_file_uris; - } - - /** - * Optional. HCFS file URIs of Python files to pass to the PySpark - * framework. Supported file types: .py, .egg, and .zip. - * - * Generated from protobuf field repeated string python_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPythonFileUris($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->python_file_uris = $arr; - - return $this; - } - - /** - * Optional. HCFS URIs of jar files to add to the CLASSPATHs of the - * Python driver and tasks. - * - * Generated from protobuf field repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getJarFileUris() - { - return $this->jar_file_uris; - } - - /** - * Optional. HCFS URIs of jar files to add to the CLASSPATHs of the - * Python driver and tasks. - * - * Generated from protobuf field repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setJarFileUris($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->jar_file_uris = $arr; - - return $this; - } - - /** - * Optional. HCFS URIs of files to be placed in the working directory of - * each executor. Useful for naively parallel tasks. - * - * Generated from protobuf field repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFileUris() - { - return $this->file_uris; - } - - /** - * Optional. HCFS URIs of files to be placed in the working directory of - * each executor. Useful for naively parallel tasks. - * - * Generated from protobuf field repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFileUris($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->file_uris = $arr; - - return $this; - } - - /** - * Optional. HCFS URIs of archives to be extracted into the working directory - * of each executor. Supported file types: - * .jar, .tar, .tar.gz, .tgz, and .zip. - * - * Generated from protobuf field repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getArchiveUris() - { - return $this->archive_uris; - } - - /** - * Optional. HCFS URIs of archives to be extracted into the working directory - * of each executor. Supported file types: - * .jar, .tar, .tar.gz, .tgz, and .zip. - * - * Generated from protobuf field repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setArchiveUris($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->archive_uris = $arr; - - return $this; - } - - /** - * Optional. A mapping of property names to values, used to configure PySpark. - * Properties that conflict with values set by the Dataproc API may be - * overwritten. Can include properties set in - * /etc/spark/conf/spark-defaults.conf and classes in user code. - * - * Generated from protobuf field map properties = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getProperties() - { - return $this->properties; - } - - /** - * Optional. A mapping of property names to values, used to configure PySpark. - * Properties that conflict with values set by the Dataproc API may be - * overwritten. Can include properties set in - * /etc/spark/conf/spark-defaults.conf and classes in user code. - * - * Generated from protobuf field map properties = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setProperties($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->properties = $arr; - - return $this; - } - - /** - * Optional. The runtime log config for job execution. - * - * Generated from protobuf field .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\LoggingConfig|null - */ - public function getLoggingConfig() - { - return $this->logging_config; - } - - public function hasLoggingConfig() - { - return isset($this->logging_config); - } - - public function clearLoggingConfig() - { - unset($this->logging_config); - } - - /** - * Optional. The runtime log config for job execution. - * - * Generated from protobuf field .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\LoggingConfig $var - * @return $this - */ - public function setLoggingConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\LoggingConfig::class); - $this->logging_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/QueryList.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/QueryList.php deleted file mode 100644 index 6e1e7dda61c..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/QueryList.php +++ /dev/null @@ -1,115 +0,0 @@ -google.cloud.dataproc.v1.QueryList - */ -class QueryList extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The queries to execute. You do not need to end a query expression - * with a semicolon. Multiple queries can be specified in one - * string by separating each with a semicolon. Here is an example of a - * Dataproc API snippet that uses a QueryList to specify a HiveJob: - * "hiveJob": { - * "queryList": { - * "queries": [ - * "query1", - * "query2", - * "query3;query4", - * ] - * } - * } - * - * Generated from protobuf field repeated string queries = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private $queries; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $queries - * Required. The queries to execute. You do not need to end a query expression - * with a semicolon. Multiple queries can be specified in one - * string by separating each with a semicolon. Here is an example of a - * Dataproc API snippet that uses a QueryList to specify a HiveJob: - * "hiveJob": { - * "queryList": { - * "queries": [ - * "query1", - * "query2", - * "query3;query4", - * ] - * } - * } - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Jobs::initOnce(); - parent::__construct($data); - } - - /** - * Required. The queries to execute. You do not need to end a query expression - * with a semicolon. Multiple queries can be specified in one - * string by separating each with a semicolon. Here is an example of a - * Dataproc API snippet that uses a QueryList to specify a HiveJob: - * "hiveJob": { - * "queryList": { - * "queries": [ - * "query1", - * "query2", - * "query3;query4", - * ] - * } - * } - * - * Generated from protobuf field repeated string queries = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getQueries() - { - return $this->queries; - } - - /** - * Required. The queries to execute. You do not need to end a query expression - * with a semicolon. Multiple queries can be specified in one - * string by separating each with a semicolon. Here is an example of a - * Dataproc API snippet that uses a QueryList to specify a HiveJob: - * "hiveJob": { - * "queryList": { - * "queries": [ - * "query1", - * "query2", - * "query3;query4", - * ] - * } - * } - * - * Generated from protobuf field repeated string queries = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setQueries($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->queries = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/RegexValidation.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/RegexValidation.php deleted file mode 100644 index 437eafd5cc5..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/RegexValidation.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.dataproc.v1.RegexValidation - */ -class RegexValidation extends \Google\Protobuf\Internal\Message -{ - /** - * Required. RE2 regular expressions used to validate the parameter's value. - * The value must match the regex in its entirety (substring - * matches are not sufficient). - * - * Generated from protobuf field repeated string regexes = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private $regexes; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $regexes - * Required. RE2 regular expressions used to validate the parameter's value. - * The value must match the regex in its entirety (substring - * matches are not sufficient). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\WorkflowTemplates::initOnce(); - parent::__construct($data); - } - - /** - * Required. RE2 regular expressions used to validate the parameter's value. - * The value must match the regex in its entirety (substring - * matches are not sufficient). - * - * Generated from protobuf field repeated string regexes = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRegexes() - { - return $this->regexes; - } - - /** - * Required. RE2 regular expressions used to validate the parameter's value. - * The value must match the regex in its entirety (substring - * matches are not sufficient). - * - * Generated from protobuf field repeated string regexes = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRegexes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->regexes = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ReservationAffinity.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ReservationAffinity.php deleted file mode 100644 index 9211155368d..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ReservationAffinity.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.dataproc.v1.ReservationAffinity - */ -class ReservationAffinity extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Type of reservation to consume - * - * Generated from protobuf field .google.cloud.dataproc.v1.ReservationAffinity.Type consume_reservation_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $consume_reservation_type = 0; - /** - * Optional. Corresponds to the label key of reservation resource. - * - * Generated from protobuf field string key = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $key = ''; - /** - * Optional. Corresponds to the label values of reservation resource. - * - * Generated from protobuf field repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $values; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $consume_reservation_type - * Optional. Type of reservation to consume - * @type string $key - * Optional. Corresponds to the label key of reservation resource. - * @type array|\Google\Protobuf\Internal\RepeatedField $values - * Optional. Corresponds to the label values of reservation resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Clusters::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Type of reservation to consume - * - * Generated from protobuf field .google.cloud.dataproc.v1.ReservationAffinity.Type consume_reservation_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getConsumeReservationType() - { - return $this->consume_reservation_type; - } - - /** - * Optional. Type of reservation to consume - * - * Generated from protobuf field .google.cloud.dataproc.v1.ReservationAffinity.Type consume_reservation_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setConsumeReservationType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataproc\V1\ReservationAffinity\Type::class); - $this->consume_reservation_type = $var; - - return $this; - } - - /** - * Optional. Corresponds to the label key of reservation resource. - * - * Generated from protobuf field string key = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getKey() - { - return $this->key; - } - - /** - * Optional. Corresponds to the label key of reservation resource. - * - * Generated from protobuf field string key = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setKey($var) - { - GPBUtil::checkString($var, True); - $this->key = $var; - - return $this; - } - - /** - * Optional. Corresponds to the label values of reservation resource. - * - * Generated from protobuf field repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getValues() - { - return $this->values; - } - - /** - * Optional. Corresponds to the label values of reservation resource. - * - * Generated from protobuf field repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setValues($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->values = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ReservationAffinity/Type.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ReservationAffinity/Type.php deleted file mode 100644 index ef2c252f01b..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ReservationAffinity/Type.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.dataproc.v1.ReservationAffinity.Type - */ -class Type -{ - /** - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * Do not consume from any allocated capacity. - * - * Generated from protobuf enum NO_RESERVATION = 1; - */ - const NO_RESERVATION = 1; - /** - * Consume any reservation available. - * - * Generated from protobuf enum ANY_RESERVATION = 2; - */ - const ANY_RESERVATION = 2; - /** - * Must consume from a specific reservation. Must specify key value fields - * for specifying the reservations. - * - * Generated from protobuf enum SPECIFIC_RESERVATION = 3; - */ - const SPECIFIC_RESERVATION = 3; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::NO_RESERVATION => 'NO_RESERVATION', - self::ANY_RESERVATION => 'ANY_RESERVATION', - self::SPECIFIC_RESERVATION => 'SPECIFIC_RESERVATION', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Type::class, \Google\Cloud\Dataproc\V1\ReservationAffinity_Type::class); - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ResizeNodeGroupRequest.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ResizeNodeGroupRequest.php deleted file mode 100644 index fefac1c3e24..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ResizeNodeGroupRequest.php +++ /dev/null @@ -1,290 +0,0 @@ -google.cloud.dataproc.v1.ResizeNodeGroupRequest - */ -class ResizeNodeGroupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the node group to resize. - * Format: - * `projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{nodeGroup}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Required. The number of running instances for the node group to maintain. - * The group adds or removes instances to maintain the number of instances - * specified by this parameter. - * - * Generated from protobuf field int32 size = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $size = 0; - /** - * Optional. A unique ID used to identify the request. If the server receives - * two - * [ResizeNodeGroupRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.ResizeNodeGroupRequests) - * with the same ID, the second request is ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created - * and stored in the backend is returned. - * Recommendation: Set this value to a - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). The maximum length is 40 characters. - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - /** - * Optional. Timeout for graceful YARN decommissioning. [Graceful - * decommissioning] - * (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/scaling-clusters#graceful_decommissioning) - * allows the removal of nodes from the Compute Engine node group - * without interrupting jobs in progress. This timeout specifies how long to - * wait for jobs in progress to finish before forcefully removing nodes (and - * potentially interrupting jobs). Default timeout is 0 (for forceful - * decommission), and the maximum allowed timeout is 1 day. (see JSON - * representation of - * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). - * Only supported on Dataproc image versions 1.2 and higher. - * - * Generated from protobuf field .google.protobuf.Duration graceful_decommission_timeout = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $graceful_decommission_timeout = null; - - /** - * @param string $name Required. The name of the node group to resize. - * Format: - * `projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{nodeGroup}` - * @param int $size Required. The number of running instances for the node group to maintain. - * The group adds or removes instances to maintain the number of instances - * specified by this parameter. - * - * @return \Google\Cloud\Dataproc\V1\ResizeNodeGroupRequest - * - * @experimental - */ - public static function build(string $name, int $size): self - { - return (new self()) - ->setName($name) - ->setSize($size); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the node group to resize. - * Format: - * `projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{nodeGroup}` - * @type int $size - * Required. The number of running instances for the node group to maintain. - * The group adds or removes instances to maintain the number of instances - * specified by this parameter. - * @type string $request_id - * Optional. A unique ID used to identify the request. If the server receives - * two - * [ResizeNodeGroupRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.ResizeNodeGroupRequests) - * with the same ID, the second request is ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created - * and stored in the backend is returned. - * Recommendation: Set this value to a - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). The maximum length is 40 characters. - * @type \Google\Protobuf\Duration $graceful_decommission_timeout - * Optional. Timeout for graceful YARN decommissioning. [Graceful - * decommissioning] - * (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/scaling-clusters#graceful_decommissioning) - * allows the removal of nodes from the Compute Engine node group - * without interrupting jobs in progress. This timeout specifies how long to - * wait for jobs in progress to finish before forcefully removing nodes (and - * potentially interrupting jobs). Default timeout is 0 (for forceful - * decommission), and the maximum allowed timeout is 1 day. (see JSON - * representation of - * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). - * Only supported on Dataproc image versions 1.2 and higher. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\NodeGroups::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the node group to resize. - * Format: - * `projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{nodeGroup}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the node group to resize. - * Format: - * `projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{nodeGroup}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The number of running instances for the node group to maintain. - * The group adds or removes instances to maintain the number of instances - * specified by this parameter. - * - * Generated from protobuf field int32 size = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getSize() - { - return $this->size; - } - - /** - * Required. The number of running instances for the node group to maintain. - * The group adds or removes instances to maintain the number of instances - * specified by this parameter. - * - * Generated from protobuf field int32 size = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setSize($var) - { - GPBUtil::checkInt32($var); - $this->size = $var; - - return $this; - } - - /** - * Optional. A unique ID used to identify the request. If the server receives - * two - * [ResizeNodeGroupRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.ResizeNodeGroupRequests) - * with the same ID, the second request is ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created - * and stored in the backend is returned. - * Recommendation: Set this value to a - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). The maximum length is 40 characters. - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A unique ID used to identify the request. If the server receives - * two - * [ResizeNodeGroupRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.ResizeNodeGroupRequests) - * with the same ID, the second request is ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created - * and stored in the backend is returned. - * Recommendation: Set this value to a - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). The maximum length is 40 characters. - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - - /** - * Optional. Timeout for graceful YARN decommissioning. [Graceful - * decommissioning] - * (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/scaling-clusters#graceful_decommissioning) - * allows the removal of nodes from the Compute Engine node group - * without interrupting jobs in progress. This timeout specifies how long to - * wait for jobs in progress to finish before forcefully removing nodes (and - * potentially interrupting jobs). Default timeout is 0 (for forceful - * decommission), and the maximum allowed timeout is 1 day. (see JSON - * representation of - * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). - * Only supported on Dataproc image versions 1.2 and higher. - * - * Generated from protobuf field .google.protobuf.Duration graceful_decommission_timeout = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Duration|null - */ - public function getGracefulDecommissionTimeout() - { - return $this->graceful_decommission_timeout; - } - - public function hasGracefulDecommissionTimeout() - { - return isset($this->graceful_decommission_timeout); - } - - public function clearGracefulDecommissionTimeout() - { - unset($this->graceful_decommission_timeout); - } - - /** - * Optional. Timeout for graceful YARN decommissioning. [Graceful - * decommissioning] - * (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/scaling-clusters#graceful_decommissioning) - * allows the removal of nodes from the Compute Engine node group - * without interrupting jobs in progress. This timeout specifies how long to - * wait for jobs in progress to finish before forcefully removing nodes (and - * potentially interrupting jobs). Default timeout is 0 (for forceful - * decommission), and the maximum allowed timeout is 1 day. (see JSON - * representation of - * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). - * Only supported on Dataproc image versions 1.2 and higher. - * - * Generated from protobuf field .google.protobuf.Duration graceful_decommission_timeout = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setGracefulDecommissionTimeout($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->graceful_decommission_timeout = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/RuntimeConfig.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/RuntimeConfig.php deleted file mode 100644 index eb6a594f836..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/RuntimeConfig.php +++ /dev/null @@ -1,143 +0,0 @@ -google.cloud.dataproc.v1.RuntimeConfig - */ -class RuntimeConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Version of the batch runtime. - * - * Generated from protobuf field string version = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $version = ''; - /** - * Optional. Optional custom container image for the job runtime environment. - * If not specified, a default container image will be used. - * - * Generated from protobuf field string container_image = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $container_image = ''; - /** - * Optional. A mapping of property names to values, which are used to - * configure workload execution. - * - * Generated from protobuf field map properties = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $properties; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $version - * Optional. Version of the batch runtime. - * @type string $container_image - * Optional. Optional custom container image for the job runtime environment. - * If not specified, a default container image will be used. - * @type array|\Google\Protobuf\Internal\MapField $properties - * Optional. A mapping of property names to values, which are used to - * configure workload execution. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Shared::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Version of the batch runtime. - * - * Generated from protobuf field string version = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Optional. Version of the batch runtime. - * - * Generated from protobuf field string version = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * Optional. Optional custom container image for the job runtime environment. - * If not specified, a default container image will be used. - * - * Generated from protobuf field string container_image = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getContainerImage() - { - return $this->container_image; - } - - /** - * Optional. Optional custom container image for the job runtime environment. - * If not specified, a default container image will be used. - * - * Generated from protobuf field string container_image = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setContainerImage($var) - { - GPBUtil::checkString($var, True); - $this->container_image = $var; - - return $this; - } - - /** - * Optional. A mapping of property names to values, which are used to - * configure workload execution. - * - * Generated from protobuf field map properties = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getProperties() - { - return $this->properties; - } - - /** - * Optional. A mapping of property names to values, which are used to - * configure workload execution. - * - * Generated from protobuf field map properties = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setProperties($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->properties = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/RuntimeInfo.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/RuntimeInfo.php deleted file mode 100644 index 711960ba7e0..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/RuntimeInfo.php +++ /dev/null @@ -1,239 +0,0 @@ -google.cloud.dataproc.v1.RuntimeInfo - */ -class RuntimeInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Map of remote access endpoints (such as web interfaces and - * APIs) to their URIs. - * - * Generated from protobuf field map endpoints = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $endpoints; - /** - * Output only. A URI pointing to the location of the stdout and stderr of the - * workload. - * - * Generated from protobuf field string output_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $output_uri = ''; - /** - * Output only. A URI pointing to the location of the diagnostics tarball. - * - * Generated from protobuf field string diagnostic_output_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $diagnostic_output_uri = ''; - /** - * Output only. Approximate workload resource usage calculated after workload - * finishes (see [Dataproc Serverless pricing] - * (https://cloud.google.com/dataproc-serverless/pricing)). - * - * Generated from protobuf field .google.cloud.dataproc.v1.UsageMetrics approximate_usage = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $approximate_usage = null; - /** - * Output only. Snapshot of current workload resource usage. - * - * Generated from protobuf field .google.cloud.dataproc.v1.UsageSnapshot current_usage = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $current_usage = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\MapField $endpoints - * Output only. Map of remote access endpoints (such as web interfaces and - * APIs) to their URIs. - * @type string $output_uri - * Output only. A URI pointing to the location of the stdout and stderr of the - * workload. - * @type string $diagnostic_output_uri - * Output only. A URI pointing to the location of the diagnostics tarball. - * @type \Google\Cloud\Dataproc\V1\UsageMetrics $approximate_usage - * Output only. Approximate workload resource usage calculated after workload - * finishes (see [Dataproc Serverless pricing] - * (https://cloud.google.com/dataproc-serverless/pricing)). - * @type \Google\Cloud\Dataproc\V1\UsageSnapshot $current_usage - * Output only. Snapshot of current workload resource usage. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Shared::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Map of remote access endpoints (such as web interfaces and - * APIs) to their URIs. - * - * Generated from protobuf field map endpoints = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getEndpoints() - { - return $this->endpoints; - } - - /** - * Output only. Map of remote access endpoints (such as web interfaces and - * APIs) to their URIs. - * - * Generated from protobuf field map endpoints = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setEndpoints($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->endpoints = $arr; - - return $this; - } - - /** - * Output only. A URI pointing to the location of the stdout and stderr of the - * workload. - * - * Generated from protobuf field string output_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getOutputUri() - { - return $this->output_uri; - } - - /** - * Output only. A URI pointing to the location of the stdout and stderr of the - * workload. - * - * Generated from protobuf field string output_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setOutputUri($var) - { - GPBUtil::checkString($var, True); - $this->output_uri = $var; - - return $this; - } - - /** - * Output only. A URI pointing to the location of the diagnostics tarball. - * - * Generated from protobuf field string diagnostic_output_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDiagnosticOutputUri() - { - return $this->diagnostic_output_uri; - } - - /** - * Output only. A URI pointing to the location of the diagnostics tarball. - * - * Generated from protobuf field string diagnostic_output_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDiagnosticOutputUri($var) - { - GPBUtil::checkString($var, True); - $this->diagnostic_output_uri = $var; - - return $this; - } - - /** - * Output only. Approximate workload resource usage calculated after workload - * finishes (see [Dataproc Serverless pricing] - * (https://cloud.google.com/dataproc-serverless/pricing)). - * - * Generated from protobuf field .google.cloud.dataproc.v1.UsageMetrics approximate_usage = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataproc\V1\UsageMetrics|null - */ - public function getApproximateUsage() - { - return $this->approximate_usage; - } - - public function hasApproximateUsage() - { - return isset($this->approximate_usage); - } - - public function clearApproximateUsage() - { - unset($this->approximate_usage); - } - - /** - * Output only. Approximate workload resource usage calculated after workload - * finishes (see [Dataproc Serverless pricing] - * (https://cloud.google.com/dataproc-serverless/pricing)). - * - * Generated from protobuf field .google.cloud.dataproc.v1.UsageMetrics approximate_usage = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataproc\V1\UsageMetrics $var - * @return $this - */ - public function setApproximateUsage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\UsageMetrics::class); - $this->approximate_usage = $var; - - return $this; - } - - /** - * Output only. Snapshot of current workload resource usage. - * - * Generated from protobuf field .google.cloud.dataproc.v1.UsageSnapshot current_usage = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataproc\V1\UsageSnapshot|null - */ - public function getCurrentUsage() - { - return $this->current_usage; - } - - public function hasCurrentUsage() - { - return isset($this->current_usage); - } - - public function clearCurrentUsage() - { - unset($this->current_usage); - } - - /** - * Output only. Snapshot of current workload resource usage. - * - * Generated from protobuf field .google.cloud.dataproc.v1.UsageSnapshot current_usage = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataproc\V1\UsageSnapshot $var - * @return $this - */ - public function setCurrentUsage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\UsageSnapshot::class); - $this->current_usage = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SecurityConfig.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SecurityConfig.php deleted file mode 100644 index 47a24e1e627..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SecurityConfig.php +++ /dev/null @@ -1,125 +0,0 @@ -google.cloud.dataproc.v1.SecurityConfig - */ -class SecurityConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Kerberos related configuration. - * - * Generated from protobuf field .google.cloud.dataproc.v1.KerberosConfig kerberos_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $kerberos_config = null; - /** - * Optional. Identity related configuration, including service account based - * secure multi-tenancy user mappings. - * - * Generated from protobuf field .google.cloud.dataproc.v1.IdentityConfig identity_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $identity_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dataproc\V1\KerberosConfig $kerberos_config - * Optional. Kerberos related configuration. - * @type \Google\Cloud\Dataproc\V1\IdentityConfig $identity_config - * Optional. Identity related configuration, including service account based - * secure multi-tenancy user mappings. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Clusters::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Kerberos related configuration. - * - * Generated from protobuf field .google.cloud.dataproc.v1.KerberosConfig kerberos_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\KerberosConfig|null - */ - public function getKerberosConfig() - { - return $this->kerberos_config; - } - - public function hasKerberosConfig() - { - return isset($this->kerberos_config); - } - - public function clearKerberosConfig() - { - unset($this->kerberos_config); - } - - /** - * Optional. Kerberos related configuration. - * - * Generated from protobuf field .google.cloud.dataproc.v1.KerberosConfig kerberos_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\KerberosConfig $var - * @return $this - */ - public function setKerberosConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\KerberosConfig::class); - $this->kerberos_config = $var; - - return $this; - } - - /** - * Optional. Identity related configuration, including service account based - * secure multi-tenancy user mappings. - * - * Generated from protobuf field .google.cloud.dataproc.v1.IdentityConfig identity_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\IdentityConfig|null - */ - public function getIdentityConfig() - { - return $this->identity_config; - } - - public function hasIdentityConfig() - { - return isset($this->identity_config); - } - - public function clearIdentityConfig() - { - unset($this->identity_config); - } - - /** - * Optional. Identity related configuration, including service account based - * secure multi-tenancy user mappings. - * - * Generated from protobuf field .google.cloud.dataproc.v1.IdentityConfig identity_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\IdentityConfig $var - * @return $this - */ - public function setIdentityConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\IdentityConfig::class); - $this->identity_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ShieldedInstanceConfig.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ShieldedInstanceConfig.php deleted file mode 100644 index c65d9547c15..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ShieldedInstanceConfig.php +++ /dev/null @@ -1,166 +0,0 @@ -google.cloud.dataproc.v1.ShieldedInstanceConfig - */ -class ShieldedInstanceConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Defines whether instances have Secure Boot enabled. - * - * Generated from protobuf field optional bool enable_secure_boot = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $enable_secure_boot = null; - /** - * Optional. Defines whether instances have the vTPM enabled. - * - * Generated from protobuf field optional bool enable_vtpm = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $enable_vtpm = null; - /** - * Optional. Defines whether instances have integrity monitoring enabled. - * - * Generated from protobuf field optional bool enable_integrity_monitoring = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $enable_integrity_monitoring = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $enable_secure_boot - * Optional. Defines whether instances have Secure Boot enabled. - * @type bool $enable_vtpm - * Optional. Defines whether instances have the vTPM enabled. - * @type bool $enable_integrity_monitoring - * Optional. Defines whether instances have integrity monitoring enabled. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Clusters::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Defines whether instances have Secure Boot enabled. - * - * Generated from protobuf field optional bool enable_secure_boot = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEnableSecureBoot() - { - return isset($this->enable_secure_boot) ? $this->enable_secure_boot : false; - } - - public function hasEnableSecureBoot() - { - return isset($this->enable_secure_boot); - } - - public function clearEnableSecureBoot() - { - unset($this->enable_secure_boot); - } - - /** - * Optional. Defines whether instances have Secure Boot enabled. - * - * Generated from protobuf field optional bool enable_secure_boot = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEnableSecureBoot($var) - { - GPBUtil::checkBool($var); - $this->enable_secure_boot = $var; - - return $this; - } - - /** - * Optional. Defines whether instances have the vTPM enabled. - * - * Generated from protobuf field optional bool enable_vtpm = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEnableVtpm() - { - return isset($this->enable_vtpm) ? $this->enable_vtpm : false; - } - - public function hasEnableVtpm() - { - return isset($this->enable_vtpm); - } - - public function clearEnableVtpm() - { - unset($this->enable_vtpm); - } - - /** - * Optional. Defines whether instances have the vTPM enabled. - * - * Generated from protobuf field optional bool enable_vtpm = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEnableVtpm($var) - { - GPBUtil::checkBool($var); - $this->enable_vtpm = $var; - - return $this; - } - - /** - * Optional. Defines whether instances have integrity monitoring enabled. - * - * Generated from protobuf field optional bool enable_integrity_monitoring = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEnableIntegrityMonitoring() - { - return isset($this->enable_integrity_monitoring) ? $this->enable_integrity_monitoring : false; - } - - public function hasEnableIntegrityMonitoring() - { - return isset($this->enable_integrity_monitoring); - } - - public function clearEnableIntegrityMonitoring() - { - unset($this->enable_integrity_monitoring); - } - - /** - * Optional. Defines whether instances have integrity monitoring enabled. - * - * Generated from protobuf field optional bool enable_integrity_monitoring = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEnableIntegrityMonitoring($var) - { - GPBUtil::checkBool($var); - $this->enable_integrity_monitoring = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SoftwareConfig.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SoftwareConfig.php deleted file mode 100644 index a319987b0f9..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SoftwareConfig.php +++ /dev/null @@ -1,215 +0,0 @@ -google.cloud.dataproc.v1.SoftwareConfig - */ -class SoftwareConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The version of software inside the cluster. It must be one of the - * supported [Dataproc - * Versions](https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-versions#supported_dataproc_versions), - * such as "1.2" (including a subminor version, such as "1.2.29"), or the - * ["preview" - * version](https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-versions#other_versions). - * If unspecified, it defaults to the latest Debian version. - * - * Generated from protobuf field string image_version = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $image_version = ''; - /** - * Optional. The properties to set on daemon config files. - * Property keys are specified in `prefix:property` format, for example - * `core:hadoop.tmp.dir`. The following are supported prefixes - * and their mappings: - * * capacity-scheduler: `capacity-scheduler.xml` - * * core: `core-site.xml` - * * distcp: `distcp-default.xml` - * * hdfs: `hdfs-site.xml` - * * hive: `hive-site.xml` - * * mapred: `mapred-site.xml` - * * pig: `pig.properties` - * * spark: `spark-defaults.conf` - * * yarn: `yarn-site.xml` - * For more information, see [Cluster - * properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties). - * - * Generated from protobuf field map properties = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $properties; - /** - * Optional. The set of components to activate on the cluster. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.Component optional_components = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $optional_components; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $image_version - * Optional. The version of software inside the cluster. It must be one of the - * supported [Dataproc - * Versions](https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-versions#supported_dataproc_versions), - * such as "1.2" (including a subminor version, such as "1.2.29"), or the - * ["preview" - * version](https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-versions#other_versions). - * If unspecified, it defaults to the latest Debian version. - * @type array|\Google\Protobuf\Internal\MapField $properties - * Optional. The properties to set on daemon config files. - * Property keys are specified in `prefix:property` format, for example - * `core:hadoop.tmp.dir`. The following are supported prefixes - * and their mappings: - * * capacity-scheduler: `capacity-scheduler.xml` - * * core: `core-site.xml` - * * distcp: `distcp-default.xml` - * * hdfs: `hdfs-site.xml` - * * hive: `hive-site.xml` - * * mapred: `mapred-site.xml` - * * pig: `pig.properties` - * * spark: `spark-defaults.conf` - * * yarn: `yarn-site.xml` - * For more information, see [Cluster - * properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties). - * @type array|\Google\Protobuf\Internal\RepeatedField $optional_components - * Optional. The set of components to activate on the cluster. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Clusters::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The version of software inside the cluster. It must be one of the - * supported [Dataproc - * Versions](https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-versions#supported_dataproc_versions), - * such as "1.2" (including a subminor version, such as "1.2.29"), or the - * ["preview" - * version](https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-versions#other_versions). - * If unspecified, it defaults to the latest Debian version. - * - * Generated from protobuf field string image_version = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getImageVersion() - { - return $this->image_version; - } - - /** - * Optional. The version of software inside the cluster. It must be one of the - * supported [Dataproc - * Versions](https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-versions#supported_dataproc_versions), - * such as "1.2" (including a subminor version, such as "1.2.29"), or the - * ["preview" - * version](https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-versions#other_versions). - * If unspecified, it defaults to the latest Debian version. - * - * Generated from protobuf field string image_version = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setImageVersion($var) - { - GPBUtil::checkString($var, True); - $this->image_version = $var; - - return $this; - } - - /** - * Optional. The properties to set on daemon config files. - * Property keys are specified in `prefix:property` format, for example - * `core:hadoop.tmp.dir`. The following are supported prefixes - * and their mappings: - * * capacity-scheduler: `capacity-scheduler.xml` - * * core: `core-site.xml` - * * distcp: `distcp-default.xml` - * * hdfs: `hdfs-site.xml` - * * hive: `hive-site.xml` - * * mapred: `mapred-site.xml` - * * pig: `pig.properties` - * * spark: `spark-defaults.conf` - * * yarn: `yarn-site.xml` - * For more information, see [Cluster - * properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties). - * - * Generated from protobuf field map properties = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getProperties() - { - return $this->properties; - } - - /** - * Optional. The properties to set on daemon config files. - * Property keys are specified in `prefix:property` format, for example - * `core:hadoop.tmp.dir`. The following are supported prefixes - * and their mappings: - * * capacity-scheduler: `capacity-scheduler.xml` - * * core: `core-site.xml` - * * distcp: `distcp-default.xml` - * * hdfs: `hdfs-site.xml` - * * hive: `hive-site.xml` - * * mapred: `mapred-site.xml` - * * pig: `pig.properties` - * * spark: `spark-defaults.conf` - * * yarn: `yarn-site.xml` - * For more information, see [Cluster - * properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties). - * - * Generated from protobuf field map properties = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setProperties($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->properties = $arr; - - return $this; - } - - /** - * Optional. The set of components to activate on the cluster. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.Component optional_components = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getOptionalComponents() - { - return $this->optional_components; - } - - /** - * Optional. The set of components to activate on the cluster. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.Component optional_components = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setOptionalComponents($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Dataproc\V1\Component::class); - $this->optional_components = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SparkBatch.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SparkBatch.php deleted file mode 100644 index e39b43d191b..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SparkBatch.php +++ /dev/null @@ -1,272 +0,0 @@ -google.cloud.dataproc.v1.SparkBatch - */ -class SparkBatch extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The arguments to pass to the driver. Do not include arguments - * that can be set as batch properties, such as `--conf`, since a collision - * can occur that causes an incorrect batch submission. - * - * Generated from protobuf field repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $args; - /** - * Optional. HCFS URIs of jar files to add to the classpath of the - * Spark driver and tasks. - * - * Generated from protobuf field repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $jar_file_uris; - /** - * Optional. HCFS URIs of files to be placed in the working directory of - * each executor. - * - * Generated from protobuf field repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $file_uris; - /** - * Optional. HCFS URIs of archives to be extracted into the working directory - * of each executor. Supported file types: - * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`. - * - * Generated from protobuf field repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $archive_uris; - protected $driver; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $main_jar_file_uri - * Optional. The HCFS URI of the jar file that contains the main class. - * @type string $main_class - * Optional. The name of the driver main class. The jar file that contains - * the class must be in the classpath or specified in `jar_file_uris`. - * @type array|\Google\Protobuf\Internal\RepeatedField $args - * Optional. The arguments to pass to the driver. Do not include arguments - * that can be set as batch properties, such as `--conf`, since a collision - * can occur that causes an incorrect batch submission. - * @type array|\Google\Protobuf\Internal\RepeatedField $jar_file_uris - * Optional. HCFS URIs of jar files to add to the classpath of the - * Spark driver and tasks. - * @type array|\Google\Protobuf\Internal\RepeatedField $file_uris - * Optional. HCFS URIs of files to be placed in the working directory of - * each executor. - * @type array|\Google\Protobuf\Internal\RepeatedField $archive_uris - * Optional. HCFS URIs of archives to be extracted into the working directory - * of each executor. Supported file types: - * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Batches::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The HCFS URI of the jar file that contains the main class. - * - * Generated from protobuf field string main_jar_file_uri = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getMainJarFileUri() - { - return $this->readOneof(1); - } - - public function hasMainJarFileUri() - { - return $this->hasOneof(1); - } - - /** - * Optional. The HCFS URI of the jar file that contains the main class. - * - * Generated from protobuf field string main_jar_file_uri = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setMainJarFileUri($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Optional. The name of the driver main class. The jar file that contains - * the class must be in the classpath or specified in `jar_file_uris`. - * - * Generated from protobuf field string main_class = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getMainClass() - { - return $this->readOneof(2); - } - - public function hasMainClass() - { - return $this->hasOneof(2); - } - - /** - * Optional. The name of the driver main class. The jar file that contains - * the class must be in the classpath or specified in `jar_file_uris`. - * - * Generated from protobuf field string main_class = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setMainClass($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Optional. The arguments to pass to the driver. Do not include arguments - * that can be set as batch properties, such as `--conf`, since a collision - * can occur that causes an incorrect batch submission. - * - * Generated from protobuf field repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getArgs() - { - return $this->args; - } - - /** - * Optional. The arguments to pass to the driver. Do not include arguments - * that can be set as batch properties, such as `--conf`, since a collision - * can occur that causes an incorrect batch submission. - * - * Generated from protobuf field repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setArgs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->args = $arr; - - return $this; - } - - /** - * Optional. HCFS URIs of jar files to add to the classpath of the - * Spark driver and tasks. - * - * Generated from protobuf field repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getJarFileUris() - { - return $this->jar_file_uris; - } - - /** - * Optional. HCFS URIs of jar files to add to the classpath of the - * Spark driver and tasks. - * - * Generated from protobuf field repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setJarFileUris($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->jar_file_uris = $arr; - - return $this; - } - - /** - * Optional. HCFS URIs of files to be placed in the working directory of - * each executor. - * - * Generated from protobuf field repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFileUris() - { - return $this->file_uris; - } - - /** - * Optional. HCFS URIs of files to be placed in the working directory of - * each executor. - * - * Generated from protobuf field repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFileUris($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->file_uris = $arr; - - return $this; - } - - /** - * Optional. HCFS URIs of archives to be extracted into the working directory - * of each executor. Supported file types: - * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`. - * - * Generated from protobuf field repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getArchiveUris() - { - return $this->archive_uris; - } - - /** - * Optional. HCFS URIs of archives to be extracted into the working directory - * of each executor. Supported file types: - * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`. - * - * Generated from protobuf field repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setArchiveUris($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->archive_uris = $arr; - - return $this; - } - - /** - * @return string - */ - public function getDriver() - { - return $this->whichOneof("driver"); - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SparkHistoryServerConfig.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SparkHistoryServerConfig.php deleted file mode 100644 index a7b81f1f713..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SparkHistoryServerConfig.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.dataproc.v1.SparkHistoryServerConfig - */ -class SparkHistoryServerConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Resource name of an existing Dataproc Cluster to act as a Spark - * History Server for the workload. - * Example: - * * `projects/[project_id]/regions/[region]/clusters/[cluster_name]` - * - * Generated from protobuf field string dataproc_cluster = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $dataproc_cluster = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $dataproc_cluster - * Optional. Resource name of an existing Dataproc Cluster to act as a Spark - * History Server for the workload. - * Example: - * * `projects/[project_id]/regions/[region]/clusters/[cluster_name]` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Shared::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Resource name of an existing Dataproc Cluster to act as a Spark - * History Server for the workload. - * Example: - * * `projects/[project_id]/regions/[region]/clusters/[cluster_name]` - * - * Generated from protobuf field string dataproc_cluster = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDataprocCluster() - { - return $this->dataproc_cluster; - } - - /** - * Optional. Resource name of an existing Dataproc Cluster to act as a Spark - * History Server for the workload. - * Example: - * * `projects/[project_id]/regions/[region]/clusters/[cluster_name]` - * - * Generated from protobuf field string dataproc_cluster = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDataprocCluster($var) - { - GPBUtil::checkString($var, True); - $this->dataproc_cluster = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SparkJob.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SparkJob.php deleted file mode 100644 index 64487c6910b..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SparkJob.php +++ /dev/null @@ -1,362 +0,0 @@ -google.cloud.dataproc.v1.SparkJob - */ -class SparkJob extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The arguments to pass to the driver. Do not include arguments, - * such as `--conf`, that can be set as job properties, since a collision may - * occur that causes an incorrect job submission. - * - * Generated from protobuf field repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $args; - /** - * Optional. HCFS URIs of jar files to add to the CLASSPATHs of the - * Spark driver and tasks. - * - * Generated from protobuf field repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $jar_file_uris; - /** - * Optional. HCFS URIs of files to be placed in the working directory of - * each executor. Useful for naively parallel tasks. - * - * Generated from protobuf field repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $file_uris; - /** - * Optional. HCFS URIs of archives to be extracted into the working directory - * of each executor. Supported file types: - * .jar, .tar, .tar.gz, .tgz, and .zip. - * - * Generated from protobuf field repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $archive_uris; - /** - * Optional. A mapping of property names to values, used to configure Spark. - * Properties that conflict with values set by the Dataproc API may be - * overwritten. Can include properties set in - * /etc/spark/conf/spark-defaults.conf and classes in user code. - * - * Generated from protobuf field map properties = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $properties; - /** - * Optional. The runtime log config for job execution. - * - * Generated from protobuf field .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $logging_config = null; - protected $driver; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $main_jar_file_uri - * The HCFS URI of the jar file that contains the main class. - * @type string $main_class - * The name of the driver's main class. The jar file that contains the class - * must be in the default CLASSPATH or specified in `jar_file_uris`. - * @type array|\Google\Protobuf\Internal\RepeatedField $args - * Optional. The arguments to pass to the driver. Do not include arguments, - * such as `--conf`, that can be set as job properties, since a collision may - * occur that causes an incorrect job submission. - * @type array|\Google\Protobuf\Internal\RepeatedField $jar_file_uris - * Optional. HCFS URIs of jar files to add to the CLASSPATHs of the - * Spark driver and tasks. - * @type array|\Google\Protobuf\Internal\RepeatedField $file_uris - * Optional. HCFS URIs of files to be placed in the working directory of - * each executor. Useful for naively parallel tasks. - * @type array|\Google\Protobuf\Internal\RepeatedField $archive_uris - * Optional. HCFS URIs of archives to be extracted into the working directory - * of each executor. Supported file types: - * .jar, .tar, .tar.gz, .tgz, and .zip. - * @type array|\Google\Protobuf\Internal\MapField $properties - * Optional. A mapping of property names to values, used to configure Spark. - * Properties that conflict with values set by the Dataproc API may be - * overwritten. Can include properties set in - * /etc/spark/conf/spark-defaults.conf and classes in user code. - * @type \Google\Cloud\Dataproc\V1\LoggingConfig $logging_config - * Optional. The runtime log config for job execution. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Jobs::initOnce(); - parent::__construct($data); - } - - /** - * The HCFS URI of the jar file that contains the main class. - * - * Generated from protobuf field string main_jar_file_uri = 1; - * @return string - */ - public function getMainJarFileUri() - { - return $this->readOneof(1); - } - - public function hasMainJarFileUri() - { - return $this->hasOneof(1); - } - - /** - * The HCFS URI of the jar file that contains the main class. - * - * Generated from protobuf field string main_jar_file_uri = 1; - * @param string $var - * @return $this - */ - public function setMainJarFileUri($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * The name of the driver's main class. The jar file that contains the class - * must be in the default CLASSPATH or specified in `jar_file_uris`. - * - * Generated from protobuf field string main_class = 2; - * @return string - */ - public function getMainClass() - { - return $this->readOneof(2); - } - - public function hasMainClass() - { - return $this->hasOneof(2); - } - - /** - * The name of the driver's main class. The jar file that contains the class - * must be in the default CLASSPATH or specified in `jar_file_uris`. - * - * Generated from protobuf field string main_class = 2; - * @param string $var - * @return $this - */ - public function setMainClass($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Optional. The arguments to pass to the driver. Do not include arguments, - * such as `--conf`, that can be set as job properties, since a collision may - * occur that causes an incorrect job submission. - * - * Generated from protobuf field repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getArgs() - { - return $this->args; - } - - /** - * Optional. The arguments to pass to the driver. Do not include arguments, - * such as `--conf`, that can be set as job properties, since a collision may - * occur that causes an incorrect job submission. - * - * Generated from protobuf field repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setArgs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->args = $arr; - - return $this; - } - - /** - * Optional. HCFS URIs of jar files to add to the CLASSPATHs of the - * Spark driver and tasks. - * - * Generated from protobuf field repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getJarFileUris() - { - return $this->jar_file_uris; - } - - /** - * Optional. HCFS URIs of jar files to add to the CLASSPATHs of the - * Spark driver and tasks. - * - * Generated from protobuf field repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setJarFileUris($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->jar_file_uris = $arr; - - return $this; - } - - /** - * Optional. HCFS URIs of files to be placed in the working directory of - * each executor. Useful for naively parallel tasks. - * - * Generated from protobuf field repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFileUris() - { - return $this->file_uris; - } - - /** - * Optional. HCFS URIs of files to be placed in the working directory of - * each executor. Useful for naively parallel tasks. - * - * Generated from protobuf field repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFileUris($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->file_uris = $arr; - - return $this; - } - - /** - * Optional. HCFS URIs of archives to be extracted into the working directory - * of each executor. Supported file types: - * .jar, .tar, .tar.gz, .tgz, and .zip. - * - * Generated from protobuf field repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getArchiveUris() - { - return $this->archive_uris; - } - - /** - * Optional. HCFS URIs of archives to be extracted into the working directory - * of each executor. Supported file types: - * .jar, .tar, .tar.gz, .tgz, and .zip. - * - * Generated from protobuf field repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setArchiveUris($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->archive_uris = $arr; - - return $this; - } - - /** - * Optional. A mapping of property names to values, used to configure Spark. - * Properties that conflict with values set by the Dataproc API may be - * overwritten. Can include properties set in - * /etc/spark/conf/spark-defaults.conf and classes in user code. - * - * Generated from protobuf field map properties = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getProperties() - { - return $this->properties; - } - - /** - * Optional. A mapping of property names to values, used to configure Spark. - * Properties that conflict with values set by the Dataproc API may be - * overwritten. Can include properties set in - * /etc/spark/conf/spark-defaults.conf and classes in user code. - * - * Generated from protobuf field map properties = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setProperties($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->properties = $arr; - - return $this; - } - - /** - * Optional. The runtime log config for job execution. - * - * Generated from protobuf field .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\LoggingConfig|null - */ - public function getLoggingConfig() - { - return $this->logging_config; - } - - public function hasLoggingConfig() - { - return isset($this->logging_config); - } - - public function clearLoggingConfig() - { - unset($this->logging_config); - } - - /** - * Optional. The runtime log config for job execution. - * - * Generated from protobuf field .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\LoggingConfig $var - * @return $this - */ - public function setLoggingConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\LoggingConfig::class); - $this->logging_config = $var; - - return $this; - } - - /** - * @return string - */ - public function getDriver() - { - return $this->whichOneof("driver"); - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SparkRBatch.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SparkRBatch.php deleted file mode 100644 index aef6fba4598..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SparkRBatch.php +++ /dev/null @@ -1,195 +0,0 @@ -google.cloud.dataproc.v1.SparkRBatch - */ -class SparkRBatch extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The HCFS URI of the main R file to use as the driver. - * Must be a `.R` or `.r` file. - * - * Generated from protobuf field string main_r_file_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $main_r_file_uri = ''; - /** - * Optional. The arguments to pass to the Spark driver. Do not include - * arguments that can be set as batch properties, such as `--conf`, since a - * collision can occur that causes an incorrect batch submission. - * - * Generated from protobuf field repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $args; - /** - * Optional. HCFS URIs of files to be placed in the working directory of - * each executor. - * - * Generated from protobuf field repeated string file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $file_uris; - /** - * Optional. HCFS URIs of archives to be extracted into the working directory - * of each executor. Supported file types: - * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`. - * - * Generated from protobuf field repeated string archive_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $archive_uris; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $main_r_file_uri - * Required. The HCFS URI of the main R file to use as the driver. - * Must be a `.R` or `.r` file. - * @type array|\Google\Protobuf\Internal\RepeatedField $args - * Optional. The arguments to pass to the Spark driver. Do not include - * arguments that can be set as batch properties, such as `--conf`, since a - * collision can occur that causes an incorrect batch submission. - * @type array|\Google\Protobuf\Internal\RepeatedField $file_uris - * Optional. HCFS URIs of files to be placed in the working directory of - * each executor. - * @type array|\Google\Protobuf\Internal\RepeatedField $archive_uris - * Optional. HCFS URIs of archives to be extracted into the working directory - * of each executor. Supported file types: - * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Batches::initOnce(); - parent::__construct($data); - } - - /** - * Required. The HCFS URI of the main R file to use as the driver. - * Must be a `.R` or `.r` file. - * - * Generated from protobuf field string main_r_file_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getMainRFileUri() - { - return $this->main_r_file_uri; - } - - /** - * Required. The HCFS URI of the main R file to use as the driver. - * Must be a `.R` or `.r` file. - * - * Generated from protobuf field string main_r_file_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setMainRFileUri($var) - { - GPBUtil::checkString($var, True); - $this->main_r_file_uri = $var; - - return $this; - } - - /** - * Optional. The arguments to pass to the Spark driver. Do not include - * arguments that can be set as batch properties, such as `--conf`, since a - * collision can occur that causes an incorrect batch submission. - * - * Generated from protobuf field repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getArgs() - { - return $this->args; - } - - /** - * Optional. The arguments to pass to the Spark driver. Do not include - * arguments that can be set as batch properties, such as `--conf`, since a - * collision can occur that causes an incorrect batch submission. - * - * Generated from protobuf field repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setArgs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->args = $arr; - - return $this; - } - - /** - * Optional. HCFS URIs of files to be placed in the working directory of - * each executor. - * - * Generated from protobuf field repeated string file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFileUris() - { - return $this->file_uris; - } - - /** - * Optional. HCFS URIs of files to be placed in the working directory of - * each executor. - * - * Generated from protobuf field repeated string file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFileUris($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->file_uris = $arr; - - return $this; - } - - /** - * Optional. HCFS URIs of archives to be extracted into the working directory - * of each executor. Supported file types: - * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`. - * - * Generated from protobuf field repeated string archive_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getArchiveUris() - { - return $this->archive_uris; - } - - /** - * Optional. HCFS URIs of archives to be extracted into the working directory - * of each executor. Supported file types: - * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`. - * - * Generated from protobuf field repeated string archive_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setArchiveUris($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->archive_uris = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SparkRJob.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SparkRJob.php deleted file mode 100644 index 702f31a6b65..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SparkRJob.php +++ /dev/null @@ -1,285 +0,0 @@ -google.cloud.dataproc.v1.SparkRJob - */ -class SparkRJob extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The HCFS URI of the main R file to use as the driver. - * Must be a .R file. - * - * Generated from protobuf field string main_r_file_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $main_r_file_uri = ''; - /** - * Optional. The arguments to pass to the driver. Do not include arguments, - * such as `--conf`, that can be set as job properties, since a collision may - * occur that causes an incorrect job submission. - * - * Generated from protobuf field repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $args; - /** - * Optional. HCFS URIs of files to be placed in the working directory of - * each executor. Useful for naively parallel tasks. - * - * Generated from protobuf field repeated string file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $file_uris; - /** - * Optional. HCFS URIs of archives to be extracted into the working directory - * of each executor. Supported file types: - * .jar, .tar, .tar.gz, .tgz, and .zip. - * - * Generated from protobuf field repeated string archive_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $archive_uris; - /** - * Optional. A mapping of property names to values, used to configure SparkR. - * Properties that conflict with values set by the Dataproc API may be - * overwritten. Can include properties set in - * /etc/spark/conf/spark-defaults.conf and classes in user code. - * - * Generated from protobuf field map properties = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $properties; - /** - * Optional. The runtime log config for job execution. - * - * Generated from protobuf field .google.cloud.dataproc.v1.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $logging_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $main_r_file_uri - * Required. The HCFS URI of the main R file to use as the driver. - * Must be a .R file. - * @type array|\Google\Protobuf\Internal\RepeatedField $args - * Optional. The arguments to pass to the driver. Do not include arguments, - * such as `--conf`, that can be set as job properties, since a collision may - * occur that causes an incorrect job submission. - * @type array|\Google\Protobuf\Internal\RepeatedField $file_uris - * Optional. HCFS URIs of files to be placed in the working directory of - * each executor. Useful for naively parallel tasks. - * @type array|\Google\Protobuf\Internal\RepeatedField $archive_uris - * Optional. HCFS URIs of archives to be extracted into the working directory - * of each executor. Supported file types: - * .jar, .tar, .tar.gz, .tgz, and .zip. - * @type array|\Google\Protobuf\Internal\MapField $properties - * Optional. A mapping of property names to values, used to configure SparkR. - * Properties that conflict with values set by the Dataproc API may be - * overwritten. Can include properties set in - * /etc/spark/conf/spark-defaults.conf and classes in user code. - * @type \Google\Cloud\Dataproc\V1\LoggingConfig $logging_config - * Optional. The runtime log config for job execution. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Jobs::initOnce(); - parent::__construct($data); - } - - /** - * Required. The HCFS URI of the main R file to use as the driver. - * Must be a .R file. - * - * Generated from protobuf field string main_r_file_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getMainRFileUri() - { - return $this->main_r_file_uri; - } - - /** - * Required. The HCFS URI of the main R file to use as the driver. - * Must be a .R file. - * - * Generated from protobuf field string main_r_file_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setMainRFileUri($var) - { - GPBUtil::checkString($var, True); - $this->main_r_file_uri = $var; - - return $this; - } - - /** - * Optional. The arguments to pass to the driver. Do not include arguments, - * such as `--conf`, that can be set as job properties, since a collision may - * occur that causes an incorrect job submission. - * - * Generated from protobuf field repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getArgs() - { - return $this->args; - } - - /** - * Optional. The arguments to pass to the driver. Do not include arguments, - * such as `--conf`, that can be set as job properties, since a collision may - * occur that causes an incorrect job submission. - * - * Generated from protobuf field repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setArgs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->args = $arr; - - return $this; - } - - /** - * Optional. HCFS URIs of files to be placed in the working directory of - * each executor. Useful for naively parallel tasks. - * - * Generated from protobuf field repeated string file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFileUris() - { - return $this->file_uris; - } - - /** - * Optional. HCFS URIs of files to be placed in the working directory of - * each executor. Useful for naively parallel tasks. - * - * Generated from protobuf field repeated string file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFileUris($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->file_uris = $arr; - - return $this; - } - - /** - * Optional. HCFS URIs of archives to be extracted into the working directory - * of each executor. Supported file types: - * .jar, .tar, .tar.gz, .tgz, and .zip. - * - * Generated from protobuf field repeated string archive_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getArchiveUris() - { - return $this->archive_uris; - } - - /** - * Optional. HCFS URIs of archives to be extracted into the working directory - * of each executor. Supported file types: - * .jar, .tar, .tar.gz, .tgz, and .zip. - * - * Generated from protobuf field repeated string archive_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setArchiveUris($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->archive_uris = $arr; - - return $this; - } - - /** - * Optional. A mapping of property names to values, used to configure SparkR. - * Properties that conflict with values set by the Dataproc API may be - * overwritten. Can include properties set in - * /etc/spark/conf/spark-defaults.conf and classes in user code. - * - * Generated from protobuf field map properties = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getProperties() - { - return $this->properties; - } - - /** - * Optional. A mapping of property names to values, used to configure SparkR. - * Properties that conflict with values set by the Dataproc API may be - * overwritten. Can include properties set in - * /etc/spark/conf/spark-defaults.conf and classes in user code. - * - * Generated from protobuf field map properties = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setProperties($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->properties = $arr; - - return $this; - } - - /** - * Optional. The runtime log config for job execution. - * - * Generated from protobuf field .google.cloud.dataproc.v1.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\LoggingConfig|null - */ - public function getLoggingConfig() - { - return $this->logging_config; - } - - public function hasLoggingConfig() - { - return isset($this->logging_config); - } - - public function clearLoggingConfig() - { - unset($this->logging_config); - } - - /** - * Optional. The runtime log config for job execution. - * - * Generated from protobuf field .google.cloud.dataproc.v1.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\LoggingConfig $var - * @return $this - */ - public function setLoggingConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\LoggingConfig::class); - $this->logging_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SparkSqlBatch.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SparkSqlBatch.php deleted file mode 100644 index 7b5ebb39667..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SparkSqlBatch.php +++ /dev/null @@ -1,145 +0,0 @@ -google.cloud.dataproc.v1.SparkSqlBatch - */ -class SparkSqlBatch extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The HCFS URI of the script that contains Spark SQL queries to - * execute. - * - * Generated from protobuf field string query_file_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $query_file_uri = ''; - /** - * Optional. Mapping of query variable names to values (equivalent to the - * Spark SQL command: `SET name="value";`). - * - * Generated from protobuf field map query_variables = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $query_variables; - /** - * Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH. - * - * Generated from protobuf field repeated string jar_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $jar_file_uris; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $query_file_uri - * Required. The HCFS URI of the script that contains Spark SQL queries to - * execute. - * @type array|\Google\Protobuf\Internal\MapField $query_variables - * Optional. Mapping of query variable names to values (equivalent to the - * Spark SQL command: `SET name="value";`). - * @type array|\Google\Protobuf\Internal\RepeatedField $jar_file_uris - * Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Batches::initOnce(); - parent::__construct($data); - } - - /** - * Required. The HCFS URI of the script that contains Spark SQL queries to - * execute. - * - * Generated from protobuf field string query_file_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getQueryFileUri() - { - return $this->query_file_uri; - } - - /** - * Required. The HCFS URI of the script that contains Spark SQL queries to - * execute. - * - * Generated from protobuf field string query_file_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setQueryFileUri($var) - { - GPBUtil::checkString($var, True); - $this->query_file_uri = $var; - - return $this; - } - - /** - * Optional. Mapping of query variable names to values (equivalent to the - * Spark SQL command: `SET name="value";`). - * - * Generated from protobuf field map query_variables = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getQueryVariables() - { - return $this->query_variables; - } - - /** - * Optional. Mapping of query variable names to values (equivalent to the - * Spark SQL command: `SET name="value";`). - * - * Generated from protobuf field map query_variables = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setQueryVariables($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->query_variables = $arr; - - return $this; - } - - /** - * Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH. - * - * Generated from protobuf field repeated string jar_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getJarFileUris() - { - return $this->jar_file_uris; - } - - /** - * Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH. - * - * Generated from protobuf field repeated string jar_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setJarFileUris($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->jar_file_uris = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SparkSqlJob.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SparkSqlJob.php deleted file mode 100644 index 1945abd33ad..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SparkSqlJob.php +++ /dev/null @@ -1,267 +0,0 @@ -google.cloud.dataproc.v1.SparkSqlJob - */ -class SparkSqlJob extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Mapping of query variable names to values (equivalent to the - * Spark SQL command: SET `name="value";`). - * - * Generated from protobuf field map script_variables = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $script_variables; - /** - * Optional. A mapping of property names to values, used to configure - * Spark SQL's SparkConf. Properties that conflict with values set by the - * Dataproc API may be overwritten. - * - * Generated from protobuf field map properties = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $properties; - /** - * Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH. - * - * Generated from protobuf field repeated string jar_file_uris = 56 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $jar_file_uris; - /** - * Optional. The runtime log config for job execution. - * - * Generated from protobuf field .google.cloud.dataproc.v1.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $logging_config = null; - protected $queries; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $query_file_uri - * The HCFS URI of the script that contains SQL queries. - * @type \Google\Cloud\Dataproc\V1\QueryList $query_list - * A list of queries. - * @type array|\Google\Protobuf\Internal\MapField $script_variables - * Optional. Mapping of query variable names to values (equivalent to the - * Spark SQL command: SET `name="value";`). - * @type array|\Google\Protobuf\Internal\MapField $properties - * Optional. A mapping of property names to values, used to configure - * Spark SQL's SparkConf. Properties that conflict with values set by the - * Dataproc API may be overwritten. - * @type array|\Google\Protobuf\Internal\RepeatedField $jar_file_uris - * Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH. - * @type \Google\Cloud\Dataproc\V1\LoggingConfig $logging_config - * Optional. The runtime log config for job execution. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Jobs::initOnce(); - parent::__construct($data); - } - - /** - * The HCFS URI of the script that contains SQL queries. - * - * Generated from protobuf field string query_file_uri = 1; - * @return string - */ - public function getQueryFileUri() - { - return $this->readOneof(1); - } - - public function hasQueryFileUri() - { - return $this->hasOneof(1); - } - - /** - * The HCFS URI of the script that contains SQL queries. - * - * Generated from protobuf field string query_file_uri = 1; - * @param string $var - * @return $this - */ - public function setQueryFileUri($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * A list of queries. - * - * Generated from protobuf field .google.cloud.dataproc.v1.QueryList query_list = 2; - * @return \Google\Cloud\Dataproc\V1\QueryList|null - */ - public function getQueryList() - { - return $this->readOneof(2); - } - - public function hasQueryList() - { - return $this->hasOneof(2); - } - - /** - * A list of queries. - * - * Generated from protobuf field .google.cloud.dataproc.v1.QueryList query_list = 2; - * @param \Google\Cloud\Dataproc\V1\QueryList $var - * @return $this - */ - public function setQueryList($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\QueryList::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Optional. Mapping of query variable names to values (equivalent to the - * Spark SQL command: SET `name="value";`). - * - * Generated from protobuf field map script_variables = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getScriptVariables() - { - return $this->script_variables; - } - - /** - * Optional. Mapping of query variable names to values (equivalent to the - * Spark SQL command: SET `name="value";`). - * - * Generated from protobuf field map script_variables = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setScriptVariables($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->script_variables = $arr; - - return $this; - } - - /** - * Optional. A mapping of property names to values, used to configure - * Spark SQL's SparkConf. Properties that conflict with values set by the - * Dataproc API may be overwritten. - * - * Generated from protobuf field map properties = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getProperties() - { - return $this->properties; - } - - /** - * Optional. A mapping of property names to values, used to configure - * Spark SQL's SparkConf. Properties that conflict with values set by the - * Dataproc API may be overwritten. - * - * Generated from protobuf field map properties = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setProperties($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->properties = $arr; - - return $this; - } - - /** - * Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH. - * - * Generated from protobuf field repeated string jar_file_uris = 56 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getJarFileUris() - { - return $this->jar_file_uris; - } - - /** - * Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH. - * - * Generated from protobuf field repeated string jar_file_uris = 56 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setJarFileUris($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->jar_file_uris = $arr; - - return $this; - } - - /** - * Optional. The runtime log config for job execution. - * - * Generated from protobuf field .google.cloud.dataproc.v1.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\LoggingConfig|null - */ - public function getLoggingConfig() - { - return $this->logging_config; - } - - public function hasLoggingConfig() - { - return isset($this->logging_config); - } - - public function clearLoggingConfig() - { - unset($this->logging_config); - } - - /** - * Optional. The runtime log config for job execution. - * - * Generated from protobuf field .google.cloud.dataproc.v1.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\LoggingConfig $var - * @return $this - */ - public function setLoggingConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\LoggingConfig::class); - $this->logging_config = $var; - - return $this; - } - - /** - * @return string - */ - public function getQueries() - { - return $this->whichOneof("queries"); - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/StartClusterRequest.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/StartClusterRequest.php deleted file mode 100644 index fe1ab98be36..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/StartClusterRequest.php +++ /dev/null @@ -1,247 +0,0 @@ -google.cloud.dataproc.v1.StartClusterRequest - */ -class StartClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The ID of the Google Cloud Platform project the - * cluster belongs to. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $project_id = ''; - /** - * Required. The Dataproc region in which to handle the request. - * - * Generated from protobuf field string region = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $region = ''; - /** - * Required. The cluster name. - * - * Generated from protobuf field string cluster_name = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $cluster_name = ''; - /** - * Optional. Specifying the `cluster_uuid` means the RPC will fail - * (with error NOT_FOUND) if a cluster with the specified UUID does not exist. - * - * Generated from protobuf field string cluster_uuid = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $cluster_uuid = ''; - /** - * Optional. A unique ID used to identify the request. If the server - * receives two - * [StartClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.StartClusterRequest)s - * with the same id, then the second request will be ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created - * and stored in the backend is returned. - * Recommendation: Set this value to a - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). The maximum length is 40 characters. - * - * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $project_id - * Required. The ID of the Google Cloud Platform project the - * cluster belongs to. - * @type string $region - * Required. The Dataproc region in which to handle the request. - * @type string $cluster_name - * Required. The cluster name. - * @type string $cluster_uuid - * Optional. Specifying the `cluster_uuid` means the RPC will fail - * (with error NOT_FOUND) if a cluster with the specified UUID does not exist. - * @type string $request_id - * Optional. A unique ID used to identify the request. If the server - * receives two - * [StartClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.StartClusterRequest)s - * with the same id, then the second request will be ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created - * and stored in the backend is returned. - * Recommendation: Set this value to a - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). The maximum length is 40 characters. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Clusters::initOnce(); - parent::__construct($data); - } - - /** - * Required. The ID of the Google Cloud Platform project the - * cluster belongs to. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * Required. The ID of the Google Cloud Platform project the - * cluster belongs to. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - - /** - * Required. The Dataproc region in which to handle the request. - * - * Generated from protobuf field string region = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getRegion() - { - return $this->region; - } - - /** - * Required. The Dataproc region in which to handle the request. - * - * Generated from protobuf field string region = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setRegion($var) - { - GPBUtil::checkString($var, True); - $this->region = $var; - - return $this; - } - - /** - * Required. The cluster name. - * - * Generated from protobuf field string cluster_name = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getClusterName() - { - return $this->cluster_name; - } - - /** - * Required. The cluster name. - * - * Generated from protobuf field string cluster_name = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setClusterName($var) - { - GPBUtil::checkString($var, True); - $this->cluster_name = $var; - - return $this; - } - - /** - * Optional. Specifying the `cluster_uuid` means the RPC will fail - * (with error NOT_FOUND) if a cluster with the specified UUID does not exist. - * - * Generated from protobuf field string cluster_uuid = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getClusterUuid() - { - return $this->cluster_uuid; - } - - /** - * Optional. Specifying the `cluster_uuid` means the RPC will fail - * (with error NOT_FOUND) if a cluster with the specified UUID does not exist. - * - * Generated from protobuf field string cluster_uuid = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setClusterUuid($var) - { - GPBUtil::checkString($var, True); - $this->cluster_uuid = $var; - - return $this; - } - - /** - * Optional. A unique ID used to identify the request. If the server - * receives two - * [StartClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.StartClusterRequest)s - * with the same id, then the second request will be ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created - * and stored in the backend is returned. - * Recommendation: Set this value to a - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). The maximum length is 40 characters. - * - * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A unique ID used to identify the request. If the server - * receives two - * [StartClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.StartClusterRequest)s - * with the same id, then the second request will be ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created - * and stored in the backend is returned. - * Recommendation: Set this value to a - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). The maximum length is 40 characters. - * - * Generated from protobuf field string request_id = 5 [(.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/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/StopClusterRequest.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/StopClusterRequest.php deleted file mode 100644 index 1d8c84aa4ef..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/StopClusterRequest.php +++ /dev/null @@ -1,247 +0,0 @@ -google.cloud.dataproc.v1.StopClusterRequest - */ -class StopClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The ID of the Google Cloud Platform project the - * cluster belongs to. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $project_id = ''; - /** - * Required. The Dataproc region in which to handle the request. - * - * Generated from protobuf field string region = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $region = ''; - /** - * Required. The cluster name. - * - * Generated from protobuf field string cluster_name = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $cluster_name = ''; - /** - * Optional. Specifying the `cluster_uuid` means the RPC will fail - * (with error NOT_FOUND) if a cluster with the specified UUID does not exist. - * - * Generated from protobuf field string cluster_uuid = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $cluster_uuid = ''; - /** - * Optional. A unique ID used to identify the request. If the server - * receives two - * [StopClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.StopClusterRequest)s - * with the same id, then the second request will be ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created - * and stored in the backend is returned. - * Recommendation: Set this value to a - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). The maximum length is 40 characters. - * - * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $project_id - * Required. The ID of the Google Cloud Platform project the - * cluster belongs to. - * @type string $region - * Required. The Dataproc region in which to handle the request. - * @type string $cluster_name - * Required. The cluster name. - * @type string $cluster_uuid - * Optional. Specifying the `cluster_uuid` means the RPC will fail - * (with error NOT_FOUND) if a cluster with the specified UUID does not exist. - * @type string $request_id - * Optional. A unique ID used to identify the request. If the server - * receives two - * [StopClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.StopClusterRequest)s - * with the same id, then the second request will be ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created - * and stored in the backend is returned. - * Recommendation: Set this value to a - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). The maximum length is 40 characters. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Clusters::initOnce(); - parent::__construct($data); - } - - /** - * Required. The ID of the Google Cloud Platform project the - * cluster belongs to. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * Required. The ID of the Google Cloud Platform project the - * cluster belongs to. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - - /** - * Required. The Dataproc region in which to handle the request. - * - * Generated from protobuf field string region = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getRegion() - { - return $this->region; - } - - /** - * Required. The Dataproc region in which to handle the request. - * - * Generated from protobuf field string region = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setRegion($var) - { - GPBUtil::checkString($var, True); - $this->region = $var; - - return $this; - } - - /** - * Required. The cluster name. - * - * Generated from protobuf field string cluster_name = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getClusterName() - { - return $this->cluster_name; - } - - /** - * Required. The cluster name. - * - * Generated from protobuf field string cluster_name = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setClusterName($var) - { - GPBUtil::checkString($var, True); - $this->cluster_name = $var; - - return $this; - } - - /** - * Optional. Specifying the `cluster_uuid` means the RPC will fail - * (with error NOT_FOUND) if a cluster with the specified UUID does not exist. - * - * Generated from protobuf field string cluster_uuid = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getClusterUuid() - { - return $this->cluster_uuid; - } - - /** - * Optional. Specifying the `cluster_uuid` means the RPC will fail - * (with error NOT_FOUND) if a cluster with the specified UUID does not exist. - * - * Generated from protobuf field string cluster_uuid = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setClusterUuid($var) - { - GPBUtil::checkString($var, True); - $this->cluster_uuid = $var; - - return $this; - } - - /** - * Optional. A unique ID used to identify the request. If the server - * receives two - * [StopClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.StopClusterRequest)s - * with the same id, then the second request will be ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created - * and stored in the backend is returned. - * Recommendation: Set this value to a - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). The maximum length is 40 characters. - * - * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A unique ID used to identify the request. If the server - * receives two - * [StopClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.StopClusterRequest)s - * with the same id, then the second request will be ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created - * and stored in the backend is returned. - * Recommendation: Set this value to a - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). The maximum length is 40 characters. - * - * Generated from protobuf field string request_id = 5 [(.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/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SubmitJobRequest.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SubmitJobRequest.php deleted file mode 100644 index 7df0693c12c..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SubmitJobRequest.php +++ /dev/null @@ -1,237 +0,0 @@ -google.cloud.dataproc.v1.SubmitJobRequest - */ -class SubmitJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The ID of the Google Cloud Platform project that the job - * belongs to. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $project_id = ''; - /** - * Required. The Dataproc region in which to handle the request. - * - * Generated from protobuf field string region = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $region = ''; - /** - * Required. The job resource. - * - * Generated from protobuf field .google.cloud.dataproc.v1.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $job = null; - /** - * Optional. A unique id used to identify the request. If the server - * receives two - * [SubmitJobRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.SubmitJobRequest)s - * with the same id, then the second request will be ignored and the - * first [Job][google.cloud.dataproc.v1.Job] created and stored in the backend - * is returned. - * It is recommended to always set this value to a - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - * The id must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). The maximum length is 40 characters. - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $projectId Required. The ID of the Google Cloud Platform project that the job - * belongs to. - * @param string $region Required. The Dataproc region in which to handle the request. - * @param \Google\Cloud\Dataproc\V1\Job $job Required. The job resource. - * - * @return \Google\Cloud\Dataproc\V1\SubmitJobRequest - * - * @experimental - */ - public static function build(string $projectId, string $region, \Google\Cloud\Dataproc\V1\Job $job): self - { - return (new self()) - ->setProjectId($projectId) - ->setRegion($region) - ->setJob($job); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $project_id - * Required. The ID of the Google Cloud Platform project that the job - * belongs to. - * @type string $region - * Required. The Dataproc region in which to handle the request. - * @type \Google\Cloud\Dataproc\V1\Job $job - * Required. The job resource. - * @type string $request_id - * Optional. A unique id used to identify the request. If the server - * receives two - * [SubmitJobRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.SubmitJobRequest)s - * with the same id, then the second request will be ignored and the - * first [Job][google.cloud.dataproc.v1.Job] created and stored in the backend - * is returned. - * It is recommended to always set this value to a - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - * The id must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). The maximum length is 40 characters. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Jobs::initOnce(); - parent::__construct($data); - } - - /** - * Required. The ID of the Google Cloud Platform project that the job - * belongs to. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * Required. The ID of the Google Cloud Platform project that the job - * belongs to. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - - /** - * Required. The Dataproc region in which to handle the request. - * - * Generated from protobuf field string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getRegion() - { - return $this->region; - } - - /** - * Required. The Dataproc region in which to handle the request. - * - * Generated from protobuf field string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setRegion($var) - { - GPBUtil::checkString($var, True); - $this->region = $var; - - return $this; - } - - /** - * Required. The job resource. - * - * Generated from protobuf field .google.cloud.dataproc.v1.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataproc\V1\Job|null - */ - public function getJob() - { - return $this->job; - } - - public function hasJob() - { - return isset($this->job); - } - - public function clearJob() - { - unset($this->job); - } - - /** - * Required. The job resource. - * - * Generated from protobuf field .google.cloud.dataproc.v1.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataproc\V1\Job $var - * @return $this - */ - public function setJob($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\Job::class); - $this->job = $var; - - return $this; - } - - /** - * Optional. A unique id used to identify the request. If the server - * receives two - * [SubmitJobRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.SubmitJobRequest)s - * with the same id, then the second request will be ignored and the - * first [Job][google.cloud.dataproc.v1.Job] created and stored in the backend - * is returned. - * It is recommended to always set this value to a - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - * The id must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). The maximum length is 40 characters. - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A unique id used to identify the request. If the server - * receives two - * [SubmitJobRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.SubmitJobRequest)s - * with the same id, then the second request will be ignored and the - * first [Job][google.cloud.dataproc.v1.Job] created and stored in the backend - * is returned. - * It is recommended to always set this value to a - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - * The id must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). The maximum length is 40 characters. - * - * 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/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/TemplateParameter.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/TemplateParameter.php deleted file mode 100644 index bb62556d4ee..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/TemplateParameter.php +++ /dev/null @@ -1,355 +0,0 @@ -google.cloud.dataproc.v1.TemplateParameter - */ -class TemplateParameter extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parameter name. - * The parameter name is used as the key, and paired with the - * parameter value, which are passed to the template when the template - * is instantiated. - * The name must contain only capital letters (A-Z), numbers (0-9), and - * underscores (_), and must not start with a number. The maximum length is - * 40 characters. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Required. Paths to all fields that the parameter replaces. - * A field is allowed to appear in at most one parameter's list of field - * paths. - * A field path is similar in syntax to a - * [google.protobuf.FieldMask][google.protobuf.FieldMask]. For example, a - * field path that references the zone field of a workflow template's cluster - * selector would be specified as `placement.clusterSelector.zone`. - * Also, field paths can reference fields using the following syntax: - * * Values in maps can be referenced by key: - * * labels['key'] - * * placement.clusterSelector.clusterLabels['key'] - * * placement.managedCluster.labels['key'] - * * placement.clusterSelector.clusterLabels['key'] - * * jobs['step-id'].labels['key'] - * * Jobs in the jobs list can be referenced by step-id: - * * jobs['step-id'].hadoopJob.mainJarFileUri - * * jobs['step-id'].hiveJob.queryFileUri - * * jobs['step-id'].pySparkJob.mainPythonFileUri - * * jobs['step-id'].hadoopJob.jarFileUris[0] - * * jobs['step-id'].hadoopJob.archiveUris[0] - * * jobs['step-id'].hadoopJob.fileUris[0] - * * jobs['step-id'].pySparkJob.pythonFileUris[0] - * * Items in repeated fields can be referenced by a zero-based index: - * * jobs['step-id'].sparkJob.args[0] - * * Other examples: - * * jobs['step-id'].hadoopJob.properties['key'] - * * jobs['step-id'].hadoopJob.args[0] - * * jobs['step-id'].hiveJob.scriptVariables['key'] - * * jobs['step-id'].hadoopJob.mainJarFileUri - * * placement.clusterSelector.zone - * It may not be possible to parameterize maps and repeated fields in their - * entirety since only individual map values and individual items in repeated - * fields can be referenced. For example, the following field paths are - * invalid: - * - placement.clusterSelector.clusterLabels - * - jobs['step-id'].sparkJob.args - * - * Generated from protobuf field repeated string fields = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $fields; - /** - * Optional. Brief description of the parameter. - * Must not exceed 1024 characters. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Optional. Validation rules to be applied to this parameter's value. - * - * Generated from protobuf field .google.cloud.dataproc.v1.ParameterValidation validation = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validation = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Parameter name. - * The parameter name is used as the key, and paired with the - * parameter value, which are passed to the template when the template - * is instantiated. - * The name must contain only capital letters (A-Z), numbers (0-9), and - * underscores (_), and must not start with a number. The maximum length is - * 40 characters. - * @type array|\Google\Protobuf\Internal\RepeatedField $fields - * Required. Paths to all fields that the parameter replaces. - * A field is allowed to appear in at most one parameter's list of field - * paths. - * A field path is similar in syntax to a - * [google.protobuf.FieldMask][google.protobuf.FieldMask]. For example, a - * field path that references the zone field of a workflow template's cluster - * selector would be specified as `placement.clusterSelector.zone`. - * Also, field paths can reference fields using the following syntax: - * * Values in maps can be referenced by key: - * * labels['key'] - * * placement.clusterSelector.clusterLabels['key'] - * * placement.managedCluster.labels['key'] - * * placement.clusterSelector.clusterLabels['key'] - * * jobs['step-id'].labels['key'] - * * Jobs in the jobs list can be referenced by step-id: - * * jobs['step-id'].hadoopJob.mainJarFileUri - * * jobs['step-id'].hiveJob.queryFileUri - * * jobs['step-id'].pySparkJob.mainPythonFileUri - * * jobs['step-id'].hadoopJob.jarFileUris[0] - * * jobs['step-id'].hadoopJob.archiveUris[0] - * * jobs['step-id'].hadoopJob.fileUris[0] - * * jobs['step-id'].pySparkJob.pythonFileUris[0] - * * Items in repeated fields can be referenced by a zero-based index: - * * jobs['step-id'].sparkJob.args[0] - * * Other examples: - * * jobs['step-id'].hadoopJob.properties['key'] - * * jobs['step-id'].hadoopJob.args[0] - * * jobs['step-id'].hiveJob.scriptVariables['key'] - * * jobs['step-id'].hadoopJob.mainJarFileUri - * * placement.clusterSelector.zone - * It may not be possible to parameterize maps and repeated fields in their - * entirety since only individual map values and individual items in repeated - * fields can be referenced. For example, the following field paths are - * invalid: - * - placement.clusterSelector.clusterLabels - * - jobs['step-id'].sparkJob.args - * @type string $description - * Optional. Brief description of the parameter. - * Must not exceed 1024 characters. - * @type \Google\Cloud\Dataproc\V1\ParameterValidation $validation - * Optional. Validation rules to be applied to this parameter's value. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\WorkflowTemplates::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parameter name. - * The parameter name is used as the key, and paired with the - * parameter value, which are passed to the template when the template - * is instantiated. - * The name must contain only capital letters (A-Z), numbers (0-9), and - * underscores (_), and must not start with a number. The maximum length is - * 40 characters. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Parameter name. - * The parameter name is used as the key, and paired with the - * parameter value, which are passed to the template when the template - * is instantiated. - * The name must contain only capital letters (A-Z), numbers (0-9), and - * underscores (_), and must not start with a number. The maximum length is - * 40 characters. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. Paths to all fields that the parameter replaces. - * A field is allowed to appear in at most one parameter's list of field - * paths. - * A field path is similar in syntax to a - * [google.protobuf.FieldMask][google.protobuf.FieldMask]. For example, a - * field path that references the zone field of a workflow template's cluster - * selector would be specified as `placement.clusterSelector.zone`. - * Also, field paths can reference fields using the following syntax: - * * Values in maps can be referenced by key: - * * labels['key'] - * * placement.clusterSelector.clusterLabels['key'] - * * placement.managedCluster.labels['key'] - * * placement.clusterSelector.clusterLabels['key'] - * * jobs['step-id'].labels['key'] - * * Jobs in the jobs list can be referenced by step-id: - * * jobs['step-id'].hadoopJob.mainJarFileUri - * * jobs['step-id'].hiveJob.queryFileUri - * * jobs['step-id'].pySparkJob.mainPythonFileUri - * * jobs['step-id'].hadoopJob.jarFileUris[0] - * * jobs['step-id'].hadoopJob.archiveUris[0] - * * jobs['step-id'].hadoopJob.fileUris[0] - * * jobs['step-id'].pySparkJob.pythonFileUris[0] - * * Items in repeated fields can be referenced by a zero-based index: - * * jobs['step-id'].sparkJob.args[0] - * * Other examples: - * * jobs['step-id'].hadoopJob.properties['key'] - * * jobs['step-id'].hadoopJob.args[0] - * * jobs['step-id'].hiveJob.scriptVariables['key'] - * * jobs['step-id'].hadoopJob.mainJarFileUri - * * placement.clusterSelector.zone - * It may not be possible to parameterize maps and repeated fields in their - * entirety since only individual map values and individual items in repeated - * fields can be referenced. For example, the following field paths are - * invalid: - * - placement.clusterSelector.clusterLabels - * - jobs['step-id'].sparkJob.args - * - * Generated from protobuf field repeated string fields = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFields() - { - return $this->fields; - } - - /** - * Required. Paths to all fields that the parameter replaces. - * A field is allowed to appear in at most one parameter's list of field - * paths. - * A field path is similar in syntax to a - * [google.protobuf.FieldMask][google.protobuf.FieldMask]. For example, a - * field path that references the zone field of a workflow template's cluster - * selector would be specified as `placement.clusterSelector.zone`. - * Also, field paths can reference fields using the following syntax: - * * Values in maps can be referenced by key: - * * labels['key'] - * * placement.clusterSelector.clusterLabels['key'] - * * placement.managedCluster.labels['key'] - * * placement.clusterSelector.clusterLabels['key'] - * * jobs['step-id'].labels['key'] - * * Jobs in the jobs list can be referenced by step-id: - * * jobs['step-id'].hadoopJob.mainJarFileUri - * * jobs['step-id'].hiveJob.queryFileUri - * * jobs['step-id'].pySparkJob.mainPythonFileUri - * * jobs['step-id'].hadoopJob.jarFileUris[0] - * * jobs['step-id'].hadoopJob.archiveUris[0] - * * jobs['step-id'].hadoopJob.fileUris[0] - * * jobs['step-id'].pySparkJob.pythonFileUris[0] - * * Items in repeated fields can be referenced by a zero-based index: - * * jobs['step-id'].sparkJob.args[0] - * * Other examples: - * * jobs['step-id'].hadoopJob.properties['key'] - * * jobs['step-id'].hadoopJob.args[0] - * * jobs['step-id'].hiveJob.scriptVariables['key'] - * * jobs['step-id'].hadoopJob.mainJarFileUri - * * placement.clusterSelector.zone - * It may not be possible to parameterize maps and repeated fields in their - * entirety since only individual map values and individual items in repeated - * fields can be referenced. For example, the following field paths are - * invalid: - * - placement.clusterSelector.clusterLabels - * - jobs['step-id'].sparkJob.args - * - * Generated from protobuf field repeated string fields = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFields($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->fields = $arr; - - return $this; - } - - /** - * Optional. Brief description of the parameter. - * Must not exceed 1024 characters. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. Brief description of the parameter. - * Must not exceed 1024 characters. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Optional. Validation rules to be applied to this parameter's value. - * - * Generated from protobuf field .google.cloud.dataproc.v1.ParameterValidation validation = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\ParameterValidation|null - */ - public function getValidation() - { - return $this->validation; - } - - public function hasValidation() - { - return isset($this->validation); - } - - public function clearValidation() - { - unset($this->validation); - } - - /** - * Optional. Validation rules to be applied to this parameter's value. - * - * Generated from protobuf field .google.cloud.dataproc.v1.ParameterValidation validation = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\ParameterValidation $var - * @return $this - */ - public function setValidation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\ParameterValidation::class); - $this->validation = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/TrinoJob.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/TrinoJob.php deleted file mode 100644 index 56fa989144a..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/TrinoJob.php +++ /dev/null @@ -1,312 +0,0 @@ -google.cloud.dataproc.v1.TrinoJob - */ -class TrinoJob extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Whether to continue executing queries if a query fails. - * The default value is `false`. Setting to `true` can be useful when - * executing independent parallel queries. - * - * Generated from protobuf field bool continue_on_failure = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $continue_on_failure = false; - /** - * Optional. The format in which query output will be displayed. See the - * Trino documentation for supported output formats - * - * Generated from protobuf field string output_format = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $output_format = ''; - /** - * Optional. Trino client tags to attach to this query - * - * Generated from protobuf field repeated string client_tags = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $client_tags; - /** - * Optional. A mapping of property names to values. Used to set Trino - * [session properties](https://trino.io/docs/current/sql/set-session.html) - * Equivalent to using the --session flag in the Trino CLI - * - * Generated from protobuf field map properties = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $properties; - /** - * Optional. The runtime log config for job execution. - * - * Generated from protobuf field .google.cloud.dataproc.v1.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $logging_config = null; - protected $queries; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $query_file_uri - * The HCFS URI of the script that contains SQL queries. - * @type \Google\Cloud\Dataproc\V1\QueryList $query_list - * A list of queries. - * @type bool $continue_on_failure - * Optional. Whether to continue executing queries if a query fails. - * The default value is `false`. Setting to `true` can be useful when - * executing independent parallel queries. - * @type string $output_format - * Optional. The format in which query output will be displayed. See the - * Trino documentation for supported output formats - * @type array|\Google\Protobuf\Internal\RepeatedField $client_tags - * Optional. Trino client tags to attach to this query - * @type array|\Google\Protobuf\Internal\MapField $properties - * Optional. A mapping of property names to values. Used to set Trino - * [session properties](https://trino.io/docs/current/sql/set-session.html) - * Equivalent to using the --session flag in the Trino CLI - * @type \Google\Cloud\Dataproc\V1\LoggingConfig $logging_config - * Optional. The runtime log config for job execution. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Jobs::initOnce(); - parent::__construct($data); - } - - /** - * The HCFS URI of the script that contains SQL queries. - * - * Generated from protobuf field string query_file_uri = 1; - * @return string - */ - public function getQueryFileUri() - { - return $this->readOneof(1); - } - - public function hasQueryFileUri() - { - return $this->hasOneof(1); - } - - /** - * The HCFS URI of the script that contains SQL queries. - * - * Generated from protobuf field string query_file_uri = 1; - * @param string $var - * @return $this - */ - public function setQueryFileUri($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * A list of queries. - * - * Generated from protobuf field .google.cloud.dataproc.v1.QueryList query_list = 2; - * @return \Google\Cloud\Dataproc\V1\QueryList|null - */ - public function getQueryList() - { - return $this->readOneof(2); - } - - public function hasQueryList() - { - return $this->hasOneof(2); - } - - /** - * A list of queries. - * - * Generated from protobuf field .google.cloud.dataproc.v1.QueryList query_list = 2; - * @param \Google\Cloud\Dataproc\V1\QueryList $var - * @return $this - */ - public function setQueryList($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\QueryList::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Optional. Whether to continue executing queries if a query fails. - * The default value is `false`. Setting to `true` can be useful when - * executing independent parallel queries. - * - * Generated from protobuf field bool continue_on_failure = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getContinueOnFailure() - { - return $this->continue_on_failure; - } - - /** - * Optional. Whether to continue executing queries if a query fails. - * The default value is `false`. Setting to `true` can be useful when - * executing independent parallel queries. - * - * Generated from protobuf field bool continue_on_failure = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setContinueOnFailure($var) - { - GPBUtil::checkBool($var); - $this->continue_on_failure = $var; - - return $this; - } - - /** - * Optional. The format in which query output will be displayed. See the - * Trino documentation for supported output formats - * - * Generated from protobuf field string output_format = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOutputFormat() - { - return $this->output_format; - } - - /** - * Optional. The format in which query output will be displayed. See the - * Trino documentation for supported output formats - * - * Generated from protobuf field string output_format = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOutputFormat($var) - { - GPBUtil::checkString($var, True); - $this->output_format = $var; - - return $this; - } - - /** - * Optional. Trino client tags to attach to this query - * - * Generated from protobuf field repeated string client_tags = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getClientTags() - { - return $this->client_tags; - } - - /** - * Optional. Trino client tags to attach to this query - * - * Generated from protobuf field repeated string client_tags = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setClientTags($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->client_tags = $arr; - - return $this; - } - - /** - * Optional. A mapping of property names to values. Used to set Trino - * [session properties](https://trino.io/docs/current/sql/set-session.html) - * Equivalent to using the --session flag in the Trino CLI - * - * Generated from protobuf field map properties = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getProperties() - { - return $this->properties; - } - - /** - * Optional. A mapping of property names to values. Used to set Trino - * [session properties](https://trino.io/docs/current/sql/set-session.html) - * Equivalent to using the --session flag in the Trino CLI - * - * Generated from protobuf field map properties = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setProperties($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->properties = $arr; - - return $this; - } - - /** - * Optional. The runtime log config for job execution. - * - * Generated from protobuf field .google.cloud.dataproc.v1.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\LoggingConfig|null - */ - public function getLoggingConfig() - { - return $this->logging_config; - } - - public function hasLoggingConfig() - { - return isset($this->logging_config); - } - - public function clearLoggingConfig() - { - unset($this->logging_config); - } - - /** - * Optional. The runtime log config for job execution. - * - * Generated from protobuf field .google.cloud.dataproc.v1.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\LoggingConfig $var - * @return $this - */ - public function setLoggingConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\LoggingConfig::class); - $this->logging_config = $var; - - return $this; - } - - /** - * @return string - */ - public function getQueries() - { - return $this->whichOneof("queries"); - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/UpdateAutoscalingPolicyRequest.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/UpdateAutoscalingPolicyRequest.php deleted file mode 100644 index bbc2fc1ebe2..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/UpdateAutoscalingPolicyRequest.php +++ /dev/null @@ -1,90 +0,0 @@ -google.cloud.dataproc.v1.UpdateAutoscalingPolicyRequest - */ -class UpdateAutoscalingPolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The updated autoscaling policy. - * - * Generated from protobuf field .google.cloud.dataproc.v1.AutoscalingPolicy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $policy = null; - - /** - * @param \Google\Cloud\Dataproc\V1\AutoscalingPolicy $policy Required. The updated autoscaling policy. - * - * @return \Google\Cloud\Dataproc\V1\UpdateAutoscalingPolicyRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Dataproc\V1\AutoscalingPolicy $policy): self - { - return (new self()) - ->setPolicy($policy); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dataproc\V1\AutoscalingPolicy $policy - * Required. The updated autoscaling policy. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\AutoscalingPolicies::initOnce(); - parent::__construct($data); - } - - /** - * Required. The updated autoscaling policy. - * - * Generated from protobuf field .google.cloud.dataproc.v1.AutoscalingPolicy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataproc\V1\AutoscalingPolicy|null - */ - public function getPolicy() - { - return $this->policy; - } - - public function hasPolicy() - { - return isset($this->policy); - } - - public function clearPolicy() - { - unset($this->policy); - } - - /** - * Required. The updated autoscaling policy. - * - * Generated from protobuf field .google.cloud.dataproc.v1.AutoscalingPolicy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataproc\V1\AutoscalingPolicy $var - * @return $this - */ - public function setPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\AutoscalingPolicy::class); - $this->policy = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/UpdateClusterRequest.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/UpdateClusterRequest.php deleted file mode 100644 index d0b3e15cf5b..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/UpdateClusterRequest.php +++ /dev/null @@ -1,629 +0,0 @@ -google.cloud.dataproc.v1.UpdateClusterRequest - */ -class UpdateClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The ID of the Google Cloud Platform project the - * cluster belongs to. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $project_id = ''; - /** - * Required. The Dataproc region in which to handle the request. - * - * Generated from protobuf field string region = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $region = ''; - /** - * Required. The cluster name. - * - * Generated from protobuf field string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $cluster_name = ''; - /** - * Required. The changes to the cluster. - * - * Generated from protobuf field .google.cloud.dataproc.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $cluster = null; - /** - * Optional. Timeout for graceful YARN decommissioning. Graceful - * decommissioning allows removing nodes from the cluster without - * interrupting jobs in progress. Timeout specifies how long to wait for jobs - * in progress to finish before forcefully removing nodes (and potentially - * interrupting jobs). Default timeout is 0 (for forceful decommission), and - * the maximum allowed timeout is 1 day. (see JSON representation of - * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). - * Only supported on Dataproc image versions 1.2 and higher. - * - * Generated from protobuf field .google.protobuf.Duration graceful_decommission_timeout = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $graceful_decommission_timeout = null; - /** - * Required. Specifies the path, relative to `Cluster`, of - * the field to update. For example, to change the number of workers - * in a cluster to 5, the `update_mask` parameter would be - * specified as `config.worker_config.num_instances`, - * and the `PATCH` request body would specify the new value, as follows: - * { - * "config":{ - * "workerConfig":{ - * "numInstances":"5" - * } - * } - * } - * Similarly, to change the number of preemptible workers in a cluster to 5, - * the `update_mask` parameter would be - * `config.secondary_worker_config.num_instances`, and the `PATCH` request - * body would be set as follows: - * { - * "config":{ - * "secondaryWorkerConfig":{ - * "numInstances":"5" - * } - * } - * } - * Note: Currently, only the following fields can be updated: - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - *
MaskPurpose
labelsUpdate labels
config.worker_config.num_instancesResize primary worker group
config.secondary_worker_config.num_instancesResize secondary worker group
config.autoscaling_config.policy_uriUse, stop using, or - * change autoscaling policies
- * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Optional. A unique ID used to identify the request. If the server - * receives two - * [UpdateClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.UpdateClusterRequest)s - * with the same id, then the second request will be ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created - * and stored in the backend is returned. - * It is recommended to always set this value to a - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). The maximum length is 40 characters. - * - * Generated from protobuf field string request_id = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $projectId Required. The ID of the Google Cloud Platform project the - * cluster belongs to. - * @param string $region Required. The Dataproc region in which to handle the request. - * @param string $clusterName Required. The cluster name. - * @param \Google\Cloud\Dataproc\V1\Cluster $cluster Required. The changes to the cluster. - * @param \Google\Protobuf\FieldMask $updateMask Required. Specifies the path, relative to `Cluster`, of - * the field to update. For example, to change the number of workers - * in a cluster to 5, the `update_mask` parameter would be - * specified as `config.worker_config.num_instances`, - * and the `PATCH` request body would specify the new value, as follows: - * - * { - * "config":{ - * "workerConfig":{ - * "numInstances":"5" - * } - * } - * } - * Similarly, to change the number of preemptible workers in a cluster to 5, - * the `update_mask` parameter would be - * `config.secondary_worker_config.num_instances`, and the `PATCH` request - * body would be set as follows: - * - * { - * "config":{ - * "secondaryWorkerConfig":{ - * "numInstances":"5" - * } - * } - * } - * Note: Currently, only the following fields can be updated: - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - *
MaskPurpose
labelsUpdate labels
config.worker_config.num_instancesResize primary worker group
config.secondary_worker_config.num_instancesResize secondary worker group
config.autoscaling_config.policy_uriUse, stop using, or - * change autoscaling policies
- * - * @return \Google\Cloud\Dataproc\V1\UpdateClusterRequest - * - * @experimental - */ - public static function build(string $projectId, string $region, string $clusterName, \Google\Cloud\Dataproc\V1\Cluster $cluster, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setProjectId($projectId) - ->setRegion($region) - ->setClusterName($clusterName) - ->setCluster($cluster) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $project_id - * Required. The ID of the Google Cloud Platform project the - * cluster belongs to. - * @type string $region - * Required. The Dataproc region in which to handle the request. - * @type string $cluster_name - * Required. The cluster name. - * @type \Google\Cloud\Dataproc\V1\Cluster $cluster - * Required. The changes to the cluster. - * @type \Google\Protobuf\Duration $graceful_decommission_timeout - * Optional. Timeout for graceful YARN decommissioning. Graceful - * decommissioning allows removing nodes from the cluster without - * interrupting jobs in progress. Timeout specifies how long to wait for jobs - * in progress to finish before forcefully removing nodes (and potentially - * interrupting jobs). Default timeout is 0 (for forceful decommission), and - * the maximum allowed timeout is 1 day. (see JSON representation of - * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). - * Only supported on Dataproc image versions 1.2 and higher. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Specifies the path, relative to `Cluster`, of - * the field to update. For example, to change the number of workers - * in a cluster to 5, the `update_mask` parameter would be - * specified as `config.worker_config.num_instances`, - * and the `PATCH` request body would specify the new value, as follows: - * { - * "config":{ - * "workerConfig":{ - * "numInstances":"5" - * } - * } - * } - * Similarly, to change the number of preemptible workers in a cluster to 5, - * the `update_mask` parameter would be - * `config.secondary_worker_config.num_instances`, and the `PATCH` request - * body would be set as follows: - * { - * "config":{ - * "secondaryWorkerConfig":{ - * "numInstances":"5" - * } - * } - * } - * Note: Currently, only the following fields can be updated: - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - *
MaskPurpose
labelsUpdate labels
config.worker_config.num_instancesResize primary worker group
config.secondary_worker_config.num_instancesResize secondary worker group
config.autoscaling_config.policy_uriUse, stop using, or - * change autoscaling policies
- * @type string $request_id - * Optional. A unique ID used to identify the request. If the server - * receives two - * [UpdateClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.UpdateClusterRequest)s - * with the same id, then the second request will be ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created - * and stored in the backend is returned. - * It is recommended to always set this value to a - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). The maximum length is 40 characters. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Clusters::initOnce(); - parent::__construct($data); - } - - /** - * Required. The ID of the Google Cloud Platform project the - * cluster belongs to. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * Required. The ID of the Google Cloud Platform project the - * cluster belongs to. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - - /** - * Required. The Dataproc region in which to handle the request. - * - * Generated from protobuf field string region = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getRegion() - { - return $this->region; - } - - /** - * Required. The Dataproc region in which to handle the request. - * - * Generated from protobuf field string region = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setRegion($var) - { - GPBUtil::checkString($var, True); - $this->region = $var; - - return $this; - } - - /** - * Required. The cluster name. - * - * Generated from protobuf field string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getClusterName() - { - return $this->cluster_name; - } - - /** - * Required. The cluster name. - * - * Generated from protobuf field string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setClusterName($var) - { - GPBUtil::checkString($var, True); - $this->cluster_name = $var; - - return $this; - } - - /** - * Required. The changes to the cluster. - * - * Generated from protobuf field .google.cloud.dataproc.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataproc\V1\Cluster|null - */ - public function getCluster() - { - return $this->cluster; - } - - public function hasCluster() - { - return isset($this->cluster); - } - - public function clearCluster() - { - unset($this->cluster); - } - - /** - * Required. The changes to the cluster. - * - * Generated from protobuf field .google.cloud.dataproc.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataproc\V1\Cluster $var - * @return $this - */ - public function setCluster($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\Cluster::class); - $this->cluster = $var; - - return $this; - } - - /** - * Optional. Timeout for graceful YARN decommissioning. Graceful - * decommissioning allows removing nodes from the cluster without - * interrupting jobs in progress. Timeout specifies how long to wait for jobs - * in progress to finish before forcefully removing nodes (and potentially - * interrupting jobs). Default timeout is 0 (for forceful decommission), and - * the maximum allowed timeout is 1 day. (see JSON representation of - * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). - * Only supported on Dataproc image versions 1.2 and higher. - * - * Generated from protobuf field .google.protobuf.Duration graceful_decommission_timeout = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Duration|null - */ - public function getGracefulDecommissionTimeout() - { - return $this->graceful_decommission_timeout; - } - - public function hasGracefulDecommissionTimeout() - { - return isset($this->graceful_decommission_timeout); - } - - public function clearGracefulDecommissionTimeout() - { - unset($this->graceful_decommission_timeout); - } - - /** - * Optional. Timeout for graceful YARN decommissioning. Graceful - * decommissioning allows removing nodes from the cluster without - * interrupting jobs in progress. Timeout specifies how long to wait for jobs - * in progress to finish before forcefully removing nodes (and potentially - * interrupting jobs). Default timeout is 0 (for forceful decommission), and - * the maximum allowed timeout is 1 day. (see JSON representation of - * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). - * Only supported on Dataproc image versions 1.2 and higher. - * - * Generated from protobuf field .google.protobuf.Duration graceful_decommission_timeout = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setGracefulDecommissionTimeout($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->graceful_decommission_timeout = $var; - - return $this; - } - - /** - * Required. Specifies the path, relative to `Cluster`, of - * the field to update. For example, to change the number of workers - * in a cluster to 5, the `update_mask` parameter would be - * specified as `config.worker_config.num_instances`, - * and the `PATCH` request body would specify the new value, as follows: - * { - * "config":{ - * "workerConfig":{ - * "numInstances":"5" - * } - * } - * } - * Similarly, to change the number of preemptible workers in a cluster to 5, - * the `update_mask` parameter would be - * `config.secondary_worker_config.num_instances`, and the `PATCH` request - * body would be set as follows: - * { - * "config":{ - * "secondaryWorkerConfig":{ - * "numInstances":"5" - * } - * } - * } - * Note: Currently, only the following fields can be updated: - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - *
MaskPurpose
labelsUpdate labels
config.worker_config.num_instancesResize primary worker group
config.secondary_worker_config.num_instancesResize secondary worker group
config.autoscaling_config.policy_uriUse, stop using, or - * change autoscaling policies
- * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.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. Specifies the path, relative to `Cluster`, of - * the field to update. For example, to change the number of workers - * in a cluster to 5, the `update_mask` parameter would be - * specified as `config.worker_config.num_instances`, - * and the `PATCH` request body would specify the new value, as follows: - * { - * "config":{ - * "workerConfig":{ - * "numInstances":"5" - * } - * } - * } - * Similarly, to change the number of preemptible workers in a cluster to 5, - * the `update_mask` parameter would be - * `config.secondary_worker_config.num_instances`, and the `PATCH` request - * body would be set as follows: - * { - * "config":{ - * "secondaryWorkerConfig":{ - * "numInstances":"5" - * } - * } - * } - * Note: Currently, only the following fields can be updated: - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - *
MaskPurpose
labelsUpdate labels
config.worker_config.num_instancesResize primary worker group
config.secondary_worker_config.num_instancesResize secondary worker group
config.autoscaling_config.policy_uriUse, stop using, or - * change autoscaling policies
- * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Optional. A unique ID used to identify the request. If the server - * receives two - * [UpdateClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.UpdateClusterRequest)s - * with the same id, then the second request will be ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created - * and stored in the backend is returned. - * It is recommended to always set this value to a - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). The maximum length is 40 characters. - * - * Generated from protobuf field string request_id = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A unique ID used to identify the request. If the server - * receives two - * [UpdateClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.UpdateClusterRequest)s - * with the same id, then the second request will be ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created - * and stored in the backend is returned. - * It is recommended to always set this value to a - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). The maximum length is 40 characters. - * - * Generated from protobuf field string request_id = 7 [(.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/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/UpdateJobRequest.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/UpdateJobRequest.php deleted file mode 100644 index 5296661fcd6..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/UpdateJobRequest.php +++ /dev/null @@ -1,247 +0,0 @@ -google.cloud.dataproc.v1.UpdateJobRequest - */ -class UpdateJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The ID of the Google Cloud Platform project that the job - * belongs to. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $project_id = ''; - /** - * Required. The Dataproc region in which to handle the request. - * - * Generated from protobuf field string region = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $region = ''; - /** - * Required. The job ID. - * - * Generated from protobuf field string job_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $job_id = ''; - /** - * Required. The changes to the job. - * - * Generated from protobuf field .google.cloud.dataproc.v1.Job job = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $job = null; - /** - * Required. Specifies the path, relative to Job, of - * the field to update. For example, to update the labels of a Job the - * update_mask parameter would be specified as - * labels, and the `PATCH` request body would specify the new - * value. Note: Currently, labels is the only - * field that can be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $project_id - * Required. The ID of the Google Cloud Platform project that the job - * belongs to. - * @type string $region - * Required. The Dataproc region in which to handle the request. - * @type string $job_id - * Required. The job ID. - * @type \Google\Cloud\Dataproc\V1\Job $job - * Required. The changes to the job. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Specifies the path, relative to Job, of - * the field to update. For example, to update the labels of a Job the - * update_mask parameter would be specified as - * labels, and the `PATCH` request body would specify the new - * value. Note: Currently, labels is the only - * field that can be updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Jobs::initOnce(); - parent::__construct($data); - } - - /** - * Required. The ID of the Google Cloud Platform project that the job - * belongs to. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * Required. The ID of the Google Cloud Platform project that the job - * belongs to. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - - /** - * Required. The Dataproc region in which to handle the request. - * - * Generated from protobuf field string region = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getRegion() - { - return $this->region; - } - - /** - * Required. The Dataproc region in which to handle the request. - * - * Generated from protobuf field string region = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setRegion($var) - { - GPBUtil::checkString($var, True); - $this->region = $var; - - return $this; - } - - /** - * Required. The job ID. - * - * Generated from protobuf field string job_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getJobId() - { - return $this->job_id; - } - - /** - * Required. The job ID. - * - * Generated from protobuf field string job_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setJobId($var) - { - GPBUtil::checkString($var, True); - $this->job_id = $var; - - return $this; - } - - /** - * Required. The changes to the job. - * - * Generated from protobuf field .google.cloud.dataproc.v1.Job job = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataproc\V1\Job|null - */ - public function getJob() - { - return $this->job; - } - - public function hasJob() - { - return isset($this->job); - } - - public function clearJob() - { - unset($this->job); - } - - /** - * Required. The changes to the job. - * - * Generated from protobuf field .google.cloud.dataproc.v1.Job job = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataproc\V1\Job $var - * @return $this - */ - public function setJob($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\Job::class); - $this->job = $var; - - return $this; - } - - /** - * Required. Specifies the path, relative to Job, of - * the field to update. For example, to update the labels of a Job the - * update_mask parameter would be specified as - * labels, and the `PATCH` request body would specify the new - * value. Note: Currently, labels is the only - * field that can be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 5 [(.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. Specifies the path, relative to Job, of - * the field to update. For example, to update the labels of a Job the - * update_mask parameter would be specified as - * labels, and the `PATCH` request body would specify the new - * value. Note: Currently, labels is the only - * field that can be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 5 [(.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/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/UpdateWorkflowTemplateRequest.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/UpdateWorkflowTemplateRequest.php deleted file mode 100644 index 3f24d19d355..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/UpdateWorkflowTemplateRequest.php +++ /dev/null @@ -1,96 +0,0 @@ -google.cloud.dataproc.v1.UpdateWorkflowTemplateRequest - */ -class UpdateWorkflowTemplateRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The updated workflow template. - * The `template.version` field must match the current version. - * - * Generated from protobuf field .google.cloud.dataproc.v1.WorkflowTemplate template = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $template = null; - - /** - * @param \Google\Cloud\Dataproc\V1\WorkflowTemplate $template Required. The updated workflow template. - * - * The `template.version` field must match the current version. - * - * @return \Google\Cloud\Dataproc\V1\UpdateWorkflowTemplateRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Dataproc\V1\WorkflowTemplate $template): self - { - return (new self()) - ->setTemplate($template); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dataproc\V1\WorkflowTemplate $template - * Required. The updated workflow template. - * The `template.version` field must match the current version. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\WorkflowTemplates::initOnce(); - parent::__construct($data); - } - - /** - * Required. The updated workflow template. - * The `template.version` field must match the current version. - * - * Generated from protobuf field .google.cloud.dataproc.v1.WorkflowTemplate template = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataproc\V1\WorkflowTemplate|null - */ - public function getTemplate() - { - return $this->template; - } - - public function hasTemplate() - { - return isset($this->template); - } - - public function clearTemplate() - { - unset($this->template); - } - - /** - * Required. The updated workflow template. - * The `template.version` field must match the current version. - * - * Generated from protobuf field .google.cloud.dataproc.v1.WorkflowTemplate template = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataproc\V1\WorkflowTemplate $var - * @return $this - */ - public function setTemplate($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\WorkflowTemplate::class); - $this->template = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/UsageMetrics.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/UsageMetrics.php deleted file mode 100644 index b96477a006b..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/UsageMetrics.php +++ /dev/null @@ -1,117 +0,0 @@ -google.cloud.dataproc.v1.UsageMetrics - */ -class UsageMetrics extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. DCU (Dataproc Compute Units) usage in (`milliDCU` x `seconds`) - * (see [Dataproc Serverless pricing] - * (https://cloud.google.com/dataproc-serverless/pricing)). - * - * Generated from protobuf field int64 milli_dcu_seconds = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $milli_dcu_seconds = 0; - /** - * Optional. Shuffle storage usage in (`GB` x `seconds`) (see - * [Dataproc Serverless pricing] - * (https://cloud.google.com/dataproc-serverless/pricing)). - * - * Generated from protobuf field int64 shuffle_storage_gb_seconds = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $shuffle_storage_gb_seconds = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $milli_dcu_seconds - * Optional. DCU (Dataproc Compute Units) usage in (`milliDCU` x `seconds`) - * (see [Dataproc Serverless pricing] - * (https://cloud.google.com/dataproc-serverless/pricing)). - * @type int|string $shuffle_storage_gb_seconds - * Optional. Shuffle storage usage in (`GB` x `seconds`) (see - * [Dataproc Serverless pricing] - * (https://cloud.google.com/dataproc-serverless/pricing)). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Shared::initOnce(); - parent::__construct($data); - } - - /** - * Optional. DCU (Dataproc Compute Units) usage in (`milliDCU` x `seconds`) - * (see [Dataproc Serverless pricing] - * (https://cloud.google.com/dataproc-serverless/pricing)). - * - * Generated from protobuf field int64 milli_dcu_seconds = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string - */ - public function getMilliDcuSeconds() - { - return $this->milli_dcu_seconds; - } - - /** - * Optional. DCU (Dataproc Compute Units) usage in (`milliDCU` x `seconds`) - * (see [Dataproc Serverless pricing] - * (https://cloud.google.com/dataproc-serverless/pricing)). - * - * Generated from protobuf field int64 milli_dcu_seconds = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string $var - * @return $this - */ - public function setMilliDcuSeconds($var) - { - GPBUtil::checkInt64($var); - $this->milli_dcu_seconds = $var; - - return $this; - } - - /** - * Optional. Shuffle storage usage in (`GB` x `seconds`) (see - * [Dataproc Serverless pricing] - * (https://cloud.google.com/dataproc-serverless/pricing)). - * - * Generated from protobuf field int64 shuffle_storage_gb_seconds = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string - */ - public function getShuffleStorageGbSeconds() - { - return $this->shuffle_storage_gb_seconds; - } - - /** - * Optional. Shuffle storage usage in (`GB` x `seconds`) (see - * [Dataproc Serverless pricing] - * (https://cloud.google.com/dataproc-serverless/pricing)). - * - * Generated from protobuf field int64 shuffle_storage_gb_seconds = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string $var - * @return $this - */ - public function setShuffleStorageGbSeconds($var) - { - GPBUtil::checkInt64($var); - $this->shuffle_storage_gb_seconds = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/UsageSnapshot.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/UsageSnapshot.php deleted file mode 100644 index 8cdfcaa92c4..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/UsageSnapshot.php +++ /dev/null @@ -1,158 +0,0 @@ -google.cloud.dataproc.v1.UsageSnapshot - */ -class UsageSnapshot extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Milli (one-thousandth) Dataproc Compute Units (DCUs) (see - * [Dataproc Serverless pricing] - * (https://cloud.google.com/dataproc-serverless/pricing)). - * - * Generated from protobuf field int64 milli_dcu = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $milli_dcu = 0; - /** - * Optional. Shuffle Storage in gigabytes (GB). (see [Dataproc Serverless - * pricing] (https://cloud.google.com/dataproc-serverless/pricing)) - * - * Generated from protobuf field int64 shuffle_storage_gb = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $shuffle_storage_gb = 0; - /** - * Optional. The timestamp of the usage snapshot. - * - * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $snapshot_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $milli_dcu - * Optional. Milli (one-thousandth) Dataproc Compute Units (DCUs) (see - * [Dataproc Serverless pricing] - * (https://cloud.google.com/dataproc-serverless/pricing)). - * @type int|string $shuffle_storage_gb - * Optional. Shuffle Storage in gigabytes (GB). (see [Dataproc Serverless - * pricing] (https://cloud.google.com/dataproc-serverless/pricing)) - * @type \Google\Protobuf\Timestamp $snapshot_time - * Optional. The timestamp of the usage snapshot. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Shared::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Milli (one-thousandth) Dataproc Compute Units (DCUs) (see - * [Dataproc Serverless pricing] - * (https://cloud.google.com/dataproc-serverless/pricing)). - * - * Generated from protobuf field int64 milli_dcu = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string - */ - public function getMilliDcu() - { - return $this->milli_dcu; - } - - /** - * Optional. Milli (one-thousandth) Dataproc Compute Units (DCUs) (see - * [Dataproc Serverless pricing] - * (https://cloud.google.com/dataproc-serverless/pricing)). - * - * Generated from protobuf field int64 milli_dcu = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string $var - * @return $this - */ - public function setMilliDcu($var) - { - GPBUtil::checkInt64($var); - $this->milli_dcu = $var; - - return $this; - } - - /** - * Optional. Shuffle Storage in gigabytes (GB). (see [Dataproc Serverless - * pricing] (https://cloud.google.com/dataproc-serverless/pricing)) - * - * Generated from protobuf field int64 shuffle_storage_gb = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string - */ - public function getShuffleStorageGb() - { - return $this->shuffle_storage_gb; - } - - /** - * Optional. Shuffle Storage in gigabytes (GB). (see [Dataproc Serverless - * pricing] (https://cloud.google.com/dataproc-serverless/pricing)) - * - * Generated from protobuf field int64 shuffle_storage_gb = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string $var - * @return $this - */ - public function setShuffleStorageGb($var) - { - GPBUtil::checkInt64($var); - $this->shuffle_storage_gb = $var; - - return $this; - } - - /** - * Optional. The timestamp of the usage snapshot. - * - * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getSnapshotTime() - { - return $this->snapshot_time; - } - - public function hasSnapshotTime() - { - return isset($this->snapshot_time); - } - - public function clearSnapshotTime() - { - unset($this->snapshot_time); - } - - /** - * Optional. The timestamp of the usage snapshot. - * - * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setSnapshotTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->snapshot_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ValueValidation.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ValueValidation.php deleted file mode 100644 index e351b56f72e..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ValueValidation.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.dataproc.v1.ValueValidation - */ -class ValueValidation extends \Google\Protobuf\Internal\Message -{ - /** - * Required. List of allowed values for the parameter. - * - * Generated from protobuf field repeated string values = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private $values; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $values - * Required. List of allowed values for the parameter. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\WorkflowTemplates::initOnce(); - parent::__construct($data); - } - - /** - * Required. List of allowed values for the parameter. - * - * Generated from protobuf field repeated string values = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getValues() - { - return $this->values; - } - - /** - * Required. List of allowed values for the parameter. - * - * Generated from protobuf field repeated string values = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setValues($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->values = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/VirtualClusterConfig.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/VirtualClusterConfig.php deleted file mode 100644 index 90c82f79099..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/VirtualClusterConfig.php +++ /dev/null @@ -1,198 +0,0 @@ -google.cloud.dataproc.v1.VirtualClusterConfig - */ -class VirtualClusterConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. A Cloud Storage bucket used to stage job - * dependencies, config files, and job driver console output. - * If you do not specify a staging bucket, Cloud - * Dataproc will determine a Cloud Storage location (US, - * ASIA, or EU) for your cluster's staging bucket according to the - * Compute Engine zone where your cluster is deployed, and then create - * and manage this project-level, per-location bucket (see - * [Dataproc staging and temp - * buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)). - * **This field requires a Cloud Storage bucket name, not a `gs://...` URI to - * a Cloud Storage bucket.** - * - * Generated from protobuf field string staging_bucket = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $staging_bucket = ''; - /** - * Optional. Configuration of auxiliary services used by this cluster. - * - * Generated from protobuf field .google.cloud.dataproc.v1.AuxiliaryServicesConfig auxiliary_services_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $auxiliary_services_config = null; - protected $infrastructure_config; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $staging_bucket - * Optional. A Cloud Storage bucket used to stage job - * dependencies, config files, and job driver console output. - * If you do not specify a staging bucket, Cloud - * Dataproc will determine a Cloud Storage location (US, - * ASIA, or EU) for your cluster's staging bucket according to the - * Compute Engine zone where your cluster is deployed, and then create - * and manage this project-level, per-location bucket (see - * [Dataproc staging and temp - * buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)). - * **This field requires a Cloud Storage bucket name, not a `gs://...` URI to - * a Cloud Storage bucket.** - * @type \Google\Cloud\Dataproc\V1\KubernetesClusterConfig $kubernetes_cluster_config - * Required. The configuration for running the Dataproc cluster on - * Kubernetes. - * @type \Google\Cloud\Dataproc\V1\AuxiliaryServicesConfig $auxiliary_services_config - * Optional. Configuration of auxiliary services used by this cluster. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Clusters::initOnce(); - parent::__construct($data); - } - - /** - * Optional. A Cloud Storage bucket used to stage job - * dependencies, config files, and job driver console output. - * If you do not specify a staging bucket, Cloud - * Dataproc will determine a Cloud Storage location (US, - * ASIA, or EU) for your cluster's staging bucket according to the - * Compute Engine zone where your cluster is deployed, and then create - * and manage this project-level, per-location bucket (see - * [Dataproc staging and temp - * buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)). - * **This field requires a Cloud Storage bucket name, not a `gs://...` URI to - * a Cloud Storage bucket.** - * - * Generated from protobuf field string staging_bucket = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getStagingBucket() - { - return $this->staging_bucket; - } - - /** - * Optional. A Cloud Storage bucket used to stage job - * dependencies, config files, and job driver console output. - * If you do not specify a staging bucket, Cloud - * Dataproc will determine a Cloud Storage location (US, - * ASIA, or EU) for your cluster's staging bucket according to the - * Compute Engine zone where your cluster is deployed, and then create - * and manage this project-level, per-location bucket (see - * [Dataproc staging and temp - * buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)). - * **This field requires a Cloud Storage bucket name, not a `gs://...` URI to - * a Cloud Storage bucket.** - * - * Generated from protobuf field string staging_bucket = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setStagingBucket($var) - { - GPBUtil::checkString($var, True); - $this->staging_bucket = $var; - - return $this; - } - - /** - * Required. The configuration for running the Dataproc cluster on - * Kubernetes. - * - * Generated from protobuf field .google.cloud.dataproc.v1.KubernetesClusterConfig kubernetes_cluster_config = 6 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataproc\V1\KubernetesClusterConfig|null - */ - public function getKubernetesClusterConfig() - { - return $this->readOneof(6); - } - - public function hasKubernetesClusterConfig() - { - return $this->hasOneof(6); - } - - /** - * Required. The configuration for running the Dataproc cluster on - * Kubernetes. - * - * Generated from protobuf field .google.cloud.dataproc.v1.KubernetesClusterConfig kubernetes_cluster_config = 6 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataproc\V1\KubernetesClusterConfig $var - * @return $this - */ - public function setKubernetesClusterConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\KubernetesClusterConfig::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Optional. Configuration of auxiliary services used by this cluster. - * - * Generated from protobuf field .google.cloud.dataproc.v1.AuxiliaryServicesConfig auxiliary_services_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\AuxiliaryServicesConfig|null - */ - public function getAuxiliaryServicesConfig() - { - return $this->auxiliary_services_config; - } - - public function hasAuxiliaryServicesConfig() - { - return isset($this->auxiliary_services_config); - } - - public function clearAuxiliaryServicesConfig() - { - unset($this->auxiliary_services_config); - } - - /** - * Optional. Configuration of auxiliary services used by this cluster. - * - * Generated from protobuf field .google.cloud.dataproc.v1.AuxiliaryServicesConfig auxiliary_services_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\AuxiliaryServicesConfig $var - * @return $this - */ - public function setAuxiliaryServicesConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\AuxiliaryServicesConfig::class); - $this->auxiliary_services_config = $var; - - return $this; - } - - /** - * @return string - */ - public function getInfrastructureConfig() - { - return $this->whichOneof("infrastructure_config"); - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/WorkflowGraph.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/WorkflowGraph.php deleted file mode 100644 index f8a4362873d..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/WorkflowGraph.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.dataproc.v1.WorkflowGraph - */ -class WorkflowGraph extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The workflow nodes. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.WorkflowNode nodes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $nodes; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dataproc\V1\WorkflowNode>|\Google\Protobuf\Internal\RepeatedField $nodes - * Output only. The workflow nodes. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\WorkflowTemplates::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The workflow nodes. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.WorkflowNode nodes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNodes() - { - return $this->nodes; - } - - /** - * Output only. The workflow nodes. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.WorkflowNode nodes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\Dataproc\V1\WorkflowNode>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNodes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataproc\V1\WorkflowNode::class); - $this->nodes = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/WorkflowMetadata.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/WorkflowMetadata.php deleted file mode 100644 index cf6f521f124..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/WorkflowMetadata.php +++ /dev/null @@ -1,645 +0,0 @@ -google.cloud.dataproc.v1.WorkflowMetadata - */ -class WorkflowMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name of the workflow template as described - * in https://cloud.google.com/apis/design/resource_names. - * * For `projects.regions.workflowTemplates`, the resource name of the - * template has the following format: - * `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}` - * * For `projects.locations.workflowTemplates`, the resource name of the - * template has the following format: - * `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}` - * - * Generated from protobuf field string template = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $template = ''; - /** - * Output only. The version of template at the time of - * workflow instantiation. - * - * Generated from protobuf field int32 version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $version = 0; - /** - * Output only. The create cluster operation metadata. - * - * Generated from protobuf field .google.cloud.dataproc.v1.ClusterOperation create_cluster = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_cluster = null; - /** - * Output only. The workflow graph. - * - * Generated from protobuf field .google.cloud.dataproc.v1.WorkflowGraph graph = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $graph = null; - /** - * Output only. The delete cluster operation metadata. - * - * Generated from protobuf field .google.cloud.dataproc.v1.ClusterOperation delete_cluster = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $delete_cluster = null; - /** - * Output only. The workflow state. - * - * Generated from protobuf field .google.cloud.dataproc.v1.WorkflowMetadata.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. The name of the target cluster. - * - * Generated from protobuf field string cluster_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $cluster_name = ''; - /** - * Map from parameter names to values that were used for those parameters. - * - * Generated from protobuf field map parameters = 8; - */ - private $parameters; - /** - * Output only. Workflow start time. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $start_time = null; - /** - * Output only. Workflow end time. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $end_time = null; - /** - * Output only. The UUID of target cluster. - * - * Generated from protobuf field string cluster_uuid = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $cluster_uuid = ''; - /** - * Output only. The timeout duration for the DAG of jobs, expressed in seconds - * (see [JSON representation of - * duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). - * - * Generated from protobuf field .google.protobuf.Duration dag_timeout = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $dag_timeout = null; - /** - * Output only. DAG start time, only set for workflows with - * [dag_timeout][google.cloud.dataproc.v1.WorkflowMetadata.dag_timeout] when - * DAG begins. - * - * Generated from protobuf field .google.protobuf.Timestamp dag_start_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $dag_start_time = null; - /** - * Output only. DAG end time, only set for workflows with - * [dag_timeout][google.cloud.dataproc.v1.WorkflowMetadata.dag_timeout] when - * DAG ends. - * - * Generated from protobuf field .google.protobuf.Timestamp dag_end_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $dag_end_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $template - * Output only. The resource name of the workflow template as described - * in https://cloud.google.com/apis/design/resource_names. - * * For `projects.regions.workflowTemplates`, the resource name of the - * template has the following format: - * `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}` - * * For `projects.locations.workflowTemplates`, the resource name of the - * template has the following format: - * `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}` - * @type int $version - * Output only. The version of template at the time of - * workflow instantiation. - * @type \Google\Cloud\Dataproc\V1\ClusterOperation $create_cluster - * Output only. The create cluster operation metadata. - * @type \Google\Cloud\Dataproc\V1\WorkflowGraph $graph - * Output only. The workflow graph. - * @type \Google\Cloud\Dataproc\V1\ClusterOperation $delete_cluster - * Output only. The delete cluster operation metadata. - * @type int $state - * Output only. The workflow state. - * @type string $cluster_name - * Output only. The name of the target cluster. - * @type array|\Google\Protobuf\Internal\MapField $parameters - * Map from parameter names to values that were used for those parameters. - * @type \Google\Protobuf\Timestamp $start_time - * Output only. Workflow start time. - * @type \Google\Protobuf\Timestamp $end_time - * Output only. Workflow end time. - * @type string $cluster_uuid - * Output only. The UUID of target cluster. - * @type \Google\Protobuf\Duration $dag_timeout - * Output only. The timeout duration for the DAG of jobs, expressed in seconds - * (see [JSON representation of - * duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). - * @type \Google\Protobuf\Timestamp $dag_start_time - * Output only. DAG start time, only set for workflows with - * [dag_timeout][google.cloud.dataproc.v1.WorkflowMetadata.dag_timeout] when - * DAG begins. - * @type \Google\Protobuf\Timestamp $dag_end_time - * Output only. DAG end time, only set for workflows with - * [dag_timeout][google.cloud.dataproc.v1.WorkflowMetadata.dag_timeout] when - * DAG ends. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\WorkflowTemplates::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name of the workflow template as described - * in https://cloud.google.com/apis/design/resource_names. - * * For `projects.regions.workflowTemplates`, the resource name of the - * template has the following format: - * `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}` - * * For `projects.locations.workflowTemplates`, the resource name of the - * template has the following format: - * `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}` - * - * Generated from protobuf field string template = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getTemplate() - { - return $this->template; - } - - /** - * Output only. The resource name of the workflow template as described - * in https://cloud.google.com/apis/design/resource_names. - * * For `projects.regions.workflowTemplates`, the resource name of the - * template has the following format: - * `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}` - * * For `projects.locations.workflowTemplates`, the resource name of the - * template has the following format: - * `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}` - * - * Generated from protobuf field string template = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setTemplate($var) - { - GPBUtil::checkString($var, True); - $this->template = $var; - - return $this; - } - - /** - * Output only. The version of template at the time of - * workflow instantiation. - * - * Generated from protobuf field int32 version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getVersion() - { - return $this->version; - } - - /** - * Output only. The version of template at the time of - * workflow instantiation. - * - * Generated from protobuf field int32 version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkInt32($var); - $this->version = $var; - - return $this; - } - - /** - * Output only. The create cluster operation metadata. - * - * Generated from protobuf field .google.cloud.dataproc.v1.ClusterOperation create_cluster = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataproc\V1\ClusterOperation|null - */ - public function getCreateCluster() - { - return $this->create_cluster; - } - - public function hasCreateCluster() - { - return isset($this->create_cluster); - } - - public function clearCreateCluster() - { - unset($this->create_cluster); - } - - /** - * Output only. The create cluster operation metadata. - * - * Generated from protobuf field .google.cloud.dataproc.v1.ClusterOperation create_cluster = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataproc\V1\ClusterOperation $var - * @return $this - */ - public function setCreateCluster($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\ClusterOperation::class); - $this->create_cluster = $var; - - return $this; - } - - /** - * Output only. The workflow graph. - * - * Generated from protobuf field .google.cloud.dataproc.v1.WorkflowGraph graph = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataproc\V1\WorkflowGraph|null - */ - public function getGraph() - { - return $this->graph; - } - - public function hasGraph() - { - return isset($this->graph); - } - - public function clearGraph() - { - unset($this->graph); - } - - /** - * Output only. The workflow graph. - * - * Generated from protobuf field .google.cloud.dataproc.v1.WorkflowGraph graph = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataproc\V1\WorkflowGraph $var - * @return $this - */ - public function setGraph($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\WorkflowGraph::class); - $this->graph = $var; - - return $this; - } - - /** - * Output only. The delete cluster operation metadata. - * - * Generated from protobuf field .google.cloud.dataproc.v1.ClusterOperation delete_cluster = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataproc\V1\ClusterOperation|null - */ - public function getDeleteCluster() - { - return $this->delete_cluster; - } - - public function hasDeleteCluster() - { - return isset($this->delete_cluster); - } - - public function clearDeleteCluster() - { - unset($this->delete_cluster); - } - - /** - * Output only. The delete cluster operation metadata. - * - * Generated from protobuf field .google.cloud.dataproc.v1.ClusterOperation delete_cluster = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataproc\V1\ClusterOperation $var - * @return $this - */ - public function setDeleteCluster($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\ClusterOperation::class); - $this->delete_cluster = $var; - - return $this; - } - - /** - * Output only. The workflow state. - * - * Generated from protobuf field .google.cloud.dataproc.v1.WorkflowMetadata.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The workflow state. - * - * Generated from protobuf field .google.cloud.dataproc.v1.WorkflowMetadata.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataproc\V1\WorkflowMetadata\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The name of the target cluster. - * - * Generated from protobuf field string cluster_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getClusterName() - { - return $this->cluster_name; - } - - /** - * Output only. The name of the target cluster. - * - * Generated from protobuf field string cluster_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setClusterName($var) - { - GPBUtil::checkString($var, True); - $this->cluster_name = $var; - - return $this; - } - - /** - * Map from parameter names to values that were used for those parameters. - * - * Generated from protobuf field map parameters = 8; - * @return \Google\Protobuf\Internal\MapField - */ - public function getParameters() - { - return $this->parameters; - } - - /** - * Map from parameter names to values that were used for those parameters. - * - * Generated from protobuf field map parameters = 8; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setParameters($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->parameters = $arr; - - return $this; - } - - /** - * Output only. Workflow start time. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * Output only. Workflow start time. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * Output only. Workflow end time. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 10 [(.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. Workflow end time. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Output only. The UUID of target cluster. - * - * Generated from protobuf field string cluster_uuid = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getClusterUuid() - { - return $this->cluster_uuid; - } - - /** - * Output only. The UUID of target cluster. - * - * Generated from protobuf field string cluster_uuid = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setClusterUuid($var) - { - GPBUtil::checkString($var, True); - $this->cluster_uuid = $var; - - return $this; - } - - /** - * Output only. The timeout duration for the DAG of jobs, expressed in seconds - * (see [JSON representation of - * duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). - * - * Generated from protobuf field .google.protobuf.Duration dag_timeout = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Duration|null - */ - public function getDagTimeout() - { - return $this->dag_timeout; - } - - public function hasDagTimeout() - { - return isset($this->dag_timeout); - } - - public function clearDagTimeout() - { - unset($this->dag_timeout); - } - - /** - * Output only. The timeout duration for the DAG of jobs, expressed in seconds - * (see [JSON representation of - * duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). - * - * Generated from protobuf field .google.protobuf.Duration dag_timeout = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setDagTimeout($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->dag_timeout = $var; - - return $this; - } - - /** - * Output only. DAG start time, only set for workflows with - * [dag_timeout][google.cloud.dataproc.v1.WorkflowMetadata.dag_timeout] when - * DAG begins. - * - * Generated from protobuf field .google.protobuf.Timestamp dag_start_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getDagStartTime() - { - return $this->dag_start_time; - } - - public function hasDagStartTime() - { - return isset($this->dag_start_time); - } - - public function clearDagStartTime() - { - unset($this->dag_start_time); - } - - /** - * Output only. DAG start time, only set for workflows with - * [dag_timeout][google.cloud.dataproc.v1.WorkflowMetadata.dag_timeout] when - * DAG begins. - * - * Generated from protobuf field .google.protobuf.Timestamp dag_start_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setDagStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->dag_start_time = $var; - - return $this; - } - - /** - * Output only. DAG end time, only set for workflows with - * [dag_timeout][google.cloud.dataproc.v1.WorkflowMetadata.dag_timeout] when - * DAG ends. - * - * Generated from protobuf field .google.protobuf.Timestamp dag_end_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getDagEndTime() - { - return $this->dag_end_time; - } - - public function hasDagEndTime() - { - return isset($this->dag_end_time); - } - - public function clearDagEndTime() - { - unset($this->dag_end_time); - } - - /** - * Output only. DAG end time, only set for workflows with - * [dag_timeout][google.cloud.dataproc.v1.WorkflowMetadata.dag_timeout] when - * DAG ends. - * - * Generated from protobuf field .google.protobuf.Timestamp dag_end_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setDagEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->dag_end_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/WorkflowMetadata/State.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/WorkflowMetadata/State.php deleted file mode 100644 index d85de568580..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/WorkflowMetadata/State.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.dataproc.v1.WorkflowMetadata.State - */ -class State -{ - /** - * Unused. - * - * Generated from protobuf enum UNKNOWN = 0; - */ - const UNKNOWN = 0; - /** - * The operation has been created. - * - * Generated from protobuf enum PENDING = 1; - */ - const PENDING = 1; - /** - * The operation is running. - * - * Generated from protobuf enum RUNNING = 2; - */ - const RUNNING = 2; - /** - * The operation is done; either cancelled or completed. - * - * Generated from protobuf enum DONE = 3; - */ - const DONE = 3; - - private static $valueToName = [ - self::UNKNOWN => 'UNKNOWN', - self::PENDING => 'PENDING', - self::RUNNING => 'RUNNING', - self::DONE => 'DONE', - ]; - - 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\Dataproc\V1\WorkflowMetadata_State::class); - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/WorkflowNode.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/WorkflowNode.php deleted file mode 100644 index f37caf64a7c..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/WorkflowNode.php +++ /dev/null @@ -1,203 +0,0 @@ -google.cloud.dataproc.v1.WorkflowNode - */ -class WorkflowNode extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The name of the node. - * - * Generated from protobuf field string step_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $step_id = ''; - /** - * Output only. Node's prerequisite nodes. - * - * Generated from protobuf field repeated string prerequisite_step_ids = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $prerequisite_step_ids; - /** - * Output only. The job id; populated after the node enters RUNNING state. - * - * Generated from protobuf field string job_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $job_id = ''; - /** - * Output only. The node state. - * - * Generated from protobuf field .google.cloud.dataproc.v1.WorkflowNode.NodeState state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. The error detail. - * - * Generated from protobuf field string error = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $error = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $step_id - * Output only. The name of the node. - * @type array|\Google\Protobuf\Internal\RepeatedField $prerequisite_step_ids - * Output only. Node's prerequisite nodes. - * @type string $job_id - * Output only. The job id; populated after the node enters RUNNING state. - * @type int $state - * Output only. The node state. - * @type string $error - * Output only. The error detail. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\WorkflowTemplates::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The name of the node. - * - * Generated from protobuf field string step_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStepId() - { - return $this->step_id; - } - - /** - * Output only. The name of the node. - * - * Generated from protobuf field string step_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setStepId($var) - { - GPBUtil::checkString($var, True); - $this->step_id = $var; - - return $this; - } - - /** - * Output only. Node's prerequisite nodes. - * - * Generated from protobuf field repeated string prerequisite_step_ids = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPrerequisiteStepIds() - { - return $this->prerequisite_step_ids; - } - - /** - * Output only. Node's prerequisite nodes. - * - * Generated from protobuf field repeated string prerequisite_step_ids = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPrerequisiteStepIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->prerequisite_step_ids = $arr; - - return $this; - } - - /** - * Output only. The job id; populated after the node enters RUNNING state. - * - * Generated from protobuf field string job_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getJobId() - { - return $this->job_id; - } - - /** - * Output only. The job id; populated after the node enters RUNNING state. - * - * Generated from protobuf field string job_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setJobId($var) - { - GPBUtil::checkString($var, True); - $this->job_id = $var; - - return $this; - } - - /** - * Output only. The node state. - * - * Generated from protobuf field .google.cloud.dataproc.v1.WorkflowNode.NodeState state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The node state. - * - * Generated from protobuf field .google.cloud.dataproc.v1.WorkflowNode.NodeState state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataproc\V1\WorkflowNode\NodeState::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The error detail. - * - * Generated from protobuf field string error = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getError() - { - return $this->error; - } - - /** - * Output only. The error detail. - * - * Generated from protobuf field string error = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setError($var) - { - GPBUtil::checkString($var, True); - $this->error = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/WorkflowNode/NodeState.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/WorkflowNode/NodeState.php deleted file mode 100644 index 8cab1c16ca7..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/WorkflowNode/NodeState.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.dataproc.v1.WorkflowNode.NodeState - */ -class NodeState -{ - /** - * State is unspecified. - * - * Generated from protobuf enum NODE_STATE_UNSPECIFIED = 0; - */ - const NODE_STATE_UNSPECIFIED = 0; - /** - * The node is awaiting prerequisite node to finish. - * - * Generated from protobuf enum BLOCKED = 1; - */ - const BLOCKED = 1; - /** - * The node is runnable but not running. - * - * Generated from protobuf enum RUNNABLE = 2; - */ - const RUNNABLE = 2; - /** - * The node is running. - * - * Generated from protobuf enum RUNNING = 3; - */ - const RUNNING = 3; - /** - * The node completed successfully. - * - * Generated from protobuf enum COMPLETED = 4; - */ - const COMPLETED = 4; - /** - * The node failed. A node can be marked FAILED because - * its ancestor or peer failed. - * - * Generated from protobuf enum FAILED = 5; - */ - const FAILED = 5; - - private static $valueToName = [ - self::NODE_STATE_UNSPECIFIED => 'NODE_STATE_UNSPECIFIED', - self::BLOCKED => 'BLOCKED', - self::RUNNABLE => 'RUNNABLE', - self::RUNNING => 'RUNNING', - self::COMPLETED => 'COMPLETED', - self::FAILED => 'FAILED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(NodeState::class, \Google\Cloud\Dataproc\V1\WorkflowNode_NodeState::class); - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/WorkflowTemplate.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/WorkflowTemplate.php deleted file mode 100644 index 3bd4e150f42..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/WorkflowTemplate.php +++ /dev/null @@ -1,538 +0,0 @@ -google.cloud.dataproc.v1.WorkflowTemplate - */ -class WorkflowTemplate extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field string id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $id = ''; - /** - * Output only. The resource name of the workflow template, as described - * in https://cloud.google.com/apis/design/resource_names. - * * For `projects.regions.workflowTemplates`, the resource name of the - * template has the following format: - * `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}` - * * For `projects.locations.workflowTemplates`, the resource name of the - * template has the following format: - * `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Optional. Used to perform a consistent read-modify-write. - * This field should be left blank for a `CreateWorkflowTemplate` request. It - * is required for an `UpdateWorkflowTemplate` request, and must match the - * current server version. A typical update template flow would fetch the - * current template with a `GetWorkflowTemplate` request, which will return - * the current template with the `version` field filled in with the - * current server version. The user updates other fields in the template, - * then returns it as part of the `UpdateWorkflowTemplate` request. - * - * Generated from protobuf field int32 version = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $version = 0; - /** - * Output only. The time template was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time template was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. The labels to associate with this template. These labels - * will be propagated to all jobs and clusters created by the workflow - * instance. - * Label **keys** must contain 1 to 63 characters, and must conform to - * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). - * Label **values** may be empty, but, if present, must contain 1 to 63 - * characters, and must conform to - * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). - * No more than 32 labels can be associated with a template. - * - * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Required. WorkflowTemplate scheduling information. - * - * Generated from protobuf field .google.cloud.dataproc.v1.WorkflowTemplatePlacement placement = 7 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $placement = null; - /** - * Required. The Directed Acyclic Graph of Jobs to submit. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.OrderedJob jobs = 8 [(.google.api.field_behavior) = REQUIRED]; - */ - private $jobs; - /** - * Optional. Template parameters whose values are substituted into the - * template. Values for parameters must be provided when the template is - * instantiated. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.TemplateParameter parameters = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $parameters; - /** - * Optional. Timeout duration for the DAG of jobs, expressed in seconds (see - * [JSON representation of - * duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). - * The timeout duration must be from 10 minutes ("600s") to 24 hours - * ("86400s"). The timer begins when the first job is submitted. If the - * workflow is running at the end of the timeout period, any remaining jobs - * are cancelled, the workflow is ended, and if the workflow was running on a - * [managed - * cluster](/dataproc/docs/concepts/workflows/using-workflows#configuring_or_selecting_a_cluster), - * the cluster is deleted. - * - * Generated from protobuf field .google.protobuf.Duration dag_timeout = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $dag_timeout = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $id - * @type string $name - * Output only. The resource name of the workflow template, as described - * in https://cloud.google.com/apis/design/resource_names. - * * For `projects.regions.workflowTemplates`, the resource name of the - * template has the following format: - * `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}` - * * For `projects.locations.workflowTemplates`, the resource name of the - * template has the following format: - * `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}` - * @type int $version - * Optional. Used to perform a consistent read-modify-write. - * This field should be left blank for a `CreateWorkflowTemplate` request. It - * is required for an `UpdateWorkflowTemplate` request, and must match the - * current server version. A typical update template flow would fetch the - * current template with a `GetWorkflowTemplate` request, which will return - * the current template with the `version` field filled in with the - * current server version. The user updates other fields in the template, - * then returns it as part of the `UpdateWorkflowTemplate` request. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time template was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time template was last updated. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. The labels to associate with this template. These labels - * will be propagated to all jobs and clusters created by the workflow - * instance. - * Label **keys** must contain 1 to 63 characters, and must conform to - * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). - * Label **values** may be empty, but, if present, must contain 1 to 63 - * characters, and must conform to - * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). - * No more than 32 labels can be associated with a template. - * @type \Google\Cloud\Dataproc\V1\WorkflowTemplatePlacement $placement - * Required. WorkflowTemplate scheduling information. - * @type array<\Google\Cloud\Dataproc\V1\OrderedJob>|\Google\Protobuf\Internal\RepeatedField $jobs - * Required. The Directed Acyclic Graph of Jobs to submit. - * @type array<\Google\Cloud\Dataproc\V1\TemplateParameter>|\Google\Protobuf\Internal\RepeatedField $parameters - * Optional. Template parameters whose values are substituted into the - * template. Values for parameters must be provided when the template is - * instantiated. - * @type \Google\Protobuf\Duration $dag_timeout - * Optional. Timeout duration for the DAG of jobs, expressed in seconds (see - * [JSON representation of - * duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). - * The timeout duration must be from 10 minutes ("600s") to 24 hours - * ("86400s"). The timer begins when the first job is submitted. If the - * workflow is running at the end of the timeout period, any remaining jobs - * are cancelled, the workflow is ended, and if the workflow was running on a - * [managed - * cluster](/dataproc/docs/concepts/workflows/using-workflows#configuring_or_selecting_a_cluster), - * the cluster is deleted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\WorkflowTemplates::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field string id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Generated from protobuf field string id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * Output only. The resource name of the workflow template, as described - * in https://cloud.google.com/apis/design/resource_names. - * * For `projects.regions.workflowTemplates`, the resource name of the - * template has the following format: - * `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}` - * * For `projects.locations.workflowTemplates`, the resource name of the - * template has the following format: - * `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The resource name of the workflow template, as described - * in https://cloud.google.com/apis/design/resource_names. - * * For `projects.regions.workflowTemplates`, the resource name of the - * template has the following format: - * `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}` - * * For `projects.locations.workflowTemplates`, the resource name of the - * template has the following format: - * `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. Used to perform a consistent read-modify-write. - * This field should be left blank for a `CreateWorkflowTemplate` request. It - * is required for an `UpdateWorkflowTemplate` request, and must match the - * current server version. A typical update template flow would fetch the - * current template with a `GetWorkflowTemplate` request, which will return - * the current template with the `version` field filled in with the - * current server version. The user updates other fields in the template, - * then returns it as part of the `UpdateWorkflowTemplate` request. - * - * Generated from protobuf field int32 version = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getVersion() - { - return $this->version; - } - - /** - * Optional. Used to perform a consistent read-modify-write. - * This field should be left blank for a `CreateWorkflowTemplate` request. It - * is required for an `UpdateWorkflowTemplate` request, and must match the - * current server version. A typical update template flow would fetch the - * current template with a `GetWorkflowTemplate` request, which will return - * the current template with the `version` field filled in with the - * current server version. The user updates other fields in the template, - * then returns it as part of the `UpdateWorkflowTemplate` request. - * - * Generated from protobuf field int32 version = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkInt32($var); - $this->version = $var; - - return $this; - } - - /** - * Output only. The time template was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time template was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time template was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The time template was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Optional. The labels to associate with this template. These labels - * will be propagated to all jobs and clusters created by the workflow - * instance. - * Label **keys** must contain 1 to 63 characters, and must conform to - * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). - * Label **values** may be empty, but, if present, must contain 1 to 63 - * characters, and must conform to - * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). - * No more than 32 labels can be associated with a template. - * - * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. The labels to associate with this template. These labels - * will be propagated to all jobs and clusters created by the workflow - * instance. - * Label **keys** must contain 1 to 63 characters, and must conform to - * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). - * Label **values** may be empty, but, if present, must contain 1 to 63 - * characters, and must conform to - * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). - * No more than 32 labels can be associated with a template. - * - * Generated from protobuf field map labels = 6 [(.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; - } - - /** - * Required. WorkflowTemplate scheduling information. - * - * Generated from protobuf field .google.cloud.dataproc.v1.WorkflowTemplatePlacement placement = 7 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataproc\V1\WorkflowTemplatePlacement|null - */ - public function getPlacement() - { - return $this->placement; - } - - public function hasPlacement() - { - return isset($this->placement); - } - - public function clearPlacement() - { - unset($this->placement); - } - - /** - * Required. WorkflowTemplate scheduling information. - * - * Generated from protobuf field .google.cloud.dataproc.v1.WorkflowTemplatePlacement placement = 7 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataproc\V1\WorkflowTemplatePlacement $var - * @return $this - */ - public function setPlacement($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\WorkflowTemplatePlacement::class); - $this->placement = $var; - - return $this; - } - - /** - * Required. The Directed Acyclic Graph of Jobs to submit. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.OrderedJob jobs = 8 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getJobs() - { - return $this->jobs; - } - - /** - * Required. The Directed Acyclic Graph of Jobs to submit. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.OrderedJob jobs = 8 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\Dataproc\V1\OrderedJob>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setJobs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataproc\V1\OrderedJob::class); - $this->jobs = $arr; - - return $this; - } - - /** - * Optional. Template parameters whose values are substituted into the - * template. Values for parameters must be provided when the template is - * instantiated. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.TemplateParameter parameters = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getParameters() - { - return $this->parameters; - } - - /** - * Optional. Template parameters whose values are substituted into the - * template. Values for parameters must be provided when the template is - * instantiated. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.TemplateParameter parameters = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Dataproc\V1\TemplateParameter>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setParameters($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataproc\V1\TemplateParameter::class); - $this->parameters = $arr; - - return $this; - } - - /** - * Optional. Timeout duration for the DAG of jobs, expressed in seconds (see - * [JSON representation of - * duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). - * The timeout duration must be from 10 minutes ("600s") to 24 hours - * ("86400s"). The timer begins when the first job is submitted. If the - * workflow is running at the end of the timeout period, any remaining jobs - * are cancelled, the workflow is ended, and if the workflow was running on a - * [managed - * cluster](/dataproc/docs/concepts/workflows/using-workflows#configuring_or_selecting_a_cluster), - * the cluster is deleted. - * - * Generated from protobuf field .google.protobuf.Duration dag_timeout = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Duration|null - */ - public function getDagTimeout() - { - return $this->dag_timeout; - } - - public function hasDagTimeout() - { - return isset($this->dag_timeout); - } - - public function clearDagTimeout() - { - unset($this->dag_timeout); - } - - /** - * Optional. Timeout duration for the DAG of jobs, expressed in seconds (see - * [JSON representation of - * duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). - * The timeout duration must be from 10 minutes ("600s") to 24 hours - * ("86400s"). The timer begins when the first job is submitted. If the - * workflow is running at the end of the timeout period, any remaining jobs - * are cancelled, the workflow is ended, and if the workflow was running on a - * [managed - * cluster](/dataproc/docs/concepts/workflows/using-workflows#configuring_or_selecting_a_cluster), - * the cluster is deleted. - * - * Generated from protobuf field .google.protobuf.Duration dag_timeout = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setDagTimeout($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->dag_timeout = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/WorkflowTemplatePlacement.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/WorkflowTemplatePlacement.php deleted file mode 100644 index d22db237142..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/WorkflowTemplatePlacement.php +++ /dev/null @@ -1,115 +0,0 @@ -google.cloud.dataproc.v1.WorkflowTemplatePlacement - */ -class WorkflowTemplatePlacement extends \Google\Protobuf\Internal\Message -{ - protected $placement; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dataproc\V1\ManagedCluster $managed_cluster - * A cluster that is managed by the workflow. - * @type \Google\Cloud\Dataproc\V1\ClusterSelector $cluster_selector - * Optional. A selector that chooses target cluster for jobs based - * on metadata. - * The selector is evaluated at the time each job is submitted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\WorkflowTemplates::initOnce(); - parent::__construct($data); - } - - /** - * A cluster that is managed by the workflow. - * - * Generated from protobuf field .google.cloud.dataproc.v1.ManagedCluster managed_cluster = 1; - * @return \Google\Cloud\Dataproc\V1\ManagedCluster|null - */ - public function getManagedCluster() - { - return $this->readOneof(1); - } - - public function hasManagedCluster() - { - return $this->hasOneof(1); - } - - /** - * A cluster that is managed by the workflow. - * - * Generated from protobuf field .google.cloud.dataproc.v1.ManagedCluster managed_cluster = 1; - * @param \Google\Cloud\Dataproc\V1\ManagedCluster $var - * @return $this - */ - public function setManagedCluster($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\ManagedCluster::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Optional. A selector that chooses target cluster for jobs based - * on metadata. - * The selector is evaluated at the time each job is submitted. - * - * Generated from protobuf field .google.cloud.dataproc.v1.ClusterSelector cluster_selector = 2; - * @return \Google\Cloud\Dataproc\V1\ClusterSelector|null - */ - public function getClusterSelector() - { - return $this->readOneof(2); - } - - public function hasClusterSelector() - { - return $this->hasOneof(2); - } - - /** - * Optional. A selector that chooses target cluster for jobs based - * on metadata. - * The selector is evaluated at the time each job is submitted. - * - * Generated from protobuf field .google.cloud.dataproc.v1.ClusterSelector cluster_selector = 2; - * @param \Google\Cloud\Dataproc\V1\ClusterSelector $var - * @return $this - */ - public function setClusterSelector($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\ClusterSelector::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getPlacement() - { - return $this->whichOneof("placement"); - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/YarnApplication.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/YarnApplication.php deleted file mode 100644 index e0d5a57ef62..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/YarnApplication.php +++ /dev/null @@ -1,184 +0,0 @@ -org.apache.hadoop.yarn.proto.YarnProtos.ApplicationReportProto. - * **Beta Feature**: This report is available for testing purposes only. It may - * be changed before final release. - * - * Generated from protobuf message google.cloud.dataproc.v1.YarnApplication - */ -class YarnApplication extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The application name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Required. The application state. - * - * Generated from protobuf field .google.cloud.dataproc.v1.YarnApplication.State state = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $state = 0; - /** - * Required. The numerical progress of the application, from 1 to 100. - * - * Generated from protobuf field float progress = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $progress = 0.0; - /** - * Optional. The HTTP URL of the ApplicationMaster, HistoryServer, or - * TimelineServer that provides application-specific information. The URL uses - * the internal hostname, and requires a proxy server for resolution and, - * possibly, access. - * - * Generated from protobuf field string tracking_url = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $tracking_url = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The application name. - * @type int $state - * Required. The application state. - * @type float $progress - * Required. The numerical progress of the application, from 1 to 100. - * @type string $tracking_url - * Optional. The HTTP URL of the ApplicationMaster, HistoryServer, or - * TimelineServer that provides application-specific information. The URL uses - * the internal hostname, and requires a proxy server for resolution and, - * possibly, access. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Jobs::initOnce(); - parent::__construct($data); - } - - /** - * Required. The application name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The application name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The application state. - * - * Generated from protobuf field .google.cloud.dataproc.v1.YarnApplication.State state = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Required. The application state. - * - * Generated from protobuf field .google.cloud.dataproc.v1.YarnApplication.State state = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataproc\V1\YarnApplication\State::class); - $this->state = $var; - - return $this; - } - - /** - * Required. The numerical progress of the application, from 1 to 100. - * - * Generated from protobuf field float progress = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return float - */ - public function getProgress() - { - return $this->progress; - } - - /** - * Required. The numerical progress of the application, from 1 to 100. - * - * Generated from protobuf field float progress = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param float $var - * @return $this - */ - public function setProgress($var) - { - GPBUtil::checkFloat($var); - $this->progress = $var; - - return $this; - } - - /** - * Optional. The HTTP URL of the ApplicationMaster, HistoryServer, or - * TimelineServer that provides application-specific information. The URL uses - * the internal hostname, and requires a proxy server for resolution and, - * possibly, access. - * - * Generated from protobuf field string tracking_url = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getTrackingUrl() - { - return $this->tracking_url; - } - - /** - * Optional. The HTTP URL of the ApplicationMaster, HistoryServer, or - * TimelineServer that provides application-specific information. The URL uses - * the internal hostname, and requires a proxy server for resolution and, - * possibly, access. - * - * Generated from protobuf field string tracking_url = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setTrackingUrl($var) - { - GPBUtil::checkString($var, True); - $this->tracking_url = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/YarnApplication/State.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/YarnApplication/State.php deleted file mode 100644 index 5ecf1fa19c5..00000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/YarnApplication/State.php +++ /dev/null @@ -1,111 +0,0 @@ -YarnProtos.YarnApplicationStateProto. - * - * Protobuf type google.cloud.dataproc.v1.YarnApplication.State - */ -class State -{ - /** - * Status is unspecified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Status is NEW. - * - * Generated from protobuf enum NEW = 1; - */ - const PBNEW = 1; - /** - * Status is NEW_SAVING. - * - * Generated from protobuf enum NEW_SAVING = 2; - */ - const NEW_SAVING = 2; - /** - * Status is SUBMITTED. - * - * Generated from protobuf enum SUBMITTED = 3; - */ - const SUBMITTED = 3; - /** - * Status is ACCEPTED. - * - * Generated from protobuf enum ACCEPTED = 4; - */ - const ACCEPTED = 4; - /** - * Status is RUNNING. - * - * Generated from protobuf enum RUNNING = 5; - */ - const RUNNING = 5; - /** - * Status is FINISHED. - * - * Generated from protobuf enum FINISHED = 6; - */ - const FINISHED = 6; - /** - * Status is FAILED. - * - * Generated from protobuf enum FAILED = 7; - */ - const FAILED = 7; - /** - * Status is KILLED. - * - * Generated from protobuf enum KILLED = 8; - */ - const KILLED = 8; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::PBNEW => 'NEW', - self::NEW_SAVING => 'NEW_SAVING', - self::SUBMITTED => 'SUBMITTED', - self::ACCEPTED => 'ACCEPTED', - self::RUNNING => 'RUNNING', - self::FINISHED => 'FINISHED', - self::FAILED => 'FAILED', - self::KILLED => 'KILLED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - $pbconst = __CLASS__. '::PB' . strtoupper($name); - if (!defined($pbconst)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($pbconst); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Dataproc\V1\YarnApplication_State::class); - diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/AutoscalingPolicyServiceClient/create_autoscaling_policy.php b/owl-bot-staging/Dataproc/v1/samples/V1/AutoscalingPolicyServiceClient/create_autoscaling_policy.php deleted file mode 100644 index db8bdcbce42..00000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/AutoscalingPolicyServiceClient/create_autoscaling_policy.php +++ /dev/null @@ -1,131 +0,0 @@ -setGracefulDecommissionTimeout($policyBasicAlgorithmYarnConfigGracefulDecommissionTimeout) - ->setScaleUpFactor($policyBasicAlgorithmYarnConfigScaleUpFactor) - ->setScaleDownFactor($policyBasicAlgorithmYarnConfigScaleDownFactor); - $policyBasicAlgorithm = (new BasicAutoscalingAlgorithm()) - ->setYarnConfig($policyBasicAlgorithmYarnConfig); - $policyWorkerConfig = (new InstanceGroupAutoscalingPolicyConfig()) - ->setMaxInstances($policyWorkerConfigMaxInstances); - $policy = (new AutoscalingPolicy()) - ->setBasicAlgorithm($policyBasicAlgorithm) - ->setWorkerConfig($policyWorkerConfig); - - // Call the API and handle any network failures. - try { - /** @var AutoscalingPolicy $response */ - $response = $autoscalingPolicyServiceClient->createAutoscalingPolicy($formattedParent, $policy); - 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 = AutoscalingPolicyServiceClient::regionName('[PROJECT]', '[REGION]'); - $policyBasicAlgorithmYarnConfigScaleUpFactor = 0.0; - $policyBasicAlgorithmYarnConfigScaleDownFactor = 0.0; - $policyWorkerConfigMaxInstances = 0; - - create_autoscaling_policy_sample( - $formattedParent, - $policyBasicAlgorithmYarnConfigScaleUpFactor, - $policyBasicAlgorithmYarnConfigScaleDownFactor, - $policyWorkerConfigMaxInstances - ); -} -// [END dataproc_v1_generated_AutoscalingPolicyService_CreateAutoscalingPolicy_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/AutoscalingPolicyServiceClient/delete_autoscaling_policy.php b/owl-bot-staging/Dataproc/v1/samples/V1/AutoscalingPolicyServiceClient/delete_autoscaling_policy.php deleted file mode 100644 index 9b5fe43c467..00000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/AutoscalingPolicyServiceClient/delete_autoscaling_policy.php +++ /dev/null @@ -1,78 +0,0 @@ -deleteAutoscalingPolicy($formattedName); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = AutoscalingPolicyServiceClient::autoscalingPolicyName( - '[PROJECT]', - '[LOCATION]', - '[AUTOSCALING_POLICY]' - ); - - delete_autoscaling_policy_sample($formattedName); -} -// [END dataproc_v1_generated_AutoscalingPolicyService_DeleteAutoscalingPolicy_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/AutoscalingPolicyServiceClient/get_autoscaling_policy.php b/owl-bot-staging/Dataproc/v1/samples/V1/AutoscalingPolicyServiceClient/get_autoscaling_policy.php deleted file mode 100644 index 27e1e1841ea..00000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/AutoscalingPolicyServiceClient/get_autoscaling_policy.php +++ /dev/null @@ -1,79 +0,0 @@ -getAutoscalingPolicy($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = AutoscalingPolicyServiceClient::autoscalingPolicyName( - '[PROJECT]', - '[LOCATION]', - '[AUTOSCALING_POLICY]' - ); - - get_autoscaling_policy_sample($formattedName); -} -// [END dataproc_v1_generated_AutoscalingPolicyService_GetAutoscalingPolicy_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/AutoscalingPolicyServiceClient/get_iam_policy.php b/owl-bot-staging/Dataproc/v1/samples/V1/AutoscalingPolicyServiceClient/get_iam_policy.php deleted file mode 100644 index 8547bf1f8c2..00000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/AutoscalingPolicyServiceClient/get_iam_policy.php +++ /dev/null @@ -1,67 +0,0 @@ -getIamPolicy($resource); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - get_iam_policy_sample($resource); -} -// [END dataproc_v1_generated_AutoscalingPolicyService_GetIamPolicy_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/AutoscalingPolicyServiceClient/list_autoscaling_policies.php b/owl-bot-staging/Dataproc/v1/samples/V1/AutoscalingPolicyServiceClient/list_autoscaling_policies.php deleted file mode 100644 index bda3591d4f7..00000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/AutoscalingPolicyServiceClient/list_autoscaling_policies.php +++ /dev/null @@ -1,80 +0,0 @@ -listAutoscalingPolicies($formattedParent); - - /** @var AutoscalingPolicy $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 = AutoscalingPolicyServiceClient::regionName('[PROJECT]', '[REGION]'); - - list_autoscaling_policies_sample($formattedParent); -} -// [END dataproc_v1_generated_AutoscalingPolicyService_ListAutoscalingPolicies_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/AutoscalingPolicyServiceClient/set_iam_policy.php b/owl-bot-staging/Dataproc/v1/samples/V1/AutoscalingPolicyServiceClient/set_iam_policy.php deleted file mode 100644 index c570a16dea0..00000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/AutoscalingPolicyServiceClient/set_iam_policy.php +++ /dev/null @@ -1,73 +0,0 @@ -setIamPolicy($resource, $policy); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - set_iam_policy_sample($resource); -} -// [END dataproc_v1_generated_AutoscalingPolicyService_SetIamPolicy_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/AutoscalingPolicyServiceClient/test_iam_permissions.php b/owl-bot-staging/Dataproc/v1/samples/V1/AutoscalingPolicyServiceClient/test_iam_permissions.php deleted file mode 100644 index 3e2de2d5514..00000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/AutoscalingPolicyServiceClient/test_iam_permissions.php +++ /dev/null @@ -1,80 +0,0 @@ -testIamPermissions($resource, $permissions); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - $permissionsElement = '[PERMISSIONS]'; - - test_iam_permissions_sample($resource, $permissionsElement); -} -// [END dataproc_v1_generated_AutoscalingPolicyService_TestIamPermissions_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/AutoscalingPolicyServiceClient/update_autoscaling_policy.php b/owl-bot-staging/Dataproc/v1/samples/V1/AutoscalingPolicyServiceClient/update_autoscaling_policy.php deleted file mode 100644 index 79e3653799d..00000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/AutoscalingPolicyServiceClient/update_autoscaling_policy.php +++ /dev/null @@ -1,120 +0,0 @@ -setGracefulDecommissionTimeout($policyBasicAlgorithmYarnConfigGracefulDecommissionTimeout) - ->setScaleUpFactor($policyBasicAlgorithmYarnConfigScaleUpFactor) - ->setScaleDownFactor($policyBasicAlgorithmYarnConfigScaleDownFactor); - $policyBasicAlgorithm = (new BasicAutoscalingAlgorithm()) - ->setYarnConfig($policyBasicAlgorithmYarnConfig); - $policyWorkerConfig = (new InstanceGroupAutoscalingPolicyConfig()) - ->setMaxInstances($policyWorkerConfigMaxInstances); - $policy = (new AutoscalingPolicy()) - ->setBasicAlgorithm($policyBasicAlgorithm) - ->setWorkerConfig($policyWorkerConfig); - - // Call the API and handle any network failures. - try { - /** @var AutoscalingPolicy $response */ - $response = $autoscalingPolicyServiceClient->updateAutoscalingPolicy($policy); - 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 -{ - $policyBasicAlgorithmYarnConfigScaleUpFactor = 0.0; - $policyBasicAlgorithmYarnConfigScaleDownFactor = 0.0; - $policyWorkerConfigMaxInstances = 0; - - update_autoscaling_policy_sample( - $policyBasicAlgorithmYarnConfigScaleUpFactor, - $policyBasicAlgorithmYarnConfigScaleDownFactor, - $policyWorkerConfigMaxInstances - ); -} -// [END dataproc_v1_generated_AutoscalingPolicyService_UpdateAutoscalingPolicy_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/BatchControllerClient/create_batch.php b/owl-bot-staging/Dataproc/v1/samples/V1/BatchControllerClient/create_batch.php deleted file mode 100644 index 6132577c0b3..00000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/BatchControllerClient/create_batch.php +++ /dev/null @@ -1,81 +0,0 @@ -createBatch($formattedParent, $batch); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Batch $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 = BatchControllerClient::locationName('[PROJECT]', '[LOCATION]'); - - create_batch_sample($formattedParent); -} -// [END dataproc_v1_generated_BatchController_CreateBatch_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/BatchControllerClient/delete_batch.php b/owl-bot-staging/Dataproc/v1/samples/V1/BatchControllerClient/delete_batch.php deleted file mode 100644 index 88197b05184..00000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/BatchControllerClient/delete_batch.php +++ /dev/null @@ -1,67 +0,0 @@ -deleteBatch($formattedName); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = BatchControllerClient::batchName('[PROJECT]', '[LOCATION]', '[BATCH]'); - - delete_batch_sample($formattedName); -} -// [END dataproc_v1_generated_BatchController_DeleteBatch_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/BatchControllerClient/get_batch.php b/owl-bot-staging/Dataproc/v1/samples/V1/BatchControllerClient/get_batch.php deleted file mode 100644 index cd9f9b66031..00000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/BatchControllerClient/get_batch.php +++ /dev/null @@ -1,68 +0,0 @@ -getBatch($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = BatchControllerClient::batchName('[PROJECT]', '[LOCATION]', '[BATCH]'); - - get_batch_sample($formattedName); -} -// [END dataproc_v1_generated_BatchController_GetBatch_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/BatchControllerClient/get_iam_policy.php b/owl-bot-staging/Dataproc/v1/samples/V1/BatchControllerClient/get_iam_policy.php deleted file mode 100644 index cf1ac3f4be1..00000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/BatchControllerClient/get_iam_policy.php +++ /dev/null @@ -1,67 +0,0 @@ -getIamPolicy($resource); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - get_iam_policy_sample($resource); -} -// [END dataproc_v1_generated_BatchController_GetIamPolicy_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/BatchControllerClient/list_batches.php b/owl-bot-staging/Dataproc/v1/samples/V1/BatchControllerClient/list_batches.php deleted file mode 100644 index e72db8b8e40..00000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/BatchControllerClient/list_batches.php +++ /dev/null @@ -1,71 +0,0 @@ -listBatches($formattedParent); - - /** @var Batch $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 = BatchControllerClient::locationName('[PROJECT]', '[LOCATION]'); - - list_batches_sample($formattedParent); -} -// [END dataproc_v1_generated_BatchController_ListBatches_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/BatchControllerClient/set_iam_policy.php b/owl-bot-staging/Dataproc/v1/samples/V1/BatchControllerClient/set_iam_policy.php deleted file mode 100644 index 92bd222d06c..00000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/BatchControllerClient/set_iam_policy.php +++ /dev/null @@ -1,73 +0,0 @@ -setIamPolicy($resource, $policy); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - set_iam_policy_sample($resource); -} -// [END dataproc_v1_generated_BatchController_SetIamPolicy_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/BatchControllerClient/test_iam_permissions.php b/owl-bot-staging/Dataproc/v1/samples/V1/BatchControllerClient/test_iam_permissions.php deleted file mode 100644 index 9954e61964b..00000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/BatchControllerClient/test_iam_permissions.php +++ /dev/null @@ -1,80 +0,0 @@ -testIamPermissions($resource, $permissions); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - $permissionsElement = '[PERMISSIONS]'; - - test_iam_permissions_sample($resource, $permissionsElement); -} -// [END dataproc_v1_generated_BatchController_TestIamPermissions_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/create_cluster.php b/owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/create_cluster.php deleted file mode 100644 index d4cc0b555a7..00000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/create_cluster.php +++ /dev/null @@ -1,98 +0,0 @@ -setProjectId($clusterProjectId) - ->setClusterName($clusterClusterName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $clusterControllerClient->createCluster($projectId, $region, $cluster); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Cluster $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $projectId = '[PROJECT_ID]'; - $region = '[REGION]'; - $clusterProjectId = '[PROJECT_ID]'; - $clusterClusterName = '[CLUSTER_NAME]'; - - create_cluster_sample($projectId, $region, $clusterProjectId, $clusterClusterName); -} -// [END dataproc_v1_generated_ClusterController_CreateCluster_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/delete_cluster.php b/owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/delete_cluster.php deleted file mode 100644 index 711d047aa93..00000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/delete_cluster.php +++ /dev/null @@ -1,81 +0,0 @@ -deleteCluster($projectId, $region, $clusterName); - $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 -{ - $projectId = '[PROJECT_ID]'; - $region = '[REGION]'; - $clusterName = '[CLUSTER_NAME]'; - - delete_cluster_sample($projectId, $region, $clusterName); -} -// [END dataproc_v1_generated_ClusterController_DeleteCluster_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/diagnose_cluster.php b/owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/diagnose_cluster.php deleted file mode 100644 index ee70dfa25a1..00000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/diagnose_cluster.php +++ /dev/null @@ -1,88 +0,0 @@ -diagnoseCluster($projectId, $region, $clusterName); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var DiagnoseClusterResults $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 -{ - $projectId = '[PROJECT_ID]'; - $region = '[REGION]'; - $clusterName = '[CLUSTER_NAME]'; - - diagnose_cluster_sample($projectId, $region, $clusterName); -} -// [END dataproc_v1_generated_ClusterController_DiagnoseCluster_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/get_cluster.php b/owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/get_cluster.php deleted file mode 100644 index 17fe8dea218..00000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/get_cluster.php +++ /dev/null @@ -1,70 +0,0 @@ -getCluster($projectId, $region, $clusterName); - 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 -{ - $projectId = '[PROJECT_ID]'; - $region = '[REGION]'; - $clusterName = '[CLUSTER_NAME]'; - - get_cluster_sample($projectId, $region, $clusterName); -} -// [END dataproc_v1_generated_ClusterController_GetCluster_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/get_iam_policy.php b/owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/get_iam_policy.php deleted file mode 100644 index 2a5c3a21595..00000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/get_iam_policy.php +++ /dev/null @@ -1,67 +0,0 @@ -getIamPolicy($resource); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - get_iam_policy_sample($resource); -} -// [END dataproc_v1_generated_ClusterController_GetIamPolicy_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/list_clusters.php b/owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/list_clusters.php deleted file mode 100644 index f7bfbcde80b..00000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/list_clusters.php +++ /dev/null @@ -1,73 +0,0 @@ -listClusters($projectId, $region); - - /** @var Cluster $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $projectId = '[PROJECT_ID]'; - $region = '[REGION]'; - - list_clusters_sample($projectId, $region); -} -// [END dataproc_v1_generated_ClusterController_ListClusters_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/set_iam_policy.php b/owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/set_iam_policy.php deleted file mode 100644 index d24f4ca0f2e..00000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/set_iam_policy.php +++ /dev/null @@ -1,73 +0,0 @@ -setIamPolicy($resource, $policy); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - set_iam_policy_sample($resource); -} -// [END dataproc_v1_generated_ClusterController_SetIamPolicy_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/start_cluster.php b/owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/start_cluster.php deleted file mode 100644 index b02f5c65e28..00000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/start_cluster.php +++ /dev/null @@ -1,82 +0,0 @@ -startCluster($projectId, $region, $clusterName); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Cluster $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $projectId = '[PROJECT_ID]'; - $region = '[REGION]'; - $clusterName = '[CLUSTER_NAME]'; - - start_cluster_sample($projectId, $region, $clusterName); -} -// [END dataproc_v1_generated_ClusterController_StartCluster_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/stop_cluster.php b/owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/stop_cluster.php deleted file mode 100644 index 454c2e77ffd..00000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/stop_cluster.php +++ /dev/null @@ -1,82 +0,0 @@ -stopCluster($projectId, $region, $clusterName); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Cluster $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $projectId = '[PROJECT_ID]'; - $region = '[REGION]'; - $clusterName = '[CLUSTER_NAME]'; - - stop_cluster_sample($projectId, $region, $clusterName); -} -// [END dataproc_v1_generated_ClusterController_StopCluster_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/test_iam_permissions.php b/owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/test_iam_permissions.php deleted file mode 100644 index b07a0d863ca..00000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/test_iam_permissions.php +++ /dev/null @@ -1,80 +0,0 @@ -testIamPermissions($resource, $permissions); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - $permissionsElement = '[PERMISSIONS]'; - - test_iam_permissions_sample($resource, $permissionsElement); -} -// [END dataproc_v1_generated_ClusterController_TestIamPermissions_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/update_cluster.php b/owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/update_cluster.php deleted file mode 100644 index c48ac8a932a..00000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/update_cluster.php +++ /dev/null @@ -1,112 +0,0 @@ -setProjectId($clusterProjectId) - ->setClusterName($clusterClusterName); - $updateMask = new FieldMask(); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $clusterControllerClient->updateCluster( - $projectId, - $region, - $clusterName, - $cluster, - $updateMask - ); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Cluster $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $projectId = '[PROJECT_ID]'; - $region = '[REGION]'; - $clusterName = '[CLUSTER_NAME]'; - $clusterProjectId = '[PROJECT_ID]'; - $clusterClusterName = '[CLUSTER_NAME]'; - - update_cluster_sample($projectId, $region, $clusterName, $clusterProjectId, $clusterClusterName); -} -// [END dataproc_v1_generated_ClusterController_UpdateCluster_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/cancel_job.php b/owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/cancel_job.php deleted file mode 100644 index 71fc53f14c7..00000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/cancel_job.php +++ /dev/null @@ -1,74 +0,0 @@ -cancelJob($projectId, $region, $jobId); - 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 -{ - $projectId = '[PROJECT_ID]'; - $region = '[REGION]'; - $jobId = '[JOB_ID]'; - - cancel_job_sample($projectId, $region, $jobId); -} -// [END dataproc_v1_generated_JobController_CancelJob_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/delete_job.php b/owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/delete_job.php deleted file mode 100644 index df618efe9bc..00000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/delete_job.php +++ /dev/null @@ -1,69 +0,0 @@ -deleteJob($projectId, $region, $jobId); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $projectId = '[PROJECT_ID]'; - $region = '[REGION]'; - $jobId = '[JOB_ID]'; - - delete_job_sample($projectId, $region, $jobId); -} -// [END dataproc_v1_generated_JobController_DeleteJob_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/get_iam_policy.php b/owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/get_iam_policy.php deleted file mode 100644 index dbfaa0bb264..00000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/get_iam_policy.php +++ /dev/null @@ -1,67 +0,0 @@ -getIamPolicy($resource); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - get_iam_policy_sample($resource); -} -// [END dataproc_v1_generated_JobController_GetIamPolicy_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/get_job.php b/owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/get_job.php deleted file mode 100644 index 87533d32743..00000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/get_job.php +++ /dev/null @@ -1,70 +0,0 @@ -getJob($projectId, $region, $jobId); - 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 -{ - $projectId = '[PROJECT_ID]'; - $region = '[REGION]'; - $jobId = '[JOB_ID]'; - - get_job_sample($projectId, $region, $jobId); -} -// [END dataproc_v1_generated_JobController_GetJob_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/list_jobs.php b/owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/list_jobs.php deleted file mode 100644 index bb89bcbe062..00000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/list_jobs.php +++ /dev/null @@ -1,73 +0,0 @@ -listJobs($projectId, $region); - - /** @var Job $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $projectId = '[PROJECT_ID]'; - $region = '[REGION]'; - - list_jobs_sample($projectId, $region); -} -// [END dataproc_v1_generated_JobController_ListJobs_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/set_iam_policy.php b/owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/set_iam_policy.php deleted file mode 100644 index 15b81e6a8f7..00000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/set_iam_policy.php +++ /dev/null @@ -1,73 +0,0 @@ -setIamPolicy($resource, $policy); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - set_iam_policy_sample($resource); -} -// [END dataproc_v1_generated_JobController_SetIamPolicy_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/submit_job.php b/owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/submit_job.php deleted file mode 100644 index 7b6292dd57d..00000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/submit_job.php +++ /dev/null @@ -1,80 +0,0 @@ -setClusterName($jobPlacementClusterName); - $job = (new Job()) - ->setPlacement($jobPlacement); - - // Call the API and handle any network failures. - try { - /** @var Job $response */ - $response = $jobControllerClient->submitJob($projectId, $region, $job); - 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 -{ - $projectId = '[PROJECT_ID]'; - $region = '[REGION]'; - $jobPlacementClusterName = '[CLUSTER_NAME]'; - - submit_job_sample($projectId, $region, $jobPlacementClusterName); -} -// [END dataproc_v1_generated_JobController_SubmitJob_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/submit_job_as_operation.php b/owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/submit_job_as_operation.php deleted file mode 100644 index 244d204a5df..00000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/submit_job_as_operation.php +++ /dev/null @@ -1,92 +0,0 @@ -setClusterName($jobPlacementClusterName); - $job = (new Job()) - ->setPlacement($jobPlacement); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $jobControllerClient->submitJobAsOperation($projectId, $region, $job); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Job $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 -{ - $projectId = '[PROJECT_ID]'; - $region = '[REGION]'; - $jobPlacementClusterName = '[CLUSTER_NAME]'; - - submit_job_as_operation_sample($projectId, $region, $jobPlacementClusterName); -} -// [END dataproc_v1_generated_JobController_SubmitJobAsOperation_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/test_iam_permissions.php b/owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/test_iam_permissions.php deleted file mode 100644 index 39d00e980e6..00000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/test_iam_permissions.php +++ /dev/null @@ -1,80 +0,0 @@ -testIamPermissions($resource, $permissions); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - $permissionsElement = '[PERMISSIONS]'; - - test_iam_permissions_sample($resource, $permissionsElement); -} -// [END dataproc_v1_generated_JobController_TestIamPermissions_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/update_job.php b/owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/update_job.php deleted file mode 100644 index ffe866f41d3..00000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/update_job.php +++ /dev/null @@ -1,85 +0,0 @@ -setClusterName($jobPlacementClusterName); - $job = (new Job()) - ->setPlacement($jobPlacement); - $updateMask = new FieldMask(); - - // Call the API and handle any network failures. - try { - /** @var Job $response */ - $response = $jobControllerClient->updateJob($projectId, $region, $jobId, $job, $updateMask); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $projectId = '[PROJECT_ID]'; - $region = '[REGION]'; - $jobId = '[JOB_ID]'; - $jobPlacementClusterName = '[CLUSTER_NAME]'; - - update_job_sample($projectId, $region, $jobId, $jobPlacementClusterName); -} -// [END dataproc_v1_generated_JobController_UpdateJob_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/NodeGroupControllerClient/create_node_group.php b/owl-bot-staging/Dataproc/v1/samples/V1/NodeGroupControllerClient/create_node_group.php deleted file mode 100644 index aa772b5171a..00000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/NodeGroupControllerClient/create_node_group.php +++ /dev/null @@ -1,93 +0,0 @@ -setRoles($nodeGroupRoles); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $nodeGroupControllerClient->createNodeGroup($formattedParent, $nodeGroup); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var NodeGroup $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 = NodeGroupControllerClient::clusterRegionName( - '[PROJECT]', - '[REGION]', - '[CLUSTER]' - ); - $nodeGroupRolesElement = Role::ROLE_UNSPECIFIED; - - create_node_group_sample($formattedParent, $nodeGroupRolesElement); -} -// [END dataproc_v1_generated_NodeGroupController_CreateNodeGroup_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/NodeGroupControllerClient/get_iam_policy.php b/owl-bot-staging/Dataproc/v1/samples/V1/NodeGroupControllerClient/get_iam_policy.php deleted file mode 100644 index 228914f7bd5..00000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/NodeGroupControllerClient/get_iam_policy.php +++ /dev/null @@ -1,67 +0,0 @@ -getIamPolicy($resource); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - get_iam_policy_sample($resource); -} -// [END dataproc_v1_generated_NodeGroupController_GetIamPolicy_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/NodeGroupControllerClient/get_node_group.php b/owl-bot-staging/Dataproc/v1/samples/V1/NodeGroupControllerClient/get_node_group.php deleted file mode 100644 index b6a34299ffe..00000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/NodeGroupControllerClient/get_node_group.php +++ /dev/null @@ -1,74 +0,0 @@ -getNodeGroup($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NodeGroupControllerClient::nodeGroupName( - '[PROJECT]', - '[REGION]', - '[CLUSTER]', - '[NODE_GROUP]' - ); - - get_node_group_sample($formattedName); -} -// [END dataproc_v1_generated_NodeGroupController_GetNodeGroup_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/NodeGroupControllerClient/resize_node_group.php b/owl-bot-staging/Dataproc/v1/samples/V1/NodeGroupControllerClient/resize_node_group.php deleted file mode 100644 index 0a74497dfb0..00000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/NodeGroupControllerClient/resize_node_group.php +++ /dev/null @@ -1,85 +0,0 @@ -resizeNodeGroup($name, $size); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var NodeGroup $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 -{ - $name = '[NAME]'; - $size = 0; - - resize_node_group_sample($name, $size); -} -// [END dataproc_v1_generated_NodeGroupController_ResizeNodeGroup_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/NodeGroupControllerClient/set_iam_policy.php b/owl-bot-staging/Dataproc/v1/samples/V1/NodeGroupControllerClient/set_iam_policy.php deleted file mode 100644 index 4bca304f7dc..00000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/NodeGroupControllerClient/set_iam_policy.php +++ /dev/null @@ -1,73 +0,0 @@ -setIamPolicy($resource, $policy); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - set_iam_policy_sample($resource); -} -// [END dataproc_v1_generated_NodeGroupController_SetIamPolicy_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/NodeGroupControllerClient/test_iam_permissions.php b/owl-bot-staging/Dataproc/v1/samples/V1/NodeGroupControllerClient/test_iam_permissions.php deleted file mode 100644 index 845c56b6059..00000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/NodeGroupControllerClient/test_iam_permissions.php +++ /dev/null @@ -1,80 +0,0 @@ -testIamPermissions($resource, $permissions); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - $permissionsElement = '[PERMISSIONS]'; - - test_iam_permissions_sample($resource, $permissionsElement); -} -// [END dataproc_v1_generated_NodeGroupController_TestIamPermissions_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/create_workflow_template.php b/owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/create_workflow_template.php deleted file mode 100644 index 34b4eae825c..00000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/create_workflow_template.php +++ /dev/null @@ -1,104 +0,0 @@ -setStepId($templateJobsStepId); - $templateJobs = [$orderedJob,]; - $template = (new WorkflowTemplate()) - ->setId($templateId) - ->setPlacement($templatePlacement) - ->setJobs($templateJobs); - - // Call the API and handle any network failures. - try { - /** @var WorkflowTemplate $response */ - $response = $workflowTemplateServiceClient->createWorkflowTemplate($formattedParent, $template); - 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 = WorkflowTemplateServiceClient::regionName('[PROJECT]', '[REGION]'); - $templateId = '[ID]'; - $templateJobsStepId = '[STEP_ID]'; - - create_workflow_template_sample($formattedParent, $templateId, $templateJobsStepId); -} -// [END dataproc_v1_generated_WorkflowTemplateService_CreateWorkflowTemplate_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/delete_workflow_template.php b/owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/delete_workflow_template.php deleted file mode 100644 index cc924ffaab7..00000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/delete_workflow_template.php +++ /dev/null @@ -1,77 +0,0 @@ -deleteWorkflowTemplate($formattedName); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = WorkflowTemplateServiceClient::workflowTemplateName( - '[PROJECT]', - '[REGION]', - '[WORKFLOW_TEMPLATE]' - ); - - delete_workflow_template_sample($formattedName); -} -// [END dataproc_v1_generated_WorkflowTemplateService_DeleteWorkflowTemplate_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/get_iam_policy.php b/owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/get_iam_policy.php deleted file mode 100644 index ada493651cd..00000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/get_iam_policy.php +++ /dev/null @@ -1,67 +0,0 @@ -getIamPolicy($resource); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - get_iam_policy_sample($resource); -} -// [END dataproc_v1_generated_WorkflowTemplateService_GetIamPolicy_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/get_workflow_template.php b/owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/get_workflow_template.php deleted file mode 100644 index 84991104b62..00000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/get_workflow_template.php +++ /dev/null @@ -1,82 +0,0 @@ -getWorkflowTemplate($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = WorkflowTemplateServiceClient::workflowTemplateName( - '[PROJECT]', - '[REGION]', - '[WORKFLOW_TEMPLATE]' - ); - - get_workflow_template_sample($formattedName); -} -// [END dataproc_v1_generated_WorkflowTemplateService_GetWorkflowTemplate_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/instantiate_inline_workflow_template.php b/owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/instantiate_inline_workflow_template.php deleted file mode 100644 index 513fdfc7b2f..00000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/instantiate_inline_workflow_template.php +++ /dev/null @@ -1,141 +0,0 @@ -setStepId($templateJobsStepId); - $templateJobs = [$orderedJob,]; - $template = (new WorkflowTemplate()) - ->setId($templateId) - ->setPlacement($templatePlacement) - ->setJobs($templateJobs); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $workflowTemplateServiceClient->instantiateInlineWorkflowTemplate( - $formattedParent, - $template - ); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = WorkflowTemplateServiceClient::regionName('[PROJECT]', '[REGION]'); - $templateId = '[ID]'; - $templateJobsStepId = '[STEP_ID]'; - - instantiate_inline_workflow_template_sample($formattedParent, $templateId, $templateJobsStepId); -} -// [END dataproc_v1_generated_WorkflowTemplateService_InstantiateInlineWorkflowTemplate_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/instantiate_workflow_template.php b/owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/instantiate_workflow_template.php deleted file mode 100644 index 9f0ffd27fa7..00000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/instantiate_workflow_template.php +++ /dev/null @@ -1,107 +0,0 @@ -instantiateWorkflowTemplate($formattedName); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = WorkflowTemplateServiceClient::workflowTemplateName( - '[PROJECT]', - '[REGION]', - '[WORKFLOW_TEMPLATE]' - ); - - instantiate_workflow_template_sample($formattedName); -} -// [END dataproc_v1_generated_WorkflowTemplateService_InstantiateWorkflowTemplate_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/list_workflow_templates.php b/owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/list_workflow_templates.php deleted file mode 100644 index 85973e7eb05..00000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/list_workflow_templates.php +++ /dev/null @@ -1,80 +0,0 @@ -listWorkflowTemplates($formattedParent); - - /** @var WorkflowTemplate $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 = WorkflowTemplateServiceClient::regionName('[PROJECT]', '[REGION]'); - - list_workflow_templates_sample($formattedParent); -} -// [END dataproc_v1_generated_WorkflowTemplateService_ListWorkflowTemplates_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/set_iam_policy.php b/owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/set_iam_policy.php deleted file mode 100644 index d5c33f58646..00000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/set_iam_policy.php +++ /dev/null @@ -1,73 +0,0 @@ -setIamPolicy($resource, $policy); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - set_iam_policy_sample($resource); -} -// [END dataproc_v1_generated_WorkflowTemplateService_SetIamPolicy_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/test_iam_permissions.php b/owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/test_iam_permissions.php deleted file mode 100644 index 31f856cea72..00000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/test_iam_permissions.php +++ /dev/null @@ -1,80 +0,0 @@ -testIamPermissions($resource, $permissions); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - $permissionsElement = '[PERMISSIONS]'; - - test_iam_permissions_sample($resource, $permissionsElement); -} -// [END dataproc_v1_generated_WorkflowTemplateService_TestIamPermissions_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/update_workflow_template.php b/owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/update_workflow_template.php deleted file mode 100644 index f9c0292a20f..00000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/update_workflow_template.php +++ /dev/null @@ -1,90 +0,0 @@ -setStepId($templateJobsStepId); - $templateJobs = [$orderedJob,]; - $template = (new WorkflowTemplate()) - ->setId($templateId) - ->setPlacement($templatePlacement) - ->setJobs($templateJobs); - - // Call the API and handle any network failures. - try { - /** @var WorkflowTemplate $response */ - $response = $workflowTemplateServiceClient->updateWorkflowTemplate($template); - 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 -{ - $templateId = '[ID]'; - $templateJobsStepId = '[STEP_ID]'; - - update_workflow_template_sample($templateId, $templateJobsStepId); -} -// [END dataproc_v1_generated_WorkflowTemplateService_UpdateWorkflowTemplate_sync] diff --git a/owl-bot-staging/Dataproc/v1/src/V1/AutoscalingPolicyServiceClient.php b/owl-bot-staging/Dataproc/v1/src/V1/AutoscalingPolicyServiceClient.php deleted file mode 100644 index 9d09630e8fe..00000000000 --- a/owl-bot-staging/Dataproc/v1/src/V1/AutoscalingPolicyServiceClient.php +++ /dev/null @@ -1,34 +0,0 @@ - self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../../resources/autoscaling_policy_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../../resources/autoscaling_policy_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../../resources/autoscaling_policy_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../../resources/autoscaling_policy_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * autoscaling_policy resource. - * - * @param string $project - * @param string $location - * @param string $autoscalingPolicy - * - * @return string The formatted autoscaling_policy resource. - */ - public static function autoscalingPolicyName(string $project, string $location, string $autoscalingPolicy): string - { - return self::getPathTemplate('autoscalingPolicy')->render([ - 'project' => $project, - 'location' => $location, - 'autoscaling_policy' => $autoscalingPolicy, - ]); - } - - /** - * 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 - * project_location_autoscaling_policy resource. - * - * @param string $project - * @param string $location - * @param string $autoscalingPolicy - * - * @return string The formatted project_location_autoscaling_policy resource. - */ - public static function projectLocationAutoscalingPolicyName(string $project, string $location, string $autoscalingPolicy): string - { - return self::getPathTemplate('projectLocationAutoscalingPolicy')->render([ - 'project' => $project, - 'location' => $location, - 'autoscaling_policy' => $autoscalingPolicy, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_region_autoscaling_policy resource. - * - * @param string $project - * @param string $region - * @param string $autoscalingPolicy - * - * @return string The formatted project_region_autoscaling_policy resource. - */ - public static function projectRegionAutoscalingPolicyName(string $project, string $region, string $autoscalingPolicy): string - { - return self::getPathTemplate('projectRegionAutoscalingPolicy')->render([ - 'project' => $project, - 'region' => $region, - 'autoscaling_policy' => $autoscalingPolicy, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a region - * resource. - * - * @param string $project - * @param string $region - * - * @return string The formatted region resource. - */ - public static function regionName(string $project, string $region): string - { - return self::getPathTemplate('region')->render([ - 'project' => $project, - 'region' => $region, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - autoscalingPolicy: projects/{project}/locations/{location}/autoscalingPolicies/{autoscaling_policy} - * - location: projects/{project}/locations/{location} - * - projectLocationAutoscalingPolicy: projects/{project}/locations/{location}/autoscalingPolicies/{autoscaling_policy} - * - projectRegionAutoscalingPolicy: projects/{project}/regions/{region}/autoscalingPolicies/{autoscaling_policy} - * - region: projects/{project}/regions/{region} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'dataproc.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates new autoscaling policy. - * - * The async variant is {@see self::createAutoscalingPolicyAsync()} . - * - * @param CreateAutoscalingPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return AutoscalingPolicy - * - * @throws ApiException Thrown if the API call fails. - */ - public function createAutoscalingPolicy(CreateAutoscalingPolicyRequest $request, array $callOptions = []): AutoscalingPolicy - { - return $this->startApiCall('CreateAutoscalingPolicy', $request, $callOptions)->wait(); - } - - /** - * Deletes an autoscaling policy. It is an error to delete an autoscaling - * policy that is in use by one or more clusters. - * - * The async variant is {@see self::deleteAutoscalingPolicyAsync()} . - * - * @param DeleteAutoscalingPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteAutoscalingPolicy(DeleteAutoscalingPolicyRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteAutoscalingPolicy', $request, $callOptions)->wait(); - } - - /** - * Retrieves autoscaling policy. - * - * The async variant is {@see self::getAutoscalingPolicyAsync()} . - * - * @param GetAutoscalingPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return AutoscalingPolicy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAutoscalingPolicy(GetAutoscalingPolicyRequest $request, array $callOptions = []): AutoscalingPolicy - { - return $this->startApiCall('GetAutoscalingPolicy', $request, $callOptions)->wait(); - } - - /** - * Lists autoscaling policies in the project. - * - * The async variant is {@see self::listAutoscalingPoliciesAsync()} . - * - * @param ListAutoscalingPoliciesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listAutoscalingPolicies(ListAutoscalingPoliciesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListAutoscalingPolicies', $request, $callOptions); - } - - /** - * Updates (replaces) autoscaling policy. - * - * Disabled check for update_mask, because all updates will be full - * replacements. - * - * The async variant is {@see self::updateAutoscalingPolicyAsync()} . - * - * @param UpdateAutoscalingPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return AutoscalingPolicy - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateAutoscalingPolicy(UpdateAutoscalingPolicyRequest $request, array $callOptions = []): AutoscalingPolicy - { - return $this->startApiCall('UpdateAutoscalingPolicy', $request, $callOptions)->wait(); - } - - /** - * Gets the access control policy for a resource. Returns an empty policy - if the resource exists and does not have a policy set. - * - * The async variant is {@see self::getIamPolicyAsync()} . - * - * @param GetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Sets the access control policy on the specified resource. Replaces - any existing policy. - - Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` - errors. - * - * The async variant is {@see self::setIamPolicyAsync()} . - * - * @param SetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Returns permissions that a caller has on the specified resource. If the - resource does not exist, this will return an empty set of - permissions, not a `NOT_FOUND` error. - - Note: This operation is designed to be used for building - permission-aware UIs and command-line tools, not for authorization - checking. This operation may "fail open" without warning. - * - * The async variant is {@see self::testIamPermissionsAsync()} . - * - * @param TestIamPermissionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TestIamPermissionsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse - { - return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Dataproc/v1/src/V1/Client/BaseClient/BatchControllerBaseClient.php b/owl-bot-staging/Dataproc/v1/src/V1/Client/BaseClient/BatchControllerBaseClient.php deleted file mode 100644 index 5de0c19d85f..00000000000 --- a/owl-bot-staging/Dataproc/v1/src/V1/Client/BaseClient/BatchControllerBaseClient.php +++ /dev/null @@ -1,479 +0,0 @@ - self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../../resources/batch_controller_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../../resources/batch_controller_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../../resources/batch_controller_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../../resources/batch_controller_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Formats a string containing the fully-qualified path to represent a batch - * resource. - * - * @param string $project - * @param string $location - * @param string $batch - * - * @return string The formatted batch resource. - */ - public static function batchName(string $project, string $location, string $batch): string - { - return self::getPathTemplate('batch')->render([ - 'project' => $project, - 'location' => $location, - 'batch' => $batch, - ]); - } - - /** - * 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 service - * resource. - * - * @param string $project - * @param string $location - * @param string $service - * - * @return string The formatted service resource. - */ - public static function serviceName(string $project, string $location, string $service): string - { - return self::getPathTemplate('service')->render([ - 'project' => $project, - 'location' => $location, - 'service' => $service, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - batch: projects/{project}/locations/{location}/batches/{batch} - * - location: projects/{project}/locations/{location} - * - service: projects/{project}/locations/{location}/services/{service} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'dataproc.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a batch workload that executes asynchronously. - * - * The async variant is {@see self::createBatchAsync()} . - * - * @param CreateBatchRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 createBatch(CreateBatchRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateBatch', $request, $callOptions)->wait(); - } - - /** - * Deletes the batch workload resource. If the batch is not in terminal state, - * the delete fails and the response returns `FAILED_PRECONDITION`. - * - * The async variant is {@see self::deleteBatchAsync()} . - * - * @param DeleteBatchRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteBatch(DeleteBatchRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteBatch', $request, $callOptions)->wait(); - } - - /** - * Gets the batch workload resource representation. - * - * The async variant is {@see self::getBatchAsync()} . - * - * @param GetBatchRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Batch - * - * @throws ApiException Thrown if the API call fails. - */ - public function getBatch(GetBatchRequest $request, array $callOptions = []): Batch - { - return $this->startApiCall('GetBatch', $request, $callOptions)->wait(); - } - - /** - * Lists batch workloads. - * - * The async variant is {@see self::listBatchesAsync()} . - * - * @param ListBatchesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listBatches(ListBatchesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListBatches', $request, $callOptions); - } - - /** - * Gets the access control policy for a resource. Returns an empty policy - if the resource exists and does not have a policy set. - * - * The async variant is {@see self::getIamPolicyAsync()} . - * - * @param GetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Sets the access control policy on the specified resource. Replaces - any existing policy. - - Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` - errors. - * - * The async variant is {@see self::setIamPolicyAsync()} . - * - * @param SetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Returns permissions that a caller has on the specified resource. If the - resource does not exist, this will return an empty set of - permissions, not a `NOT_FOUND` error. - - Note: This operation is designed to be used for building - permission-aware UIs and command-line tools, not for authorization - checking. This operation may "fail open" without warning. - * - * The async variant is {@see self::testIamPermissionsAsync()} . - * - * @param TestIamPermissionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TestIamPermissionsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse - { - return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Dataproc/v1/src/V1/Client/BaseClient/ClusterControllerBaseClient.php b/owl-bot-staging/Dataproc/v1/src/V1/Client/BaseClient/ClusterControllerBaseClient.php deleted file mode 100644 index c554a07f326..00000000000 --- a/owl-bot-staging/Dataproc/v1/src/V1/Client/BaseClient/ClusterControllerBaseClient.php +++ /dev/null @@ -1,626 +0,0 @@ - self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../../resources/cluster_controller_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../../resources/cluster_controller_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../../resources/cluster_controller_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../../resources/cluster_controller_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Formats a string containing the fully-qualified path to represent a cluster - * resource. - * - * @param string $project - * @param string $location - * @param string $cluster - * - * @return string The formatted cluster resource. - */ - public static function clusterName(string $project, string $location, string $cluster): string - { - return self::getPathTemplate('cluster')->render([ - 'project' => $project, - 'location' => $location, - 'cluster' => $cluster, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * cluster_region resource. - * - * @param string $project - * @param string $region - * @param string $cluster - * - * @return string The formatted cluster_region resource. - */ - public static function clusterRegionName(string $project, string $region, string $cluster): string - { - return self::getPathTemplate('clusterRegion')->render([ - 'project' => $project, - 'region' => $region, - 'cluster' => $cluster, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a node_group - * resource. - * - * @param string $project - * @param string $region - * @param string $cluster - * @param string $nodeGroup - * - * @return string The formatted node_group resource. - */ - public static function nodeGroupName(string $project, string $region, string $cluster, string $nodeGroup): string - { - return self::getPathTemplate('nodeGroup')->render([ - 'project' => $project, - 'region' => $region, - 'cluster' => $cluster, - 'node_group' => $nodeGroup, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a service - * resource. - * - * @param string $project - * @param string $location - * @param string $service - * - * @return string The formatted service resource. - */ - public static function serviceName(string $project, string $location, string $service): string - { - return self::getPathTemplate('service')->render([ - 'project' => $project, - 'location' => $location, - 'service' => $service, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - cluster: projects/{project}/locations/{location}/clusters/{cluster} - * - clusterRegion: projects/{project}/regions/{region}/clusters/{cluster} - * - nodeGroup: projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{node_group} - * - service: projects/{project}/locations/{location}/services/{service} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'dataproc.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a cluster in a project. The returned - * [Operation.metadata][google.longrunning.Operation.metadata] will be - * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). - * - * The async variant is {@see self::createClusterAsync()} . - * - * @param CreateClusterRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createCluster(CreateClusterRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateCluster', $request, $callOptions)->wait(); - } - - /** - * Deletes a cluster in a project. The returned - * [Operation.metadata][google.longrunning.Operation.metadata] will be - * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). - * - * The async variant is {@see self::deleteClusterAsync()} . - * - * @param DeleteClusterRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteCluster(DeleteClusterRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteCluster', $request, $callOptions)->wait(); - } - - /** - * Gets cluster diagnostic information. The returned - * [Operation.metadata][google.longrunning.Operation.metadata] will be - * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). - * After the operation completes, - * [Operation.response][google.longrunning.Operation.response] - * contains - * [DiagnoseClusterResults](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#diagnoseclusterresults). - * - * The async variant is {@see self::diagnoseClusterAsync()} . - * - * @param DiagnoseClusterRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 diagnoseCluster(DiagnoseClusterRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DiagnoseCluster', $request, $callOptions)->wait(); - } - - /** - * Gets the resource representation for a cluster in a project. - * - * The async variant is {@see self::getClusterAsync()} . - * - * @param GetClusterRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Cluster - * - * @throws ApiException Thrown if the API call fails. - */ - public function getCluster(GetClusterRequest $request, array $callOptions = []): Cluster - { - return $this->startApiCall('GetCluster', $request, $callOptions)->wait(); - } - - /** - * Lists all regions/{region}/clusters in a project alphabetically. - * - * The async variant is {@see self::listClustersAsync()} . - * - * @param ListClustersRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listClusters(ListClustersRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListClusters', $request, $callOptions); - } - - /** - * Starts a cluster in a project. - * - * The async variant is {@see self::startClusterAsync()} . - * - * @param StartClusterRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 startCluster(StartClusterRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('StartCluster', $request, $callOptions)->wait(); - } - - /** - * Stops a cluster in a project. - * - * The async variant is {@see self::stopClusterAsync()} . - * - * @param StopClusterRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 stopCluster(StopClusterRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('StopCluster', $request, $callOptions)->wait(); - } - - /** - * Updates a cluster in a project. The returned - * [Operation.metadata][google.longrunning.Operation.metadata] will be - * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). - * The cluster must be in a - * [`RUNNING`][google.cloud.dataproc.v1.ClusterStatus.State] state or an error - * is returned. - * - * The async variant is {@see self::updateClusterAsync()} . - * - * @param UpdateClusterRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateCluster(UpdateClusterRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateCluster', $request, $callOptions)->wait(); - } - - /** - * Gets the access control policy for a resource. Returns an empty policy - if the resource exists and does not have a policy set. - * - * The async variant is {@see self::getIamPolicyAsync()} . - * - * @param GetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Sets the access control policy on the specified resource. Replaces - any existing policy. - - Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` - errors. - * - * The async variant is {@see self::setIamPolicyAsync()} . - * - * @param SetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Returns permissions that a caller has on the specified resource. If the - resource does not exist, this will return an empty set of - permissions, not a `NOT_FOUND` error. - - Note: This operation is designed to be used for building - permission-aware UIs and command-line tools, not for authorization - checking. This operation may "fail open" without warning. - * - * The async variant is {@see self::testIamPermissionsAsync()} . - * - * @param TestIamPermissionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TestIamPermissionsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse - { - return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Dataproc/v1/src/V1/Client/BaseClient/JobControllerBaseClient.php b/owl-bot-staging/Dataproc/v1/src/V1/Client/BaseClient/JobControllerBaseClient.php deleted file mode 100644 index 6f211213524..00000000000 --- a/owl-bot-staging/Dataproc/v1/src/V1/Client/BaseClient/JobControllerBaseClient.php +++ /dev/null @@ -1,472 +0,0 @@ - self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../../resources/job_controller_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../../resources/job_controller_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../../resources/job_controller_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../../resources/job_controller_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'dataproc.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Starts a job cancellation request. To access the job resource - * after cancellation, call - * [regions/{region}/jobs.list](https://cloud.google.com/dataproc/docs/reference/rest/v1/projects.regions.jobs/list) - * or - * [regions/{region}/jobs.get](https://cloud.google.com/dataproc/docs/reference/rest/v1/projects.regions.jobs/get). - * - * The async variant is {@see self::cancelJobAsync()} . - * - * @param CancelJobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Job - * - * @throws ApiException Thrown if the API call fails. - */ - public function cancelJob(CancelJobRequest $request, array $callOptions = []): Job - { - return $this->startApiCall('CancelJob', $request, $callOptions)->wait(); - } - - /** - * Deletes the job from the project. If the job is active, the delete fails, - * and the response returns `FAILED_PRECONDITION`. - * - * The async variant is {@see self::deleteJobAsync()} . - * - * @param DeleteJobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteJob(DeleteJobRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteJob', $request, $callOptions)->wait(); - } - - /** - * Gets the resource representation for a job in a project. - * - * The async variant is {@see self::getJobAsync()} . - * - * @param GetJobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Job - * - * @throws ApiException Thrown if the API call fails. - */ - public function getJob(GetJobRequest $request, array $callOptions = []): Job - { - return $this->startApiCall('GetJob', $request, $callOptions)->wait(); - } - - /** - * Lists regions/{region}/jobs in a project. - * - * The async variant is {@see self::listJobsAsync()} . - * - * @param ListJobsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listJobs(ListJobsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListJobs', $request, $callOptions); - } - - /** - * Submits a job to a cluster. - * - * The async variant is {@see self::submitJobAsync()} . - * - * @param SubmitJobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Job - * - * @throws ApiException Thrown if the API call fails. - */ - public function submitJob(SubmitJobRequest $request, array $callOptions = []): Job - { - return $this->startApiCall('SubmitJob', $request, $callOptions)->wait(); - } - - /** - * Submits job to a cluster. - * - * The async variant is {@see self::submitJobAsOperationAsync()} . - * - * @param SubmitJobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 submitJobAsOperation(SubmitJobRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('SubmitJobAsOperation', $request, $callOptions)->wait(); - } - - /** - * Updates a job in a project. - * - * The async variant is {@see self::updateJobAsync()} . - * - * @param UpdateJobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Job - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateJob(UpdateJobRequest $request, array $callOptions = []): Job - { - return $this->startApiCall('UpdateJob', $request, $callOptions)->wait(); - } - - /** - * Gets the access control policy for a resource. Returns an empty policy - if the resource exists and does not have a policy set. - * - * The async variant is {@see self::getIamPolicyAsync()} . - * - * @param GetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Sets the access control policy on the specified resource. Replaces - any existing policy. - - Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` - errors. - * - * The async variant is {@see self::setIamPolicyAsync()} . - * - * @param SetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Returns permissions that a caller has on the specified resource. If the - resource does not exist, this will return an empty set of - permissions, not a `NOT_FOUND` error. - - Note: This operation is designed to be used for building - permission-aware UIs and command-line tools, not for authorization - checking. This operation may "fail open" without warning. - * - * The async variant is {@see self::testIamPermissionsAsync()} . - * - * @param TestIamPermissionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TestIamPermissionsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse - { - return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Dataproc/v1/src/V1/Client/BaseClient/NodeGroupControllerBaseClient.php b/owl-bot-staging/Dataproc/v1/src/V1/Client/BaseClient/NodeGroupControllerBaseClient.php deleted file mode 100644 index ec1a6c3ff3b..00000000000 --- a/owl-bot-staging/Dataproc/v1/src/V1/Client/BaseClient/NodeGroupControllerBaseClient.php +++ /dev/null @@ -1,445 +0,0 @@ - self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../../resources/node_group_controller_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../../resources/node_group_controller_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../../resources/node_group_controller_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../../resources/node_group_controller_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * cluster_region resource. - * - * @param string $project - * @param string $region - * @param string $cluster - * - * @return string The formatted cluster_region resource. - */ - public static function clusterRegionName(string $project, string $region, string $cluster): string - { - return self::getPathTemplate('clusterRegion')->render([ - 'project' => $project, - 'region' => $region, - 'cluster' => $cluster, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a node_group - * resource. - * - * @param string $project - * @param string $region - * @param string $cluster - * @param string $nodeGroup - * - * @return string The formatted node_group resource. - */ - public static function nodeGroupName(string $project, string $region, string $cluster, string $nodeGroup): string - { - return self::getPathTemplate('nodeGroup')->render([ - 'project' => $project, - 'region' => $region, - 'cluster' => $cluster, - 'node_group' => $nodeGroup, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - clusterRegion: projects/{project}/regions/{region}/clusters/{cluster} - * - nodeGroup: projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{node_group} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'dataproc.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a node group in a cluster. The returned - * [Operation.metadata][google.longrunning.Operation.metadata] is - * [NodeGroupOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#nodegroupoperationmetadata). - * - * The async variant is {@see self::createNodeGroupAsync()} . - * - * @param CreateNodeGroupRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 createNodeGroup(CreateNodeGroupRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateNodeGroup', $request, $callOptions)->wait(); - } - - /** - * Gets the resource representation for a node group in a - * cluster. - * - * The async variant is {@see self::getNodeGroupAsync()} . - * - * @param GetNodeGroupRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return NodeGroup - * - * @throws ApiException Thrown if the API call fails. - */ - public function getNodeGroup(GetNodeGroupRequest $request, array $callOptions = []): NodeGroup - { - return $this->startApiCall('GetNodeGroup', $request, $callOptions)->wait(); - } - - /** - * Resizes a node group in a cluster. The returned - * [Operation.metadata][google.longrunning.Operation.metadata] is - * [NodeGroupOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#nodegroupoperationmetadata). - * - * The async variant is {@see self::resizeNodeGroupAsync()} . - * - * @param ResizeNodeGroupRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 resizeNodeGroup(ResizeNodeGroupRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('ResizeNodeGroup', $request, $callOptions)->wait(); - } - - /** - * Gets the access control policy for a resource. Returns an empty policy - if the resource exists and does not have a policy set. - * - * The async variant is {@see self::getIamPolicyAsync()} . - * - * @param GetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Sets the access control policy on the specified resource. Replaces - any existing policy. - - Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` - errors. - * - * The async variant is {@see self::setIamPolicyAsync()} . - * - * @param SetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Returns permissions that a caller has on the specified resource. If the - resource does not exist, this will return an empty set of - permissions, not a `NOT_FOUND` error. - - Note: This operation is designed to be used for building - permission-aware UIs and command-line tools, not for authorization - checking. This operation may "fail open" without warning. - * - * The async variant is {@see self::testIamPermissionsAsync()} . - * - * @param TestIamPermissionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TestIamPermissionsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse - { - return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Dataproc/v1/src/V1/Client/BaseClient/WorkflowTemplateServiceBaseClient.php b/owl-bot-staging/Dataproc/v1/src/V1/Client/BaseClient/WorkflowTemplateServiceBaseClient.php deleted file mode 100644 index 81c72238694..00000000000 --- a/owl-bot-staging/Dataproc/v1/src/V1/Client/BaseClient/WorkflowTemplateServiceBaseClient.php +++ /dev/null @@ -1,706 +0,0 @@ - self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../../resources/workflow_template_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../../resources/workflow_template_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../../resources/workflow_template_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../../resources/workflow_template_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * cluster_region resource. - * - * @param string $project - * @param string $region - * @param string $cluster - * - * @return string The formatted cluster_region resource. - */ - public static function clusterRegionName(string $project, string $region, string $cluster): string - { - return self::getPathTemplate('clusterRegion')->render([ - 'project' => $project, - 'region' => $region, - 'cluster' => $cluster, - ]); - } - - /** - * 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 node_group - * resource. - * - * @param string $project - * @param string $region - * @param string $cluster - * @param string $nodeGroup - * - * @return string The formatted node_group resource. - */ - public static function nodeGroupName(string $project, string $region, string $cluster, string $nodeGroup): string - { - return self::getPathTemplate('nodeGroup')->render([ - 'project' => $project, - 'region' => $region, - 'cluster' => $cluster, - 'node_group' => $nodeGroup, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_workflow_template resource. - * - * @param string $project - * @param string $location - * @param string $workflowTemplate - * - * @return string The formatted project_location_workflow_template resource. - */ - public static function projectLocationWorkflowTemplateName(string $project, string $location, string $workflowTemplate): string - { - return self::getPathTemplate('projectLocationWorkflowTemplate')->render([ - 'project' => $project, - 'location' => $location, - 'workflow_template' => $workflowTemplate, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_region_workflow_template resource. - * - * @param string $project - * @param string $region - * @param string $workflowTemplate - * - * @return string The formatted project_region_workflow_template resource. - */ - public static function projectRegionWorkflowTemplateName(string $project, string $region, string $workflowTemplate): string - { - return self::getPathTemplate('projectRegionWorkflowTemplate')->render([ - 'project' => $project, - 'region' => $region, - 'workflow_template' => $workflowTemplate, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a region - * resource. - * - * @param string $project - * @param string $region - * - * @return string The formatted region resource. - */ - public static function regionName(string $project, string $region): string - { - return self::getPathTemplate('region')->render([ - 'project' => $project, - 'region' => $region, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a service - * resource. - * - * @param string $project - * @param string $location - * @param string $service - * - * @return string The formatted service resource. - */ - public static function serviceName(string $project, string $location, string $service): string - { - return self::getPathTemplate('service')->render([ - 'project' => $project, - 'location' => $location, - 'service' => $service, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * workflow_template resource. - * - * @param string $project - * @param string $region - * @param string $workflowTemplate - * - * @return string The formatted workflow_template resource. - */ - public static function workflowTemplateName(string $project, string $region, string $workflowTemplate): string - { - return self::getPathTemplate('workflowTemplate')->render([ - 'project' => $project, - 'region' => $region, - 'workflow_template' => $workflowTemplate, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - clusterRegion: projects/{project}/regions/{region}/clusters/{cluster} - * - location: projects/{project}/locations/{location} - * - nodeGroup: projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{node_group} - * - projectLocationWorkflowTemplate: projects/{project}/locations/{location}/workflowTemplates/{workflow_template} - * - projectRegionWorkflowTemplate: projects/{project}/regions/{region}/workflowTemplates/{workflow_template} - * - region: projects/{project}/regions/{region} - * - service: projects/{project}/locations/{location}/services/{service} - * - workflowTemplate: projects/{project}/regions/{region}/workflowTemplates/{workflow_template} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'dataproc.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates new workflow template. - * - * The async variant is {@see self::createWorkflowTemplateAsync()} . - * - * @param CreateWorkflowTemplateRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return WorkflowTemplate - * - * @throws ApiException Thrown if the API call fails. - */ - public function createWorkflowTemplate(CreateWorkflowTemplateRequest $request, array $callOptions = []): WorkflowTemplate - { - return $this->startApiCall('CreateWorkflowTemplate', $request, $callOptions)->wait(); - } - - /** - * Deletes a workflow template. It does not cancel in-progress workflows. - * - * The async variant is {@see self::deleteWorkflowTemplateAsync()} . - * - * @param DeleteWorkflowTemplateRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteWorkflowTemplate(DeleteWorkflowTemplateRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteWorkflowTemplate', $request, $callOptions)->wait(); - } - - /** - * Retrieves the latest workflow template. - * - * Can retrieve previously instantiated template by specifying optional - * version parameter. - * - * The async variant is {@see self::getWorkflowTemplateAsync()} . - * - * @param GetWorkflowTemplateRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return WorkflowTemplate - * - * @throws ApiException Thrown if the API call fails. - */ - public function getWorkflowTemplate(GetWorkflowTemplateRequest $request, array $callOptions = []): WorkflowTemplate - { - return $this->startApiCall('GetWorkflowTemplate', $request, $callOptions)->wait(); - } - - /** - * Instantiates a template and begins execution. - * - * This method is equivalent to executing the sequence - * [CreateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.CreateWorkflowTemplate], - * [InstantiateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.InstantiateWorkflowTemplate], - * [DeleteWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.DeleteWorkflowTemplate]. - * - * The returned Operation can be used to track execution of - * workflow by polling - * [operations.get][google.longrunning.Operations.GetOperation]. - * The Operation will complete when entire workflow is finished. - * - * The running workflow can be aborted via - * [operations.cancel][google.longrunning.Operations.CancelOperation]. - * This will cause any inflight jobs to be cancelled and workflow-owned - * clusters to be deleted. - * - * The [Operation.metadata][google.longrunning.Operation.metadata] will be - * [WorkflowMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata). - * Also see [Using - * WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata). - * - * On successful completion, - * [Operation.response][google.longrunning.Operation.response] will be - * [Empty][google.protobuf.Empty]. - * - * The async variant is {@see self::instantiateInlineWorkflowTemplateAsync()} . - * - * @param InstantiateInlineWorkflowTemplateRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 instantiateInlineWorkflowTemplate(InstantiateInlineWorkflowTemplateRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('InstantiateInlineWorkflowTemplate', $request, $callOptions)->wait(); - } - - /** - * Instantiates a template and begins execution. - * - * The returned Operation can be used to track execution of - * workflow by polling - * [operations.get][google.longrunning.Operations.GetOperation]. - * The Operation will complete when entire workflow is finished. - * - * The running workflow can be aborted via - * [operations.cancel][google.longrunning.Operations.CancelOperation]. - * This will cause any inflight jobs to be cancelled and workflow-owned - * clusters to be deleted. - * - * The [Operation.metadata][google.longrunning.Operation.metadata] will be - * [WorkflowMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata). - * Also see [Using - * WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata). - * - * On successful completion, - * [Operation.response][google.longrunning.Operation.response] will be - * [Empty][google.protobuf.Empty]. - * - * The async variant is {@see self::instantiateWorkflowTemplateAsync()} . - * - * @param InstantiateWorkflowTemplateRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 instantiateWorkflowTemplate(InstantiateWorkflowTemplateRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('InstantiateWorkflowTemplate', $request, $callOptions)->wait(); - } - - /** - * Lists workflows that match the specified filter in the request. - * - * The async variant is {@see self::listWorkflowTemplatesAsync()} . - * - * @param ListWorkflowTemplatesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listWorkflowTemplates(ListWorkflowTemplatesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListWorkflowTemplates', $request, $callOptions); - } - - /** - * Updates (replaces) workflow template. The updated template - * must contain version that matches the current server version. - * - * The async variant is {@see self::updateWorkflowTemplateAsync()} . - * - * @param UpdateWorkflowTemplateRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return WorkflowTemplate - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateWorkflowTemplate(UpdateWorkflowTemplateRequest $request, array $callOptions = []): WorkflowTemplate - { - return $this->startApiCall('UpdateWorkflowTemplate', $request, $callOptions)->wait(); - } - - /** - * Gets the access control policy for a resource. Returns an empty policy - if the resource exists and does not have a policy set. - * - * The async variant is {@see self::getIamPolicyAsync()} . - * - * @param GetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Sets the access control policy on the specified resource. Replaces - any existing policy. - - Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` - errors. - * - * The async variant is {@see self::setIamPolicyAsync()} . - * - * @param SetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Returns permissions that a caller has on the specified resource. If the - resource does not exist, this will return an empty set of - permissions, not a `NOT_FOUND` error. - - Note: This operation is designed to be used for building - permission-aware UIs and command-line tools, not for authorization - checking. This operation may "fail open" without warning. - * - * The async variant is {@see self::testIamPermissionsAsync()} . - * - * @param TestIamPermissionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TestIamPermissionsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse - { - return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Dataproc/v1/src/V1/Client/BatchControllerClient.php b/owl-bot-staging/Dataproc/v1/src/V1/Client/BatchControllerClient.php deleted file mode 100644 index 893119340f7..00000000000 --- a/owl-bot-staging/Dataproc/v1/src/V1/Client/BatchControllerClient.php +++ /dev/null @@ -1,40 +0,0 @@ -regionName('[PROJECT]', '[REGION]'); - * $policy = new AutoscalingPolicy(); - * $response = $autoscalingPolicyServiceClient->createAutoscalingPolicy($formattedParent, $policy); - * } finally { - * $autoscalingPolicyServiceClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - * - * This service has a new (beta) implementation. See {@see - * \Google\Cloud\Dataproc\V1\Client\AutoscalingPolicyServiceClient} to use the new - * surface. - */ -class AutoscalingPolicyServiceGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.dataproc.v1.AutoscalingPolicyService'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'dataproc.googleapis.com'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static $autoscalingPolicyNameTemplate; - - private static $locationNameTemplate; - - private static $projectLocationAutoscalingPolicyNameTemplate; - - private static $projectRegionAutoscalingPolicyNameTemplate; - - private static $regionNameTemplate; - - private static $pathTemplateMap; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/autoscaling_policy_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/autoscaling_policy_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/autoscaling_policy_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/autoscaling_policy_service_rest_client_config.php', - ], - ], - ]; - } - - private static function getAutoscalingPolicyNameTemplate() - { - if (self::$autoscalingPolicyNameTemplate == null) { - self::$autoscalingPolicyNameTemplate = new PathTemplate('projects/{project}/locations/{location}/autoscalingPolicies/{autoscaling_policy}'); - } - - return self::$autoscalingPolicyNameTemplate; - } - - private static function getLocationNameTemplate() - { - if (self::$locationNameTemplate == null) { - self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); - } - - return self::$locationNameTemplate; - } - - private static function getProjectLocationAutoscalingPolicyNameTemplate() - { - if (self::$projectLocationAutoscalingPolicyNameTemplate == null) { - self::$projectLocationAutoscalingPolicyNameTemplate = new PathTemplate('projects/{project}/locations/{location}/autoscalingPolicies/{autoscaling_policy}'); - } - - return self::$projectLocationAutoscalingPolicyNameTemplate; - } - - private static function getProjectRegionAutoscalingPolicyNameTemplate() - { - if (self::$projectRegionAutoscalingPolicyNameTemplate == null) { - self::$projectRegionAutoscalingPolicyNameTemplate = new PathTemplate('projects/{project}/regions/{region}/autoscalingPolicies/{autoscaling_policy}'); - } - - return self::$projectRegionAutoscalingPolicyNameTemplate; - } - - private static function getRegionNameTemplate() - { - if (self::$regionNameTemplate == null) { - self::$regionNameTemplate = new PathTemplate('projects/{project}/regions/{region}'); - } - - return self::$regionNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'autoscalingPolicy' => self::getAutoscalingPolicyNameTemplate(), - 'location' => self::getLocationNameTemplate(), - 'projectLocationAutoscalingPolicy' => self::getProjectLocationAutoscalingPolicyNameTemplate(), - 'projectRegionAutoscalingPolicy' => self::getProjectRegionAutoscalingPolicyNameTemplate(), - 'region' => self::getRegionNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * autoscaling_policy resource. - * - * @param string $project - * @param string $location - * @param string $autoscalingPolicy - * - * @return string The formatted autoscaling_policy resource. - */ - public static function autoscalingPolicyName($project, $location, $autoscalingPolicy) - { - return self::getAutoscalingPolicyNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'autoscaling_policy' => $autoscalingPolicy, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName($project, $location) - { - return self::getLocationNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_autoscaling_policy resource. - * - * @param string $project - * @param string $location - * @param string $autoscalingPolicy - * - * @return string The formatted project_location_autoscaling_policy resource. - */ - public static function projectLocationAutoscalingPolicyName($project, $location, $autoscalingPolicy) - { - return self::getProjectLocationAutoscalingPolicyNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'autoscaling_policy' => $autoscalingPolicy, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_region_autoscaling_policy resource. - * - * @param string $project - * @param string $region - * @param string $autoscalingPolicy - * - * @return string The formatted project_region_autoscaling_policy resource. - */ - public static function projectRegionAutoscalingPolicyName($project, $region, $autoscalingPolicy) - { - return self::getProjectRegionAutoscalingPolicyNameTemplate()->render([ - 'project' => $project, - 'region' => $region, - 'autoscaling_policy' => $autoscalingPolicy, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a region - * resource. - * - * @param string $project - * @param string $region - * - * @return string The formatted region resource. - */ - public static function regionName($project, $region) - { - return self::getRegionNameTemplate()->render([ - 'project' => $project, - 'region' => $region, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - autoscalingPolicy: projects/{project}/locations/{location}/autoscalingPolicies/{autoscaling_policy} - * - location: projects/{project}/locations/{location} - * - projectLocationAutoscalingPolicy: projects/{project}/locations/{location}/autoscalingPolicies/{autoscaling_policy} - * - projectRegionAutoscalingPolicy: projects/{project}/regions/{region}/autoscalingPolicies/{autoscaling_policy} - * - region: projects/{project}/regions/{region} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'dataproc.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** - * Creates new autoscaling policy. - * - * Sample code: - * ``` - * $autoscalingPolicyServiceClient = new AutoscalingPolicyServiceClient(); - * try { - * $formattedParent = $autoscalingPolicyServiceClient->regionName('[PROJECT]', '[REGION]'); - * $policy = new AutoscalingPolicy(); - * $response = $autoscalingPolicyServiceClient->createAutoscalingPolicy($formattedParent, $policy); - * } finally { - * $autoscalingPolicyServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The "resource name" of the region or location, as described - * in https://cloud.google.com/apis/design/resource_names. - * - * * For `projects.regions.autoscalingPolicies.create`, the resource name - * of the region has the following format: - * `projects/{project_id}/regions/{region}` - * - * * For `projects.locations.autoscalingPolicies.create`, the resource name - * of the location has the following format: - * `projects/{project_id}/locations/{location}` - * @param AutoscalingPolicy $policy Required. The autoscaling policy to create. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataproc\V1\AutoscalingPolicy - * - * @throws ApiException if the remote call fails - */ - public function createAutoscalingPolicy($parent, $policy, array $optionalArgs = []) - { - $request = new CreateAutoscalingPolicyRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setPolicy($policy); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateAutoscalingPolicy', AutoscalingPolicy::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes an autoscaling policy. It is an error to delete an autoscaling - * policy that is in use by one or more clusters. - * - * Sample code: - * ``` - * $autoscalingPolicyServiceClient = new AutoscalingPolicyServiceClient(); - * try { - * $formattedName = $autoscalingPolicyServiceClient->autoscalingPolicyName('[PROJECT]', '[LOCATION]', '[AUTOSCALING_POLICY]'); - * $autoscalingPolicyServiceClient->deleteAutoscalingPolicy($formattedName); - * } finally { - * $autoscalingPolicyServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The "resource name" of the autoscaling policy, as described - * in https://cloud.google.com/apis/design/resource_names. - * - * * For `projects.regions.autoscalingPolicies.delete`, the resource name - * of the policy has the following format: - * `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}` - * - * * For `projects.locations.autoscalingPolicies.delete`, the resource name - * of the policy has the following format: - * `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}` - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - */ - public function deleteAutoscalingPolicy($name, array $optionalArgs = []) - { - $request = new DeleteAutoscalingPolicyRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteAutoscalingPolicy', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Retrieves autoscaling policy. - * - * Sample code: - * ``` - * $autoscalingPolicyServiceClient = new AutoscalingPolicyServiceClient(); - * try { - * $formattedName = $autoscalingPolicyServiceClient->autoscalingPolicyName('[PROJECT]', '[LOCATION]', '[AUTOSCALING_POLICY]'); - * $response = $autoscalingPolicyServiceClient->getAutoscalingPolicy($formattedName); - * } finally { - * $autoscalingPolicyServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The "resource name" of the autoscaling policy, as described - * in https://cloud.google.com/apis/design/resource_names. - * - * * For `projects.regions.autoscalingPolicies.get`, the resource name - * of the policy has the following format: - * `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}` - * - * * For `projects.locations.autoscalingPolicies.get`, the resource name - * of the policy has the following format: - * `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}` - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataproc\V1\AutoscalingPolicy - * - * @throws ApiException if the remote call fails - */ - public function getAutoscalingPolicy($name, array $optionalArgs = []) - { - $request = new GetAutoscalingPolicyRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetAutoscalingPolicy', AutoscalingPolicy::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists autoscaling policies in the project. - * - * Sample code: - * ``` - * $autoscalingPolicyServiceClient = new AutoscalingPolicyServiceClient(); - * try { - * $formattedParent = $autoscalingPolicyServiceClient->regionName('[PROJECT]', '[REGION]'); - * // Iterate over pages of elements - * $pagedResponse = $autoscalingPolicyServiceClient->listAutoscalingPolicies($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $autoscalingPolicyServiceClient->listAutoscalingPolicies($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $autoscalingPolicyServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The "resource name" of the region or location, as described - * in https://cloud.google.com/apis/design/resource_names. - * - * * For `projects.regions.autoscalingPolicies.list`, the resource name - * of the region has the following format: - * `projects/{project_id}/regions/{region}` - * - * * For `projects.locations.autoscalingPolicies.list`, the resource name - * of the location has the following format: - * `projects/{project_id}/locations/{location}` - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listAutoscalingPolicies($parent, array $optionalArgs = []) - { - $request = new ListAutoscalingPoliciesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListAutoscalingPolicies', $optionalArgs, ListAutoscalingPoliciesResponse::class, $request); - } - - /** - * Updates (replaces) autoscaling policy. - * - * Disabled check for update_mask, because all updates will be full - * replacements. - * - * Sample code: - * ``` - * $autoscalingPolicyServiceClient = new AutoscalingPolicyServiceClient(); - * try { - * $policy = new AutoscalingPolicy(); - * $response = $autoscalingPolicyServiceClient->updateAutoscalingPolicy($policy); - * } finally { - * $autoscalingPolicyServiceClient->close(); - * } - * ``` - * - * @param AutoscalingPolicy $policy Required. The updated autoscaling policy. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataproc\V1\AutoscalingPolicy - * - * @throws ApiException if the remote call fails - */ - public function updateAutoscalingPolicy($policy, array $optionalArgs = []) - { - $request = new UpdateAutoscalingPolicyRequest(); - $requestParamHeaders = []; - $request->setPolicy($policy); - $requestParamHeaders['policy.name'] = $policy->getName(); - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateAutoscalingPolicy', AutoscalingPolicy::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets the access control policy for a resource. Returns an empty policy - if the resource exists and does not have a policy set. - * - * Sample code: - * ``` - * $autoscalingPolicyServiceClient = new AutoscalingPolicyServiceClient(); - * try { - * $resource = 'resource'; - * $response = $autoscalingPolicyServiceClient->getIamPolicy($resource); - * } finally { - * $autoscalingPolicyServiceClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - * @param array $optionalArgs { - * Optional. - * - * @type GetPolicyOptions $options - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function getIamPolicy($resource, array $optionalArgs = []) - { - $request = new GetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['options'])) { - $request->setOptions($optionalArgs['options']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); - } - - /** - * Sets the access control policy on the specified resource. Replaces - any existing policy. - - Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` - errors. - * - * Sample code: - * ``` - * $autoscalingPolicyServiceClient = new AutoscalingPolicyServiceClient(); - * try { - * $resource = 'resource'; - * $policy = new Policy(); - * $response = $autoscalingPolicyServiceClient->setIamPolicy($resource, $policy); - * } finally { - * $autoscalingPolicyServiceClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being specified. - * See the operation documentation for the appropriate value for this field. - * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of - * the policy is limited to a few 10s of KB. An empty policy is a - * valid policy but certain Cloud Platform services (such as Projects) - * might reject them. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - * the fields in the mask will be modified. If no mask is provided, the - * following default mask is used: - * - * `paths: "bindings, etag"` - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function setIamPolicy($resource, $policy, array $optionalArgs = []) - { - $request = new SetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPolicy($policy); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('SetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); - } - - /** - * Returns permissions that a caller has on the specified resource. If the - resource does not exist, this will return an empty set of - permissions, not a `NOT_FOUND` error. - - Note: This operation is designed to be used for building - permission-aware UIs and command-line tools, not for authorization - checking. This operation may "fail open" without warning. - * - * Sample code: - * ``` - * $autoscalingPolicyServiceClient = new AutoscalingPolicyServiceClient(); - * try { - * $resource = 'resource'; - * $permissions = []; - * $response = $autoscalingPolicyServiceClient->testIamPermissions($resource, $permissions); - * } finally { - * $autoscalingPolicyServiceClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\TestIamPermissionsResponse - * - * @throws ApiException if the remote call fails - */ - public function testIamPermissions($resource, $permissions, array $optionalArgs = []) - { - $request = new TestIamPermissionsRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPermissions($permissions); - $requestParamHeaders['resource'] = $resource; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); - } -} diff --git a/owl-bot-staging/Dataproc/v1/src/V1/Gapic/BatchControllerGapicClient.php b/owl-bot-staging/Dataproc/v1/src/V1/Gapic/BatchControllerGapicClient.php deleted file mode 100644 index a03be55e88d..00000000000 --- a/owl-bot-staging/Dataproc/v1/src/V1/Gapic/BatchControllerGapicClient.php +++ /dev/null @@ -1,812 +0,0 @@ -locationName('[PROJECT]', '[LOCATION]'); - * $batch = new Batch(); - * $operationResponse = $batchControllerClient->createBatch($formattedParent, $batch); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $batchControllerClient->createBatch($formattedParent, $batch); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $batchControllerClient->resumeOperation($operationName, 'createBatch'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $batchControllerClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - * - * This service has a new (beta) implementation. See {@see - * \Google\Cloud\Dataproc\V1\Client\BatchControllerClient} to use the new surface. - */ -class BatchControllerGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.dataproc.v1.BatchController'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'dataproc.googleapis.com'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static $batchNameTemplate; - - private static $locationNameTemplate; - - private static $serviceNameTemplate; - - private static $pathTemplateMap; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/batch_controller_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/batch_controller_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/batch_controller_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/batch_controller_rest_client_config.php', - ], - ], - ]; - } - - private static function getBatchNameTemplate() - { - if (self::$batchNameTemplate == null) { - self::$batchNameTemplate = new PathTemplate('projects/{project}/locations/{location}/batches/{batch}'); - } - - return self::$batchNameTemplate; - } - - private static function getLocationNameTemplate() - { - if (self::$locationNameTemplate == null) { - self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); - } - - return self::$locationNameTemplate; - } - - private static function getServiceNameTemplate() - { - if (self::$serviceNameTemplate == null) { - self::$serviceNameTemplate = new PathTemplate('projects/{project}/locations/{location}/services/{service}'); - } - - return self::$serviceNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'batch' => self::getBatchNameTemplate(), - 'location' => self::getLocationNameTemplate(), - 'service' => self::getServiceNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a batch - * resource. - * - * @param string $project - * @param string $location - * @param string $batch - * - * @return string The formatted batch resource. - */ - public static function batchName($project, $location, $batch) - { - return self::getBatchNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'batch' => $batch, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName($project, $location) - { - return self::getLocationNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a service - * resource. - * - * @param string $project - * @param string $location - * @param string $service - * - * @return string The formatted service resource. - */ - public static function serviceName($project, $location, $service) - { - return self::getServiceNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'service' => $service, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - batch: projects/{project}/locations/{location}/batches/{batch} - * - location: projects/{project}/locations/{location} - * - service: projects/{project}/locations/{location}/services/{service} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'dataproc.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** - * Creates a batch workload that executes asynchronously. - * - * Sample code: - * ``` - * $batchControllerClient = new BatchControllerClient(); - * try { - * $formattedParent = $batchControllerClient->locationName('[PROJECT]', '[LOCATION]'); - * $batch = new Batch(); - * $operationResponse = $batchControllerClient->createBatch($formattedParent, $batch); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $batchControllerClient->createBatch($formattedParent, $batch); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $batchControllerClient->resumeOperation($operationName, 'createBatch'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $batchControllerClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource where this batch will be created. - * @param Batch $batch Required. The batch to create. - * @param array $optionalArgs { - * Optional. - * - * @type string $batchId - * Optional. The ID to use for the batch, which will become the final - * component of the batch's resource name. - * - * This value must be 4-63 characters. Valid characters are `/[a-z][0-9]-/`. - * @type string $requestId - * Optional. A unique ID used to identify the request. If the service - * receives two - * [CreateBatchRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateBatchRequest)s - * with the same request_id, the second request is ignored and the - * Operation that corresponds to the first Batch created and stored - * in the backend is returned. - * - * Recommendation: Set this value to a - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - * - * The value must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). The maximum length is 40 characters. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createBatch($parent, $batch, array $optionalArgs = []) - { - $request = new CreateBatchRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setBatch($batch); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['batchId'])) { - $request->setBatchId($optionalArgs['batchId']); - } - - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateBatch', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes the batch workload resource. If the batch is not in terminal state, - * the delete fails and the response returns `FAILED_PRECONDITION`. - * - * Sample code: - * ``` - * $batchControllerClient = new BatchControllerClient(); - * try { - * $formattedName = $batchControllerClient->batchName('[PROJECT]', '[LOCATION]', '[BATCH]'); - * $batchControllerClient->deleteBatch($formattedName); - * } finally { - * $batchControllerClient->close(); - * } - * ``` - * - * @param string $name Required. The fully qualified name of the batch to retrieve - * in the format - * "projects/PROJECT_ID/locations/DATAPROC_REGION/batches/BATCH_ID" - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - */ - public function deleteBatch($name, array $optionalArgs = []) - { - $request = new DeleteBatchRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteBatch', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets the batch workload resource representation. - * - * Sample code: - * ``` - * $batchControllerClient = new BatchControllerClient(); - * try { - * $formattedName = $batchControllerClient->batchName('[PROJECT]', '[LOCATION]', '[BATCH]'); - * $response = $batchControllerClient->getBatch($formattedName); - * } finally { - * $batchControllerClient->close(); - * } - * ``` - * - * @param string $name Required. The fully qualified name of the batch to retrieve - * in the format - * "projects/PROJECT_ID/locations/DATAPROC_REGION/batches/BATCH_ID" - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataproc\V1\Batch - * - * @throws ApiException if the remote call fails - */ - public function getBatch($name, array $optionalArgs = []) - { - $request = new GetBatchRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetBatch', Batch::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists batch workloads. - * - * Sample code: - * ``` - * $batchControllerClient = new BatchControllerClient(); - * try { - * $formattedParent = $batchControllerClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $batchControllerClient->listBatches($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $batchControllerClient->listBatches($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $batchControllerClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent, which owns this collection of batches. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type string $filter - * Optional. A filter for the batches to return in the response. - * - * A filter is a logical expression constraining the values of various fields - * in each batch resource. Filters are case sensitive, and may contain - * multiple clauses combined with logical operators (AND/OR). - * Supported fields are `batch_id`, `batch_uuid`, `state`, and `create_time`. - * - * e.g. `state = RUNNING and create_time < "2023-01-01T00:00:00Z"` - * filters for batches in state RUNNING that were created before 2023-01-01 - * - * See https://google.aip.dev/assets/misc/ebnf-filtering.txt for a detailed - * description of the filter syntax and a list of supported comparisons. - * @type string $orderBy - * Optional. Field(s) on which to sort the list of batches. - * - * Currently the only supported sort orders are unspecified (empty) and - * `create_time desc` to sort by most recently created batches first. - * - * See https://google.aip.dev/132#ordering for more details. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listBatches($parent, array $optionalArgs = []) - { - $request = new ListBatchesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListBatches', $optionalArgs, ListBatchesResponse::class, $request); - } - - /** - * Gets the access control policy for a resource. Returns an empty policy - if the resource exists and does not have a policy set. - * - * Sample code: - * ``` - * $batchControllerClient = new BatchControllerClient(); - * try { - * $resource = 'resource'; - * $response = $batchControllerClient->getIamPolicy($resource); - * } finally { - * $batchControllerClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - * @param array $optionalArgs { - * Optional. - * - * @type GetPolicyOptions $options - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function getIamPolicy($resource, array $optionalArgs = []) - { - $request = new GetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['options'])) { - $request->setOptions($optionalArgs['options']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); - } - - /** - * Sets the access control policy on the specified resource. Replaces - any existing policy. - - Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` - errors. - * - * Sample code: - * ``` - * $batchControllerClient = new BatchControllerClient(); - * try { - * $resource = 'resource'; - * $policy = new Policy(); - * $response = $batchControllerClient->setIamPolicy($resource, $policy); - * } finally { - * $batchControllerClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being specified. - * See the operation documentation for the appropriate value for this field. - * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of - * the policy is limited to a few 10s of KB. An empty policy is a - * valid policy but certain Cloud Platform services (such as Projects) - * might reject them. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - * the fields in the mask will be modified. If no mask is provided, the - * following default mask is used: - * - * `paths: "bindings, etag"` - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function setIamPolicy($resource, $policy, array $optionalArgs = []) - { - $request = new SetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPolicy($policy); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('SetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); - } - - /** - * Returns permissions that a caller has on the specified resource. If the - resource does not exist, this will return an empty set of - permissions, not a `NOT_FOUND` error. - - Note: This operation is designed to be used for building - permission-aware UIs and command-line tools, not for authorization - checking. This operation may "fail open" without warning. - * - * Sample code: - * ``` - * $batchControllerClient = new BatchControllerClient(); - * try { - * $resource = 'resource'; - * $permissions = []; - * $response = $batchControllerClient->testIamPermissions($resource, $permissions); - * } finally { - * $batchControllerClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\TestIamPermissionsResponse - * - * @throws ApiException if the remote call fails - */ - public function testIamPermissions($resource, $permissions, array $optionalArgs = []) - { - $request = new TestIamPermissionsRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPermissions($permissions); - $requestParamHeaders['resource'] = $resource; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); - } -} diff --git a/owl-bot-staging/Dataproc/v1/src/V1/Gapic/ClusterControllerGapicClient.php b/owl-bot-staging/Dataproc/v1/src/V1/Gapic/ClusterControllerGapicClient.php deleted file mode 100644 index c89cd323508..00000000000 --- a/owl-bot-staging/Dataproc/v1/src/V1/Gapic/ClusterControllerGapicClient.php +++ /dev/null @@ -1,1395 +0,0 @@ -createCluster($projectId, $region, $cluster); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $clusterControllerClient->createCluster($projectId, $region, $cluster); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $clusterControllerClient->resumeOperation($operationName, 'createCluster'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $clusterControllerClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - * - * This service has a new (beta) implementation. See {@see - * \Google\Cloud\Dataproc\V1\Client\ClusterControllerClient} to use the new - * surface. - */ -class ClusterControllerGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.dataproc.v1.ClusterController'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'dataproc.googleapis.com'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static $clusterNameTemplate; - - private static $clusterRegionNameTemplate; - - private static $nodeGroupNameTemplate; - - private static $serviceNameTemplate; - - private static $pathTemplateMap; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/cluster_controller_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/cluster_controller_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/cluster_controller_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/cluster_controller_rest_client_config.php', - ], - ], - ]; - } - - private static function getClusterNameTemplate() - { - if (self::$clusterNameTemplate == null) { - self::$clusterNameTemplate = new PathTemplate('projects/{project}/locations/{location}/clusters/{cluster}'); - } - - return self::$clusterNameTemplate; - } - - private static function getClusterRegionNameTemplate() - { - if (self::$clusterRegionNameTemplate == null) { - self::$clusterRegionNameTemplate = new PathTemplate('projects/{project}/regions/{region}/clusters/{cluster}'); - } - - return self::$clusterRegionNameTemplate; - } - - private static function getNodeGroupNameTemplate() - { - if (self::$nodeGroupNameTemplate == null) { - self::$nodeGroupNameTemplate = new PathTemplate('projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{node_group}'); - } - - return self::$nodeGroupNameTemplate; - } - - private static function getServiceNameTemplate() - { - if (self::$serviceNameTemplate == null) { - self::$serviceNameTemplate = new PathTemplate('projects/{project}/locations/{location}/services/{service}'); - } - - return self::$serviceNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'cluster' => self::getClusterNameTemplate(), - 'clusterRegion' => self::getClusterRegionNameTemplate(), - 'nodeGroup' => self::getNodeGroupNameTemplate(), - 'service' => self::getServiceNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a cluster - * resource. - * - * @param string $project - * @param string $location - * @param string $cluster - * - * @return string The formatted cluster resource. - */ - public static function clusterName($project, $location, $cluster) - { - return self::getClusterNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'cluster' => $cluster, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * cluster_region resource. - * - * @param string $project - * @param string $region - * @param string $cluster - * - * @return string The formatted cluster_region resource. - */ - public static function clusterRegionName($project, $region, $cluster) - { - return self::getClusterRegionNameTemplate()->render([ - 'project' => $project, - 'region' => $region, - 'cluster' => $cluster, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a node_group - * resource. - * - * @param string $project - * @param string $region - * @param string $cluster - * @param string $nodeGroup - * - * @return string The formatted node_group resource. - */ - public static function nodeGroupName($project, $region, $cluster, $nodeGroup) - { - return self::getNodeGroupNameTemplate()->render([ - 'project' => $project, - 'region' => $region, - 'cluster' => $cluster, - 'node_group' => $nodeGroup, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a service - * resource. - * - * @param string $project - * @param string $location - * @param string $service - * - * @return string The formatted service resource. - */ - public static function serviceName($project, $location, $service) - { - return self::getServiceNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'service' => $service, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - cluster: projects/{project}/locations/{location}/clusters/{cluster} - * - clusterRegion: projects/{project}/regions/{region}/clusters/{cluster} - * - nodeGroup: projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{node_group} - * - service: projects/{project}/locations/{location}/services/{service} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'dataproc.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** - * Creates a cluster in a project. The returned - * [Operation.metadata][google.longrunning.Operation.metadata] will be - * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). - * - * Sample code: - * ``` - * $clusterControllerClient = new ClusterControllerClient(); - * try { - * $projectId = 'project_id'; - * $region = 'region'; - * $cluster = new Cluster(); - * $operationResponse = $clusterControllerClient->createCluster($projectId, $region, $cluster); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $clusterControllerClient->createCluster($projectId, $region, $cluster); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $clusterControllerClient->resumeOperation($operationName, 'createCluster'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $clusterControllerClient->close(); - * } - * ``` - * - * @param string $projectId Required. The ID of the Google Cloud Platform project that the cluster - * belongs to. - * @param string $region Required. The Dataproc region in which to handle the request. - * @param Cluster $cluster Required. The cluster to create. - * @param array $optionalArgs { - * Optional. - * - * @type string $requestId - * Optional. A unique ID used to identify the request. If the server receives - * two - * [CreateClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateClusterRequest)s - * with the same id, then the second request will be ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created - * and stored in the backend is returned. - * - * It is recommended to always set this value to a - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - * - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). The maximum length is 40 characters. - * @type int $actionOnFailedPrimaryWorkers - * Optional. Failure action when primary worker creation fails. - * For allowed values, use constants defined on {@see \Google\Cloud\Dataproc\V1\FailureAction} - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createCluster($projectId, $region, $cluster, array $optionalArgs = []) - { - $request = new CreateClusterRequest(); - $requestParamHeaders = []; - $request->setProjectId($projectId); - $request->setRegion($region); - $request->setCluster($cluster); - $requestParamHeaders['project_id'] = $projectId; - $requestParamHeaders['region'] = $region; - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - if (isset($optionalArgs['actionOnFailedPrimaryWorkers'])) { - $request->setActionOnFailedPrimaryWorkers($optionalArgs['actionOnFailedPrimaryWorkers']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateCluster', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes a cluster in a project. The returned - * [Operation.metadata][google.longrunning.Operation.metadata] will be - * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). - * - * Sample code: - * ``` - * $clusterControllerClient = new ClusterControllerClient(); - * try { - * $projectId = 'project_id'; - * $region = 'region'; - * $clusterName = 'cluster_name'; - * $operationResponse = $clusterControllerClient->deleteCluster($projectId, $region, $clusterName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $clusterControllerClient->deleteCluster($projectId, $region, $clusterName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $clusterControllerClient->resumeOperation($operationName, 'deleteCluster'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $clusterControllerClient->close(); - * } - * ``` - * - * @param string $projectId Required. The ID of the Google Cloud Platform project that the cluster - * belongs to. - * @param string $region Required. The Dataproc region in which to handle the request. - * @param string $clusterName Required. The cluster name. - * @param array $optionalArgs { - * Optional. - * - * @type string $clusterUuid - * Optional. Specifying the `cluster_uuid` means the RPC should fail - * (with error NOT_FOUND) if cluster with specified UUID does not exist. - * @type string $requestId - * Optional. A unique ID used to identify the request. If the server - * receives two - * [DeleteClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.DeleteClusterRequest)s - * with the same id, then the second request will be ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created - * and stored in the backend is returned. - * - * It is recommended to always set this value to a - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - * - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). The maximum length is 40 characters. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteCluster($projectId, $region, $clusterName, array $optionalArgs = []) - { - $request = new DeleteClusterRequest(); - $requestParamHeaders = []; - $request->setProjectId($projectId); - $request->setRegion($region); - $request->setClusterName($clusterName); - $requestParamHeaders['project_id'] = $projectId; - $requestParamHeaders['region'] = $region; - $requestParamHeaders['cluster_name'] = $clusterName; - if (isset($optionalArgs['clusterUuid'])) { - $request->setClusterUuid($optionalArgs['clusterUuid']); - } - - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('DeleteCluster', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Gets cluster diagnostic information. The returned - * [Operation.metadata][google.longrunning.Operation.metadata] will be - * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). - * After the operation completes, - * [Operation.response][google.longrunning.Operation.response] - * contains - * [DiagnoseClusterResults](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#diagnoseclusterresults). - * - * Sample code: - * ``` - * $clusterControllerClient = new ClusterControllerClient(); - * try { - * $projectId = 'project_id'; - * $region = 'region'; - * $clusterName = 'cluster_name'; - * $operationResponse = $clusterControllerClient->diagnoseCluster($projectId, $region, $clusterName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $clusterControllerClient->diagnoseCluster($projectId, $region, $clusterName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $clusterControllerClient->resumeOperation($operationName, 'diagnoseCluster'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $clusterControllerClient->close(); - * } - * ``` - * - * @param string $projectId Required. The ID of the Google Cloud Platform project that the cluster - * belongs to. - * @param string $region Required. The Dataproc region in which to handle the request. - * @param string $clusterName Required. The cluster name. - * @param array $optionalArgs { - * Optional. - * - * @type string $tarballGcsDir - * Optional. The output Cloud Storage directory for the diagnostic - * tarball. If not specified, a task-specific directory in the cluster's - * staging bucket will be used. - * @type Interval $diagnosisInterval - * Optional. Time interval in which diagnosis should be carried out on the - * cluster. - * @type string[] $jobs - * Optional. Specifies a list of jobs on which diagnosis is to be performed. - * Format: projects/{project}/regions/{region}/jobs/{job} - * @type string[] $yarnApplicationIds - * Optional. Specifies a list of yarn applications on which diagnosis is to be - * performed. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function diagnoseCluster($projectId, $region, $clusterName, array $optionalArgs = []) - { - $request = new DiagnoseClusterRequest(); - $requestParamHeaders = []; - $request->setProjectId($projectId); - $request->setRegion($region); - $request->setClusterName($clusterName); - $requestParamHeaders['project_id'] = $projectId; - $requestParamHeaders['region'] = $region; - $requestParamHeaders['cluster_name'] = $clusterName; - if (isset($optionalArgs['tarballGcsDir'])) { - $request->setTarballGcsDir($optionalArgs['tarballGcsDir']); - } - - if (isset($optionalArgs['diagnosisInterval'])) { - $request->setDiagnosisInterval($optionalArgs['diagnosisInterval']); - } - - if (isset($optionalArgs['jobs'])) { - $request->setJobs($optionalArgs['jobs']); - } - - if (isset($optionalArgs['yarnApplicationIds'])) { - $request->setYarnApplicationIds($optionalArgs['yarnApplicationIds']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('DiagnoseCluster', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Gets the resource representation for a cluster in a project. - * - * Sample code: - * ``` - * $clusterControllerClient = new ClusterControllerClient(); - * try { - * $projectId = 'project_id'; - * $region = 'region'; - * $clusterName = 'cluster_name'; - * $response = $clusterControllerClient->getCluster($projectId, $region, $clusterName); - * } finally { - * $clusterControllerClient->close(); - * } - * ``` - * - * @param string $projectId Required. The ID of the Google Cloud Platform project that the cluster - * belongs to. - * @param string $region Required. The Dataproc region in which to handle the request. - * @param string $clusterName Required. The cluster name. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataproc\V1\Cluster - * - * @throws ApiException if the remote call fails - */ - public function getCluster($projectId, $region, $clusterName, array $optionalArgs = []) - { - $request = new GetClusterRequest(); - $requestParamHeaders = []; - $request->setProjectId($projectId); - $request->setRegion($region); - $request->setClusterName($clusterName); - $requestParamHeaders['project_id'] = $projectId; - $requestParamHeaders['region'] = $region; - $requestParamHeaders['cluster_name'] = $clusterName; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetCluster', Cluster::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists all regions/{region}/clusters in a project alphabetically. - * - * Sample code: - * ``` - * $clusterControllerClient = new ClusterControllerClient(); - * try { - * $projectId = 'project_id'; - * $region = 'region'; - * // Iterate over pages of elements - * $pagedResponse = $clusterControllerClient->listClusters($projectId, $region); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $clusterControllerClient->listClusters($projectId, $region); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $clusterControllerClient->close(); - * } - * ``` - * - * @param string $projectId Required. The ID of the Google Cloud Platform project that the cluster - * belongs to. - * @param string $region Required. The Dataproc region in which to handle the request. - * @param array $optionalArgs { - * Optional. - * - * @type string $filter - * Optional. A filter constraining the clusters to list. Filters are - * case-sensitive and have the following syntax: - * - * field = value [AND [field = value]] ... - * - * where **field** is one of `status.state`, `clusterName`, or `labels.[KEY]`, - * and `[KEY]` is a label key. **value** can be `*` to match all values. - * `status.state` can be one of the following: `ACTIVE`, `INACTIVE`, - * `CREATING`, `RUNNING`, `ERROR`, `DELETING`, or `UPDATING`. `ACTIVE` - * contains the `CREATING`, `UPDATING`, and `RUNNING` states. `INACTIVE` - * contains the `DELETING` and `ERROR` states. - * `clusterName` is the name of the cluster provided at creation time. - * Only the logical `AND` operator is supported; space-separated items are - * treated as having an implicit `AND` operator. - * - * Example filter: - * - * status.state = ACTIVE AND clusterName = mycluster - * AND labels.env = staging AND labels.starred = * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listClusters($projectId, $region, array $optionalArgs = []) - { - $request = new ListClustersRequest(); - $requestParamHeaders = []; - $request->setProjectId($projectId); - $request->setRegion($region); - $requestParamHeaders['project_id'] = $projectId; - $requestParamHeaders['region'] = $region; - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListClusters', $optionalArgs, ListClustersResponse::class, $request); - } - - /** - * Starts a cluster in a project. - * - * Sample code: - * ``` - * $clusterControllerClient = new ClusterControllerClient(); - * try { - * $projectId = 'project_id'; - * $region = 'region'; - * $clusterName = 'cluster_name'; - * $operationResponse = $clusterControllerClient->startCluster($projectId, $region, $clusterName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $clusterControllerClient->startCluster($projectId, $region, $clusterName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $clusterControllerClient->resumeOperation($operationName, 'startCluster'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $clusterControllerClient->close(); - * } - * ``` - * - * @param string $projectId Required. The ID of the Google Cloud Platform project the - * cluster belongs to. - * @param string $region Required. The Dataproc region in which to handle the request. - * @param string $clusterName Required. The cluster name. - * @param array $optionalArgs { - * Optional. - * - * @type string $clusterUuid - * Optional. Specifying the `cluster_uuid` means the RPC will fail - * (with error NOT_FOUND) if a cluster with the specified UUID does not exist. - * @type string $requestId - * Optional. A unique ID used to identify the request. If the server - * receives two - * [StartClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.StartClusterRequest)s - * with the same id, then the second request will be ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created - * and stored in the backend is returned. - * - * Recommendation: Set this value to a - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - * - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). The maximum length is 40 characters. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function startCluster($projectId, $region, $clusterName, array $optionalArgs = []) - { - $request = new StartClusterRequest(); - $requestParamHeaders = []; - $request->setProjectId($projectId); - $request->setRegion($region); - $request->setClusterName($clusterName); - $requestParamHeaders['project_id'] = $projectId; - $requestParamHeaders['region'] = $region; - $requestParamHeaders['cluster_name'] = $clusterName; - if (isset($optionalArgs['clusterUuid'])) { - $request->setClusterUuid($optionalArgs['clusterUuid']); - } - - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('StartCluster', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Stops a cluster in a project. - * - * Sample code: - * ``` - * $clusterControllerClient = new ClusterControllerClient(); - * try { - * $projectId = 'project_id'; - * $region = 'region'; - * $clusterName = 'cluster_name'; - * $operationResponse = $clusterControllerClient->stopCluster($projectId, $region, $clusterName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $clusterControllerClient->stopCluster($projectId, $region, $clusterName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $clusterControllerClient->resumeOperation($operationName, 'stopCluster'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $clusterControllerClient->close(); - * } - * ``` - * - * @param string $projectId Required. The ID of the Google Cloud Platform project the - * cluster belongs to. - * @param string $region Required. The Dataproc region in which to handle the request. - * @param string $clusterName Required. The cluster name. - * @param array $optionalArgs { - * Optional. - * - * @type string $clusterUuid - * Optional. Specifying the `cluster_uuid` means the RPC will fail - * (with error NOT_FOUND) if a cluster with the specified UUID does not exist. - * @type string $requestId - * Optional. A unique ID used to identify the request. If the server - * receives two - * [StopClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.StopClusterRequest)s - * with the same id, then the second request will be ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created - * and stored in the backend is returned. - * - * Recommendation: Set this value to a - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - * - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). The maximum length is 40 characters. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function stopCluster($projectId, $region, $clusterName, array $optionalArgs = []) - { - $request = new StopClusterRequest(); - $requestParamHeaders = []; - $request->setProjectId($projectId); - $request->setRegion($region); - $request->setClusterName($clusterName); - $requestParamHeaders['project_id'] = $projectId; - $requestParamHeaders['region'] = $region; - $requestParamHeaders['cluster_name'] = $clusterName; - if (isset($optionalArgs['clusterUuid'])) { - $request->setClusterUuid($optionalArgs['clusterUuid']); - } - - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('StopCluster', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Updates a cluster in a project. The returned - * [Operation.metadata][google.longrunning.Operation.metadata] will be - * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). - * The cluster must be in a - * [`RUNNING`][google.cloud.dataproc.v1.ClusterStatus.State] state or an error - * is returned. - * - * Sample code: - * ``` - * $clusterControllerClient = new ClusterControllerClient(); - * try { - * $projectId = 'project_id'; - * $region = 'region'; - * $clusterName = 'cluster_name'; - * $cluster = new Cluster(); - * $updateMask = new FieldMask(); - * $operationResponse = $clusterControllerClient->updateCluster($projectId, $region, $clusterName, $cluster, $updateMask); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $clusterControllerClient->updateCluster($projectId, $region, $clusterName, $cluster, $updateMask); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $clusterControllerClient->resumeOperation($operationName, 'updateCluster'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $clusterControllerClient->close(); - * } - * ``` - * - * @param string $projectId Required. The ID of the Google Cloud Platform project the - * cluster belongs to. - * @param string $region Required. The Dataproc region in which to handle the request. - * @param string $clusterName Required. The cluster name. - * @param Cluster $cluster Required. The changes to the cluster. - * @param FieldMask $updateMask Required. Specifies the path, relative to `Cluster`, of - * the field to update. For example, to change the number of workers - * in a cluster to 5, the `update_mask` parameter would be - * specified as `config.worker_config.num_instances`, - * and the `PATCH` request body would specify the new value, as follows: - * - * { - * "config":{ - * "workerConfig":{ - * "numInstances":"5" - * } - * } - * } - * Similarly, to change the number of preemptible workers in a cluster to 5, - * the `update_mask` parameter would be - * `config.secondary_worker_config.num_instances`, and the `PATCH` request - * body would be set as follows: - * - * { - * "config":{ - * "secondaryWorkerConfig":{ - * "numInstances":"5" - * } - * } - * } - * Note: Currently, only the following fields can be updated: - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - *
MaskPurpose
labelsUpdate labels
config.worker_config.num_instancesResize primary worker group
config.secondary_worker_config.num_instancesResize secondary worker group
config.autoscaling_config.policy_uriUse, stop using, or - * change autoscaling policies
- * @param array $optionalArgs { - * Optional. - * - * @type Duration $gracefulDecommissionTimeout - * Optional. Timeout for graceful YARN decommissioning. Graceful - * decommissioning allows removing nodes from the cluster without - * interrupting jobs in progress. Timeout specifies how long to wait for jobs - * in progress to finish before forcefully removing nodes (and potentially - * interrupting jobs). Default timeout is 0 (for forceful decommission), and - * the maximum allowed timeout is 1 day. (see JSON representation of - * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). - * - * Only supported on Dataproc image versions 1.2 and higher. - * @type string $requestId - * Optional. A unique ID used to identify the request. If the server - * receives two - * [UpdateClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.UpdateClusterRequest)s - * with the same id, then the second request will be ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created - * and stored in the backend is returned. - * - * It is recommended to always set this value to a - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - * - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). The maximum length is 40 characters. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updateCluster($projectId, $region, $clusterName, $cluster, $updateMask, array $optionalArgs = []) - { - $request = new UpdateClusterRequest(); - $requestParamHeaders = []; - $request->setProjectId($projectId); - $request->setRegion($region); - $request->setClusterName($clusterName); - $request->setCluster($cluster); - $request->setUpdateMask($updateMask); - $requestParamHeaders['project_id'] = $projectId; - $requestParamHeaders['region'] = $region; - $requestParamHeaders['cluster_name'] = $clusterName; - if (isset($optionalArgs['gracefulDecommissionTimeout'])) { - $request->setGracefulDecommissionTimeout($optionalArgs['gracefulDecommissionTimeout']); - } - - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UpdateCluster', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Gets the access control policy for a resource. Returns an empty policy - if the resource exists and does not have a policy set. - * - * Sample code: - * ``` - * $clusterControllerClient = new ClusterControllerClient(); - * try { - * $resource = 'resource'; - * $response = $clusterControllerClient->getIamPolicy($resource); - * } finally { - * $clusterControllerClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - * @param array $optionalArgs { - * Optional. - * - * @type GetPolicyOptions $options - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function getIamPolicy($resource, array $optionalArgs = []) - { - $request = new GetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['options'])) { - $request->setOptions($optionalArgs['options']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); - } - - /** - * Sets the access control policy on the specified resource. Replaces - any existing policy. - - Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` - errors. - * - * Sample code: - * ``` - * $clusterControllerClient = new ClusterControllerClient(); - * try { - * $resource = 'resource'; - * $policy = new Policy(); - * $response = $clusterControllerClient->setIamPolicy($resource, $policy); - * } finally { - * $clusterControllerClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being specified. - * See the operation documentation for the appropriate value for this field. - * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of - * the policy is limited to a few 10s of KB. An empty policy is a - * valid policy but certain Cloud Platform services (such as Projects) - * might reject them. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - * the fields in the mask will be modified. If no mask is provided, the - * following default mask is used: - * - * `paths: "bindings, etag"` - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function setIamPolicy($resource, $policy, array $optionalArgs = []) - { - $request = new SetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPolicy($policy); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('SetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); - } - - /** - * Returns permissions that a caller has on the specified resource. If the - resource does not exist, this will return an empty set of - permissions, not a `NOT_FOUND` error. - - Note: This operation is designed to be used for building - permission-aware UIs and command-line tools, not for authorization - checking. This operation may "fail open" without warning. - * - * Sample code: - * ``` - * $clusterControllerClient = new ClusterControllerClient(); - * try { - * $resource = 'resource'; - * $permissions = []; - * $response = $clusterControllerClient->testIamPermissions($resource, $permissions); - * } finally { - * $clusterControllerClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\TestIamPermissionsResponse - * - * @throws ApiException if the remote call fails - */ - public function testIamPermissions($resource, $permissions, array $optionalArgs = []) - { - $request = new TestIamPermissionsRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPermissions($permissions); - $requestParamHeaders['resource'] = $resource; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); - } -} diff --git a/owl-bot-staging/Dataproc/v1/src/V1/Gapic/JobControllerGapicClient.php b/owl-bot-staging/Dataproc/v1/src/V1/Gapic/JobControllerGapicClient.php deleted file mode 100644 index 38bfe5b6849..00000000000 --- a/owl-bot-staging/Dataproc/v1/src/V1/Gapic/JobControllerGapicClient.php +++ /dev/null @@ -1,837 +0,0 @@ -cancelJob($projectId, $region, $jobId); - * } finally { - * $jobControllerClient->close(); - * } - * ``` - * - * This service has a new (beta) implementation. See {@see - * \Google\Cloud\Dataproc\V1\Client\JobControllerClient} to use the new surface. - */ -class JobControllerGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.dataproc.v1.JobController'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'dataproc.googleapis.com'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/job_controller_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/job_controller_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/job_controller_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/job_controller_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'dataproc.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** - * Starts a job cancellation request. To access the job resource - * after cancellation, call - * [regions/{region}/jobs.list](https://cloud.google.com/dataproc/docs/reference/rest/v1/projects.regions.jobs/list) - * or - * [regions/{region}/jobs.get](https://cloud.google.com/dataproc/docs/reference/rest/v1/projects.regions.jobs/get). - * - * Sample code: - * ``` - * $jobControllerClient = new JobControllerClient(); - * try { - * $projectId = 'project_id'; - * $region = 'region'; - * $jobId = 'job_id'; - * $response = $jobControllerClient->cancelJob($projectId, $region, $jobId); - * } finally { - * $jobControllerClient->close(); - * } - * ``` - * - * @param string $projectId Required. The ID of the Google Cloud Platform project that the job - * belongs to. - * @param string $region Required. The Dataproc region in which to handle the request. - * @param string $jobId Required. The job ID. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataproc\V1\Job - * - * @throws ApiException if the remote call fails - */ - public function cancelJob($projectId, $region, $jobId, array $optionalArgs = []) - { - $request = new CancelJobRequest(); - $requestParamHeaders = []; - $request->setProjectId($projectId); - $request->setRegion($region); - $request->setJobId($jobId); - $requestParamHeaders['project_id'] = $projectId; - $requestParamHeaders['region'] = $region; - $requestParamHeaders['job_id'] = $jobId; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CancelJob', Job::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes the job from the project. If the job is active, the delete fails, - * and the response returns `FAILED_PRECONDITION`. - * - * Sample code: - * ``` - * $jobControllerClient = new JobControllerClient(); - * try { - * $projectId = 'project_id'; - * $region = 'region'; - * $jobId = 'job_id'; - * $jobControllerClient->deleteJob($projectId, $region, $jobId); - * } finally { - * $jobControllerClient->close(); - * } - * ``` - * - * @param string $projectId Required. The ID of the Google Cloud Platform project that the job - * belongs to. - * @param string $region Required. The Dataproc region in which to handle the request. - * @param string $jobId Required. The job ID. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - */ - public function deleteJob($projectId, $region, $jobId, array $optionalArgs = []) - { - $request = new DeleteJobRequest(); - $requestParamHeaders = []; - $request->setProjectId($projectId); - $request->setRegion($region); - $request->setJobId($jobId); - $requestParamHeaders['project_id'] = $projectId; - $requestParamHeaders['region'] = $region; - $requestParamHeaders['job_id'] = $jobId; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteJob', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets the resource representation for a job in a project. - * - * Sample code: - * ``` - * $jobControllerClient = new JobControllerClient(); - * try { - * $projectId = 'project_id'; - * $region = 'region'; - * $jobId = 'job_id'; - * $response = $jobControllerClient->getJob($projectId, $region, $jobId); - * } finally { - * $jobControllerClient->close(); - * } - * ``` - * - * @param string $projectId Required. The ID of the Google Cloud Platform project that the job - * belongs to. - * @param string $region Required. The Dataproc region in which to handle the request. - * @param string $jobId Required. The job ID. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataproc\V1\Job - * - * @throws ApiException if the remote call fails - */ - public function getJob($projectId, $region, $jobId, array $optionalArgs = []) - { - $request = new GetJobRequest(); - $requestParamHeaders = []; - $request->setProjectId($projectId); - $request->setRegion($region); - $request->setJobId($jobId); - $requestParamHeaders['project_id'] = $projectId; - $requestParamHeaders['region'] = $region; - $requestParamHeaders['job_id'] = $jobId; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetJob', Job::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists regions/{region}/jobs in a project. - * - * Sample code: - * ``` - * $jobControllerClient = new JobControllerClient(); - * try { - * $projectId = 'project_id'; - * $region = 'region'; - * // Iterate over pages of elements - * $pagedResponse = $jobControllerClient->listJobs($projectId, $region); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $jobControllerClient->listJobs($projectId, $region); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $jobControllerClient->close(); - * } - * ``` - * - * @param string $projectId Required. The ID of the Google Cloud Platform project that the job - * belongs to. - * @param string $region Required. The Dataproc region in which to handle the request. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type string $clusterName - * Optional. If set, the returned jobs list includes only jobs that were - * submitted to the named cluster. - * @type int $jobStateMatcher - * Optional. Specifies enumerated categories of jobs to list. - * (default = match ALL jobs). - * - * If `filter` is provided, `jobStateMatcher` will be ignored. - * For allowed values, use constants defined on {@see \Google\Cloud\Dataproc\V1\ListJobsRequest\JobStateMatcher} - * @type string $filter - * Optional. A filter constraining the jobs to list. Filters are - * case-sensitive and have the following syntax: - * - * [field = value] AND [field [= value]] ... - * - * where **field** is `status.state` or `labels.[KEY]`, and `[KEY]` is a label - * key. **value** can be `*` to match all values. - * `status.state` can be either `ACTIVE` or `NON_ACTIVE`. - * Only the logical `AND` operator is supported; space-separated items are - * treated as having an implicit `AND` operator. - * - * Example filter: - * - * status.state = ACTIVE AND labels.env = staging AND labels.starred = * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listJobs($projectId, $region, array $optionalArgs = []) - { - $request = new ListJobsRequest(); - $requestParamHeaders = []; - $request->setProjectId($projectId); - $request->setRegion($region); - $requestParamHeaders['project_id'] = $projectId; - $requestParamHeaders['region'] = $region; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['clusterName'])) { - $request->setClusterName($optionalArgs['clusterName']); - } - - if (isset($optionalArgs['jobStateMatcher'])) { - $request->setJobStateMatcher($optionalArgs['jobStateMatcher']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListJobs', $optionalArgs, ListJobsResponse::class, $request); - } - - /** - * Submits a job to a cluster. - * - * Sample code: - * ``` - * $jobControllerClient = new JobControllerClient(); - * try { - * $projectId = 'project_id'; - * $region = 'region'; - * $job = new Job(); - * $response = $jobControllerClient->submitJob($projectId, $region, $job); - * } finally { - * $jobControllerClient->close(); - * } - * ``` - * - * @param string $projectId Required. The ID of the Google Cloud Platform project that the job - * belongs to. - * @param string $region Required. The Dataproc region in which to handle the request. - * @param Job $job Required. The job resource. - * @param array $optionalArgs { - * Optional. - * - * @type string $requestId - * Optional. A unique id used to identify the request. If the server - * receives two - * [SubmitJobRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.SubmitJobRequest)s - * with the same id, then the second request will be ignored and the - * first [Job][google.cloud.dataproc.v1.Job] created and stored in the backend - * is returned. - * - * It is recommended to always set this value to a - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - * - * The id must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). The maximum length is 40 characters. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataproc\V1\Job - * - * @throws ApiException if the remote call fails - */ - public function submitJob($projectId, $region, $job, array $optionalArgs = []) - { - $request = new SubmitJobRequest(); - $requestParamHeaders = []; - $request->setProjectId($projectId); - $request->setRegion($region); - $request->setJob($job); - $requestParamHeaders['project_id'] = $projectId; - $requestParamHeaders['region'] = $region; - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('SubmitJob', Job::class, $optionalArgs, $request)->wait(); - } - - /** - * Submits job to a cluster. - * - * Sample code: - * ``` - * $jobControllerClient = new JobControllerClient(); - * try { - * $projectId = 'project_id'; - * $region = 'region'; - * $job = new Job(); - * $operationResponse = $jobControllerClient->submitJobAsOperation($projectId, $region, $job); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $jobControllerClient->submitJobAsOperation($projectId, $region, $job); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $jobControllerClient->resumeOperation($operationName, 'submitJobAsOperation'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $jobControllerClient->close(); - * } - * ``` - * - * @param string $projectId Required. The ID of the Google Cloud Platform project that the job - * belongs to. - * @param string $region Required. The Dataproc region in which to handle the request. - * @param Job $job Required. The job resource. - * @param array $optionalArgs { - * Optional. - * - * @type string $requestId - * Optional. A unique id used to identify the request. If the server - * receives two - * [SubmitJobRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.SubmitJobRequest)s - * with the same id, then the second request will be ignored and the - * first [Job][google.cloud.dataproc.v1.Job] created and stored in the backend - * is returned. - * - * It is recommended to always set this value to a - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - * - * The id must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). The maximum length is 40 characters. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function submitJobAsOperation($projectId, $region, $job, array $optionalArgs = []) - { - $request = new SubmitJobRequest(); - $requestParamHeaders = []; - $request->setProjectId($projectId); - $request->setRegion($region); - $request->setJob($job); - $requestParamHeaders['project_id'] = $projectId; - $requestParamHeaders['region'] = $region; - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('SubmitJobAsOperation', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Updates a job in a project. - * - * Sample code: - * ``` - * $jobControllerClient = new JobControllerClient(); - * try { - * $projectId = 'project_id'; - * $region = 'region'; - * $jobId = 'job_id'; - * $job = new Job(); - * $updateMask = new FieldMask(); - * $response = $jobControllerClient->updateJob($projectId, $region, $jobId, $job, $updateMask); - * } finally { - * $jobControllerClient->close(); - * } - * ``` - * - * @param string $projectId Required. The ID of the Google Cloud Platform project that the job - * belongs to. - * @param string $region Required. The Dataproc region in which to handle the request. - * @param string $jobId Required. The job ID. - * @param Job $job Required. The changes to the job. - * @param FieldMask $updateMask Required. Specifies the path, relative to Job, of - * the field to update. For example, to update the labels of a Job the - * update_mask parameter would be specified as - * labels, and the `PATCH` request body would specify the new - * value. Note: Currently, labels is the only - * field that can be updated. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataproc\V1\Job - * - * @throws ApiException if the remote call fails - */ - public function updateJob($projectId, $region, $jobId, $job, $updateMask, array $optionalArgs = []) - { - $request = new UpdateJobRequest(); - $requestParamHeaders = []; - $request->setProjectId($projectId); - $request->setRegion($region); - $request->setJobId($jobId); - $request->setJob($job); - $request->setUpdateMask($updateMask); - $requestParamHeaders['project_id'] = $projectId; - $requestParamHeaders['region'] = $region; - $requestParamHeaders['job_id'] = $jobId; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateJob', Job::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets the access control policy for a resource. Returns an empty policy - if the resource exists and does not have a policy set. - * - * Sample code: - * ``` - * $jobControllerClient = new JobControllerClient(); - * try { - * $resource = 'resource'; - * $response = $jobControllerClient->getIamPolicy($resource); - * } finally { - * $jobControllerClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - * @param array $optionalArgs { - * Optional. - * - * @type GetPolicyOptions $options - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function getIamPolicy($resource, array $optionalArgs = []) - { - $request = new GetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['options'])) { - $request->setOptions($optionalArgs['options']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); - } - - /** - * Sets the access control policy on the specified resource. Replaces - any existing policy. - - Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` - errors. - * - * Sample code: - * ``` - * $jobControllerClient = new JobControllerClient(); - * try { - * $resource = 'resource'; - * $policy = new Policy(); - * $response = $jobControllerClient->setIamPolicy($resource, $policy); - * } finally { - * $jobControllerClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being specified. - * See the operation documentation for the appropriate value for this field. - * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of - * the policy is limited to a few 10s of KB. An empty policy is a - * valid policy but certain Cloud Platform services (such as Projects) - * might reject them. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - * the fields in the mask will be modified. If no mask is provided, the - * following default mask is used: - * - * `paths: "bindings, etag"` - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function setIamPolicy($resource, $policy, array $optionalArgs = []) - { - $request = new SetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPolicy($policy); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('SetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); - } - - /** - * Returns permissions that a caller has on the specified resource. If the - resource does not exist, this will return an empty set of - permissions, not a `NOT_FOUND` error. - - Note: This operation is designed to be used for building - permission-aware UIs and command-line tools, not for authorization - checking. This operation may "fail open" without warning. - * - * Sample code: - * ``` - * $jobControllerClient = new JobControllerClient(); - * try { - * $resource = 'resource'; - * $permissions = []; - * $response = $jobControllerClient->testIamPermissions($resource, $permissions); - * } finally { - * $jobControllerClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\TestIamPermissionsResponse - * - * @throws ApiException if the remote call fails - */ - public function testIamPermissions($resource, $permissions, array $optionalArgs = []) - { - $request = new TestIamPermissionsRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPermissions($permissions); - $requestParamHeaders['resource'] = $resource; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); - } -} diff --git a/owl-bot-staging/Dataproc/v1/src/V1/Gapic/NodeGroupControllerGapicClient.php b/owl-bot-staging/Dataproc/v1/src/V1/Gapic/NodeGroupControllerGapicClient.php deleted file mode 100644 index 6ab1f8b8d84..00000000000 --- a/owl-bot-staging/Dataproc/v1/src/V1/Gapic/NodeGroupControllerGapicClient.php +++ /dev/null @@ -1,761 +0,0 @@ -clusterRegionName('[PROJECT]', '[REGION]', '[CLUSTER]'); - * $nodeGroup = new NodeGroup(); - * $operationResponse = $nodeGroupControllerClient->createNodeGroup($formattedParent, $nodeGroup); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $nodeGroupControllerClient->createNodeGroup($formattedParent, $nodeGroup); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $nodeGroupControllerClient->resumeOperation($operationName, 'createNodeGroup'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $nodeGroupControllerClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - * - * This service has a new (beta) implementation. See {@see - * \Google\Cloud\Dataproc\V1\Client\NodeGroupControllerClient} to use the new - * surface. - */ -class NodeGroupControllerGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.dataproc.v1.NodeGroupController'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'dataproc.googleapis.com'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static $clusterRegionNameTemplate; - - private static $nodeGroupNameTemplate; - - private static $pathTemplateMap; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/node_group_controller_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/node_group_controller_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/node_group_controller_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/node_group_controller_rest_client_config.php', - ], - ], - ]; - } - - private static function getClusterRegionNameTemplate() - { - if (self::$clusterRegionNameTemplate == null) { - self::$clusterRegionNameTemplate = new PathTemplate('projects/{project}/regions/{region}/clusters/{cluster}'); - } - - return self::$clusterRegionNameTemplate; - } - - private static function getNodeGroupNameTemplate() - { - if (self::$nodeGroupNameTemplate == null) { - self::$nodeGroupNameTemplate = new PathTemplate('projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{node_group}'); - } - - return self::$nodeGroupNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'clusterRegion' => self::getClusterRegionNameTemplate(), - 'nodeGroup' => self::getNodeGroupNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * cluster_region resource. - * - * @param string $project - * @param string $region - * @param string $cluster - * - * @return string The formatted cluster_region resource. - */ - public static function clusterRegionName($project, $region, $cluster) - { - return self::getClusterRegionNameTemplate()->render([ - 'project' => $project, - 'region' => $region, - 'cluster' => $cluster, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a node_group - * resource. - * - * @param string $project - * @param string $region - * @param string $cluster - * @param string $nodeGroup - * - * @return string The formatted node_group resource. - */ - public static function nodeGroupName($project, $region, $cluster, $nodeGroup) - { - return self::getNodeGroupNameTemplate()->render([ - 'project' => $project, - 'region' => $region, - 'cluster' => $cluster, - 'node_group' => $nodeGroup, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - clusterRegion: projects/{project}/regions/{region}/clusters/{cluster} - * - nodeGroup: projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{node_group} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'dataproc.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** - * Creates a node group in a cluster. The returned - * [Operation.metadata][google.longrunning.Operation.metadata] is - * [NodeGroupOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#nodegroupoperationmetadata). - * - * Sample code: - * ``` - * $nodeGroupControllerClient = new NodeGroupControllerClient(); - * try { - * $formattedParent = $nodeGroupControllerClient->clusterRegionName('[PROJECT]', '[REGION]', '[CLUSTER]'); - * $nodeGroup = new NodeGroup(); - * $operationResponse = $nodeGroupControllerClient->createNodeGroup($formattedParent, $nodeGroup); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $nodeGroupControllerClient->createNodeGroup($formattedParent, $nodeGroup); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $nodeGroupControllerClient->resumeOperation($operationName, 'createNodeGroup'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $nodeGroupControllerClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource where this node group will be created. - * Format: `projects/{project}/regions/{region}/clusters/{cluster}` - * @param NodeGroup $nodeGroup Required. The node group to create. - * @param array $optionalArgs { - * Optional. - * - * @type string $nodeGroupId - * Optional. An optional node group ID. Generated if not specified. - * - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). Cannot begin or end with underscore - * or hyphen. Must consist of from 3 to 33 characters. - * @type string $requestId - * Optional. A unique ID used to identify the request. If the server receives - * two - * [CreateNodeGroupRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateNodeGroupRequests) - * with the same ID, the second request is ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created - * and stored in the backend is returned. - * - * Recommendation: Set this value to a - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - * - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). The maximum length is 40 characters. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createNodeGroup($parent, $nodeGroup, array $optionalArgs = []) - { - $request = new CreateNodeGroupRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setNodeGroup($nodeGroup); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['nodeGroupId'])) { - $request->setNodeGroupId($optionalArgs['nodeGroupId']); - } - - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateNodeGroup', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Gets the resource representation for a node group in a - * cluster. - * - * Sample code: - * ``` - * $nodeGroupControllerClient = new NodeGroupControllerClient(); - * try { - * $formattedName = $nodeGroupControllerClient->nodeGroupName('[PROJECT]', '[REGION]', '[CLUSTER]', '[NODE_GROUP]'); - * $response = $nodeGroupControllerClient->getNodeGroup($formattedName); - * } finally { - * $nodeGroupControllerClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the node group to retrieve. - * Format: - * `projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{nodeGroup}` - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataproc\V1\NodeGroup - * - * @throws ApiException if the remote call fails - */ - public function getNodeGroup($name, array $optionalArgs = []) - { - $request = new GetNodeGroupRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetNodeGroup', NodeGroup::class, $optionalArgs, $request)->wait(); - } - - /** - * Resizes a node group in a cluster. The returned - * [Operation.metadata][google.longrunning.Operation.metadata] is - * [NodeGroupOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#nodegroupoperationmetadata). - * - * Sample code: - * ``` - * $nodeGroupControllerClient = new NodeGroupControllerClient(); - * try { - * $name = 'name'; - * $size = 0; - * $operationResponse = $nodeGroupControllerClient->resizeNodeGroup($name, $size); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $nodeGroupControllerClient->resizeNodeGroup($name, $size); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $nodeGroupControllerClient->resumeOperation($operationName, 'resizeNodeGroup'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $nodeGroupControllerClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the node group to resize. - * Format: - * `projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{nodeGroup}` - * @param int $size Required. The number of running instances for the node group to maintain. - * The group adds or removes instances to maintain the number of instances - * specified by this parameter. - * @param array $optionalArgs { - * Optional. - * - * @type string $requestId - * Optional. A unique ID used to identify the request. If the server receives - * two - * [ResizeNodeGroupRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.ResizeNodeGroupRequests) - * with the same ID, the second request is ignored and the - * first [google.longrunning.Operation][google.longrunning.Operation] created - * and stored in the backend is returned. - * - * Recommendation: Set this value to a - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - * - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). The maximum length is 40 characters. - * @type Duration $gracefulDecommissionTimeout - * Optional. Timeout for graceful YARN decommissioning. [Graceful - * decommissioning] - * (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/scaling-clusters#graceful_decommissioning) - * allows the removal of nodes from the Compute Engine node group - * without interrupting jobs in progress. This timeout specifies how long to - * wait for jobs in progress to finish before forcefully removing nodes (and - * potentially interrupting jobs). Default timeout is 0 (for forceful - * decommission), and the maximum allowed timeout is 1 day. (see JSON - * representation of - * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). - * - * Only supported on Dataproc image versions 1.2 and higher. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function resizeNodeGroup($name, $size, array $optionalArgs = []) - { - $request = new ResizeNodeGroupRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setSize($size); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - if (isset($optionalArgs['gracefulDecommissionTimeout'])) { - $request->setGracefulDecommissionTimeout($optionalArgs['gracefulDecommissionTimeout']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('ResizeNodeGroup', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Gets the access control policy for a resource. Returns an empty policy - if the resource exists and does not have a policy set. - * - * Sample code: - * ``` - * $nodeGroupControllerClient = new NodeGroupControllerClient(); - * try { - * $resource = 'resource'; - * $response = $nodeGroupControllerClient->getIamPolicy($resource); - * } finally { - * $nodeGroupControllerClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - * @param array $optionalArgs { - * Optional. - * - * @type GetPolicyOptions $options - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function getIamPolicy($resource, array $optionalArgs = []) - { - $request = new GetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['options'])) { - $request->setOptions($optionalArgs['options']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); - } - - /** - * Sets the access control policy on the specified resource. Replaces - any existing policy. - - Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` - errors. - * - * Sample code: - * ``` - * $nodeGroupControllerClient = new NodeGroupControllerClient(); - * try { - * $resource = 'resource'; - * $policy = new Policy(); - * $response = $nodeGroupControllerClient->setIamPolicy($resource, $policy); - * } finally { - * $nodeGroupControllerClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being specified. - * See the operation documentation for the appropriate value for this field. - * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of - * the policy is limited to a few 10s of KB. An empty policy is a - * valid policy but certain Cloud Platform services (such as Projects) - * might reject them. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - * the fields in the mask will be modified. If no mask is provided, the - * following default mask is used: - * - * `paths: "bindings, etag"` - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function setIamPolicy($resource, $policy, array $optionalArgs = []) - { - $request = new SetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPolicy($policy); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('SetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); - } - - /** - * Returns permissions that a caller has on the specified resource. If the - resource does not exist, this will return an empty set of - permissions, not a `NOT_FOUND` error. - - Note: This operation is designed to be used for building - permission-aware UIs and command-line tools, not for authorization - checking. This operation may "fail open" without warning. - * - * Sample code: - * ``` - * $nodeGroupControllerClient = new NodeGroupControllerClient(); - * try { - * $resource = 'resource'; - * $permissions = []; - * $response = $nodeGroupControllerClient->testIamPermissions($resource, $permissions); - * } finally { - * $nodeGroupControllerClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\TestIamPermissionsResponse - * - * @throws ApiException if the remote call fails - */ - public function testIamPermissions($resource, $permissions, array $optionalArgs = []) - { - $request = new TestIamPermissionsRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPermissions($permissions); - $requestParamHeaders['resource'] = $resource; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); - } -} diff --git a/owl-bot-staging/Dataproc/v1/src/V1/Gapic/WorkflowTemplateServiceGapicClient.php b/owl-bot-staging/Dataproc/v1/src/V1/Gapic/WorkflowTemplateServiceGapicClient.php deleted file mode 100644 index 0c2d8e88f76..00000000000 --- a/owl-bot-staging/Dataproc/v1/src/V1/Gapic/WorkflowTemplateServiceGapicClient.php +++ /dev/null @@ -1,1201 +0,0 @@ -regionName('[PROJECT]', '[REGION]'); - * $template = new WorkflowTemplate(); - * $response = $workflowTemplateServiceClient->createWorkflowTemplate($formattedParent, $template); - * } finally { - * $workflowTemplateServiceClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - * - * This service has a new (beta) implementation. See {@see - * \Google\Cloud\Dataproc\V1\Client\WorkflowTemplateServiceClient} to use the new - * surface. - */ -class WorkflowTemplateServiceGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.dataproc.v1.WorkflowTemplateService'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'dataproc.googleapis.com'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static $clusterRegionNameTemplate; - - private static $locationNameTemplate; - - private static $nodeGroupNameTemplate; - - private static $projectLocationWorkflowTemplateNameTemplate; - - private static $projectRegionWorkflowTemplateNameTemplate; - - private static $regionNameTemplate; - - private static $serviceNameTemplate; - - private static $workflowTemplateNameTemplate; - - private static $pathTemplateMap; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/workflow_template_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/workflow_template_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/workflow_template_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/workflow_template_service_rest_client_config.php', - ], - ], - ]; - } - - private static function getClusterRegionNameTemplate() - { - if (self::$clusterRegionNameTemplate == null) { - self::$clusterRegionNameTemplate = new PathTemplate('projects/{project}/regions/{region}/clusters/{cluster}'); - } - - return self::$clusterRegionNameTemplate; - } - - private static function getLocationNameTemplate() - { - if (self::$locationNameTemplate == null) { - self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); - } - - return self::$locationNameTemplate; - } - - private static function getNodeGroupNameTemplate() - { - if (self::$nodeGroupNameTemplate == null) { - self::$nodeGroupNameTemplate = new PathTemplate('projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{node_group}'); - } - - return self::$nodeGroupNameTemplate; - } - - private static function getProjectLocationWorkflowTemplateNameTemplate() - { - if (self::$projectLocationWorkflowTemplateNameTemplate == null) { - self::$projectLocationWorkflowTemplateNameTemplate = new PathTemplate('projects/{project}/locations/{location}/workflowTemplates/{workflow_template}'); - } - - return self::$projectLocationWorkflowTemplateNameTemplate; - } - - private static function getProjectRegionWorkflowTemplateNameTemplate() - { - if (self::$projectRegionWorkflowTemplateNameTemplate == null) { - self::$projectRegionWorkflowTemplateNameTemplate = new PathTemplate('projects/{project}/regions/{region}/workflowTemplates/{workflow_template}'); - } - - return self::$projectRegionWorkflowTemplateNameTemplate; - } - - private static function getRegionNameTemplate() - { - if (self::$regionNameTemplate == null) { - self::$regionNameTemplate = new PathTemplate('projects/{project}/regions/{region}'); - } - - return self::$regionNameTemplate; - } - - private static function getServiceNameTemplate() - { - if (self::$serviceNameTemplate == null) { - self::$serviceNameTemplate = new PathTemplate('projects/{project}/locations/{location}/services/{service}'); - } - - return self::$serviceNameTemplate; - } - - private static function getWorkflowTemplateNameTemplate() - { - if (self::$workflowTemplateNameTemplate == null) { - self::$workflowTemplateNameTemplate = new PathTemplate('projects/{project}/regions/{region}/workflowTemplates/{workflow_template}'); - } - - return self::$workflowTemplateNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'clusterRegion' => self::getClusterRegionNameTemplate(), - 'location' => self::getLocationNameTemplate(), - 'nodeGroup' => self::getNodeGroupNameTemplate(), - 'projectLocationWorkflowTemplate' => self::getProjectLocationWorkflowTemplateNameTemplate(), - 'projectRegionWorkflowTemplate' => self::getProjectRegionWorkflowTemplateNameTemplate(), - 'region' => self::getRegionNameTemplate(), - 'service' => self::getServiceNameTemplate(), - 'workflowTemplate' => self::getWorkflowTemplateNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * cluster_region resource. - * - * @param string $project - * @param string $region - * @param string $cluster - * - * @return string The formatted cluster_region resource. - */ - public static function clusterRegionName($project, $region, $cluster) - { - return self::getClusterRegionNameTemplate()->render([ - 'project' => $project, - 'region' => $region, - 'cluster' => $cluster, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName($project, $location) - { - return self::getLocationNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a node_group - * resource. - * - * @param string $project - * @param string $region - * @param string $cluster - * @param string $nodeGroup - * - * @return string The formatted node_group resource. - */ - public static function nodeGroupName($project, $region, $cluster, $nodeGroup) - { - return self::getNodeGroupNameTemplate()->render([ - 'project' => $project, - 'region' => $region, - 'cluster' => $cluster, - 'node_group' => $nodeGroup, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_workflow_template resource. - * - * @param string $project - * @param string $location - * @param string $workflowTemplate - * - * @return string The formatted project_location_workflow_template resource. - */ - public static function projectLocationWorkflowTemplateName($project, $location, $workflowTemplate) - { - return self::getProjectLocationWorkflowTemplateNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'workflow_template' => $workflowTemplate, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_region_workflow_template resource. - * - * @param string $project - * @param string $region - * @param string $workflowTemplate - * - * @return string The formatted project_region_workflow_template resource. - */ - public static function projectRegionWorkflowTemplateName($project, $region, $workflowTemplate) - { - return self::getProjectRegionWorkflowTemplateNameTemplate()->render([ - 'project' => $project, - 'region' => $region, - 'workflow_template' => $workflowTemplate, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a region - * resource. - * - * @param string $project - * @param string $region - * - * @return string The formatted region resource. - */ - public static function regionName($project, $region) - { - return self::getRegionNameTemplate()->render([ - 'project' => $project, - 'region' => $region, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a service - * resource. - * - * @param string $project - * @param string $location - * @param string $service - * - * @return string The formatted service resource. - */ - public static function serviceName($project, $location, $service) - { - return self::getServiceNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'service' => $service, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * workflow_template resource. - * - * @param string $project - * @param string $region - * @param string $workflowTemplate - * - * @return string The formatted workflow_template resource. - */ - public static function workflowTemplateName($project, $region, $workflowTemplate) - { - return self::getWorkflowTemplateNameTemplate()->render([ - 'project' => $project, - 'region' => $region, - 'workflow_template' => $workflowTemplate, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - clusterRegion: projects/{project}/regions/{region}/clusters/{cluster} - * - location: projects/{project}/locations/{location} - * - nodeGroup: projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{node_group} - * - projectLocationWorkflowTemplate: projects/{project}/locations/{location}/workflowTemplates/{workflow_template} - * - projectRegionWorkflowTemplate: projects/{project}/regions/{region}/workflowTemplates/{workflow_template} - * - region: projects/{project}/regions/{region} - * - service: projects/{project}/locations/{location}/services/{service} - * - workflowTemplate: projects/{project}/regions/{region}/workflowTemplates/{workflow_template} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'dataproc.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** - * Creates new workflow template. - * - * Sample code: - * ``` - * $workflowTemplateServiceClient = new WorkflowTemplateServiceClient(); - * try { - * $formattedParent = $workflowTemplateServiceClient->regionName('[PROJECT]', '[REGION]'); - * $template = new WorkflowTemplate(); - * $response = $workflowTemplateServiceClient->createWorkflowTemplate($formattedParent, $template); - * } finally { - * $workflowTemplateServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the region or location, as described - * in https://cloud.google.com/apis/design/resource_names. - * - * * For `projects.regions.workflowTemplates.create`, the resource name of the - * region has the following format: - * `projects/{project_id}/regions/{region}` - * - * * For `projects.locations.workflowTemplates.create`, the resource name of - * the location has the following format: - * `projects/{project_id}/locations/{location}` - * @param WorkflowTemplate $template Required. The Dataproc workflow template to create. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataproc\V1\WorkflowTemplate - * - * @throws ApiException if the remote call fails - */ - public function createWorkflowTemplate($parent, $template, array $optionalArgs = []) - { - $request = new CreateWorkflowTemplateRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setTemplate($template); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateWorkflowTemplate', WorkflowTemplate::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes a workflow template. It does not cancel in-progress workflows. - * - * Sample code: - * ``` - * $workflowTemplateServiceClient = new WorkflowTemplateServiceClient(); - * try { - * $formattedName = $workflowTemplateServiceClient->workflowTemplateName('[PROJECT]', '[REGION]', '[WORKFLOW_TEMPLATE]'); - * $workflowTemplateServiceClient->deleteWorkflowTemplate($formattedName); - * } finally { - * $workflowTemplateServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the workflow template, as described - * in https://cloud.google.com/apis/design/resource_names. - * - * * For `projects.regions.workflowTemplates.delete`, the resource name - * of the template has the following format: - * `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}` - * - * * For `projects.locations.workflowTemplates.instantiate`, the resource name - * of the template has the following format: - * `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}` - * @param array $optionalArgs { - * Optional. - * - * @type int $version - * Optional. The version of workflow template to delete. If specified, - * will only delete the template if the current server version matches - * specified version. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - */ - public function deleteWorkflowTemplate($name, array $optionalArgs = []) - { - $request = new DeleteWorkflowTemplateRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['version'])) { - $request->setVersion($optionalArgs['version']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteWorkflowTemplate', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Retrieves the latest workflow template. - * - * Can retrieve previously instantiated template by specifying optional - * version parameter. - * - * Sample code: - * ``` - * $workflowTemplateServiceClient = new WorkflowTemplateServiceClient(); - * try { - * $formattedName = $workflowTemplateServiceClient->workflowTemplateName('[PROJECT]', '[REGION]', '[WORKFLOW_TEMPLATE]'); - * $response = $workflowTemplateServiceClient->getWorkflowTemplate($formattedName); - * } finally { - * $workflowTemplateServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the workflow template, as described - * in https://cloud.google.com/apis/design/resource_names. - * - * * For `projects.regions.workflowTemplates.get`, the resource name of the - * template has the following format: - * `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}` - * - * * For `projects.locations.workflowTemplates.get`, the resource name of the - * template has the following format: - * `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}` - * @param array $optionalArgs { - * Optional. - * - * @type int $version - * Optional. The version of workflow template to retrieve. Only previously - * instantiated versions can be retrieved. - * - * If unspecified, retrieves the current version. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataproc\V1\WorkflowTemplate - * - * @throws ApiException if the remote call fails - */ - public function getWorkflowTemplate($name, array $optionalArgs = []) - { - $request = new GetWorkflowTemplateRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['version'])) { - $request->setVersion($optionalArgs['version']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetWorkflowTemplate', WorkflowTemplate::class, $optionalArgs, $request)->wait(); - } - - /** - * Instantiates a template and begins execution. - * - * This method is equivalent to executing the sequence - * [CreateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.CreateWorkflowTemplate], - * [InstantiateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.InstantiateWorkflowTemplate], - * [DeleteWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.DeleteWorkflowTemplate]. - * - * The returned Operation can be used to track execution of - * workflow by polling - * [operations.get][google.longrunning.Operations.GetOperation]. - * The Operation will complete when entire workflow is finished. - * - * The running workflow can be aborted via - * [operations.cancel][google.longrunning.Operations.CancelOperation]. - * This will cause any inflight jobs to be cancelled and workflow-owned - * clusters to be deleted. - * - * The [Operation.metadata][google.longrunning.Operation.metadata] will be - * [WorkflowMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata). - * Also see [Using - * WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata). - * - * On successful completion, - * [Operation.response][google.longrunning.Operation.response] will be - * [Empty][google.protobuf.Empty]. - * - * Sample code: - * ``` - * $workflowTemplateServiceClient = new WorkflowTemplateServiceClient(); - * try { - * $formattedParent = $workflowTemplateServiceClient->regionName('[PROJECT]', '[REGION]'); - * $template = new WorkflowTemplate(); - * $operationResponse = $workflowTemplateServiceClient->instantiateInlineWorkflowTemplate($formattedParent, $template); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $workflowTemplateServiceClient->instantiateInlineWorkflowTemplate($formattedParent, $template); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $workflowTemplateServiceClient->resumeOperation($operationName, 'instantiateInlineWorkflowTemplate'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $workflowTemplateServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the region or location, as described - * in https://cloud.google.com/apis/design/resource_names. - * - * * For `projects.regions.workflowTemplates,instantiateinline`, the resource - * name of the region has the following format: - * `projects/{project_id}/regions/{region}` - * - * * For `projects.locations.workflowTemplates.instantiateinline`, the - * resource name of the location has the following format: - * `projects/{project_id}/locations/{location}` - * @param WorkflowTemplate $template Required. The workflow template to instantiate. - * @param array $optionalArgs { - * Optional. - * - * @type string $requestId - * Optional. A tag that prevents multiple concurrent workflow - * instances with the same tag from running. This mitigates risk of - * concurrent instances started due to retries. - * - * It is recommended to always set this value to a - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - * - * The tag must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). The maximum length is 40 characters. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function instantiateInlineWorkflowTemplate($parent, $template, array $optionalArgs = []) - { - $request = new InstantiateInlineWorkflowTemplateRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setTemplate($template); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('InstantiateInlineWorkflowTemplate', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Instantiates a template and begins execution. - * - * The returned Operation can be used to track execution of - * workflow by polling - * [operations.get][google.longrunning.Operations.GetOperation]. - * The Operation will complete when entire workflow is finished. - * - * The running workflow can be aborted via - * [operations.cancel][google.longrunning.Operations.CancelOperation]. - * This will cause any inflight jobs to be cancelled and workflow-owned - * clusters to be deleted. - * - * The [Operation.metadata][google.longrunning.Operation.metadata] will be - * [WorkflowMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata). - * Also see [Using - * WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata). - * - * On successful completion, - * [Operation.response][google.longrunning.Operation.response] will be - * [Empty][google.protobuf.Empty]. - * - * Sample code: - * ``` - * $workflowTemplateServiceClient = new WorkflowTemplateServiceClient(); - * try { - * $formattedName = $workflowTemplateServiceClient->workflowTemplateName('[PROJECT]', '[REGION]', '[WORKFLOW_TEMPLATE]'); - * $operationResponse = $workflowTemplateServiceClient->instantiateWorkflowTemplate($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $workflowTemplateServiceClient->instantiateWorkflowTemplate($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $workflowTemplateServiceClient->resumeOperation($operationName, 'instantiateWorkflowTemplate'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $workflowTemplateServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the workflow template, as described - * in https://cloud.google.com/apis/design/resource_names. - * - * * For `projects.regions.workflowTemplates.instantiate`, the resource name - * of the template has the following format: - * `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}` - * - * * For `projects.locations.workflowTemplates.instantiate`, the resource name - * of the template has the following format: - * `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}` - * @param array $optionalArgs { - * Optional. - * - * @type int $version - * Optional. The version of workflow template to instantiate. If specified, - * the workflow will be instantiated only if the current version of - * the workflow template has the supplied version. - * - * This option cannot be used to instantiate a previous version of - * workflow template. - * @type string $requestId - * Optional. A tag that prevents multiple concurrent workflow - * instances with the same tag from running. This mitigates risk of - * concurrent instances started due to retries. - * - * It is recommended to always set this value to a - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - * - * The tag must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and hyphens (-). The maximum length is 40 characters. - * @type array $parameters - * Optional. Map from parameter names to values that should be used for those - * parameters. Values may not exceed 1000 characters. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function instantiateWorkflowTemplate($name, array $optionalArgs = []) - { - $request = new InstantiateWorkflowTemplateRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['version'])) { - $request->setVersion($optionalArgs['version']); - } - - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - if (isset($optionalArgs['parameters'])) { - $request->setParameters($optionalArgs['parameters']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('InstantiateWorkflowTemplate', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Lists workflows that match the specified filter in the request. - * - * Sample code: - * ``` - * $workflowTemplateServiceClient = new WorkflowTemplateServiceClient(); - * try { - * $formattedParent = $workflowTemplateServiceClient->regionName('[PROJECT]', '[REGION]'); - * // Iterate over pages of elements - * $pagedResponse = $workflowTemplateServiceClient->listWorkflowTemplates($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $workflowTemplateServiceClient->listWorkflowTemplates($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $workflowTemplateServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the region or location, as described - * in https://cloud.google.com/apis/design/resource_names. - * - * * For `projects.regions.workflowTemplates,list`, the resource - * name of the region has the following format: - * `projects/{project_id}/regions/{region}` - * - * * For `projects.locations.workflowTemplates.list`, the - * resource name of the location has the following format: - * `projects/{project_id}/locations/{location}` - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listWorkflowTemplates($parent, array $optionalArgs = []) - { - $request = new ListWorkflowTemplatesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListWorkflowTemplates', $optionalArgs, ListWorkflowTemplatesResponse::class, $request); - } - - /** - * Updates (replaces) workflow template. The updated template - * must contain version that matches the current server version. - * - * Sample code: - * ``` - * $workflowTemplateServiceClient = new WorkflowTemplateServiceClient(); - * try { - * $template = new WorkflowTemplate(); - * $response = $workflowTemplateServiceClient->updateWorkflowTemplate($template); - * } finally { - * $workflowTemplateServiceClient->close(); - * } - * ``` - * - * @param WorkflowTemplate $template Required. The updated workflow template. - * - * The `template.version` field must match the current version. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataproc\V1\WorkflowTemplate - * - * @throws ApiException if the remote call fails - */ - public function updateWorkflowTemplate($template, array $optionalArgs = []) - { - $request = new UpdateWorkflowTemplateRequest(); - $requestParamHeaders = []; - $request->setTemplate($template); - $requestParamHeaders['template.name'] = $template->getName(); - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateWorkflowTemplate', WorkflowTemplate::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets the access control policy for a resource. Returns an empty policy - if the resource exists and does not have a policy set. - * - * Sample code: - * ``` - * $workflowTemplateServiceClient = new WorkflowTemplateServiceClient(); - * try { - * $resource = 'resource'; - * $response = $workflowTemplateServiceClient->getIamPolicy($resource); - * } finally { - * $workflowTemplateServiceClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - * @param array $optionalArgs { - * Optional. - * - * @type GetPolicyOptions $options - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function getIamPolicy($resource, array $optionalArgs = []) - { - $request = new GetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['options'])) { - $request->setOptions($optionalArgs['options']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); - } - - /** - * Sets the access control policy on the specified resource. Replaces - any existing policy. - - Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` - errors. - * - * Sample code: - * ``` - * $workflowTemplateServiceClient = new WorkflowTemplateServiceClient(); - * try { - * $resource = 'resource'; - * $policy = new Policy(); - * $response = $workflowTemplateServiceClient->setIamPolicy($resource, $policy); - * } finally { - * $workflowTemplateServiceClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being specified. - * See the operation documentation for the appropriate value for this field. - * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of - * the policy is limited to a few 10s of KB. An empty policy is a - * valid policy but certain Cloud Platform services (such as Projects) - * might reject them. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - * the fields in the mask will be modified. If no mask is provided, the - * following default mask is used: - * - * `paths: "bindings, etag"` - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function setIamPolicy($resource, $policy, array $optionalArgs = []) - { - $request = new SetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPolicy($policy); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('SetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); - } - - /** - * Returns permissions that a caller has on the specified resource. If the - resource does not exist, this will return an empty set of - permissions, not a `NOT_FOUND` error. - - Note: This operation is designed to be used for building - permission-aware UIs and command-line tools, not for authorization - checking. This operation may "fail open" without warning. - * - * Sample code: - * ``` - * $workflowTemplateServiceClient = new WorkflowTemplateServiceClient(); - * try { - * $resource = 'resource'; - * $permissions = []; - * $response = $workflowTemplateServiceClient->testIamPermissions($resource, $permissions); - * } finally { - * $workflowTemplateServiceClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\TestIamPermissionsResponse - * - * @throws ApiException if the remote call fails - */ - public function testIamPermissions($resource, $permissions, array $optionalArgs = []) - { - $request = new TestIamPermissionsRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPermissions($permissions); - $requestParamHeaders['resource'] = $resource; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); - } -} diff --git a/owl-bot-staging/Dataproc/v1/src/V1/JobControllerClient.php b/owl-bot-staging/Dataproc/v1/src/V1/JobControllerClient.php deleted file mode 100644 index 3c87c8f6e0b..00000000000 --- a/owl-bot-staging/Dataproc/v1/src/V1/JobControllerClient.php +++ /dev/null @@ -1,34 +0,0 @@ - [ - 'google.cloud.dataproc.v1.AutoscalingPolicyService' => [ - 'CreateAutoscalingPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataproc\V1\AutoscalingPolicy', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteAutoscalingPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetAutoscalingPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataproc\V1\AutoscalingPolicy', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListAutoscalingPolicies' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getPolicies', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dataproc\V1\ListAutoscalingPoliciesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateAutoscalingPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataproc\V1\AutoscalingPolicy', - 'headerParams' => [ - [ - 'keyName' => 'policy.name', - 'fieldAccessors' => [ - 'getPolicy', - 'getName', - ], - ], - ], - ], - 'GetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'SetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'TestIamPermissions' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'templateMap' => [ - 'autoscalingPolicy' => 'projects/{project}/locations/{location}/autoscalingPolicies/{autoscaling_policy}', - 'location' => 'projects/{project}/locations/{location}', - 'projectLocationAutoscalingPolicy' => 'projects/{project}/locations/{location}/autoscalingPolicies/{autoscaling_policy}', - 'projectRegionAutoscalingPolicy' => 'projects/{project}/regions/{region}/autoscalingPolicies/{autoscaling_policy}', - 'region' => 'projects/{project}/regions/{region}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Dataproc/v1/src/V1/resources/autoscaling_policy_service_rest_client_config.php b/owl-bot-staging/Dataproc/v1/src/V1/resources/autoscaling_policy_service_rest_client_config.php deleted file mode 100644 index 802871a91d8..00000000000 --- a/owl-bot-staging/Dataproc/v1/src/V1/resources/autoscaling_policy_service_rest_client_config.php +++ /dev/null @@ -1,303 +0,0 @@ - [ - 'google.cloud.dataproc.v1.AutoscalingPolicyService' => [ - 'CreateAutoscalingPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/autoscalingPolicies', - 'body' => 'policy', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/regions/*}/autoscalingPolicies', - 'body' => 'policy', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteAutoscalingPolicy' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/autoscalingPolicies/*}', - 'additionalBindings' => [ - [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/regions/*/autoscalingPolicies/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetAutoscalingPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/autoscalingPolicies/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/regions/*/autoscalingPolicies/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListAutoscalingPolicies' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/autoscalingPolicies', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/regions/*}/autoscalingPolicies', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateAutoscalingPolicy' => [ - 'method' => 'put', - 'uriTemplate' => '/v1/{policy.name=projects/*/locations/*/autoscalingPolicies/*}', - 'body' => 'policy', - 'additionalBindings' => [ - [ - 'method' => 'put', - 'uriTemplate' => '/v1/{policy.name=projects/*/regions/*/autoscalingPolicies/*}', - 'body' => 'policy', - ], - ], - 'placeholders' => [ - 'policy.name' => [ - 'getters' => [ - 'getPolicy', - 'getName', - ], - ], - ], - ], - ], - 'google.iam.v1.IAMPolicy' => [ - 'GetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/clusters/*}:getIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/jobs/*}:getIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/operations/*}:getIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/workflowTemplates/*}:getIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/workflowTemplates/*}:getIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/autoscalingPolicies/*}:getIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/autoscalingPolicies/*}:getIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/clusters/*}:setIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/jobs/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/operations/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/workflowTemplates/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/workflowTemplates/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/autoscalingPolicies/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/autoscalingPolicies/*}:setIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/clusters/*}:testIamPermissions', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/jobs/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/operations/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/workflowTemplates/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/workflowTemplates/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/autoscalingPolicies/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/autoscalingPolicies/*}:testIamPermissions', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/regions/*/operations/*}:cancel', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/regions/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/regions/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/regions/*/operations}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Dataproc/v1/src/V1/resources/batch_controller_client_config.json b/owl-bot-staging/Dataproc/v1/src/V1/resources/batch_controller_client_config.json deleted file mode 100644 index 595eb6d972d..00000000000 --- a/owl-bot-staging/Dataproc/v1/src/V1/resources/batch_controller_client_config.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "interfaces": { - "google.cloud.dataproc.v1.BatchController": { - "retry_codes": { - "no_retry_codes": [] - }, - "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 - } - }, - "methods": { - "CreateBatch": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteBatch": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetBatch": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListBatches": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "SetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "TestIamPermissions": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - } - } - } - } -} diff --git a/owl-bot-staging/Dataproc/v1/src/V1/resources/batch_controller_descriptor_config.php b/owl-bot-staging/Dataproc/v1/src/V1/resources/batch_controller_descriptor_config.php deleted file mode 100644 index 2f7bc24e6d8..00000000000 --- a/owl-bot-staging/Dataproc/v1/src/V1/resources/batch_controller_descriptor_config.php +++ /dev/null @@ -1,115 +0,0 @@ - [ - 'google.cloud.dataproc.v1.BatchController' => [ - 'CreateBatch' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dataproc\V1\Batch', - 'metadataReturnType' => '\Google\Cloud\Dataproc\V1\BatchOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteBatch' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetBatch' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataproc\V1\Batch', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListBatches' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getBatches', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dataproc\V1\ListBatchesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'GetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'SetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'TestIamPermissions' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'templateMap' => [ - 'batch' => 'projects/{project}/locations/{location}/batches/{batch}', - 'location' => 'projects/{project}/locations/{location}', - 'service' => 'projects/{project}/locations/{location}/services/{service}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Dataproc/v1/src/V1/resources/batch_controller_rest_client_config.php b/owl-bot-staging/Dataproc/v1/src/V1/resources/batch_controller_rest_client_config.php deleted file mode 100644 index 15194bea6ec..00000000000 --- a/owl-bot-staging/Dataproc/v1/src/V1/resources/batch_controller_rest_client_config.php +++ /dev/null @@ -1,258 +0,0 @@ - [ - 'google.cloud.dataproc.v1.BatchController' => [ - 'CreateBatch' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/batches', - 'body' => 'batch', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteBatch' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/batches/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetBatch' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/batches/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListBatches' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/batches', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - ], - 'google.iam.v1.IAMPolicy' => [ - 'GetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/clusters/*}:getIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/jobs/*}:getIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/operations/*}:getIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/workflowTemplates/*}:getIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/workflowTemplates/*}:getIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/autoscalingPolicies/*}:getIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/autoscalingPolicies/*}:getIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/clusters/*}:setIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/jobs/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/operations/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/workflowTemplates/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/workflowTemplates/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/autoscalingPolicies/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/autoscalingPolicies/*}:setIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/clusters/*}:testIamPermissions', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/jobs/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/operations/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/workflowTemplates/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/workflowTemplates/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/autoscalingPolicies/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/autoscalingPolicies/*}:testIamPermissions', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/regions/*/operations/*}:cancel', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/regions/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/regions/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/regions/*/operations}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Dataproc/v1/src/V1/resources/cluster_controller_client_config.json b/owl-bot-staging/Dataproc/v1/src/V1/resources/cluster_controller_client_config.json deleted file mode 100644 index ffb0cf89845..00000000000 --- a/owl-bot-staging/Dataproc/v1/src/V1/resources/cluster_controller_client_config.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "interfaces": { - "google.cloud.dataproc.v1.ClusterController": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_5_codes": [ - "UNAVAILABLE" - ], - "retry_policy_6_codes": [ - "INTERNAL", - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_5_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 300000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 300000, - "total_timeout_millis": 300000 - }, - "retry_policy_6_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 300000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 300000, - "total_timeout_millis": 300000 - } - }, - "methods": { - "CreateCluster": { - "timeout_millis": 300000, - "retry_codes_name": "retry_policy_5_codes", - "retry_params_name": "retry_policy_5_params" - }, - "DeleteCluster": { - "timeout_millis": 300000, - "retry_codes_name": "retry_policy_5_codes", - "retry_params_name": "retry_policy_5_params" - }, - "DiagnoseCluster": { - "timeout_millis": 300000, - "retry_codes_name": "retry_policy_5_codes", - "retry_params_name": "retry_policy_5_params" - }, - "GetCluster": { - "timeout_millis": 300000, - "retry_codes_name": "retry_policy_6_codes", - "retry_params_name": "retry_policy_6_params" - }, - "ListClusters": { - "timeout_millis": 300000, - "retry_codes_name": "retry_policy_6_codes", - "retry_params_name": "retry_policy_6_params" - }, - "StartCluster": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "StopCluster": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateCluster": { - "timeout_millis": 300000, - "retry_codes_name": "retry_policy_5_codes", - "retry_params_name": "retry_policy_5_params" - }, - "GetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "SetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "TestIamPermissions": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - } - } - } - } -} diff --git a/owl-bot-staging/Dataproc/v1/src/V1/resources/cluster_controller_descriptor_config.php b/owl-bot-staging/Dataproc/v1/src/V1/resources/cluster_controller_descriptor_config.php deleted file mode 100644 index 925b0ae43a3..00000000000 --- a/owl-bot-staging/Dataproc/v1/src/V1/resources/cluster_controller_descriptor_config.php +++ /dev/null @@ -1,283 +0,0 @@ - [ - 'google.cloud.dataproc.v1.ClusterController' => [ - 'CreateCluster' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dataproc\V1\Cluster', - 'metadataReturnType' => '\Google\Cloud\Dataproc\V1\ClusterOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'project_id', - 'fieldAccessors' => [ - 'getProjectId', - ], - ], - [ - 'keyName' => 'region', - 'fieldAccessors' => [ - 'getRegion', - ], - ], - ], - ], - 'DeleteCluster' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Dataproc\V1\ClusterOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'project_id', - 'fieldAccessors' => [ - 'getProjectId', - ], - ], - [ - 'keyName' => 'region', - 'fieldAccessors' => [ - 'getRegion', - ], - ], - [ - 'keyName' => 'cluster_name', - 'fieldAccessors' => [ - 'getClusterName', - ], - ], - ], - ], - 'DiagnoseCluster' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dataproc\V1\DiagnoseClusterResults', - 'metadataReturnType' => '\Google\Cloud\Dataproc\V1\ClusterOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'project_id', - 'fieldAccessors' => [ - 'getProjectId', - ], - ], - [ - 'keyName' => 'region', - 'fieldAccessors' => [ - 'getRegion', - ], - ], - [ - 'keyName' => 'cluster_name', - 'fieldAccessors' => [ - 'getClusterName', - ], - ], - ], - ], - 'StartCluster' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dataproc\V1\Cluster', - 'metadataReturnType' => '\Google\Cloud\Dataproc\V1\ClusterOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'project_id', - 'fieldAccessors' => [ - 'getProjectId', - ], - ], - [ - 'keyName' => 'region', - 'fieldAccessors' => [ - 'getRegion', - ], - ], - [ - 'keyName' => 'cluster_name', - 'fieldAccessors' => [ - 'getClusterName', - ], - ], - ], - ], - 'StopCluster' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dataproc\V1\Cluster', - 'metadataReturnType' => '\Google\Cloud\Dataproc\V1\ClusterOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'project_id', - 'fieldAccessors' => [ - 'getProjectId', - ], - ], - [ - 'keyName' => 'region', - 'fieldAccessors' => [ - 'getRegion', - ], - ], - [ - 'keyName' => 'cluster_name', - 'fieldAccessors' => [ - 'getClusterName', - ], - ], - ], - ], - 'UpdateCluster' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dataproc\V1\Cluster', - 'metadataReturnType' => '\Google\Cloud\Dataproc\V1\ClusterOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'project_id', - 'fieldAccessors' => [ - 'getProjectId', - ], - ], - [ - 'keyName' => 'region', - 'fieldAccessors' => [ - 'getRegion', - ], - ], - [ - 'keyName' => 'cluster_name', - 'fieldAccessors' => [ - 'getClusterName', - ], - ], - ], - ], - 'GetCluster' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataproc\V1\Cluster', - 'headerParams' => [ - [ - 'keyName' => 'project_id', - 'fieldAccessors' => [ - 'getProjectId', - ], - ], - [ - 'keyName' => 'region', - 'fieldAccessors' => [ - 'getRegion', - ], - ], - [ - 'keyName' => 'cluster_name', - 'fieldAccessors' => [ - 'getClusterName', - ], - ], - ], - ], - 'ListClusters' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getClusters', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dataproc\V1\ListClustersResponse', - 'headerParams' => [ - [ - 'keyName' => 'project_id', - 'fieldAccessors' => [ - 'getProjectId', - ], - ], - [ - 'keyName' => 'region', - 'fieldAccessors' => [ - 'getRegion', - ], - ], - ], - ], - 'GetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'SetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'TestIamPermissions' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'templateMap' => [ - 'cluster' => 'projects/{project}/locations/{location}/clusters/{cluster}', - 'clusterRegion' => 'projects/{project}/regions/{region}/clusters/{cluster}', - 'nodeGroup' => 'projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{node_group}', - 'service' => 'projects/{project}/locations/{location}/services/{service}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Dataproc/v1/src/V1/resources/cluster_controller_rest_client_config.php b/owl-bot-staging/Dataproc/v1/src/V1/resources/cluster_controller_rest_client_config.php deleted file mode 100644 index 87a6911ceeb..00000000000 --- a/owl-bot-staging/Dataproc/v1/src/V1/resources/cluster_controller_rest_client_config.php +++ /dev/null @@ -1,379 +0,0 @@ - [ - 'google.cloud.dataproc.v1.ClusterController' => [ - 'CreateCluster' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/projects/{project_id}/regions/{region}/clusters', - 'body' => 'cluster', - 'placeholders' => [ - 'project_id' => [ - 'getters' => [ - 'getProjectId', - ], - ], - 'region' => [ - 'getters' => [ - 'getRegion', - ], - ], - ], - ], - 'DeleteCluster' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/projects/{project_id}/regions/{region}/clusters/{cluster_name}', - 'placeholders' => [ - 'cluster_name' => [ - 'getters' => [ - 'getClusterName', - ], - ], - 'project_id' => [ - 'getters' => [ - 'getProjectId', - ], - ], - 'region' => [ - 'getters' => [ - 'getRegion', - ], - ], - ], - ], - 'DiagnoseCluster' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/projects/{project_id}/regions/{region}/clusters/{cluster_name}:diagnose', - 'body' => '*', - 'placeholders' => [ - 'cluster_name' => [ - 'getters' => [ - 'getClusterName', - ], - ], - 'project_id' => [ - 'getters' => [ - 'getProjectId', - ], - ], - 'region' => [ - 'getters' => [ - 'getRegion', - ], - ], - ], - ], - 'GetCluster' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/projects/{project_id}/regions/{region}/clusters/{cluster_name}', - 'placeholders' => [ - 'cluster_name' => [ - 'getters' => [ - 'getClusterName', - ], - ], - 'project_id' => [ - 'getters' => [ - 'getProjectId', - ], - ], - 'region' => [ - 'getters' => [ - 'getRegion', - ], - ], - ], - ], - 'ListClusters' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/projects/{project_id}/regions/{region}/clusters', - 'placeholders' => [ - 'project_id' => [ - 'getters' => [ - 'getProjectId', - ], - ], - 'region' => [ - 'getters' => [ - 'getRegion', - ], - ], - ], - ], - 'StartCluster' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/projects/{project_id}/regions/{region}/clusters/{cluster_name}:start', - 'body' => '*', - 'placeholders' => [ - 'cluster_name' => [ - 'getters' => [ - 'getClusterName', - ], - ], - 'project_id' => [ - 'getters' => [ - 'getProjectId', - ], - ], - 'region' => [ - 'getters' => [ - 'getRegion', - ], - ], - ], - ], - 'StopCluster' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/projects/{project_id}/regions/{region}/clusters/{cluster_name}:stop', - 'body' => '*', - 'placeholders' => [ - 'cluster_name' => [ - 'getters' => [ - 'getClusterName', - ], - ], - 'project_id' => [ - 'getters' => [ - 'getProjectId', - ], - ], - 'region' => [ - 'getters' => [ - 'getRegion', - ], - ], - ], - ], - 'UpdateCluster' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/projects/{project_id}/regions/{region}/clusters/{cluster_name}', - 'body' => 'cluster', - 'placeholders' => [ - 'cluster_name' => [ - 'getters' => [ - 'getClusterName', - ], - ], - 'project_id' => [ - 'getters' => [ - 'getProjectId', - ], - ], - 'region' => [ - 'getters' => [ - 'getRegion', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'google.iam.v1.IAMPolicy' => [ - 'GetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/clusters/*}:getIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/jobs/*}:getIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/operations/*}:getIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/workflowTemplates/*}:getIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/workflowTemplates/*}:getIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/autoscalingPolicies/*}:getIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/autoscalingPolicies/*}:getIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/clusters/*}:setIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/jobs/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/operations/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/workflowTemplates/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/workflowTemplates/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/autoscalingPolicies/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/autoscalingPolicies/*}:setIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/clusters/*}:testIamPermissions', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/jobs/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/operations/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/workflowTemplates/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/workflowTemplates/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/autoscalingPolicies/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/autoscalingPolicies/*}:testIamPermissions', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/regions/*/operations/*}:cancel', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/regions/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/regions/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/regions/*/operations}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Dataproc/v1/src/V1/resources/job_controller_client_config.json b/owl-bot-staging/Dataproc/v1/src/V1/resources/job_controller_client_config.json deleted file mode 100644 index 9e57cda3b3e..00000000000 --- a/owl-bot-staging/Dataproc/v1/src/V1/resources/job_controller_client_config.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "interfaces": { - "google.cloud.dataproc.v1.JobController": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_2_codes": [ - "DEADLINE_EXCEEDED", - "INTERNAL", - "UNAVAILABLE" - ], - "retry_policy_7_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_2_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 900000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 900000, - "total_timeout_millis": 900000 - }, - "retry_policy_7_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 900000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 900000, - "total_timeout_millis": 900000 - } - }, - "methods": { - "CancelJob": { - "timeout_millis": 900000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "DeleteJob": { - "timeout_millis": 900000, - "retry_codes_name": "retry_policy_7_codes", - "retry_params_name": "retry_policy_7_params" - }, - "GetJob": { - "timeout_millis": 900000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "ListJobs": { - "timeout_millis": 900000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "SubmitJob": { - "timeout_millis": 900000, - "retry_codes_name": "retry_policy_7_codes", - "retry_params_name": "retry_policy_7_params" - }, - "SubmitJobAsOperation": { - "timeout_millis": 900000, - "retry_codes_name": "retry_policy_7_codes", - "retry_params_name": "retry_policy_7_params" - }, - "UpdateJob": { - "timeout_millis": 900000, - "retry_codes_name": "retry_policy_7_codes", - "retry_params_name": "retry_policy_7_params" - }, - "GetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "SetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "TestIamPermissions": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - } - } - } - } -} diff --git a/owl-bot-staging/Dataproc/v1/src/V1/resources/job_controller_descriptor_config.php b/owl-bot-staging/Dataproc/v1/src/V1/resources/job_controller_descriptor_config.php deleted file mode 100644 index 65927f736c9..00000000000 --- a/owl-bot-staging/Dataproc/v1/src/V1/resources/job_controller_descriptor_config.php +++ /dev/null @@ -1,212 +0,0 @@ - [ - 'google.cloud.dataproc.v1.JobController' => [ - 'SubmitJobAsOperation' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dataproc\V1\Job', - 'metadataReturnType' => '\Google\Cloud\Dataproc\V1\JobMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'project_id', - 'fieldAccessors' => [ - 'getProjectId', - ], - ], - [ - 'keyName' => 'region', - 'fieldAccessors' => [ - 'getRegion', - ], - ], - ], - ], - 'CancelJob' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataproc\V1\Job', - 'headerParams' => [ - [ - 'keyName' => 'project_id', - 'fieldAccessors' => [ - 'getProjectId', - ], - ], - [ - 'keyName' => 'region', - 'fieldAccessors' => [ - 'getRegion', - ], - ], - [ - 'keyName' => 'job_id', - 'fieldAccessors' => [ - 'getJobId', - ], - ], - ], - ], - 'DeleteJob' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'project_id', - 'fieldAccessors' => [ - 'getProjectId', - ], - ], - [ - 'keyName' => 'region', - 'fieldAccessors' => [ - 'getRegion', - ], - ], - [ - 'keyName' => 'job_id', - 'fieldAccessors' => [ - 'getJobId', - ], - ], - ], - ], - 'GetJob' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataproc\V1\Job', - 'headerParams' => [ - [ - 'keyName' => 'project_id', - 'fieldAccessors' => [ - 'getProjectId', - ], - ], - [ - 'keyName' => 'region', - 'fieldAccessors' => [ - 'getRegion', - ], - ], - [ - 'keyName' => 'job_id', - 'fieldAccessors' => [ - 'getJobId', - ], - ], - ], - ], - 'ListJobs' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getJobs', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dataproc\V1\ListJobsResponse', - 'headerParams' => [ - [ - 'keyName' => 'project_id', - 'fieldAccessors' => [ - 'getProjectId', - ], - ], - [ - 'keyName' => 'region', - 'fieldAccessors' => [ - 'getRegion', - ], - ], - ], - ], - 'SubmitJob' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataproc\V1\Job', - 'headerParams' => [ - [ - 'keyName' => 'project_id', - 'fieldAccessors' => [ - 'getProjectId', - ], - ], - [ - 'keyName' => 'region', - 'fieldAccessors' => [ - 'getRegion', - ], - ], - ], - ], - 'UpdateJob' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataproc\V1\Job', - 'headerParams' => [ - [ - 'keyName' => 'project_id', - 'fieldAccessors' => [ - 'getProjectId', - ], - ], - [ - 'keyName' => 'region', - 'fieldAccessors' => [ - 'getRegion', - ], - ], - [ - 'keyName' => 'job_id', - 'fieldAccessors' => [ - 'getJobId', - ], - ], - ], - ], - 'GetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'SetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'TestIamPermissions' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - ], - ], -]; diff --git a/owl-bot-staging/Dataproc/v1/src/V1/resources/job_controller_rest_client_config.php b/owl-bot-staging/Dataproc/v1/src/V1/resources/job_controller_rest_client_config.php deleted file mode 100644 index 7523816ab8b..00000000000 --- a/owl-bot-staging/Dataproc/v1/src/V1/resources/job_controller_rest_client_config.php +++ /dev/null @@ -1,352 +0,0 @@ - [ - 'google.cloud.dataproc.v1.JobController' => [ - 'CancelJob' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/projects/{project_id}/regions/{region}/jobs/{job_id}:cancel', - 'body' => '*', - 'placeholders' => [ - 'job_id' => [ - 'getters' => [ - 'getJobId', - ], - ], - 'project_id' => [ - 'getters' => [ - 'getProjectId', - ], - ], - 'region' => [ - 'getters' => [ - 'getRegion', - ], - ], - ], - ], - 'DeleteJob' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/projects/{project_id}/regions/{region}/jobs/{job_id}', - 'placeholders' => [ - 'job_id' => [ - 'getters' => [ - 'getJobId', - ], - ], - 'project_id' => [ - 'getters' => [ - 'getProjectId', - ], - ], - 'region' => [ - 'getters' => [ - 'getRegion', - ], - ], - ], - ], - 'GetJob' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/projects/{project_id}/regions/{region}/jobs/{job_id}', - 'placeholders' => [ - 'job_id' => [ - 'getters' => [ - 'getJobId', - ], - ], - 'project_id' => [ - 'getters' => [ - 'getProjectId', - ], - ], - 'region' => [ - 'getters' => [ - 'getRegion', - ], - ], - ], - ], - 'ListJobs' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/projects/{project_id}/regions/{region}/jobs', - 'placeholders' => [ - 'project_id' => [ - 'getters' => [ - 'getProjectId', - ], - ], - 'region' => [ - 'getters' => [ - 'getRegion', - ], - ], - ], - ], - 'SubmitJob' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/projects/{project_id}/regions/{region}/jobs:submit', - 'body' => '*', - 'placeholders' => [ - 'project_id' => [ - 'getters' => [ - 'getProjectId', - ], - ], - 'region' => [ - 'getters' => [ - 'getRegion', - ], - ], - ], - ], - 'SubmitJobAsOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/projects/{project_id}/regions/{region}/jobs:submitAsOperation', - 'body' => '*', - 'placeholders' => [ - 'project_id' => [ - 'getters' => [ - 'getProjectId', - ], - ], - 'region' => [ - 'getters' => [ - 'getRegion', - ], - ], - ], - ], - 'UpdateJob' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/projects/{project_id}/regions/{region}/jobs/{job_id}', - 'body' => 'job', - 'placeholders' => [ - 'job_id' => [ - 'getters' => [ - 'getJobId', - ], - ], - 'project_id' => [ - 'getters' => [ - 'getProjectId', - ], - ], - 'region' => [ - 'getters' => [ - 'getRegion', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'google.iam.v1.IAMPolicy' => [ - 'GetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/clusters/*}:getIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/jobs/*}:getIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/operations/*}:getIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/workflowTemplates/*}:getIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/workflowTemplates/*}:getIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/autoscalingPolicies/*}:getIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/autoscalingPolicies/*}:getIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/clusters/*}:setIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/jobs/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/operations/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/workflowTemplates/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/workflowTemplates/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/autoscalingPolicies/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/autoscalingPolicies/*}:setIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/clusters/*}:testIamPermissions', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/jobs/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/operations/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/workflowTemplates/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/workflowTemplates/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/autoscalingPolicies/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/autoscalingPolicies/*}:testIamPermissions', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/regions/*/operations/*}:cancel', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/regions/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/regions/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/regions/*/operations}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Dataproc/v1/src/V1/resources/node_group_controller_client_config.json b/owl-bot-staging/Dataproc/v1/src/V1/resources/node_group_controller_client_config.json deleted file mode 100644 index 273c3e01645..00000000000 --- a/owl-bot-staging/Dataproc/v1/src/V1/resources/node_group_controller_client_config.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "interfaces": { - "google.cloud.dataproc.v1.NodeGroupController": { - "retry_codes": { - "no_retry_codes": [] - }, - "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 - } - }, - "methods": { - "CreateNodeGroup": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetNodeGroup": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ResizeNodeGroup": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "SetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "TestIamPermissions": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - } - } - } - } -} diff --git a/owl-bot-staging/Dataproc/v1/src/V1/resources/node_group_controller_descriptor_config.php b/owl-bot-staging/Dataproc/v1/src/V1/resources/node_group_controller_descriptor_config.php deleted file mode 100644 index 6367bd1eb3b..00000000000 --- a/owl-bot-staging/Dataproc/v1/src/V1/resources/node_group_controller_descriptor_config.php +++ /dev/null @@ -1,101 +0,0 @@ - [ - 'google.cloud.dataproc.v1.NodeGroupController' => [ - 'CreateNodeGroup' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dataproc\V1\NodeGroup', - 'metadataReturnType' => '\Google\Cloud\Dataproc\V1\NodeGroupOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ResizeNodeGroup' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dataproc\V1\NodeGroup', - 'metadataReturnType' => '\Google\Cloud\Dataproc\V1\NodeGroupOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetNodeGroup' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataproc\V1\NodeGroup', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'SetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'TestIamPermissions' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'templateMap' => [ - 'clusterRegion' => 'projects/{project}/regions/{region}/clusters/{cluster}', - 'nodeGroup' => 'projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{node_group}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Dataproc/v1/src/V1/resources/node_group_controller_rest_client_config.php b/owl-bot-staging/Dataproc/v1/src/V1/resources/node_group_controller_rest_client_config.php deleted file mode 100644 index d0ef71ea59c..00000000000 --- a/owl-bot-staging/Dataproc/v1/src/V1/resources/node_group_controller_rest_client_config.php +++ /dev/null @@ -1,248 +0,0 @@ - [ - 'google.cloud.dataproc.v1.NodeGroupController' => [ - 'CreateNodeGroup' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/regions/*/clusters/*}/nodeGroups', - 'body' => 'node_group', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'GetNodeGroup' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/regions/*/clusters/*/nodeGroups/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ResizeNodeGroup' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/regions/*/clusters/*/nodeGroups/*}:resize', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.iam.v1.IAMPolicy' => [ - 'GetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/clusters/*}:getIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/jobs/*}:getIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/operations/*}:getIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/workflowTemplates/*}:getIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/workflowTemplates/*}:getIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/autoscalingPolicies/*}:getIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/autoscalingPolicies/*}:getIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/clusters/*}:setIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/jobs/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/operations/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/workflowTemplates/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/workflowTemplates/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/autoscalingPolicies/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/autoscalingPolicies/*}:setIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/clusters/*}:testIamPermissions', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/jobs/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/operations/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/workflowTemplates/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/workflowTemplates/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/autoscalingPolicies/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/autoscalingPolicies/*}:testIamPermissions', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/regions/*/operations/*}:cancel', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/regions/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/regions/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/regions/*/operations}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Dataproc/v1/src/V1/resources/workflow_template_service_client_config.json b/owl-bot-staging/Dataproc/v1/src/V1/resources/workflow_template_service_client_config.json deleted file mode 100644 index c54531343ad..00000000000 --- a/owl-bot-staging/Dataproc/v1/src/V1/resources/workflow_template_service_client_config.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "interfaces": { - "google.cloud.dataproc.v1.WorkflowTemplateService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_3_codes": [ - "UNAVAILABLE" - ], - "retry_policy_4_codes": [ - "DEADLINE_EXCEEDED", - "INTERNAL", - "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_3_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 600000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 600000, - "total_timeout_millis": 600000 - }, - "retry_policy_4_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 600000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 600000, - "total_timeout_millis": 600000 - } - }, - "methods": { - "CreateWorkflowTemplate": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "DeleteWorkflowTemplate": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "GetWorkflowTemplate": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params" - }, - "InstantiateInlineWorkflowTemplate": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "InstantiateWorkflowTemplate": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "ListWorkflowTemplates": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params" - }, - "UpdateWorkflowTemplate": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "GetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "SetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "TestIamPermissions": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - } - } - } - } -} diff --git a/owl-bot-staging/Dataproc/v1/src/V1/resources/workflow_template_service_descriptor_config.php b/owl-bot-staging/Dataproc/v1/src/V1/resources/workflow_template_service_descriptor_config.php deleted file mode 100644 index 07140b14784..00000000000 --- a/owl-bot-staging/Dataproc/v1/src/V1/resources/workflow_template_service_descriptor_config.php +++ /dev/null @@ -1,164 +0,0 @@ - [ - 'google.cloud.dataproc.v1.WorkflowTemplateService' => [ - 'InstantiateInlineWorkflowTemplate' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Dataproc\V1\WorkflowMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'InstantiateWorkflowTemplate' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Dataproc\V1\WorkflowMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'CreateWorkflowTemplate' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataproc\V1\WorkflowTemplate', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteWorkflowTemplate' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetWorkflowTemplate' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataproc\V1\WorkflowTemplate', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListWorkflowTemplates' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getTemplates', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dataproc\V1\ListWorkflowTemplatesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateWorkflowTemplate' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataproc\V1\WorkflowTemplate', - 'headerParams' => [ - [ - 'keyName' => 'template.name', - 'fieldAccessors' => [ - 'getTemplate', - 'getName', - ], - ], - ], - ], - 'GetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'SetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'TestIamPermissions' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'templateMap' => [ - 'clusterRegion' => 'projects/{project}/regions/{region}/clusters/{cluster}', - 'location' => 'projects/{project}/locations/{location}', - 'nodeGroup' => 'projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{node_group}', - 'projectLocationWorkflowTemplate' => 'projects/{project}/locations/{location}/workflowTemplates/{workflow_template}', - 'projectRegionWorkflowTemplate' => 'projects/{project}/regions/{region}/workflowTemplates/{workflow_template}', - 'region' => 'projects/{project}/regions/{region}', - 'service' => 'projects/{project}/locations/{location}/services/{service}', - 'workflowTemplate' => 'projects/{project}/regions/{region}/workflowTemplates/{workflow_template}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Dataproc/v1/src/V1/resources/workflow_template_service_rest_client_config.php b/owl-bot-staging/Dataproc/v1/src/V1/resources/workflow_template_service_rest_client_config.php deleted file mode 100644 index 695430e9a49..00000000000 --- a/owl-bot-staging/Dataproc/v1/src/V1/resources/workflow_template_service_rest_client_config.php +++ /dev/null @@ -1,341 +0,0 @@ - [ - 'google.cloud.dataproc.v1.WorkflowTemplateService' => [ - 'CreateWorkflowTemplate' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/workflowTemplates', - 'body' => 'template', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/regions/*}/workflowTemplates', - 'body' => 'template', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteWorkflowTemplate' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/workflowTemplates/*}', - 'additionalBindings' => [ - [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/regions/*/workflowTemplates/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetWorkflowTemplate' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/workflowTemplates/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/regions/*/workflowTemplates/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'InstantiateInlineWorkflowTemplate' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/workflowTemplates:instantiateInline', - 'body' => 'template', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/regions/*}/workflowTemplates:instantiateInline', - 'body' => 'template', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'InstantiateWorkflowTemplate' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/workflowTemplates/*}:instantiate', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/regions/*/workflowTemplates/*}:instantiate', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListWorkflowTemplates' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/workflowTemplates', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/regions/*}/workflowTemplates', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateWorkflowTemplate' => [ - 'method' => 'put', - 'uriTemplate' => '/v1/{template.name=projects/*/locations/*/workflowTemplates/*}', - 'body' => 'template', - 'additionalBindings' => [ - [ - 'method' => 'put', - 'uriTemplate' => '/v1/{template.name=projects/*/regions/*/workflowTemplates/*}', - 'body' => 'template', - ], - ], - 'placeholders' => [ - 'template.name' => [ - 'getters' => [ - 'getTemplate', - 'getName', - ], - ], - ], - ], - ], - 'google.iam.v1.IAMPolicy' => [ - 'GetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/clusters/*}:getIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/jobs/*}:getIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/operations/*}:getIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/workflowTemplates/*}:getIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/workflowTemplates/*}:getIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/autoscalingPolicies/*}:getIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/autoscalingPolicies/*}:getIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/clusters/*}:setIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/jobs/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/operations/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/workflowTemplates/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/workflowTemplates/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/autoscalingPolicies/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/autoscalingPolicies/*}:setIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/clusters/*}:testIamPermissions', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/jobs/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/operations/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/workflowTemplates/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/workflowTemplates/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/regions/*/autoscalingPolicies/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/autoscalingPolicies/*}:testIamPermissions', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/regions/*/operations/*}:cancel', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/regions/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/regions/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/regions/*/operations}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Dataproc/v1/tests/Unit/V1/AutoscalingPolicyServiceClientTest.php b/owl-bot-staging/Dataproc/v1/tests/Unit/V1/AutoscalingPolicyServiceClientTest.php deleted file mode 100644 index b9d485cd48e..00000000000 --- a/owl-bot-staging/Dataproc/v1/tests/Unit/V1/AutoscalingPolicyServiceClientTest.php +++ /dev/null @@ -1,630 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return AutoscalingPolicyServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new AutoscalingPolicyServiceClient($options); - } - - /** @test */ - public function createAutoscalingPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $id = 'id3355'; - $name = 'name3373707'; - $expectedResponse = new AutoscalingPolicy(); - $expectedResponse->setId($id); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->regionName('[PROJECT]', '[REGION]'); - $policy = new AutoscalingPolicy(); - $policyWorkerConfig = new InstanceGroupAutoscalingPolicyConfig(); - $workerConfigMaxInstances = 339756550; - $policyWorkerConfig->setMaxInstances($workerConfigMaxInstances); - $policy->setWorkerConfig($policyWorkerConfig); - $policyBasicAlgorithm = new BasicAutoscalingAlgorithm(); - $basicAlgorithmYarnConfig = new BasicYarnAutoscalingConfig(); - $yarnConfigGracefulDecommissionTimeout = new Duration(); - $basicAlgorithmYarnConfig->setGracefulDecommissionTimeout($yarnConfigGracefulDecommissionTimeout); - $yarnConfigScaleUpFactor = -4.1551534E7; - $basicAlgorithmYarnConfig->setScaleUpFactor($yarnConfigScaleUpFactor); - $yarnConfigScaleDownFactor = -1.72221005E8; - $basicAlgorithmYarnConfig->setScaleDownFactor($yarnConfigScaleDownFactor); - $policyBasicAlgorithm->setYarnConfig($basicAlgorithmYarnConfig); - $policy->setBasicAlgorithm($policyBasicAlgorithm); - $response = $gapicClient->createAutoscalingPolicy($formattedParent, $policy); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataproc.v1.AutoscalingPolicyService/CreateAutoscalingPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createAutoscalingPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->regionName('[PROJECT]', '[REGION]'); - $policy = new AutoscalingPolicy(); - $policyWorkerConfig = new InstanceGroupAutoscalingPolicyConfig(); - $workerConfigMaxInstances = 339756550; - $policyWorkerConfig->setMaxInstances($workerConfigMaxInstances); - $policy->setWorkerConfig($policyWorkerConfig); - $policyBasicAlgorithm = new BasicAutoscalingAlgorithm(); - $basicAlgorithmYarnConfig = new BasicYarnAutoscalingConfig(); - $yarnConfigGracefulDecommissionTimeout = new Duration(); - $basicAlgorithmYarnConfig->setGracefulDecommissionTimeout($yarnConfigGracefulDecommissionTimeout); - $yarnConfigScaleUpFactor = -4.1551534E7; - $basicAlgorithmYarnConfig->setScaleUpFactor($yarnConfigScaleUpFactor); - $yarnConfigScaleDownFactor = -1.72221005E8; - $basicAlgorithmYarnConfig->setScaleDownFactor($yarnConfigScaleDownFactor); - $policyBasicAlgorithm->setYarnConfig($basicAlgorithmYarnConfig); - $policy->setBasicAlgorithm($policyBasicAlgorithm); - try { - $gapicClient->createAutoscalingPolicy($formattedParent, $policy); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteAutoscalingPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->autoscalingPolicyName('[PROJECT]', '[LOCATION]', '[AUTOSCALING_POLICY]'); - $gapicClient->deleteAutoscalingPolicy($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataproc.v1.AutoscalingPolicyService/DeleteAutoscalingPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteAutoscalingPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->autoscalingPolicyName('[PROJECT]', '[LOCATION]', '[AUTOSCALING_POLICY]'); - try { - $gapicClient->deleteAutoscalingPolicy($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAutoscalingPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $id = 'id3355'; - $name2 = 'name2-1052831874'; - $expectedResponse = new AutoscalingPolicy(); - $expectedResponse->setId($id); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->autoscalingPolicyName('[PROJECT]', '[LOCATION]', '[AUTOSCALING_POLICY]'); - $response = $gapicClient->getAutoscalingPolicy($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataproc.v1.AutoscalingPolicyService/GetAutoscalingPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAutoscalingPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->autoscalingPolicyName('[PROJECT]', '[LOCATION]', '[AUTOSCALING_POLICY]'); - try { - $gapicClient->getAutoscalingPolicy($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAutoscalingPoliciesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $policiesElement = new AutoscalingPolicy(); - $policies = [ - $policiesElement, - ]; - $expectedResponse = new ListAutoscalingPoliciesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setPolicies($policies); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->regionName('[PROJECT]', '[REGION]'); - $response = $gapicClient->listAutoscalingPolicies($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getPolicies()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataproc.v1.AutoscalingPolicyService/ListAutoscalingPolicies', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAutoscalingPoliciesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->regionName('[PROJECT]', '[REGION]'); - try { - $gapicClient->listAutoscalingPolicies($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateAutoscalingPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $id = 'id3355'; - $name = 'name3373707'; - $expectedResponse = new AutoscalingPolicy(); - $expectedResponse->setId($id); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $policy = new AutoscalingPolicy(); - $policyWorkerConfig = new InstanceGroupAutoscalingPolicyConfig(); - $workerConfigMaxInstances = 339756550; - $policyWorkerConfig->setMaxInstances($workerConfigMaxInstances); - $policy->setWorkerConfig($policyWorkerConfig); - $policyBasicAlgorithm = new BasicAutoscalingAlgorithm(); - $basicAlgorithmYarnConfig = new BasicYarnAutoscalingConfig(); - $yarnConfigGracefulDecommissionTimeout = new Duration(); - $basicAlgorithmYarnConfig->setGracefulDecommissionTimeout($yarnConfigGracefulDecommissionTimeout); - $yarnConfigScaleUpFactor = -4.1551534E7; - $basicAlgorithmYarnConfig->setScaleUpFactor($yarnConfigScaleUpFactor); - $yarnConfigScaleDownFactor = -1.72221005E8; - $basicAlgorithmYarnConfig->setScaleDownFactor($yarnConfigScaleDownFactor); - $policyBasicAlgorithm->setYarnConfig($basicAlgorithmYarnConfig); - $policy->setBasicAlgorithm($policyBasicAlgorithm); - $response = $gapicClient->updateAutoscalingPolicy($policy); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataproc.v1.AutoscalingPolicyService/UpdateAutoscalingPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateAutoscalingPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $policy = new AutoscalingPolicy(); - $policyWorkerConfig = new InstanceGroupAutoscalingPolicyConfig(); - $workerConfigMaxInstances = 339756550; - $policyWorkerConfig->setMaxInstances($workerConfigMaxInstances); - $policy->setWorkerConfig($policyWorkerConfig); - $policyBasicAlgorithm = new BasicAutoscalingAlgorithm(); - $basicAlgorithmYarnConfig = new BasicYarnAutoscalingConfig(); - $yarnConfigGracefulDecommissionTimeout = new Duration(); - $basicAlgorithmYarnConfig->setGracefulDecommissionTimeout($yarnConfigGracefulDecommissionTimeout); - $yarnConfigScaleUpFactor = -4.1551534E7; - $basicAlgorithmYarnConfig->setScaleUpFactor($yarnConfigScaleUpFactor); - $yarnConfigScaleDownFactor = -1.72221005E8; - $basicAlgorithmYarnConfig->setScaleDownFactor($yarnConfigScaleDownFactor); - $policyBasicAlgorithm->setYarnConfig($basicAlgorithmYarnConfig); - $policy->setBasicAlgorithm($policyBasicAlgorithm); - try { - $gapicClient->updateAutoscalingPolicy($policy); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $response = $gapicClient->getIamPolicy($resource); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - try { - $gapicClient->getIamPolicy($resource); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $response = $gapicClient->setIamPolicy($resource, $policy); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - try { - $gapicClient->setIamPolicy($resource, $policy); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $response = $gapicClient->testIamPermissions($resource, $permissions); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - try { - $gapicClient->testIamPermissions($resource, $permissions); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Dataproc/v1/tests/Unit/V1/BatchControllerClientTest.php b/owl-bot-staging/Dataproc/v1/tests/Unit/V1/BatchControllerClientTest.php deleted file mode 100644 index fea28a58a5b..00000000000 --- a/owl-bot-staging/Dataproc/v1/tests/Unit/V1/BatchControllerClientTest.php +++ /dev/null @@ -1,583 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return BatchControllerClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new BatchControllerClient($options); - } - - /** @test */ - public function createBatchTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createBatchTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uuid = 'uuid3601339'; - $stateMessage = 'stateMessage29641305'; - $creator = 'creator1028554796'; - $operation = 'operation1662702951'; - $expectedResponse = new Batch(); - $expectedResponse->setName($name); - $expectedResponse->setUuid($uuid); - $expectedResponse->setStateMessage($stateMessage); - $expectedResponse->setCreator($creator); - $expectedResponse->setOperation($operation); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createBatchTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $batch = new Batch(); - $response = $gapicClient->createBatch($formattedParent, $batch); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataproc.v1.BatchController/CreateBatch', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getBatch(); - $this->assertProtobufEquals($batch, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createBatchTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createBatchExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createBatchTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $batch = new Batch(); - $response = $gapicClient->createBatch($formattedParent, $batch); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createBatchTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteBatchTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->batchName('[PROJECT]', '[LOCATION]', '[BATCH]'); - $gapicClient->deleteBatch($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataproc.v1.BatchController/DeleteBatch', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteBatchExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->batchName('[PROJECT]', '[LOCATION]', '[BATCH]'); - try { - $gapicClient->deleteBatch($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getBatchTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uuid = 'uuid3601339'; - $stateMessage = 'stateMessage29641305'; - $creator = 'creator1028554796'; - $operation = 'operation1662702951'; - $expectedResponse = new Batch(); - $expectedResponse->setName($name2); - $expectedResponse->setUuid($uuid); - $expectedResponse->setStateMessage($stateMessage); - $expectedResponse->setCreator($creator); - $expectedResponse->setOperation($operation); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->batchName('[PROJECT]', '[LOCATION]', '[BATCH]'); - $response = $gapicClient->getBatch($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataproc.v1.BatchController/GetBatch', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getBatchExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->batchName('[PROJECT]', '[LOCATION]', '[BATCH]'); - try { - $gapicClient->getBatch($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listBatchesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $batchesElement = new Batch(); - $batches = [ - $batchesElement, - ]; - $expectedResponse = new ListBatchesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setBatches($batches); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listBatches($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getBatches()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataproc.v1.BatchController/ListBatches', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listBatchesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - try { - $gapicClient->listBatches($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $response = $gapicClient->getIamPolicy($resource); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - try { - $gapicClient->getIamPolicy($resource); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $response = $gapicClient->setIamPolicy($resource, $policy); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - try { - $gapicClient->setIamPolicy($resource, $policy); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $response = $gapicClient->testIamPermissions($resource, $permissions); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - try { - $gapicClient->testIamPermissions($resource, $permissions); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Dataproc/v1/tests/Unit/V1/Client/AutoscalingPolicyServiceClientTest.php b/owl-bot-staging/Dataproc/v1/tests/Unit/V1/Client/AutoscalingPolicyServiceClientTest.php deleted file mode 100644 index cab9c0ea61c..00000000000 --- a/owl-bot-staging/Dataproc/v1/tests/Unit/V1/Client/AutoscalingPolicyServiceClientTest.php +++ /dev/null @@ -1,725 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return AutoscalingPolicyServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new AutoscalingPolicyServiceClient($options); - } - - /** @test */ - public function createAutoscalingPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $id = 'id3355'; - $name = 'name3373707'; - $expectedResponse = new AutoscalingPolicy(); - $expectedResponse->setId($id); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->regionName('[PROJECT]', '[REGION]'); - $policy = new AutoscalingPolicy(); - $policyWorkerConfig = new InstanceGroupAutoscalingPolicyConfig(); - $workerConfigMaxInstances = 339756550; - $policyWorkerConfig->setMaxInstances($workerConfigMaxInstances); - $policy->setWorkerConfig($policyWorkerConfig); - $policyBasicAlgorithm = new BasicAutoscalingAlgorithm(); - $basicAlgorithmYarnConfig = new BasicYarnAutoscalingConfig(); - $yarnConfigGracefulDecommissionTimeout = new Duration(); - $basicAlgorithmYarnConfig->setGracefulDecommissionTimeout($yarnConfigGracefulDecommissionTimeout); - $yarnConfigScaleUpFactor = -4.1551534E7; - $basicAlgorithmYarnConfig->setScaleUpFactor($yarnConfigScaleUpFactor); - $yarnConfigScaleDownFactor = -1.72221005E8; - $basicAlgorithmYarnConfig->setScaleDownFactor($yarnConfigScaleDownFactor); - $policyBasicAlgorithm->setYarnConfig($basicAlgorithmYarnConfig); - $policy->setBasicAlgorithm($policyBasicAlgorithm); - $request = (new CreateAutoscalingPolicyRequest()) - ->setParent($formattedParent) - ->setPolicy($policy); - $response = $gapicClient->createAutoscalingPolicy($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.dataproc.v1.AutoscalingPolicyService/CreateAutoscalingPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createAutoscalingPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->regionName('[PROJECT]', '[REGION]'); - $policy = new AutoscalingPolicy(); - $policyWorkerConfig = new InstanceGroupAutoscalingPolicyConfig(); - $workerConfigMaxInstances = 339756550; - $policyWorkerConfig->setMaxInstances($workerConfigMaxInstances); - $policy->setWorkerConfig($policyWorkerConfig); - $policyBasicAlgorithm = new BasicAutoscalingAlgorithm(); - $basicAlgorithmYarnConfig = new BasicYarnAutoscalingConfig(); - $yarnConfigGracefulDecommissionTimeout = new Duration(); - $basicAlgorithmYarnConfig->setGracefulDecommissionTimeout($yarnConfigGracefulDecommissionTimeout); - $yarnConfigScaleUpFactor = -4.1551534E7; - $basicAlgorithmYarnConfig->setScaleUpFactor($yarnConfigScaleUpFactor); - $yarnConfigScaleDownFactor = -1.72221005E8; - $basicAlgorithmYarnConfig->setScaleDownFactor($yarnConfigScaleDownFactor); - $policyBasicAlgorithm->setYarnConfig($basicAlgorithmYarnConfig); - $policy->setBasicAlgorithm($policyBasicAlgorithm); - $request = (new CreateAutoscalingPolicyRequest()) - ->setParent($formattedParent) - ->setPolicy($policy); - try { - $gapicClient->createAutoscalingPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteAutoscalingPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->autoscalingPolicyName('[PROJECT]', '[LOCATION]', '[AUTOSCALING_POLICY]'); - $request = (new DeleteAutoscalingPolicyRequest()) - ->setName($formattedName); - $gapicClient->deleteAutoscalingPolicy($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataproc.v1.AutoscalingPolicyService/DeleteAutoscalingPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteAutoscalingPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->autoscalingPolicyName('[PROJECT]', '[LOCATION]', '[AUTOSCALING_POLICY]'); - $request = (new DeleteAutoscalingPolicyRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteAutoscalingPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAutoscalingPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $id = 'id3355'; - $name2 = 'name2-1052831874'; - $expectedResponse = new AutoscalingPolicy(); - $expectedResponse->setId($id); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->autoscalingPolicyName('[PROJECT]', '[LOCATION]', '[AUTOSCALING_POLICY]'); - $request = (new GetAutoscalingPolicyRequest()) - ->setName($formattedName); - $response = $gapicClient->getAutoscalingPolicy($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.dataproc.v1.AutoscalingPolicyService/GetAutoscalingPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAutoscalingPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->autoscalingPolicyName('[PROJECT]', '[LOCATION]', '[AUTOSCALING_POLICY]'); - $request = (new GetAutoscalingPolicyRequest()) - ->setName($formattedName); - try { - $gapicClient->getAutoscalingPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAutoscalingPoliciesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $policiesElement = new AutoscalingPolicy(); - $policies = [ - $policiesElement, - ]; - $expectedResponse = new ListAutoscalingPoliciesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setPolicies($policies); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->regionName('[PROJECT]', '[REGION]'); - $request = (new ListAutoscalingPoliciesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listAutoscalingPolicies($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getPolicies()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataproc.v1.AutoscalingPolicyService/ListAutoscalingPolicies', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAutoscalingPoliciesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->regionName('[PROJECT]', '[REGION]'); - $request = (new ListAutoscalingPoliciesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listAutoscalingPolicies($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateAutoscalingPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $id = 'id3355'; - $name = 'name3373707'; - $expectedResponse = new AutoscalingPolicy(); - $expectedResponse->setId($id); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $policy = new AutoscalingPolicy(); - $policyWorkerConfig = new InstanceGroupAutoscalingPolicyConfig(); - $workerConfigMaxInstances = 339756550; - $policyWorkerConfig->setMaxInstances($workerConfigMaxInstances); - $policy->setWorkerConfig($policyWorkerConfig); - $policyBasicAlgorithm = new BasicAutoscalingAlgorithm(); - $basicAlgorithmYarnConfig = new BasicYarnAutoscalingConfig(); - $yarnConfigGracefulDecommissionTimeout = new Duration(); - $basicAlgorithmYarnConfig->setGracefulDecommissionTimeout($yarnConfigGracefulDecommissionTimeout); - $yarnConfigScaleUpFactor = -4.1551534E7; - $basicAlgorithmYarnConfig->setScaleUpFactor($yarnConfigScaleUpFactor); - $yarnConfigScaleDownFactor = -1.72221005E8; - $basicAlgorithmYarnConfig->setScaleDownFactor($yarnConfigScaleDownFactor); - $policyBasicAlgorithm->setYarnConfig($basicAlgorithmYarnConfig); - $policy->setBasicAlgorithm($policyBasicAlgorithm); - $request = (new UpdateAutoscalingPolicyRequest()) - ->setPolicy($policy); - $response = $gapicClient->updateAutoscalingPolicy($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.dataproc.v1.AutoscalingPolicyService/UpdateAutoscalingPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateAutoscalingPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $policy = new AutoscalingPolicy(); - $policyWorkerConfig = new InstanceGroupAutoscalingPolicyConfig(); - $workerConfigMaxInstances = 339756550; - $policyWorkerConfig->setMaxInstances($workerConfigMaxInstances); - $policy->setWorkerConfig($policyWorkerConfig); - $policyBasicAlgorithm = new BasicAutoscalingAlgorithm(); - $basicAlgorithmYarnConfig = new BasicYarnAutoscalingConfig(); - $yarnConfigGracefulDecommissionTimeout = new Duration(); - $basicAlgorithmYarnConfig->setGracefulDecommissionTimeout($yarnConfigGracefulDecommissionTimeout); - $yarnConfigScaleUpFactor = -4.1551534E7; - $basicAlgorithmYarnConfig->setScaleUpFactor($yarnConfigScaleUpFactor); - $yarnConfigScaleDownFactor = -1.72221005E8; - $basicAlgorithmYarnConfig->setScaleDownFactor($yarnConfigScaleDownFactor); - $policyBasicAlgorithm->setYarnConfig($basicAlgorithmYarnConfig); - $policy->setBasicAlgorithm($policyBasicAlgorithm); - $request = (new UpdateAutoscalingPolicyRequest()) - ->setPolicy($policy); - try { - $gapicClient->updateAutoscalingPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - $response = $gapicClient->getIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - try { - $gapicClient->getIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - $response = $gapicClient->setIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - try { - $gapicClient->setIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - $response = $gapicClient->testIamPermissions($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - try { - $gapicClient->testIamPermissions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createAutoscalingPolicyAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $id = 'id3355'; - $name = 'name3373707'; - $expectedResponse = new AutoscalingPolicy(); - $expectedResponse->setId($id); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->regionName('[PROJECT]', '[REGION]'); - $policy = new AutoscalingPolicy(); - $policyWorkerConfig = new InstanceGroupAutoscalingPolicyConfig(); - $workerConfigMaxInstances = 339756550; - $policyWorkerConfig->setMaxInstances($workerConfigMaxInstances); - $policy->setWorkerConfig($policyWorkerConfig); - $policyBasicAlgorithm = new BasicAutoscalingAlgorithm(); - $basicAlgorithmYarnConfig = new BasicYarnAutoscalingConfig(); - $yarnConfigGracefulDecommissionTimeout = new Duration(); - $basicAlgorithmYarnConfig->setGracefulDecommissionTimeout($yarnConfigGracefulDecommissionTimeout); - $yarnConfigScaleUpFactor = -4.1551534E7; - $basicAlgorithmYarnConfig->setScaleUpFactor($yarnConfigScaleUpFactor); - $yarnConfigScaleDownFactor = -1.72221005E8; - $basicAlgorithmYarnConfig->setScaleDownFactor($yarnConfigScaleDownFactor); - $policyBasicAlgorithm->setYarnConfig($basicAlgorithmYarnConfig); - $policy->setBasicAlgorithm($policyBasicAlgorithm); - $request = (new CreateAutoscalingPolicyRequest()) - ->setParent($formattedParent) - ->setPolicy($policy); - $response = $gapicClient->createAutoscalingPolicyAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataproc.v1.AutoscalingPolicyService/CreateAutoscalingPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Dataproc/v1/tests/Unit/V1/Client/BatchControllerClientTest.php b/owl-bot-staging/Dataproc/v1/tests/Unit/V1/Client/BatchControllerClientTest.php deleted file mode 100644 index 6ac334a22c9..00000000000 --- a/owl-bot-staging/Dataproc/v1/tests/Unit/V1/Client/BatchControllerClientTest.php +++ /dev/null @@ -1,702 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return BatchControllerClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new BatchControllerClient($options); - } - - /** @test */ - public function createBatchTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createBatchTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uuid = 'uuid3601339'; - $stateMessage = 'stateMessage29641305'; - $creator = 'creator1028554796'; - $operation = 'operation1662702951'; - $expectedResponse = new Batch(); - $expectedResponse->setName($name); - $expectedResponse->setUuid($uuid); - $expectedResponse->setStateMessage($stateMessage); - $expectedResponse->setCreator($creator); - $expectedResponse->setOperation($operation); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createBatchTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $batch = new Batch(); - $request = (new CreateBatchRequest()) - ->setParent($formattedParent) - ->setBatch($batch); - $response = $gapicClient->createBatch($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.dataproc.v1.BatchController/CreateBatch', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getBatch(); - $this->assertProtobufEquals($batch, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createBatchTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createBatchExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createBatchTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $batch = new Batch(); - $request = (new CreateBatchRequest()) - ->setParent($formattedParent) - ->setBatch($batch); - $response = $gapicClient->createBatch($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createBatchTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteBatchTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->batchName('[PROJECT]', '[LOCATION]', '[BATCH]'); - $request = (new DeleteBatchRequest()) - ->setName($formattedName); - $gapicClient->deleteBatch($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataproc.v1.BatchController/DeleteBatch', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteBatchExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->batchName('[PROJECT]', '[LOCATION]', '[BATCH]'); - $request = (new DeleteBatchRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteBatch($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getBatchTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uuid = 'uuid3601339'; - $stateMessage = 'stateMessage29641305'; - $creator = 'creator1028554796'; - $operation = 'operation1662702951'; - $expectedResponse = new Batch(); - $expectedResponse->setName($name2); - $expectedResponse->setUuid($uuid); - $expectedResponse->setStateMessage($stateMessage); - $expectedResponse->setCreator($creator); - $expectedResponse->setOperation($operation); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->batchName('[PROJECT]', '[LOCATION]', '[BATCH]'); - $request = (new GetBatchRequest()) - ->setName($formattedName); - $response = $gapicClient->getBatch($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.dataproc.v1.BatchController/GetBatch', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getBatchExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->batchName('[PROJECT]', '[LOCATION]', '[BATCH]'); - $request = (new GetBatchRequest()) - ->setName($formattedName); - try { - $gapicClient->getBatch($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listBatchesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $batchesElement = new Batch(); - $batches = [ - $batchesElement, - ]; - $expectedResponse = new ListBatchesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setBatches($batches); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListBatchesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listBatches($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getBatches()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataproc.v1.BatchController/ListBatches', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listBatchesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListBatchesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listBatches($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - $response = $gapicClient->getIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - try { - $gapicClient->getIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - $response = $gapicClient->setIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - try { - $gapicClient->setIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - $response = $gapicClient->testIamPermissions($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - try { - $gapicClient->testIamPermissions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createBatchAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createBatchTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uuid = 'uuid3601339'; - $stateMessage = 'stateMessage29641305'; - $creator = 'creator1028554796'; - $operation = 'operation1662702951'; - $expectedResponse = new Batch(); - $expectedResponse->setName($name); - $expectedResponse->setUuid($uuid); - $expectedResponse->setStateMessage($stateMessage); - $expectedResponse->setCreator($creator); - $expectedResponse->setOperation($operation); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createBatchTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $batch = new Batch(); - $request = (new CreateBatchRequest()) - ->setParent($formattedParent) - ->setBatch($batch); - $response = $gapicClient->createBatchAsync($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.dataproc.v1.BatchController/CreateBatch', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getBatch(); - $this->assertProtobufEquals($batch, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createBatchTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -} diff --git a/owl-bot-staging/Dataproc/v1/tests/Unit/V1/Client/ClusterControllerClientTest.php b/owl-bot-staging/Dataproc/v1/tests/Unit/V1/Client/ClusterControllerClientTest.php deleted file mode 100644 index 8cb0783958f..00000000000 --- a/owl-bot-staging/Dataproc/v1/tests/Unit/V1/Client/ClusterControllerClientTest.php +++ /dev/null @@ -1,1380 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return ClusterControllerClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new ClusterControllerClient($options); - } - - /** @test */ - public function createClusterTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $projectId2 = 'projectId2939242356'; - $clusterName = 'clusterName-1018081872'; - $clusterUuid = 'clusterUuid-1017854240'; - $expectedResponse = new Cluster(); - $expectedResponse->setProjectId($projectId2); - $expectedResponse->setClusterName($clusterName); - $expectedResponse->setClusterUuid($clusterUuid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $projectId = 'projectId-1969970175'; - $region = 'region-934795532'; - $cluster = new Cluster(); - $clusterProjectId = 'clusterProjectId-927164102'; - $cluster->setProjectId($clusterProjectId); - $clusterClusterName = 'clusterClusterName2146953547'; - $cluster->setClusterName($clusterClusterName); - $request = (new CreateClusterRequest()) - ->setProjectId($projectId) - ->setRegion($region) - ->setCluster($cluster); - $response = $gapicClient->createCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataproc.v1.ClusterController/CreateCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getProjectId(); - $this->assertProtobufEquals($projectId, $actualValue); - $actualValue = $actualApiRequestObject->getRegion(); - $this->assertProtobufEquals($region, $actualValue); - $actualValue = $actualApiRequestObject->getCluster(); - $this->assertProtobufEquals($cluster, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createClusterTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createClusterExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $projectId = 'projectId-1969970175'; - $region = 'region-934795532'; - $cluster = new Cluster(); - $clusterProjectId = 'clusterProjectId-927164102'; - $cluster->setProjectId($clusterProjectId); - $clusterClusterName = 'clusterClusterName2146953547'; - $cluster->setClusterName($clusterClusterName); - $request = (new CreateClusterRequest()) - ->setProjectId($projectId) - ->setRegion($region) - ->setCluster($cluster); - $response = $gapicClient->createCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createClusterTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteClusterTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $projectId = 'projectId-1969970175'; - $region = 'region-934795532'; - $clusterName = 'clusterName-1018081872'; - $request = (new DeleteClusterRequest()) - ->setProjectId($projectId) - ->setRegion($region) - ->setClusterName($clusterName); - $response = $gapicClient->deleteCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataproc.v1.ClusterController/DeleteCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getProjectId(); - $this->assertProtobufEquals($projectId, $actualValue); - $actualValue = $actualApiRequestObject->getRegion(); - $this->assertProtobufEquals($region, $actualValue); - $actualValue = $actualApiRequestObject->getClusterName(); - $this->assertProtobufEquals($clusterName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteClusterTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteClusterExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $projectId = 'projectId-1969970175'; - $region = 'region-934795532'; - $clusterName = 'clusterName-1018081872'; - $request = (new DeleteClusterRequest()) - ->setProjectId($projectId) - ->setRegion($region) - ->setClusterName($clusterName); - $response = $gapicClient->deleteCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteClusterTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function diagnoseClusterTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/diagnoseClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $outputUri = 'outputUri-1273518802'; - $expectedResponse = new DiagnoseClusterResults(); - $expectedResponse->setOutputUri($outputUri); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/diagnoseClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $projectId = 'projectId-1969970175'; - $region = 'region-934795532'; - $clusterName = 'clusterName-1018081872'; - $request = (new DiagnoseClusterRequest()) - ->setProjectId($projectId) - ->setRegion($region) - ->setClusterName($clusterName); - $response = $gapicClient->diagnoseCluster($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.dataproc.v1.ClusterController/DiagnoseCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getProjectId(); - $this->assertProtobufEquals($projectId, $actualValue); - $actualValue = $actualApiRequestObject->getRegion(); - $this->assertProtobufEquals($region, $actualValue); - $actualValue = $actualApiRequestObject->getClusterName(); - $this->assertProtobufEquals($clusterName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/diagnoseClusterTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function diagnoseClusterExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/diagnoseClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $projectId = 'projectId-1969970175'; - $region = 'region-934795532'; - $clusterName = 'clusterName-1018081872'; - $request = (new DiagnoseClusterRequest()) - ->setProjectId($projectId) - ->setRegion($region) - ->setClusterName($clusterName); - $response = $gapicClient->diagnoseCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/diagnoseClusterTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getClusterTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $projectId2 = 'projectId2939242356'; - $clusterName2 = 'clusterName2875867491'; - $clusterUuid = 'clusterUuid-1017854240'; - $expectedResponse = new Cluster(); - $expectedResponse->setProjectId($projectId2); - $expectedResponse->setClusterName($clusterName2); - $expectedResponse->setClusterUuid($clusterUuid); - $transport->addResponse($expectedResponse); - // Mock request - $projectId = 'projectId-1969970175'; - $region = 'region-934795532'; - $clusterName = 'clusterName-1018081872'; - $request = (new GetClusterRequest()) - ->setProjectId($projectId) - ->setRegion($region) - ->setClusterName($clusterName); - $response = $gapicClient->getCluster($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataproc.v1.ClusterController/GetCluster', $actualFuncCall); - $actualValue = $actualRequestObject->getProjectId(); - $this->assertProtobufEquals($projectId, $actualValue); - $actualValue = $actualRequestObject->getRegion(); - $this->assertProtobufEquals($region, $actualValue); - $actualValue = $actualRequestObject->getClusterName(); - $this->assertProtobufEquals($clusterName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getClusterExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $projectId = 'projectId-1969970175'; - $region = 'region-934795532'; - $clusterName = 'clusterName-1018081872'; - $request = (new GetClusterRequest()) - ->setProjectId($projectId) - ->setRegion($region) - ->setClusterName($clusterName); - try { - $gapicClient->getCluster($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listClustersTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $clustersElement = new Cluster(); - $clusters = [ - $clustersElement, - ]; - $expectedResponse = new ListClustersResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setClusters($clusters); - $transport->addResponse($expectedResponse); - // Mock request - $projectId = 'projectId-1969970175'; - $region = 'region-934795532'; - $request = (new ListClustersRequest()) - ->setProjectId($projectId) - ->setRegion($region); - $response = $gapicClient->listClusters($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getClusters()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataproc.v1.ClusterController/ListClusters', $actualFuncCall); - $actualValue = $actualRequestObject->getProjectId(); - $this->assertProtobufEquals($projectId, $actualValue); - $actualValue = $actualRequestObject->getRegion(); - $this->assertProtobufEquals($region, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listClustersExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $projectId = 'projectId-1969970175'; - $region = 'region-934795532'; - $request = (new ListClustersRequest()) - ->setProjectId($projectId) - ->setRegion($region); - try { - $gapicClient->listClusters($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function startClusterTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/startClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $projectId2 = 'projectId2939242356'; - $clusterName2 = 'clusterName2875867491'; - $clusterUuid2 = 'clusterUuid21094621843'; - $expectedResponse = new Cluster(); - $expectedResponse->setProjectId($projectId2); - $expectedResponse->setClusterName($clusterName2); - $expectedResponse->setClusterUuid($clusterUuid2); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/startClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $projectId = 'projectId-1969970175'; - $region = 'region-934795532'; - $clusterName = 'clusterName-1018081872'; - $request = (new StartClusterRequest()) - ->setProjectId($projectId) - ->setRegion($region) - ->setClusterName($clusterName); - $response = $gapicClient->startCluster($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.dataproc.v1.ClusterController/StartCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getProjectId(); - $this->assertProtobufEquals($projectId, $actualValue); - $actualValue = $actualApiRequestObject->getRegion(); - $this->assertProtobufEquals($region, $actualValue); - $actualValue = $actualApiRequestObject->getClusterName(); - $this->assertProtobufEquals($clusterName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/startClusterTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function startClusterExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/startClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $projectId = 'projectId-1969970175'; - $region = 'region-934795532'; - $clusterName = 'clusterName-1018081872'; - $request = (new StartClusterRequest()) - ->setProjectId($projectId) - ->setRegion($region) - ->setClusterName($clusterName); - $response = $gapicClient->startCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/startClusterTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function stopClusterTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/stopClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $projectId2 = 'projectId2939242356'; - $clusterName2 = 'clusterName2875867491'; - $clusterUuid2 = 'clusterUuid21094621843'; - $expectedResponse = new Cluster(); - $expectedResponse->setProjectId($projectId2); - $expectedResponse->setClusterName($clusterName2); - $expectedResponse->setClusterUuid($clusterUuid2); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/stopClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $projectId = 'projectId-1969970175'; - $region = 'region-934795532'; - $clusterName = 'clusterName-1018081872'; - $request = (new StopClusterRequest()) - ->setProjectId($projectId) - ->setRegion($region) - ->setClusterName($clusterName); - $response = $gapicClient->stopCluster($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.dataproc.v1.ClusterController/StopCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getProjectId(); - $this->assertProtobufEquals($projectId, $actualValue); - $actualValue = $actualApiRequestObject->getRegion(); - $this->assertProtobufEquals($region, $actualValue); - $actualValue = $actualApiRequestObject->getClusterName(); - $this->assertProtobufEquals($clusterName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/stopClusterTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function stopClusterExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/stopClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $projectId = 'projectId-1969970175'; - $region = 'region-934795532'; - $clusterName = 'clusterName-1018081872'; - $request = (new StopClusterRequest()) - ->setProjectId($projectId) - ->setRegion($region) - ->setClusterName($clusterName); - $response = $gapicClient->stopCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/stopClusterTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateClusterTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $projectId2 = 'projectId2939242356'; - $clusterName2 = 'clusterName2875867491'; - $clusterUuid = 'clusterUuid-1017854240'; - $expectedResponse = new Cluster(); - $expectedResponse->setProjectId($projectId2); - $expectedResponse->setClusterName($clusterName2); - $expectedResponse->setClusterUuid($clusterUuid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $projectId = 'projectId-1969970175'; - $region = 'region-934795532'; - $clusterName = 'clusterName-1018081872'; - $cluster = new Cluster(); - $clusterProjectId = 'clusterProjectId-927164102'; - $cluster->setProjectId($clusterProjectId); - $clusterClusterName = 'clusterClusterName2146953547'; - $cluster->setClusterName($clusterClusterName); - $updateMask = new FieldMask(); - $request = (new UpdateClusterRequest()) - ->setProjectId($projectId) - ->setRegion($region) - ->setClusterName($clusterName) - ->setCluster($cluster) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataproc.v1.ClusterController/UpdateCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getProjectId(); - $this->assertProtobufEquals($projectId, $actualValue); - $actualValue = $actualApiRequestObject->getRegion(); - $this->assertProtobufEquals($region, $actualValue); - $actualValue = $actualApiRequestObject->getClusterName(); - $this->assertProtobufEquals($clusterName, $actualValue); - $actualValue = $actualApiRequestObject->getCluster(); - $this->assertProtobufEquals($cluster, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateClusterTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateClusterExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $projectId = 'projectId-1969970175'; - $region = 'region-934795532'; - $clusterName = 'clusterName-1018081872'; - $cluster = new Cluster(); - $clusterProjectId = 'clusterProjectId-927164102'; - $cluster->setProjectId($clusterProjectId); - $clusterClusterName = 'clusterClusterName2146953547'; - $cluster->setClusterName($clusterClusterName); - $updateMask = new FieldMask(); - $request = (new UpdateClusterRequest()) - ->setProjectId($projectId) - ->setRegion($region) - ->setClusterName($clusterName) - ->setCluster($cluster) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateClusterTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - $response = $gapicClient->getIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - try { - $gapicClient->getIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - $response = $gapicClient->setIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - try { - $gapicClient->setIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - $response = $gapicClient->testIamPermissions($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - try { - $gapicClient->testIamPermissions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createClusterAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $projectId2 = 'projectId2939242356'; - $clusterName = 'clusterName-1018081872'; - $clusterUuid = 'clusterUuid-1017854240'; - $expectedResponse = new Cluster(); - $expectedResponse->setProjectId($projectId2); - $expectedResponse->setClusterName($clusterName); - $expectedResponse->setClusterUuid($clusterUuid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $projectId = 'projectId-1969970175'; - $region = 'region-934795532'; - $cluster = new Cluster(); - $clusterProjectId = 'clusterProjectId-927164102'; - $cluster->setProjectId($clusterProjectId); - $clusterClusterName = 'clusterClusterName2146953547'; - $cluster->setClusterName($clusterClusterName); - $request = (new CreateClusterRequest()) - ->setProjectId($projectId) - ->setRegion($region) - ->setCluster($cluster); - $response = $gapicClient->createClusterAsync($request)->wait(); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataproc.v1.ClusterController/CreateCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getProjectId(); - $this->assertProtobufEquals($projectId, $actualValue); - $actualValue = $actualApiRequestObject->getRegion(); - $this->assertProtobufEquals($region, $actualValue); - $actualValue = $actualApiRequestObject->getCluster(); - $this->assertProtobufEquals($cluster, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createClusterTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -} diff --git a/owl-bot-staging/Dataproc/v1/tests/Unit/V1/Client/JobControllerClientTest.php b/owl-bot-staging/Dataproc/v1/tests/Unit/V1/Client/JobControllerClientTest.php deleted file mode 100644 index f689f5b9d73..00000000000 --- a/owl-bot-staging/Dataproc/v1/tests/Unit/V1/Client/JobControllerClientTest.php +++ /dev/null @@ -1,985 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return JobControllerClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new JobControllerClient($options); - } - - /** @test */ - public function cancelJobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $driverOutputResourceUri = 'driverOutputResourceUri-542229086'; - $driverControlFilesUri = 'driverControlFilesUri207057643'; - $jobUuid = 'jobUuid-1615012099'; - $done = true; - $expectedResponse = new Job(); - $expectedResponse->setDriverOutputResourceUri($driverOutputResourceUri); - $expectedResponse->setDriverControlFilesUri($driverControlFilesUri); - $expectedResponse->setJobUuid($jobUuid); - $expectedResponse->setDone($done); - $transport->addResponse($expectedResponse); - // Mock request - $projectId = 'projectId-1969970175'; - $region = 'region-934795532'; - $jobId = 'jobId-1154752291'; - $request = (new CancelJobRequest()) - ->setProjectId($projectId) - ->setRegion($region) - ->setJobId($jobId); - $response = $gapicClient->cancelJob($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.dataproc.v1.JobController/CancelJob', $actualFuncCall); - $actualValue = $actualRequestObject->getProjectId(); - $this->assertProtobufEquals($projectId, $actualValue); - $actualValue = $actualRequestObject->getRegion(); - $this->assertProtobufEquals($region, $actualValue); - $actualValue = $actualRequestObject->getJobId(); - $this->assertProtobufEquals($jobId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function cancelJobExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $projectId = 'projectId-1969970175'; - $region = 'region-934795532'; - $jobId = 'jobId-1154752291'; - $request = (new CancelJobRequest()) - ->setProjectId($projectId) - ->setRegion($region) - ->setJobId($jobId); - try { - $gapicClient->cancelJob($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteJobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $projectId = 'projectId-1969970175'; - $region = 'region-934795532'; - $jobId = 'jobId-1154752291'; - $request = (new DeleteJobRequest()) - ->setProjectId($projectId) - ->setRegion($region) - ->setJobId($jobId); - $gapicClient->deleteJob($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataproc.v1.JobController/DeleteJob', $actualFuncCall); - $actualValue = $actualRequestObject->getProjectId(); - $this->assertProtobufEquals($projectId, $actualValue); - $actualValue = $actualRequestObject->getRegion(); - $this->assertProtobufEquals($region, $actualValue); - $actualValue = $actualRequestObject->getJobId(); - $this->assertProtobufEquals($jobId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteJobExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $projectId = 'projectId-1969970175'; - $region = 'region-934795532'; - $jobId = 'jobId-1154752291'; - $request = (new DeleteJobRequest()) - ->setProjectId($projectId) - ->setRegion($region) - ->setJobId($jobId); - try { - $gapicClient->deleteJob($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getJobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $driverOutputResourceUri = 'driverOutputResourceUri-542229086'; - $driverControlFilesUri = 'driverControlFilesUri207057643'; - $jobUuid = 'jobUuid-1615012099'; - $done = true; - $expectedResponse = new Job(); - $expectedResponse->setDriverOutputResourceUri($driverOutputResourceUri); - $expectedResponse->setDriverControlFilesUri($driverControlFilesUri); - $expectedResponse->setJobUuid($jobUuid); - $expectedResponse->setDone($done); - $transport->addResponse($expectedResponse); - // Mock request - $projectId = 'projectId-1969970175'; - $region = 'region-934795532'; - $jobId = 'jobId-1154752291'; - $request = (new GetJobRequest()) - ->setProjectId($projectId) - ->setRegion($region) - ->setJobId($jobId); - $response = $gapicClient->getJob($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataproc.v1.JobController/GetJob', $actualFuncCall); - $actualValue = $actualRequestObject->getProjectId(); - $this->assertProtobufEquals($projectId, $actualValue); - $actualValue = $actualRequestObject->getRegion(); - $this->assertProtobufEquals($region, $actualValue); - $actualValue = $actualRequestObject->getJobId(); - $this->assertProtobufEquals($jobId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getJobExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $projectId = 'projectId-1969970175'; - $region = 'region-934795532'; - $jobId = 'jobId-1154752291'; - $request = (new GetJobRequest()) - ->setProjectId($projectId) - ->setRegion($region) - ->setJobId($jobId); - try { - $gapicClient->getJob($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listJobsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $jobsElement = new Job(); - $jobs = [ - $jobsElement, - ]; - $expectedResponse = new ListJobsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setJobs($jobs); - $transport->addResponse($expectedResponse); - // Mock request - $projectId = 'projectId-1969970175'; - $region = 'region-934795532'; - $request = (new ListJobsRequest()) - ->setProjectId($projectId) - ->setRegion($region); - $response = $gapicClient->listJobs($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getJobs()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataproc.v1.JobController/ListJobs', $actualFuncCall); - $actualValue = $actualRequestObject->getProjectId(); - $this->assertProtobufEquals($projectId, $actualValue); - $actualValue = $actualRequestObject->getRegion(); - $this->assertProtobufEquals($region, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listJobsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $projectId = 'projectId-1969970175'; - $region = 'region-934795532'; - $request = (new ListJobsRequest()) - ->setProjectId($projectId) - ->setRegion($region); - try { - $gapicClient->listJobs($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function submitJobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $driverOutputResourceUri = 'driverOutputResourceUri-542229086'; - $driverControlFilesUri = 'driverControlFilesUri207057643'; - $jobUuid = 'jobUuid-1615012099'; - $done = true; - $expectedResponse = new Job(); - $expectedResponse->setDriverOutputResourceUri($driverOutputResourceUri); - $expectedResponse->setDriverControlFilesUri($driverControlFilesUri); - $expectedResponse->setJobUuid($jobUuid); - $expectedResponse->setDone($done); - $transport->addResponse($expectedResponse); - // Mock request - $projectId = 'projectId-1969970175'; - $region = 'region-934795532'; - $job = new Job(); - $jobPlacement = new JobPlacement(); - $placementClusterName = 'placementClusterName1028110208'; - $jobPlacement->setClusterName($placementClusterName); - $job->setPlacement($jobPlacement); - $request = (new SubmitJobRequest()) - ->setProjectId($projectId) - ->setRegion($region) - ->setJob($job); - $response = $gapicClient->submitJob($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.dataproc.v1.JobController/SubmitJob', $actualFuncCall); - $actualValue = $actualRequestObject->getProjectId(); - $this->assertProtobufEquals($projectId, $actualValue); - $actualValue = $actualRequestObject->getRegion(); - $this->assertProtobufEquals($region, $actualValue); - $actualValue = $actualRequestObject->getJob(); - $this->assertProtobufEquals($job, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function submitJobExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $projectId = 'projectId-1969970175'; - $region = 'region-934795532'; - $job = new Job(); - $jobPlacement = new JobPlacement(); - $placementClusterName = 'placementClusterName1028110208'; - $jobPlacement->setClusterName($placementClusterName); - $job->setPlacement($jobPlacement); - $request = (new SubmitJobRequest()) - ->setProjectId($projectId) - ->setRegion($region) - ->setJob($job); - try { - $gapicClient->submitJob($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function submitJobAsOperationTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/submitJobAsOperationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $driverOutputResourceUri = 'driverOutputResourceUri-542229086'; - $driverControlFilesUri = 'driverControlFilesUri207057643'; - $jobUuid = 'jobUuid-1615012099'; - $done = true; - $expectedResponse = new Job(); - $expectedResponse->setDriverOutputResourceUri($driverOutputResourceUri); - $expectedResponse->setDriverControlFilesUri($driverControlFilesUri); - $expectedResponse->setJobUuid($jobUuid); - $expectedResponse->setDone($done); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/submitJobAsOperationTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $projectId = 'projectId-1969970175'; - $region = 'region-934795532'; - $job = new Job(); - $jobPlacement = new JobPlacement(); - $placementClusterName = 'placementClusterName1028110208'; - $jobPlacement->setClusterName($placementClusterName); - $job->setPlacement($jobPlacement); - $request = (new SubmitJobRequest()) - ->setProjectId($projectId) - ->setRegion($region) - ->setJob($job); - $response = $gapicClient->submitJobAsOperation($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.dataproc.v1.JobController/SubmitJobAsOperation', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getProjectId(); - $this->assertProtobufEquals($projectId, $actualValue); - $actualValue = $actualApiRequestObject->getRegion(); - $this->assertProtobufEquals($region, $actualValue); - $actualValue = $actualApiRequestObject->getJob(); - $this->assertProtobufEquals($job, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/submitJobAsOperationTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function submitJobAsOperationExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/submitJobAsOperationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $projectId = 'projectId-1969970175'; - $region = 'region-934795532'; - $job = new Job(); - $jobPlacement = new JobPlacement(); - $placementClusterName = 'placementClusterName1028110208'; - $jobPlacement->setClusterName($placementClusterName); - $job->setPlacement($jobPlacement); - $request = (new SubmitJobRequest()) - ->setProjectId($projectId) - ->setRegion($region) - ->setJob($job); - $response = $gapicClient->submitJobAsOperation($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/submitJobAsOperationTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateJobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $driverOutputResourceUri = 'driverOutputResourceUri-542229086'; - $driverControlFilesUri = 'driverControlFilesUri207057643'; - $jobUuid = 'jobUuid-1615012099'; - $done = true; - $expectedResponse = new Job(); - $expectedResponse->setDriverOutputResourceUri($driverOutputResourceUri); - $expectedResponse->setDriverControlFilesUri($driverControlFilesUri); - $expectedResponse->setJobUuid($jobUuid); - $expectedResponse->setDone($done); - $transport->addResponse($expectedResponse); - // Mock request - $projectId = 'projectId-1969970175'; - $region = 'region-934795532'; - $jobId = 'jobId-1154752291'; - $job = new Job(); - $jobPlacement = new JobPlacement(); - $placementClusterName = 'placementClusterName1028110208'; - $jobPlacement->setClusterName($placementClusterName); - $job->setPlacement($jobPlacement); - $updateMask = new FieldMask(); - $request = (new UpdateJobRequest()) - ->setProjectId($projectId) - ->setRegion($region) - ->setJobId($jobId) - ->setJob($job) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateJob($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.dataproc.v1.JobController/UpdateJob', $actualFuncCall); - $actualValue = $actualRequestObject->getProjectId(); - $this->assertProtobufEquals($projectId, $actualValue); - $actualValue = $actualRequestObject->getRegion(); - $this->assertProtobufEquals($region, $actualValue); - $actualValue = $actualRequestObject->getJobId(); - $this->assertProtobufEquals($jobId, $actualValue); - $actualValue = $actualRequestObject->getJob(); - $this->assertProtobufEquals($job, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateJobExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $projectId = 'projectId-1969970175'; - $region = 'region-934795532'; - $jobId = 'jobId-1154752291'; - $job = new Job(); - $jobPlacement = new JobPlacement(); - $placementClusterName = 'placementClusterName1028110208'; - $jobPlacement->setClusterName($placementClusterName); - $job->setPlacement($jobPlacement); - $updateMask = new FieldMask(); - $request = (new UpdateJobRequest()) - ->setProjectId($projectId) - ->setRegion($region) - ->setJobId($jobId) - ->setJob($job) - ->setUpdateMask($updateMask); - try { - $gapicClient->updateJob($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - $response = $gapicClient->getIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - try { - $gapicClient->getIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - $response = $gapicClient->setIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - try { - $gapicClient->setIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - $response = $gapicClient->testIamPermissions($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - try { - $gapicClient->testIamPermissions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function cancelJobAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $driverOutputResourceUri = 'driverOutputResourceUri-542229086'; - $driverControlFilesUri = 'driverControlFilesUri207057643'; - $jobUuid = 'jobUuid-1615012099'; - $done = true; - $expectedResponse = new Job(); - $expectedResponse->setDriverOutputResourceUri($driverOutputResourceUri); - $expectedResponse->setDriverControlFilesUri($driverControlFilesUri); - $expectedResponse->setJobUuid($jobUuid); - $expectedResponse->setDone($done); - $transport->addResponse($expectedResponse); - // Mock request - $projectId = 'projectId-1969970175'; - $region = 'region-934795532'; - $jobId = 'jobId-1154752291'; - $request = (new CancelJobRequest()) - ->setProjectId($projectId) - ->setRegion($region) - ->setJobId($jobId); - $response = $gapicClient->cancelJobAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataproc.v1.JobController/CancelJob', $actualFuncCall); - $actualValue = $actualRequestObject->getProjectId(); - $this->assertProtobufEquals($projectId, $actualValue); - $actualValue = $actualRequestObject->getRegion(); - $this->assertProtobufEquals($region, $actualValue); - $actualValue = $actualRequestObject->getJobId(); - $this->assertProtobufEquals($jobId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Dataproc/v1/tests/Unit/V1/Client/NodeGroupControllerClientTest.php b/owl-bot-staging/Dataproc/v1/tests/Unit/V1/Client/NodeGroupControllerClientTest.php deleted file mode 100644 index 7decfbb06d0..00000000000 --- a/owl-bot-staging/Dataproc/v1/tests/Unit/V1/Client/NodeGroupControllerClientTest.php +++ /dev/null @@ -1,677 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return NodeGroupControllerClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new NodeGroupControllerClient($options); - } - - /** @test */ - public function createNodeGroupTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createNodeGroupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $expectedResponse = new NodeGroup(); - $expectedResponse->setName($name); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createNodeGroupTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->clusterRegionName('[PROJECT]', '[REGION]', '[CLUSTER]'); - $nodeGroup = new NodeGroup(); - $nodeGroupRoles = []; - $nodeGroup->setRoles($nodeGroupRoles); - $request = (new CreateNodeGroupRequest()) - ->setParent($formattedParent) - ->setNodeGroup($nodeGroup); - $response = $gapicClient->createNodeGroup($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.dataproc.v1.NodeGroupController/CreateNodeGroup', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getNodeGroup(); - $this->assertProtobufEquals($nodeGroup, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createNodeGroupTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createNodeGroupExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createNodeGroupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->clusterRegionName('[PROJECT]', '[REGION]', '[CLUSTER]'); - $nodeGroup = new NodeGroup(); - $nodeGroupRoles = []; - $nodeGroup->setRoles($nodeGroupRoles); - $request = (new CreateNodeGroupRequest()) - ->setParent($formattedParent) - ->setNodeGroup($nodeGroup); - $response = $gapicClient->createNodeGroup($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createNodeGroupTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getNodeGroupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new NodeGroup(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->nodeGroupName('[PROJECT]', '[REGION]', '[CLUSTER]', '[NODE_GROUP]'); - $request = (new GetNodeGroupRequest()) - ->setName($formattedName); - $response = $gapicClient->getNodeGroup($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.dataproc.v1.NodeGroupController/GetNodeGroup', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getNodeGroupExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->nodeGroupName('[PROJECT]', '[REGION]', '[CLUSTER]', '[NODE_GROUP]'); - $request = (new GetNodeGroupRequest()) - ->setName($formattedName); - try { - $gapicClient->getNodeGroup($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function resizeNodeGroupTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/resizeNodeGroupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $expectedResponse = new NodeGroup(); - $expectedResponse->setName($name2); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/resizeNodeGroupTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $name = 'name3373707'; - $size = 3530753; - $request = (new ResizeNodeGroupRequest()) - ->setName($name) - ->setSize($size); - $response = $gapicClient->resizeNodeGroup($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.dataproc.v1.NodeGroupController/ResizeNodeGroup', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $actualValue = $actualApiRequestObject->getSize(); - $this->assertProtobufEquals($size, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/resizeNodeGroupTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function resizeNodeGroupExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/resizeNodeGroupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $size = 3530753; - $request = (new ResizeNodeGroupRequest()) - ->setName($name) - ->setSize($size); - $response = $gapicClient->resizeNodeGroup($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/resizeNodeGroupTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - $response = $gapicClient->getIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - try { - $gapicClient->getIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - $response = $gapicClient->setIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - try { - $gapicClient->setIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - $response = $gapicClient->testIamPermissions($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - try { - $gapicClient->testIamPermissions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createNodeGroupAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createNodeGroupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $expectedResponse = new NodeGroup(); - $expectedResponse->setName($name); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createNodeGroupTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->clusterRegionName('[PROJECT]', '[REGION]', '[CLUSTER]'); - $nodeGroup = new NodeGroup(); - $nodeGroupRoles = []; - $nodeGroup->setRoles($nodeGroupRoles); - $request = (new CreateNodeGroupRequest()) - ->setParent($formattedParent) - ->setNodeGroup($nodeGroup); - $response = $gapicClient->createNodeGroupAsync($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.dataproc.v1.NodeGroupController/CreateNodeGroup', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getNodeGroup(); - $this->assertProtobufEquals($nodeGroup, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createNodeGroupTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -} diff --git a/owl-bot-staging/Dataproc/v1/tests/Unit/V1/Client/WorkflowTemplateServiceClientTest.php b/owl-bot-staging/Dataproc/v1/tests/Unit/V1/Client/WorkflowTemplateServiceClientTest.php deleted file mode 100644 index 5dafcbfd0a9..00000000000 --- a/owl-bot-staging/Dataproc/v1/tests/Unit/V1/Client/WorkflowTemplateServiceClientTest.php +++ /dev/null @@ -1,956 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return WorkflowTemplateServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new WorkflowTemplateServiceClient($options); - } - - /** @test */ - public function createWorkflowTemplateTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $id = 'id3355'; - $name = 'name3373707'; - $version = 351608024; - $expectedResponse = new WorkflowTemplate(); - $expectedResponse->setId($id); - $expectedResponse->setName($name); - $expectedResponse->setVersion($version); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->regionName('[PROJECT]', '[REGION]'); - $template = new WorkflowTemplate(); - $templateId = 'templateId1304010549'; - $template->setId($templateId); - $templatePlacement = new WorkflowTemplatePlacement(); - $template->setPlacement($templatePlacement); - $templateJobs = []; - $template->setJobs($templateJobs); - $request = (new CreateWorkflowTemplateRequest()) - ->setParent($formattedParent) - ->setTemplate($template); - $response = $gapicClient->createWorkflowTemplate($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.dataproc.v1.WorkflowTemplateService/CreateWorkflowTemplate', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getTemplate(); - $this->assertProtobufEquals($template, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createWorkflowTemplateExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->regionName('[PROJECT]', '[REGION]'); - $template = new WorkflowTemplate(); - $templateId = 'templateId1304010549'; - $template->setId($templateId); - $templatePlacement = new WorkflowTemplatePlacement(); - $template->setPlacement($templatePlacement); - $templateJobs = []; - $template->setJobs($templateJobs); - $request = (new CreateWorkflowTemplateRequest()) - ->setParent($formattedParent) - ->setTemplate($template); - try { - $gapicClient->createWorkflowTemplate($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteWorkflowTemplateTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->workflowTemplateName('[PROJECT]', '[REGION]', '[WORKFLOW_TEMPLATE]'); - $request = (new DeleteWorkflowTemplateRequest()) - ->setName($formattedName); - $gapicClient->deleteWorkflowTemplate($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataproc.v1.WorkflowTemplateService/DeleteWorkflowTemplate', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteWorkflowTemplateExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->workflowTemplateName('[PROJECT]', '[REGION]', '[WORKFLOW_TEMPLATE]'); - $request = (new DeleteWorkflowTemplateRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteWorkflowTemplate($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getWorkflowTemplateTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $id = 'id3355'; - $name2 = 'name2-1052831874'; - $version2 = 1407102325; - $expectedResponse = new WorkflowTemplate(); - $expectedResponse->setId($id); - $expectedResponse->setName($name2); - $expectedResponse->setVersion($version2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->workflowTemplateName('[PROJECT]', '[REGION]', '[WORKFLOW_TEMPLATE]'); - $request = (new GetWorkflowTemplateRequest()) - ->setName($formattedName); - $response = $gapicClient->getWorkflowTemplate($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.dataproc.v1.WorkflowTemplateService/GetWorkflowTemplate', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getWorkflowTemplateExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->workflowTemplateName('[PROJECT]', '[REGION]', '[WORKFLOW_TEMPLATE]'); - $request = (new GetWorkflowTemplateRequest()) - ->setName($formattedName); - try { - $gapicClient->getWorkflowTemplate($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function instantiateInlineWorkflowTemplateTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/instantiateInlineWorkflowTemplateTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/instantiateInlineWorkflowTemplateTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->regionName('[PROJECT]', '[REGION]'); - $template = new WorkflowTemplate(); - $templateId = 'templateId1304010549'; - $template->setId($templateId); - $templatePlacement = new WorkflowTemplatePlacement(); - $template->setPlacement($templatePlacement); - $templateJobs = []; - $template->setJobs($templateJobs); - $request = (new InstantiateInlineWorkflowTemplateRequest()) - ->setParent($formattedParent) - ->setTemplate($template); - $response = $gapicClient->instantiateInlineWorkflowTemplate($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.dataproc.v1.WorkflowTemplateService/InstantiateInlineWorkflowTemplate', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getTemplate(); - $this->assertProtobufEquals($template, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/instantiateInlineWorkflowTemplateTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function instantiateInlineWorkflowTemplateExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/instantiateInlineWorkflowTemplateTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->regionName('[PROJECT]', '[REGION]'); - $template = new WorkflowTemplate(); - $templateId = 'templateId1304010549'; - $template->setId($templateId); - $templatePlacement = new WorkflowTemplatePlacement(); - $template->setPlacement($templatePlacement); - $templateJobs = []; - $template->setJobs($templateJobs); - $request = (new InstantiateInlineWorkflowTemplateRequest()) - ->setParent($formattedParent) - ->setTemplate($template); - $response = $gapicClient->instantiateInlineWorkflowTemplate($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/instantiateInlineWorkflowTemplateTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function instantiateWorkflowTemplateTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/instantiateWorkflowTemplateTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/instantiateWorkflowTemplateTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->workflowTemplateName('[PROJECT]', '[REGION]', '[WORKFLOW_TEMPLATE]'); - $request = (new InstantiateWorkflowTemplateRequest()) - ->setName($formattedName); - $response = $gapicClient->instantiateWorkflowTemplate($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.dataproc.v1.WorkflowTemplateService/InstantiateWorkflowTemplate', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/instantiateWorkflowTemplateTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function instantiateWorkflowTemplateExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/instantiateWorkflowTemplateTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->workflowTemplateName('[PROJECT]', '[REGION]', '[WORKFLOW_TEMPLATE]'); - $request = (new InstantiateWorkflowTemplateRequest()) - ->setName($formattedName); - $response = $gapicClient->instantiateWorkflowTemplate($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/instantiateWorkflowTemplateTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function listWorkflowTemplatesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $templatesElement = new WorkflowTemplate(); - $templates = [ - $templatesElement, - ]; - $expectedResponse = new ListWorkflowTemplatesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTemplates($templates); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->regionName('[PROJECT]', '[REGION]'); - $request = (new ListWorkflowTemplatesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listWorkflowTemplates($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getTemplates()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataproc.v1.WorkflowTemplateService/ListWorkflowTemplates', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listWorkflowTemplatesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->regionName('[PROJECT]', '[REGION]'); - $request = (new ListWorkflowTemplatesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listWorkflowTemplates($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateWorkflowTemplateTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $id = 'id3355'; - $name = 'name3373707'; - $version = 351608024; - $expectedResponse = new WorkflowTemplate(); - $expectedResponse->setId($id); - $expectedResponse->setName($name); - $expectedResponse->setVersion($version); - $transport->addResponse($expectedResponse); - // Mock request - $template = new WorkflowTemplate(); - $templateId = 'templateId1304010549'; - $template->setId($templateId); - $templatePlacement = new WorkflowTemplatePlacement(); - $template->setPlacement($templatePlacement); - $templateJobs = []; - $template->setJobs($templateJobs); - $request = (new UpdateWorkflowTemplateRequest()) - ->setTemplate($template); - $response = $gapicClient->updateWorkflowTemplate($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.dataproc.v1.WorkflowTemplateService/UpdateWorkflowTemplate', $actualFuncCall); - $actualValue = $actualRequestObject->getTemplate(); - $this->assertProtobufEquals($template, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateWorkflowTemplateExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $template = new WorkflowTemplate(); - $templateId = 'templateId1304010549'; - $template->setId($templateId); - $templatePlacement = new WorkflowTemplatePlacement(); - $template->setPlacement($templatePlacement); - $templateJobs = []; - $template->setJobs($templateJobs); - $request = (new UpdateWorkflowTemplateRequest()) - ->setTemplate($template); - try { - $gapicClient->updateWorkflowTemplate($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - $response = $gapicClient->getIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - try { - $gapicClient->getIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - $response = $gapicClient->setIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - try { - $gapicClient->setIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - $response = $gapicClient->testIamPermissions($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - try { - $gapicClient->testIamPermissions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createWorkflowTemplateAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $id = 'id3355'; - $name = 'name3373707'; - $version = 351608024; - $expectedResponse = new WorkflowTemplate(); - $expectedResponse->setId($id); - $expectedResponse->setName($name); - $expectedResponse->setVersion($version); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->regionName('[PROJECT]', '[REGION]'); - $template = new WorkflowTemplate(); - $templateId = 'templateId1304010549'; - $template->setId($templateId); - $templatePlacement = new WorkflowTemplatePlacement(); - $template->setPlacement($templatePlacement); - $templateJobs = []; - $template->setJobs($templateJobs); - $request = (new CreateWorkflowTemplateRequest()) - ->setParent($formattedParent) - ->setTemplate($template); - $response = $gapicClient->createWorkflowTemplateAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataproc.v1.WorkflowTemplateService/CreateWorkflowTemplate', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getTemplate(); - $this->assertProtobufEquals($template, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Dataproc/v1/tests/Unit/V1/ClusterControllerClientTest.php b/owl-bot-staging/Dataproc/v1/tests/Unit/V1/ClusterControllerClientTest.php deleted file mode 100644 index 5825a9c7c91..00000000000 --- a/owl-bot-staging/Dataproc/v1/tests/Unit/V1/ClusterControllerClientTest.php +++ /dev/null @@ -1,1205 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return ClusterControllerClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new ClusterControllerClient($options); - } - - /** @test */ - public function createClusterTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $projectId2 = 'projectId2939242356'; - $clusterName = 'clusterName-1018081872'; - $clusterUuid = 'clusterUuid-1017854240'; - $expectedResponse = new Cluster(); - $expectedResponse->setProjectId($projectId2); - $expectedResponse->setClusterName($clusterName); - $expectedResponse->setClusterUuid($clusterUuid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $projectId = 'projectId-1969970175'; - $region = 'region-934795532'; - $cluster = new Cluster(); - $clusterProjectId = 'clusterProjectId-927164102'; - $cluster->setProjectId($clusterProjectId); - $clusterClusterName = 'clusterClusterName2146953547'; - $cluster->setClusterName($clusterClusterName); - $response = $gapicClient->createCluster($projectId, $region, $cluster); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataproc.v1.ClusterController/CreateCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getProjectId(); - $this->assertProtobufEquals($projectId, $actualValue); - $actualValue = $actualApiRequestObject->getRegion(); - $this->assertProtobufEquals($region, $actualValue); - $actualValue = $actualApiRequestObject->getCluster(); - $this->assertProtobufEquals($cluster, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createClusterTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createClusterExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $projectId = 'projectId-1969970175'; - $region = 'region-934795532'; - $cluster = new Cluster(); - $clusterProjectId = 'clusterProjectId-927164102'; - $cluster->setProjectId($clusterProjectId); - $clusterClusterName = 'clusterClusterName2146953547'; - $cluster->setClusterName($clusterClusterName); - $response = $gapicClient->createCluster($projectId, $region, $cluster); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createClusterTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteClusterTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $projectId = 'projectId-1969970175'; - $region = 'region-934795532'; - $clusterName = 'clusterName-1018081872'; - $response = $gapicClient->deleteCluster($projectId, $region, $clusterName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataproc.v1.ClusterController/DeleteCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getProjectId(); - $this->assertProtobufEquals($projectId, $actualValue); - $actualValue = $actualApiRequestObject->getRegion(); - $this->assertProtobufEquals($region, $actualValue); - $actualValue = $actualApiRequestObject->getClusterName(); - $this->assertProtobufEquals($clusterName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteClusterTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteClusterExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $projectId = 'projectId-1969970175'; - $region = 'region-934795532'; - $clusterName = 'clusterName-1018081872'; - $response = $gapicClient->deleteCluster($projectId, $region, $clusterName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteClusterTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function diagnoseClusterTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/diagnoseClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $outputUri = 'outputUri-1273518802'; - $expectedResponse = new DiagnoseClusterResults(); - $expectedResponse->setOutputUri($outputUri); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/diagnoseClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $projectId = 'projectId-1969970175'; - $region = 'region-934795532'; - $clusterName = 'clusterName-1018081872'; - $response = $gapicClient->diagnoseCluster($projectId, $region, $clusterName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataproc.v1.ClusterController/DiagnoseCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getProjectId(); - $this->assertProtobufEquals($projectId, $actualValue); - $actualValue = $actualApiRequestObject->getRegion(); - $this->assertProtobufEquals($region, $actualValue); - $actualValue = $actualApiRequestObject->getClusterName(); - $this->assertProtobufEquals($clusterName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/diagnoseClusterTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function diagnoseClusterExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/diagnoseClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $projectId = 'projectId-1969970175'; - $region = 'region-934795532'; - $clusterName = 'clusterName-1018081872'; - $response = $gapicClient->diagnoseCluster($projectId, $region, $clusterName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/diagnoseClusterTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getClusterTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $projectId2 = 'projectId2939242356'; - $clusterName2 = 'clusterName2875867491'; - $clusterUuid = 'clusterUuid-1017854240'; - $expectedResponse = new Cluster(); - $expectedResponse->setProjectId($projectId2); - $expectedResponse->setClusterName($clusterName2); - $expectedResponse->setClusterUuid($clusterUuid); - $transport->addResponse($expectedResponse); - // Mock request - $projectId = 'projectId-1969970175'; - $region = 'region-934795532'; - $clusterName = 'clusterName-1018081872'; - $response = $gapicClient->getCluster($projectId, $region, $clusterName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataproc.v1.ClusterController/GetCluster', $actualFuncCall); - $actualValue = $actualRequestObject->getProjectId(); - $this->assertProtobufEquals($projectId, $actualValue); - $actualValue = $actualRequestObject->getRegion(); - $this->assertProtobufEquals($region, $actualValue); - $actualValue = $actualRequestObject->getClusterName(); - $this->assertProtobufEquals($clusterName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getClusterExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $projectId = 'projectId-1969970175'; - $region = 'region-934795532'; - $clusterName = 'clusterName-1018081872'; - try { - $gapicClient->getCluster($projectId, $region, $clusterName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listClustersTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $clustersElement = new Cluster(); - $clusters = [ - $clustersElement, - ]; - $expectedResponse = new ListClustersResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setClusters($clusters); - $transport->addResponse($expectedResponse); - // Mock request - $projectId = 'projectId-1969970175'; - $region = 'region-934795532'; - $response = $gapicClient->listClusters($projectId, $region); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getClusters()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataproc.v1.ClusterController/ListClusters', $actualFuncCall); - $actualValue = $actualRequestObject->getProjectId(); - $this->assertProtobufEquals($projectId, $actualValue); - $actualValue = $actualRequestObject->getRegion(); - $this->assertProtobufEquals($region, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listClustersExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $projectId = 'projectId-1969970175'; - $region = 'region-934795532'; - try { - $gapicClient->listClusters($projectId, $region); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function startClusterTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/startClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $projectId2 = 'projectId2939242356'; - $clusterName2 = 'clusterName2875867491'; - $clusterUuid2 = 'clusterUuid21094621843'; - $expectedResponse = new Cluster(); - $expectedResponse->setProjectId($projectId2); - $expectedResponse->setClusterName($clusterName2); - $expectedResponse->setClusterUuid($clusterUuid2); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/startClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $projectId = 'projectId-1969970175'; - $region = 'region-934795532'; - $clusterName = 'clusterName-1018081872'; - $response = $gapicClient->startCluster($projectId, $region, $clusterName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataproc.v1.ClusterController/StartCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getProjectId(); - $this->assertProtobufEquals($projectId, $actualValue); - $actualValue = $actualApiRequestObject->getRegion(); - $this->assertProtobufEquals($region, $actualValue); - $actualValue = $actualApiRequestObject->getClusterName(); - $this->assertProtobufEquals($clusterName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/startClusterTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function startClusterExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/startClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $projectId = 'projectId-1969970175'; - $region = 'region-934795532'; - $clusterName = 'clusterName-1018081872'; - $response = $gapicClient->startCluster($projectId, $region, $clusterName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/startClusterTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function stopClusterTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/stopClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $projectId2 = 'projectId2939242356'; - $clusterName2 = 'clusterName2875867491'; - $clusterUuid2 = 'clusterUuid21094621843'; - $expectedResponse = new Cluster(); - $expectedResponse->setProjectId($projectId2); - $expectedResponse->setClusterName($clusterName2); - $expectedResponse->setClusterUuid($clusterUuid2); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/stopClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $projectId = 'projectId-1969970175'; - $region = 'region-934795532'; - $clusterName = 'clusterName-1018081872'; - $response = $gapicClient->stopCluster($projectId, $region, $clusterName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataproc.v1.ClusterController/StopCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getProjectId(); - $this->assertProtobufEquals($projectId, $actualValue); - $actualValue = $actualApiRequestObject->getRegion(); - $this->assertProtobufEquals($region, $actualValue); - $actualValue = $actualApiRequestObject->getClusterName(); - $this->assertProtobufEquals($clusterName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/stopClusterTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function stopClusterExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/stopClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $projectId = 'projectId-1969970175'; - $region = 'region-934795532'; - $clusterName = 'clusterName-1018081872'; - $response = $gapicClient->stopCluster($projectId, $region, $clusterName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/stopClusterTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateClusterTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $projectId2 = 'projectId2939242356'; - $clusterName2 = 'clusterName2875867491'; - $clusterUuid = 'clusterUuid-1017854240'; - $expectedResponse = new Cluster(); - $expectedResponse->setProjectId($projectId2); - $expectedResponse->setClusterName($clusterName2); - $expectedResponse->setClusterUuid($clusterUuid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $projectId = 'projectId-1969970175'; - $region = 'region-934795532'; - $clusterName = 'clusterName-1018081872'; - $cluster = new Cluster(); - $clusterProjectId = 'clusterProjectId-927164102'; - $cluster->setProjectId($clusterProjectId); - $clusterClusterName = 'clusterClusterName2146953547'; - $cluster->setClusterName($clusterClusterName); - $updateMask = new FieldMask(); - $response = $gapicClient->updateCluster($projectId, $region, $clusterName, $cluster, $updateMask); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataproc.v1.ClusterController/UpdateCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getProjectId(); - $this->assertProtobufEquals($projectId, $actualValue); - $actualValue = $actualApiRequestObject->getRegion(); - $this->assertProtobufEquals($region, $actualValue); - $actualValue = $actualApiRequestObject->getClusterName(); - $this->assertProtobufEquals($clusterName, $actualValue); - $actualValue = $actualApiRequestObject->getCluster(); - $this->assertProtobufEquals($cluster, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateClusterTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateClusterExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $projectId = 'projectId-1969970175'; - $region = 'region-934795532'; - $clusterName = 'clusterName-1018081872'; - $cluster = new Cluster(); - $clusterProjectId = 'clusterProjectId-927164102'; - $cluster->setProjectId($clusterProjectId); - $clusterClusterName = 'clusterClusterName2146953547'; - $cluster->setClusterName($clusterClusterName); - $updateMask = new FieldMask(); - $response = $gapicClient->updateCluster($projectId, $region, $clusterName, $cluster, $updateMask); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateClusterTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $response = $gapicClient->getIamPolicy($resource); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - try { - $gapicClient->getIamPolicy($resource); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $response = $gapicClient->setIamPolicy($resource, $policy); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - try { - $gapicClient->setIamPolicy($resource, $policy); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $response = $gapicClient->testIamPermissions($resource, $permissions); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - try { - $gapicClient->testIamPermissions($resource, $permissions); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Dataproc/v1/tests/Unit/V1/JobControllerClientTest.php b/owl-bot-staging/Dataproc/v1/tests/Unit/V1/JobControllerClientTest.php deleted file mode 100644 index 43aa11659bc..00000000000 --- a/owl-bot-staging/Dataproc/v1/tests/Unit/V1/JobControllerClientTest.php +++ /dev/null @@ -1,859 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return JobControllerClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new JobControllerClient($options); - } - - /** @test */ - public function cancelJobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $driverOutputResourceUri = 'driverOutputResourceUri-542229086'; - $driverControlFilesUri = 'driverControlFilesUri207057643'; - $jobUuid = 'jobUuid-1615012099'; - $done = true; - $expectedResponse = new Job(); - $expectedResponse->setDriverOutputResourceUri($driverOutputResourceUri); - $expectedResponse->setDriverControlFilesUri($driverControlFilesUri); - $expectedResponse->setJobUuid($jobUuid); - $expectedResponse->setDone($done); - $transport->addResponse($expectedResponse); - // Mock request - $projectId = 'projectId-1969970175'; - $region = 'region-934795532'; - $jobId = 'jobId-1154752291'; - $response = $gapicClient->cancelJob($projectId, $region, $jobId); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataproc.v1.JobController/CancelJob', $actualFuncCall); - $actualValue = $actualRequestObject->getProjectId(); - $this->assertProtobufEquals($projectId, $actualValue); - $actualValue = $actualRequestObject->getRegion(); - $this->assertProtobufEquals($region, $actualValue); - $actualValue = $actualRequestObject->getJobId(); - $this->assertProtobufEquals($jobId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function cancelJobExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $projectId = 'projectId-1969970175'; - $region = 'region-934795532'; - $jobId = 'jobId-1154752291'; - try { - $gapicClient->cancelJob($projectId, $region, $jobId); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteJobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $projectId = 'projectId-1969970175'; - $region = 'region-934795532'; - $jobId = 'jobId-1154752291'; - $gapicClient->deleteJob($projectId, $region, $jobId); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataproc.v1.JobController/DeleteJob', $actualFuncCall); - $actualValue = $actualRequestObject->getProjectId(); - $this->assertProtobufEquals($projectId, $actualValue); - $actualValue = $actualRequestObject->getRegion(); - $this->assertProtobufEquals($region, $actualValue); - $actualValue = $actualRequestObject->getJobId(); - $this->assertProtobufEquals($jobId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteJobExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $projectId = 'projectId-1969970175'; - $region = 'region-934795532'; - $jobId = 'jobId-1154752291'; - try { - $gapicClient->deleteJob($projectId, $region, $jobId); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getJobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $driverOutputResourceUri = 'driverOutputResourceUri-542229086'; - $driverControlFilesUri = 'driverControlFilesUri207057643'; - $jobUuid = 'jobUuid-1615012099'; - $done = true; - $expectedResponse = new Job(); - $expectedResponse->setDriverOutputResourceUri($driverOutputResourceUri); - $expectedResponse->setDriverControlFilesUri($driverControlFilesUri); - $expectedResponse->setJobUuid($jobUuid); - $expectedResponse->setDone($done); - $transport->addResponse($expectedResponse); - // Mock request - $projectId = 'projectId-1969970175'; - $region = 'region-934795532'; - $jobId = 'jobId-1154752291'; - $response = $gapicClient->getJob($projectId, $region, $jobId); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataproc.v1.JobController/GetJob', $actualFuncCall); - $actualValue = $actualRequestObject->getProjectId(); - $this->assertProtobufEquals($projectId, $actualValue); - $actualValue = $actualRequestObject->getRegion(); - $this->assertProtobufEquals($region, $actualValue); - $actualValue = $actualRequestObject->getJobId(); - $this->assertProtobufEquals($jobId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getJobExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $projectId = 'projectId-1969970175'; - $region = 'region-934795532'; - $jobId = 'jobId-1154752291'; - try { - $gapicClient->getJob($projectId, $region, $jobId); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listJobsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $jobsElement = new Job(); - $jobs = [ - $jobsElement, - ]; - $expectedResponse = new ListJobsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setJobs($jobs); - $transport->addResponse($expectedResponse); - // Mock request - $projectId = 'projectId-1969970175'; - $region = 'region-934795532'; - $response = $gapicClient->listJobs($projectId, $region); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getJobs()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataproc.v1.JobController/ListJobs', $actualFuncCall); - $actualValue = $actualRequestObject->getProjectId(); - $this->assertProtobufEquals($projectId, $actualValue); - $actualValue = $actualRequestObject->getRegion(); - $this->assertProtobufEquals($region, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listJobsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $projectId = 'projectId-1969970175'; - $region = 'region-934795532'; - try { - $gapicClient->listJobs($projectId, $region); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function submitJobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $driverOutputResourceUri = 'driverOutputResourceUri-542229086'; - $driverControlFilesUri = 'driverControlFilesUri207057643'; - $jobUuid = 'jobUuid-1615012099'; - $done = true; - $expectedResponse = new Job(); - $expectedResponse->setDriverOutputResourceUri($driverOutputResourceUri); - $expectedResponse->setDriverControlFilesUri($driverControlFilesUri); - $expectedResponse->setJobUuid($jobUuid); - $expectedResponse->setDone($done); - $transport->addResponse($expectedResponse); - // Mock request - $projectId = 'projectId-1969970175'; - $region = 'region-934795532'; - $job = new Job(); - $jobPlacement = new JobPlacement(); - $placementClusterName = 'placementClusterName1028110208'; - $jobPlacement->setClusterName($placementClusterName); - $job->setPlacement($jobPlacement); - $response = $gapicClient->submitJob($projectId, $region, $job); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataproc.v1.JobController/SubmitJob', $actualFuncCall); - $actualValue = $actualRequestObject->getProjectId(); - $this->assertProtobufEquals($projectId, $actualValue); - $actualValue = $actualRequestObject->getRegion(); - $this->assertProtobufEquals($region, $actualValue); - $actualValue = $actualRequestObject->getJob(); - $this->assertProtobufEquals($job, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function submitJobExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $projectId = 'projectId-1969970175'; - $region = 'region-934795532'; - $job = new Job(); - $jobPlacement = new JobPlacement(); - $placementClusterName = 'placementClusterName1028110208'; - $jobPlacement->setClusterName($placementClusterName); - $job->setPlacement($jobPlacement); - try { - $gapicClient->submitJob($projectId, $region, $job); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function submitJobAsOperationTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/submitJobAsOperationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $driverOutputResourceUri = 'driverOutputResourceUri-542229086'; - $driverControlFilesUri = 'driverControlFilesUri207057643'; - $jobUuid = 'jobUuid-1615012099'; - $done = true; - $expectedResponse = new Job(); - $expectedResponse->setDriverOutputResourceUri($driverOutputResourceUri); - $expectedResponse->setDriverControlFilesUri($driverControlFilesUri); - $expectedResponse->setJobUuid($jobUuid); - $expectedResponse->setDone($done); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/submitJobAsOperationTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $projectId = 'projectId-1969970175'; - $region = 'region-934795532'; - $job = new Job(); - $jobPlacement = new JobPlacement(); - $placementClusterName = 'placementClusterName1028110208'; - $jobPlacement->setClusterName($placementClusterName); - $job->setPlacement($jobPlacement); - $response = $gapicClient->submitJobAsOperation($projectId, $region, $job); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataproc.v1.JobController/SubmitJobAsOperation', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getProjectId(); - $this->assertProtobufEquals($projectId, $actualValue); - $actualValue = $actualApiRequestObject->getRegion(); - $this->assertProtobufEquals($region, $actualValue); - $actualValue = $actualApiRequestObject->getJob(); - $this->assertProtobufEquals($job, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/submitJobAsOperationTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function submitJobAsOperationExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/submitJobAsOperationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $projectId = 'projectId-1969970175'; - $region = 'region-934795532'; - $job = new Job(); - $jobPlacement = new JobPlacement(); - $placementClusterName = 'placementClusterName1028110208'; - $jobPlacement->setClusterName($placementClusterName); - $job->setPlacement($jobPlacement); - $response = $gapicClient->submitJobAsOperation($projectId, $region, $job); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/submitJobAsOperationTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateJobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $driverOutputResourceUri = 'driverOutputResourceUri-542229086'; - $driverControlFilesUri = 'driverControlFilesUri207057643'; - $jobUuid = 'jobUuid-1615012099'; - $done = true; - $expectedResponse = new Job(); - $expectedResponse->setDriverOutputResourceUri($driverOutputResourceUri); - $expectedResponse->setDriverControlFilesUri($driverControlFilesUri); - $expectedResponse->setJobUuid($jobUuid); - $expectedResponse->setDone($done); - $transport->addResponse($expectedResponse); - // Mock request - $projectId = 'projectId-1969970175'; - $region = 'region-934795532'; - $jobId = 'jobId-1154752291'; - $job = new Job(); - $jobPlacement = new JobPlacement(); - $placementClusterName = 'placementClusterName1028110208'; - $jobPlacement->setClusterName($placementClusterName); - $job->setPlacement($jobPlacement); - $updateMask = new FieldMask(); - $response = $gapicClient->updateJob($projectId, $region, $jobId, $job, $updateMask); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataproc.v1.JobController/UpdateJob', $actualFuncCall); - $actualValue = $actualRequestObject->getProjectId(); - $this->assertProtobufEquals($projectId, $actualValue); - $actualValue = $actualRequestObject->getRegion(); - $this->assertProtobufEquals($region, $actualValue); - $actualValue = $actualRequestObject->getJobId(); - $this->assertProtobufEquals($jobId, $actualValue); - $actualValue = $actualRequestObject->getJob(); - $this->assertProtobufEquals($job, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateJobExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $projectId = 'projectId-1969970175'; - $region = 'region-934795532'; - $jobId = 'jobId-1154752291'; - $job = new Job(); - $jobPlacement = new JobPlacement(); - $placementClusterName = 'placementClusterName1028110208'; - $jobPlacement->setClusterName($placementClusterName); - $job->setPlacement($jobPlacement); - $updateMask = new FieldMask(); - try { - $gapicClient->updateJob($projectId, $region, $jobId, $job, $updateMask); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $response = $gapicClient->getIamPolicy($resource); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - try { - $gapicClient->getIamPolicy($resource); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $response = $gapicClient->setIamPolicy($resource, $policy); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - try { - $gapicClient->setIamPolicy($resource, $policy); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $response = $gapicClient->testIamPermissions($resource, $permissions); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - try { - $gapicClient->testIamPermissions($resource, $permissions); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Dataproc/v1/tests/Unit/V1/NodeGroupControllerClientTest.php b/owl-bot-staging/Dataproc/v1/tests/Unit/V1/NodeGroupControllerClientTest.php deleted file mode 100644 index dc330e61e74..00000000000 --- a/owl-bot-staging/Dataproc/v1/tests/Unit/V1/NodeGroupControllerClientTest.php +++ /dev/null @@ -1,567 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return NodeGroupControllerClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new NodeGroupControllerClient($options); - } - - /** @test */ - public function createNodeGroupTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createNodeGroupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $expectedResponse = new NodeGroup(); - $expectedResponse->setName($name); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createNodeGroupTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->clusterRegionName('[PROJECT]', '[REGION]', '[CLUSTER]'); - $nodeGroup = new NodeGroup(); - $nodeGroupRoles = []; - $nodeGroup->setRoles($nodeGroupRoles); - $response = $gapicClient->createNodeGroup($formattedParent, $nodeGroup); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataproc.v1.NodeGroupController/CreateNodeGroup', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getNodeGroup(); - $this->assertProtobufEquals($nodeGroup, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createNodeGroupTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createNodeGroupExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createNodeGroupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->clusterRegionName('[PROJECT]', '[REGION]', '[CLUSTER]'); - $nodeGroup = new NodeGroup(); - $nodeGroupRoles = []; - $nodeGroup->setRoles($nodeGroupRoles); - $response = $gapicClient->createNodeGroup($formattedParent, $nodeGroup); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createNodeGroupTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getNodeGroupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new NodeGroup(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->nodeGroupName('[PROJECT]', '[REGION]', '[CLUSTER]', '[NODE_GROUP]'); - $response = $gapicClient->getNodeGroup($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataproc.v1.NodeGroupController/GetNodeGroup', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getNodeGroupExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->nodeGroupName('[PROJECT]', '[REGION]', '[CLUSTER]', '[NODE_GROUP]'); - try { - $gapicClient->getNodeGroup($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function resizeNodeGroupTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/resizeNodeGroupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $expectedResponse = new NodeGroup(); - $expectedResponse->setName($name2); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/resizeNodeGroupTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $name = 'name3373707'; - $size = 3530753; - $response = $gapicClient->resizeNodeGroup($name, $size); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataproc.v1.NodeGroupController/ResizeNodeGroup', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $actualValue = $actualApiRequestObject->getSize(); - $this->assertProtobufEquals($size, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/resizeNodeGroupTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function resizeNodeGroupExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/resizeNodeGroupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $size = 3530753; - $response = $gapicClient->resizeNodeGroup($name, $size); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/resizeNodeGroupTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $response = $gapicClient->getIamPolicy($resource); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - try { - $gapicClient->getIamPolicy($resource); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $response = $gapicClient->setIamPolicy($resource, $policy); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - try { - $gapicClient->setIamPolicy($resource, $policy); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $response = $gapicClient->testIamPermissions($resource, $permissions); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - try { - $gapicClient->testIamPermissions($resource, $permissions); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Dataproc/v1/tests/Unit/V1/WorkflowTemplateServiceClientTest.php b/owl-bot-staging/Dataproc/v1/tests/Unit/V1/WorkflowTemplateServiceClientTest.php deleted file mode 100644 index 64b623807fa..00000000000 --- a/owl-bot-staging/Dataproc/v1/tests/Unit/V1/WorkflowTemplateServiceClientTest.php +++ /dev/null @@ -1,855 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return WorkflowTemplateServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new WorkflowTemplateServiceClient($options); - } - - /** @test */ - public function createWorkflowTemplateTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $id = 'id3355'; - $name = 'name3373707'; - $version = 351608024; - $expectedResponse = new WorkflowTemplate(); - $expectedResponse->setId($id); - $expectedResponse->setName($name); - $expectedResponse->setVersion($version); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->regionName('[PROJECT]', '[REGION]'); - $template = new WorkflowTemplate(); - $templateId = 'templateId1304010549'; - $template->setId($templateId); - $templatePlacement = new WorkflowTemplatePlacement(); - $template->setPlacement($templatePlacement); - $templateJobs = []; - $template->setJobs($templateJobs); - $response = $gapicClient->createWorkflowTemplate($formattedParent, $template); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataproc.v1.WorkflowTemplateService/CreateWorkflowTemplate', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getTemplate(); - $this->assertProtobufEquals($template, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createWorkflowTemplateExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->regionName('[PROJECT]', '[REGION]'); - $template = new WorkflowTemplate(); - $templateId = 'templateId1304010549'; - $template->setId($templateId); - $templatePlacement = new WorkflowTemplatePlacement(); - $template->setPlacement($templatePlacement); - $templateJobs = []; - $template->setJobs($templateJobs); - try { - $gapicClient->createWorkflowTemplate($formattedParent, $template); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteWorkflowTemplateTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->workflowTemplateName('[PROJECT]', '[REGION]', '[WORKFLOW_TEMPLATE]'); - $gapicClient->deleteWorkflowTemplate($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataproc.v1.WorkflowTemplateService/DeleteWorkflowTemplate', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteWorkflowTemplateExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->workflowTemplateName('[PROJECT]', '[REGION]', '[WORKFLOW_TEMPLATE]'); - try { - $gapicClient->deleteWorkflowTemplate($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getWorkflowTemplateTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $id = 'id3355'; - $name2 = 'name2-1052831874'; - $version2 = 1407102325; - $expectedResponse = new WorkflowTemplate(); - $expectedResponse->setId($id); - $expectedResponse->setName($name2); - $expectedResponse->setVersion($version2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->workflowTemplateName('[PROJECT]', '[REGION]', '[WORKFLOW_TEMPLATE]'); - $response = $gapicClient->getWorkflowTemplate($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataproc.v1.WorkflowTemplateService/GetWorkflowTemplate', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getWorkflowTemplateExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->workflowTemplateName('[PROJECT]', '[REGION]', '[WORKFLOW_TEMPLATE]'); - try { - $gapicClient->getWorkflowTemplate($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function instantiateInlineWorkflowTemplateTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/instantiateInlineWorkflowTemplateTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/instantiateInlineWorkflowTemplateTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->regionName('[PROJECT]', '[REGION]'); - $template = new WorkflowTemplate(); - $templateId = 'templateId1304010549'; - $template->setId($templateId); - $templatePlacement = new WorkflowTemplatePlacement(); - $template->setPlacement($templatePlacement); - $templateJobs = []; - $template->setJobs($templateJobs); - $response = $gapicClient->instantiateInlineWorkflowTemplate($formattedParent, $template); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataproc.v1.WorkflowTemplateService/InstantiateInlineWorkflowTemplate', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getTemplate(); - $this->assertProtobufEquals($template, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/instantiateInlineWorkflowTemplateTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function instantiateInlineWorkflowTemplateExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/instantiateInlineWorkflowTemplateTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->regionName('[PROJECT]', '[REGION]'); - $template = new WorkflowTemplate(); - $templateId = 'templateId1304010549'; - $template->setId($templateId); - $templatePlacement = new WorkflowTemplatePlacement(); - $template->setPlacement($templatePlacement); - $templateJobs = []; - $template->setJobs($templateJobs); - $response = $gapicClient->instantiateInlineWorkflowTemplate($formattedParent, $template); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/instantiateInlineWorkflowTemplateTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function instantiateWorkflowTemplateTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/instantiateWorkflowTemplateTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/instantiateWorkflowTemplateTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->workflowTemplateName('[PROJECT]', '[REGION]', '[WORKFLOW_TEMPLATE]'); - $response = $gapicClient->instantiateWorkflowTemplate($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataproc.v1.WorkflowTemplateService/InstantiateWorkflowTemplate', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/instantiateWorkflowTemplateTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function instantiateWorkflowTemplateExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/instantiateWorkflowTemplateTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->workflowTemplateName('[PROJECT]', '[REGION]', '[WORKFLOW_TEMPLATE]'); - $response = $gapicClient->instantiateWorkflowTemplate($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/instantiateWorkflowTemplateTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function listWorkflowTemplatesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $templatesElement = new WorkflowTemplate(); - $templates = [ - $templatesElement, - ]; - $expectedResponse = new ListWorkflowTemplatesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTemplates($templates); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->regionName('[PROJECT]', '[REGION]'); - $response = $gapicClient->listWorkflowTemplates($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getTemplates()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataproc.v1.WorkflowTemplateService/ListWorkflowTemplates', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listWorkflowTemplatesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->regionName('[PROJECT]', '[REGION]'); - try { - $gapicClient->listWorkflowTemplates($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateWorkflowTemplateTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $id = 'id3355'; - $name = 'name3373707'; - $version = 351608024; - $expectedResponse = new WorkflowTemplate(); - $expectedResponse->setId($id); - $expectedResponse->setName($name); - $expectedResponse->setVersion($version); - $transport->addResponse($expectedResponse); - // Mock request - $template = new WorkflowTemplate(); - $templateId = 'templateId1304010549'; - $template->setId($templateId); - $templatePlacement = new WorkflowTemplatePlacement(); - $template->setPlacement($templatePlacement); - $templateJobs = []; - $template->setJobs($templateJobs); - $response = $gapicClient->updateWorkflowTemplate($template); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataproc.v1.WorkflowTemplateService/UpdateWorkflowTemplate', $actualFuncCall); - $actualValue = $actualRequestObject->getTemplate(); - $this->assertProtobufEquals($template, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateWorkflowTemplateExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $template = new WorkflowTemplate(); - $templateId = 'templateId1304010549'; - $template->setId($templateId); - $templatePlacement = new WorkflowTemplatePlacement(); - $template->setPlacement($templatePlacement); - $templateJobs = []; - $template->setJobs($templateJobs); - try { - $gapicClient->updateWorkflowTemplate($template); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $response = $gapicClient->getIamPolicy($resource); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - try { - $gapicClient->getIamPolicy($resource); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $response = $gapicClient->setIamPolicy($resource, $policy); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - try { - $gapicClient->setIamPolicy($resource, $policy); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $response = $gapicClient->testIamPermissions($resource, $permissions); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - try { - $gapicClient->testIamPermissions($resource, $permissions); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } -}