From af5827aa0627066c9de55456f2d219137c797545 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Wed, 25 Sep 2024 04:00:28 +0000 Subject: [PATCH 1/2] feat: add support for Spark Connect sessions in Dataproc Serverless for Spark docs: update docs for `filter` field in `ListSessionsRequest` PiperOrigin-RevId: 678438691 Source-Link: https://github.com/googleapis/googleapis/commit/5c181aaf78bd1ae2e08c3a2971cd9e87b6e00986 Source-Link: https://github.com/googleapis/googleapis-gen/commit/3b37678e3ed4e52f2a122ea91738a9e7b5f4cba1 Copy-Tag: eyJwIjoiRGF0YXByb2MvLk93bEJvdC55YW1sIiwiaCI6IjNiMzc2NzhlM2VkNGU1MmYyYTEyMmVhOTE3MzhhOWU3YjVmNGNiYTEifQ== --- .../Cloud/Dataproc/V1/AutoscalingPolicies.php | Bin 0 -> 4769 bytes .../Google/Cloud/Dataproc/V1/Batches.php | Bin 0 -> 4900 bytes .../Google/Cloud/Dataproc/V1/Clusters.php | Bin 0 -> 15194 bytes .../Google/Cloud/Dataproc/V1/Jobs.php | Bin 0 -> 10877 bytes .../Google/Cloud/Dataproc/V1/NodeGroups.php | 58 + .../Google/Cloud/Dataproc/V1/Operations.php | Bin 0 -> 3289 bytes .../Cloud/Dataproc/V1/SessionTemplates.php | Bin 0 -> 4164 bytes .../Google/Cloud/Dataproc/V1/Sessions.php | Bin 0 -> 4741 bytes .../Google/Cloud/Dataproc/V1/Shared.php | Bin 0 -> 5596 bytes .../Cloud/Dataproc/V1/WorkflowTemplates.php | Bin 0 -> 9293 bytes .../Cloud/Dataproc/V1/AcceleratorConfig.php | 151 ++ .../Cloud/Dataproc/V1/AutoscalingConfig.php | 87 ++ .../Cloud/Dataproc/V1/AutoscalingPolicy.php | 324 ++++ .../Cloud/Dataproc/V1/AutotuningConfig.php | 67 + .../Dataproc/V1/AutotuningConfig/Scenario.php | 72 + .../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 +++ .../Dataproc/V1/CreateSessionRequest.php | 249 +++ .../V1/CreateSessionTemplateRequest.php | 127 ++ .../V1/CreateWorkflowTemplateRequest.php | 164 ++ .../Dataproc/V1/DataprocMetricConfig.php | 67 + .../V1/DataprocMetricConfig/Metric.php | 208 +++ .../V1/DataprocMetricConfig/MetricSource.php | 111 ++ .../V1/DeleteAutoscalingPolicyRequest.php | 119 ++ .../Cloud/Dataproc/V1/DeleteBatchRequest.php | 91 ++ .../Dataproc/V1/DeleteClusterRequest.php | 265 ++++ .../Cloud/Dataproc/V1/DeleteJobRequest.php | 157 ++ .../Dataproc/V1/DeleteSessionRequest.php | 143 ++ .../V1/DeleteSessionTemplateRequest.php | 81 + .../V1/DeleteWorkflowTemplateRequest.php | 161 ++ .../Dataproc/V1/DiagnoseClusterRequest.php | 361 +++++ .../DiagnoseClusterRequest/TarballAccess.php | 66 + .../Dataproc/V1/DiagnoseClusterResults.php | 75 + .../Google/Cloud/Dataproc/V1/DiskConfig.php | 229 +++ .../Dataproc/V1/DriverSchedulingConfig.php | 101 ++ .../Cloud/Dataproc/V1/EncryptionConfig.php | 209 +++ .../Cloud/Dataproc/V1/EndpointConfig.php | 109 ++ .../Cloud/Dataproc/V1/EnvironmentConfig.php | 121 ++ .../Cloud/Dataproc/V1/ExecutionConfig.php | 448 ++++++ .../Cloud/Dataproc/V1/FailureAction.php | 62 + .../src/Google/Cloud/Dataproc/V1/FlinkJob.php | 322 ++++ .../Cloud/Dataproc/V1/GceClusterConfig.php | 750 +++++++++ .../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 ++ .../Cloud/Dataproc/V1/GetSessionRequest.php | 81 + .../Dataproc/V1/GetSessionTemplateRequest.php | 81 + .../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 | 746 +++++++++ .../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 | 918 +++++++++++ .../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/JupyterConfig.php | 101 ++ .../Dataproc/V1/JupyterConfig/Kernel.php | 64 + .../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 | 147 ++ .../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 | 155 ++ .../V1/ListSessionTemplatesRequest.php | 199 +++ .../V1/ListSessionTemplatesResponse.php | 105 ++ .../Cloud/Dataproc/V1/ListSessionsRequest.php | 235 +++ .../Dataproc/V1/ListSessionsResponse.php | 105 ++ .../V1/ListWorkflowTemplatesRequest.php | 190 +++ .../V1/ListWorkflowTemplatesResponse.php | 151 ++ .../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 | 578 +++++++ .../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 ++++ .../Dataproc/V1/PyPiRepositoryConfig.php | 67 + .../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/RepositoryConfig.php | 77 + .../Cloud/Dataproc/V1/ReservationAffinity.php | 135 ++ .../Dataproc/V1/ReservationAffinity/Type.php | 70 + .../Dataproc/V1/ResizeNodeGroupRequest.php | 290 ++++ .../Cloud/Dataproc/V1/RuntimeConfig.php | 269 ++++ .../Google/Cloud/Dataproc/V1/RuntimeInfo.php | 267 ++++ .../Cloud/Dataproc/V1/SecurityConfig.php | 125 ++ .../src/Google/Cloud/Dataproc/V1/Session.php | 690 +++++++++ .../V1/Session/SessionStateHistory.php | 156 ++ .../Cloud/Dataproc/V1/Session/State.php | 85 + .../Dataproc/V1/SessionOperationMetadata.php | 325 ++++ .../SessionOperationType.php | 71 + .../Cloud/Dataproc/V1/SessionTemplate.php | 482 ++++++ .../Dataproc/V1/ShieldedInstanceConfig.php | 166 ++ .../Cloud/Dataproc/V1/SoftwareConfig.php | 215 +++ .../Google/Cloud/Dataproc/V1/SparkBatch.php | 272 ++++ .../Cloud/Dataproc/V1/SparkConnectConfig.php | 33 + .../Dataproc/V1/SparkHistoryServerConfig.php | 79 + .../src/Google/Cloud/Dataproc/V1/SparkJob.php | 365 +++++ .../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/StartupConfig.php | 98 ++ .../Cloud/Dataproc/V1/StopClusterRequest.php | 247 +++ .../Cloud/Dataproc/V1/SubmitJobRequest.php | 237 +++ .../Cloud/Dataproc/V1/TemplateParameter.php | 355 +++++ .../Dataproc/V1/TerminateSessionRequest.php | 143 ++ .../src/Google/Cloud/Dataproc/V1/TrinoJob.php | 312 ++++ .../V1/UpdateAutoscalingPolicyRequest.php | 90 ++ .../Dataproc/V1/UpdateClusterRequest.php | 629 ++++++++ .../Cloud/Dataproc/V1/UpdateJobRequest.php | 247 +++ .../V1/UpdateSessionTemplateRequest.php | 90 ++ .../V1/UpdateWorkflowTemplateRequest.php | 96 ++ .../Google/Cloud/Dataproc/V1/UsageMetrics.php | 193 +++ .../Cloud/Dataproc/V1/UsageSnapshot.php | 314 ++++ .../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 | 586 +++++++ .../V1/WorkflowTemplate/EncryptionConfig.php | 170 ++ .../Dataproc/V1/WorkflowTemplatePlacement.php | 115 ++ .../Cloud/Dataproc/V1/YarnApplication.php | 184 +++ .../Dataproc/V1/YarnApplication/State.php | 111 ++ .../create_autoscaling_policy.php | 135 ++ .../delete_autoscaling_policy.php | 83 + .../get_autoscaling_policy.php | 84 + .../get_iam_policy.php | 72 + .../list_autoscaling_policies.php | 85 + .../set_iam_policy.php | 77 + .../test_iam_permissions.php | 84 + .../update_autoscaling_policy.php | 123 ++ .../V1/BatchControllerClient/create_batch.php | 85 + .../V1/BatchControllerClient/delete_batch.php | 72 + .../V1/BatchControllerClient/get_batch.php | 73 + .../BatchControllerClient/get_iam_policy.php | 72 + .../V1/BatchControllerClient/list_batches.php | 76 + .../BatchControllerClient/set_iam_policy.php | 77 + .../test_iam_permissions.php | 84 + .../create_cluster.php | 103 ++ .../delete_cluster.php | 88 ++ .../diagnose_cluster.php | 95 ++ .../ClusterControllerClient/get_cluster.php | 77 + .../get_iam_policy.php | 72 + .../ClusterControllerClient/list_clusters.php | 79 + .../set_iam_policy.php | 77 + .../ClusterControllerClient/start_cluster.php | 89 ++ .../ClusterControllerClient/stop_cluster.php | 89 ++ .../test_iam_permissions.php | 84 + .../update_cluster.php | 113 ++ .../V1/JobControllerClient/cancel_job.php | 81 + .../V1/JobControllerClient/delete_job.php | 76 + .../V1/JobControllerClient/get_iam_policy.php | 72 + .../V1/JobControllerClient/get_job.php | 77 + .../V1/JobControllerClient/list_jobs.php | 79 + .../V1/JobControllerClient/set_iam_policy.php | 77 + .../V1/JobControllerClient/submit_job.php | 85 + .../submit_job_as_operation.php | 97 ++ .../test_iam_permissions.php | 84 + .../V1/JobControllerClient/update_job.php | 92 ++ .../create_node_group.php | 97 ++ .../get_iam_policy.php | 72 + .../get_node_group.php | 79 + .../resize_node_group.php | 91 ++ .../set_iam_policy.php | 77 + .../test_iam_permissions.php | 84 + .../create_session.php | 98 ++ .../delete_session.php | 84 + .../get_iam_policy.php | 72 + .../SessionControllerClient/get_session.php | 71 + .../SessionControllerClient/list_sessions.php | 76 + .../set_iam_policy.php | 77 + .../terminate_session.php | 83 + .../test_iam_permissions.php | 84 + .../create_session_template.php | 78 + .../delete_session_template.php | 73 + .../get_iam_policy.php | 72 + .../get_session_template.php | 75 + .../list_session_templates.php | 76 + .../set_iam_policy.php | 77 + .../test_iam_permissions.php | 84 + .../update_session_template.php | 72 + .../create_workflow_template.php | 108 ++ .../delete_workflow_template.php | 82 + .../get_iam_policy.php | 72 + .../get_workflow_template.php | 87 ++ .../instantiate_inline_workflow_template.php | 142 ++ .../instantiate_workflow_template.php | 112 ++ .../list_workflow_templates.php | 85 + .../set_iam_policy.php | 77 + .../test_iam_permissions.php | 84 + .../update_workflow_template.php | 93 ++ .../Client/AutoscalingPolicyServiceClient.php | 536 +++++++ .../src/V1/Client/BatchControllerClient.php | 512 ++++++ .../src/V1/Client/ClusterControllerClient.php | 689 ++++++++ .../v1/src/V1/Client/JobControllerClient.php | 511 ++++++ .../V1/Client/NodeGroupControllerClient.php | 476 ++++++ .../src/V1/Client/SessionControllerClient.php | 562 +++++++ .../SessionTemplateControllerClient.php | 493 ++++++ .../Client/WorkflowTemplateServiceClient.php | 774 +++++++++ .../Dataproc/v1/src/V1/gapic_metadata.json | 421 +++++ ...oscaling_policy_service_client_config.json | 85 + ...aling_policy_service_descriptor_config.php | 143 ++ ...ling_policy_service_rest_client_config.php | 323 ++++ .../batch_controller_client_config.json | 57 + .../batch_controller_descriptor_config.php | 135 ++ .../batch_controller_rest_client_config.php | 278 ++++ .../cluster_controller_client_config.json | 103 ++ .../cluster_controller_descriptor_config.php | 304 ++++ .../cluster_controller_rest_client_config.php | 399 +++++ .../job_controller_client_config.json | 98 ++ .../job_controller_descriptor_config.php | 232 +++ .../job_controller_rest_client_config.php | 372 +++++ .../node_group_controller_client_config.json | 52 + ...ode_group_controller_descriptor_config.php | 121 ++ ...de_group_controller_rest_client_config.php | 268 ++++ .../session_controller_client_config.json | 62 + .../session_controller_descriptor_config.php | 162 ++ .../session_controller_rest_client_config.php | 293 ++++ ...ion_template_controller_client_config.json | 62 + ..._template_controller_descriptor_config.php | 141 ++ ...template_controller_rest_client_config.php | 291 ++++ ...rkflow_template_service_client_config.json | 98 ++ ...low_template_service_descriptor_config.php | 185 +++ ...ow_template_service_rest_client_config.php | 361 +++++ .../AutoscalingPolicyServiceClientTest.php | 725 +++++++++ .../V1/Client/BatchControllerClientTest.php | 702 +++++++++ .../V1/Client/ClusterControllerClientTest.php | 1380 +++++++++++++++++ .../V1/Client/JobControllerClientTest.php | 985 ++++++++++++ .../Client/NodeGroupControllerClientTest.php | 677 ++++++++ .../V1/Client/SessionControllerClientTest.php | 929 +++++++++++ .../SessionTemplateControllerClientTest.php | 677 ++++++++ .../WorkflowTemplateServiceClientTest.php | 956 ++++++++++++ 303 files changed, 59667 insertions(+) create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/GPBMetadata/Google/Cloud/Dataproc/V1/AutoscalingPolicies.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/GPBMetadata/Google/Cloud/Dataproc/V1/Batches.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/GPBMetadata/Google/Cloud/Dataproc/V1/Clusters.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/GPBMetadata/Google/Cloud/Dataproc/V1/Jobs.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/GPBMetadata/Google/Cloud/Dataproc/V1/NodeGroups.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/GPBMetadata/Google/Cloud/Dataproc/V1/Operations.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/GPBMetadata/Google/Cloud/Dataproc/V1/SessionTemplates.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/GPBMetadata/Google/Cloud/Dataproc/V1/Sessions.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/GPBMetadata/Google/Cloud/Dataproc/V1/Shared.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/GPBMetadata/Google/Cloud/Dataproc/V1/WorkflowTemplates.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/AcceleratorConfig.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/AutoscalingConfig.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/AutoscalingPolicy.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/AutotuningConfig.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/AutotuningConfig/Scenario.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/AuxiliaryNodeGroup.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/AuxiliaryServicesConfig.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/BasicAutoscalingAlgorithm.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/BasicYarnAutoscalingConfig.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/Batch.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/Batch/State.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/Batch/StateHistory.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/BatchOperationMetadata.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/BatchOperationMetadata/BatchOperationType.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/CancelJobRequest.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/Cluster.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ClusterConfig.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ClusterMetrics.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ClusterOperation.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ClusterOperationMetadata.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ClusterOperationStatus.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ClusterOperationStatus/State.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ClusterSelector.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ClusterStatus.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ClusterStatus/State.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ClusterStatus/Substate.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/Component.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ConfidentialInstanceConfig.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/CreateAutoscalingPolicyRequest.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/CreateBatchRequest.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/CreateClusterRequest.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/CreateNodeGroupRequest.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/CreateSessionRequest.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/CreateSessionTemplateRequest.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/CreateWorkflowTemplateRequest.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DataprocMetricConfig.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DataprocMetricConfig/Metric.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DataprocMetricConfig/MetricSource.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DeleteAutoscalingPolicyRequest.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DeleteBatchRequest.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DeleteClusterRequest.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DeleteJobRequest.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DeleteSessionRequest.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DeleteSessionTemplateRequest.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DeleteWorkflowTemplateRequest.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DiagnoseClusterRequest.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DiagnoseClusterRequest/TarballAccess.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DiagnoseClusterResults.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DiskConfig.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DriverSchedulingConfig.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/EncryptionConfig.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/EndpointConfig.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/EnvironmentConfig.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ExecutionConfig.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/FailureAction.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/FlinkJob.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GceClusterConfig.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GceClusterConfig/PrivateIpv6GoogleAccess.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GetAutoscalingPolicyRequest.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GetBatchRequest.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GetClusterRequest.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GetJobRequest.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GetNodeGroupRequest.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GetSessionRequest.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GetSessionTemplateRequest.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GetWorkflowTemplateRequest.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GkeClusterConfig.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GkeNodePoolConfig.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GkeNodePoolConfig/GkeNodeConfig.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GkeNodePoolConfig/GkeNodePoolAcceleratorConfig.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GkeNodePoolConfig/GkeNodePoolAutoscalingConfig.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GkeNodePoolTarget.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GkeNodePoolTarget/Role.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/HadoopJob.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/HiveJob.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/IdentityConfig.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/InstanceFlexibilityPolicy.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/InstanceFlexibilityPolicy/InstanceSelection.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/InstanceFlexibilityPolicy/InstanceSelectionResult.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/InstanceGroupAutoscalingPolicyConfig.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/InstanceGroupConfig.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/InstanceGroupConfig/Preemptibility.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/InstanceReference.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/InstantiateInlineWorkflowTemplateRequest.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/InstantiateWorkflowTemplateRequest.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/Job.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/JobMetadata.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/JobPlacement.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/JobReference.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/JobScheduling.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/JobStatus.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/JobStatus/State.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/JobStatus/Substate.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/JupyterConfig.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/JupyterConfig/Kernel.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/KerberosConfig.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/KubernetesClusterConfig.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/KubernetesSoftwareConfig.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/LifecycleConfig.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListAutoscalingPoliciesRequest.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListAutoscalingPoliciesResponse.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListBatchesRequest.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListBatchesResponse.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListClustersRequest.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListClustersResponse.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListJobsRequest.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListJobsRequest/JobStateMatcher.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListJobsResponse.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListSessionTemplatesRequest.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListSessionTemplatesResponse.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListSessionsRequest.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListSessionsResponse.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListWorkflowTemplatesRequest.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListWorkflowTemplatesResponse.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/LoggingConfig.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/LoggingConfig/Level.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ManagedCluster.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ManagedGroupConfig.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/MetastoreConfig.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/NodeGroup.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/NodeGroup/Role.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/NodeGroupAffinity.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/NodeGroupOperationMetadata.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/NodeGroupOperationMetadata/NodeGroupOperationType.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/NodeInitializationAction.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/OrderedJob.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ParameterValidation.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/PeripheralsConfig.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/PigJob.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/PrestoJob.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/PyPiRepositoryConfig.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/PySparkBatch.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/PySparkJob.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/QueryList.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/RegexValidation.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/RepositoryConfig.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ReservationAffinity.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ReservationAffinity/Type.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ResizeNodeGroupRequest.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/RuntimeConfig.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/RuntimeInfo.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SecurityConfig.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/Session.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/Session/SessionStateHistory.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/Session/State.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SessionOperationMetadata.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SessionOperationMetadata/SessionOperationType.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SessionTemplate.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ShieldedInstanceConfig.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SoftwareConfig.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SparkBatch.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SparkConnectConfig.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SparkHistoryServerConfig.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SparkJob.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SparkRBatch.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SparkRJob.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SparkSqlBatch.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SparkSqlJob.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/StartClusterRequest.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/StartupConfig.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/StopClusterRequest.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SubmitJobRequest.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/TemplateParameter.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/TerminateSessionRequest.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/TrinoJob.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/UpdateAutoscalingPolicyRequest.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/UpdateClusterRequest.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/UpdateJobRequest.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/UpdateSessionTemplateRequest.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/UpdateWorkflowTemplateRequest.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/UsageMetrics.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/UsageSnapshot.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ValueValidation.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/VirtualClusterConfig.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/WorkflowGraph.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/WorkflowMetadata.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/WorkflowMetadata/State.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/WorkflowNode.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/WorkflowNode/NodeState.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/WorkflowTemplate.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/WorkflowTemplate/EncryptionConfig.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/WorkflowTemplatePlacement.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/YarnApplication.php create mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/YarnApplication/State.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/AutoscalingPolicyServiceClient/create_autoscaling_policy.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/AutoscalingPolicyServiceClient/delete_autoscaling_policy.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/AutoscalingPolicyServiceClient/get_autoscaling_policy.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/AutoscalingPolicyServiceClient/get_iam_policy.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/AutoscalingPolicyServiceClient/list_autoscaling_policies.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/AutoscalingPolicyServiceClient/set_iam_policy.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/AutoscalingPolicyServiceClient/test_iam_permissions.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/AutoscalingPolicyServiceClient/update_autoscaling_policy.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/BatchControllerClient/create_batch.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/BatchControllerClient/delete_batch.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/BatchControllerClient/get_batch.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/BatchControllerClient/get_iam_policy.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/BatchControllerClient/list_batches.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/BatchControllerClient/set_iam_policy.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/BatchControllerClient/test_iam_permissions.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/create_cluster.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/delete_cluster.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/diagnose_cluster.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/get_cluster.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/get_iam_policy.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/list_clusters.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/set_iam_policy.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/start_cluster.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/stop_cluster.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/test_iam_permissions.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/update_cluster.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/cancel_job.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/delete_job.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/get_iam_policy.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/get_job.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/list_jobs.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/set_iam_policy.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/submit_job.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/submit_job_as_operation.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/test_iam_permissions.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/update_job.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/NodeGroupControllerClient/create_node_group.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/NodeGroupControllerClient/get_iam_policy.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/NodeGroupControllerClient/get_node_group.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/NodeGroupControllerClient/resize_node_group.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/NodeGroupControllerClient/set_iam_policy.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/NodeGroupControllerClient/test_iam_permissions.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/create_session.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/delete_session.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/get_iam_policy.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/get_session.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/list_sessions.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/set_iam_policy.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/terminate_session.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/test_iam_permissions.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/create_session_template.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/delete_session_template.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/get_iam_policy.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/get_session_template.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/list_session_templates.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/set_iam_policy.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/test_iam_permissions.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/update_session_template.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/create_workflow_template.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/delete_workflow_template.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/get_iam_policy.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/get_workflow_template.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/instantiate_inline_workflow_template.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/instantiate_workflow_template.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/list_workflow_templates.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/set_iam_policy.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/test_iam_permissions.php create mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/update_workflow_template.php create mode 100644 owl-bot-staging/Dataproc/v1/src/V1/Client/AutoscalingPolicyServiceClient.php create mode 100644 owl-bot-staging/Dataproc/v1/src/V1/Client/BatchControllerClient.php create mode 100644 owl-bot-staging/Dataproc/v1/src/V1/Client/ClusterControllerClient.php create mode 100644 owl-bot-staging/Dataproc/v1/src/V1/Client/JobControllerClient.php create mode 100644 owl-bot-staging/Dataproc/v1/src/V1/Client/NodeGroupControllerClient.php create mode 100644 owl-bot-staging/Dataproc/v1/src/V1/Client/SessionControllerClient.php create mode 100644 owl-bot-staging/Dataproc/v1/src/V1/Client/SessionTemplateControllerClient.php create mode 100644 owl-bot-staging/Dataproc/v1/src/V1/Client/WorkflowTemplateServiceClient.php create mode 100644 owl-bot-staging/Dataproc/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/Dataproc/v1/src/V1/resources/autoscaling_policy_service_client_config.json create mode 100644 owl-bot-staging/Dataproc/v1/src/V1/resources/autoscaling_policy_service_descriptor_config.php create mode 100644 owl-bot-staging/Dataproc/v1/src/V1/resources/autoscaling_policy_service_rest_client_config.php create mode 100644 owl-bot-staging/Dataproc/v1/src/V1/resources/batch_controller_client_config.json create mode 100644 owl-bot-staging/Dataproc/v1/src/V1/resources/batch_controller_descriptor_config.php create mode 100644 owl-bot-staging/Dataproc/v1/src/V1/resources/batch_controller_rest_client_config.php create mode 100644 owl-bot-staging/Dataproc/v1/src/V1/resources/cluster_controller_client_config.json create mode 100644 owl-bot-staging/Dataproc/v1/src/V1/resources/cluster_controller_descriptor_config.php create mode 100644 owl-bot-staging/Dataproc/v1/src/V1/resources/cluster_controller_rest_client_config.php create mode 100644 owl-bot-staging/Dataproc/v1/src/V1/resources/job_controller_client_config.json create mode 100644 owl-bot-staging/Dataproc/v1/src/V1/resources/job_controller_descriptor_config.php create mode 100644 owl-bot-staging/Dataproc/v1/src/V1/resources/job_controller_rest_client_config.php create mode 100644 owl-bot-staging/Dataproc/v1/src/V1/resources/node_group_controller_client_config.json create mode 100644 owl-bot-staging/Dataproc/v1/src/V1/resources/node_group_controller_descriptor_config.php create mode 100644 owl-bot-staging/Dataproc/v1/src/V1/resources/node_group_controller_rest_client_config.php create mode 100644 owl-bot-staging/Dataproc/v1/src/V1/resources/session_controller_client_config.json create mode 100644 owl-bot-staging/Dataproc/v1/src/V1/resources/session_controller_descriptor_config.php create mode 100644 owl-bot-staging/Dataproc/v1/src/V1/resources/session_controller_rest_client_config.php create mode 100644 owl-bot-staging/Dataproc/v1/src/V1/resources/session_template_controller_client_config.json create mode 100644 owl-bot-staging/Dataproc/v1/src/V1/resources/session_template_controller_descriptor_config.php create mode 100644 owl-bot-staging/Dataproc/v1/src/V1/resources/session_template_controller_rest_client_config.php create mode 100644 owl-bot-staging/Dataproc/v1/src/V1/resources/workflow_template_service_client_config.json create mode 100644 owl-bot-staging/Dataproc/v1/src/V1/resources/workflow_template_service_descriptor_config.php create mode 100644 owl-bot-staging/Dataproc/v1/src/V1/resources/workflow_template_service_rest_client_config.php create mode 100644 owl-bot-staging/Dataproc/v1/tests/Unit/V1/Client/AutoscalingPolicyServiceClientTest.php create mode 100644 owl-bot-staging/Dataproc/v1/tests/Unit/V1/Client/BatchControllerClientTest.php create mode 100644 owl-bot-staging/Dataproc/v1/tests/Unit/V1/Client/ClusterControllerClientTest.php create mode 100644 owl-bot-staging/Dataproc/v1/tests/Unit/V1/Client/JobControllerClientTest.php create mode 100644 owl-bot-staging/Dataproc/v1/tests/Unit/V1/Client/NodeGroupControllerClientTest.php create mode 100644 owl-bot-staging/Dataproc/v1/tests/Unit/V1/Client/SessionControllerClientTest.php create mode 100644 owl-bot-staging/Dataproc/v1/tests/Unit/V1/Client/SessionTemplateControllerClientTest.php create mode 100644 owl-bot-staging/Dataproc/v1/tests/Unit/V1/Client/WorkflowTemplateServiceClientTest.php 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 new file mode 100644 index 0000000000000000000000000000000000000000..98b0e6cfe0333a52130f4349319bb8a979803766 GIT binary patch literal 4769 zcmb_gO>Y}T7-pR&YR8JI4ybY6;x49AleG0JDOHNow5*dfR0L|Z1&PSQ8n4IB(Dm*z zJDb!*7NYzC1ic_}KtjDD{sDJ5Ai=FC4xB3f0B~VGcGuh3>&BtIbmMp4XWn_{dES}b zYd5@Y54^5#U|8jlfFmt^R@GQ84-~ngGaBIJ?7B`d3#hX!>lOgL z_^CF8InyIG({WtEg6sI@a(_*Ih_u92n_!2HmvfU~yIH~8Xot9Tywp25RM3HojJaP6 zxMukR4?ba>%1K-Ac&s}-Rqpns>m=M;v)PQd@+Nn|Y)rn`iu2%60bD+W{9#Tdm854% zk!MOf3;CH44taz-O6-SnO#W;l&=REA8zJlAfK!P9G^92R6~d789@nnX4EYP=r}xLP zU`Pdvk0-&2{kH2u05YVR({ye27(4-v2s`I8;;+iYALazS3ywFCPpmq!+b$(+yOW#X z(d^>olA3F9>7|NDNX%qLsRAewU z3250nx~mdJqQfSb@iB*OBHFD#JImyYnni<~V9G`fZ2P$>eS)*GlwSHkwWUp&x$ZF9 z6*X)5OCX#04Q9c_ecTQAWExEFAUg;*rJT8{m4DTqn!jjZE|#0x39dB1#JjvPFe9vT z!F-G@<{NwAQ_rwnOZ66GFM8}HJAKrajXl)w)vEn>dvJ3IBE@adtBgJMaB#Fr795N9 zRs2x{r&1*Zt03D&)QOZMgqvM_Bb|PU^dZkku#(UVSK|^mZt?Ekba$P)hbeKJ(g4}T zQxR%pw^G!uw#BqA&Z|=QX`rYegT|NQMr&XE}R_3=fIgbyF;AF8!cX#=)ls}a;OF` zfIIq>P~liI}Kc#xn3_Ftv+Gdz;A$RYLKx z1`4Yb^ZQO>TU9f-gFgwd&!7pWJVbflRYs~T@ZR%}c>#`Lo3}WGxSVuDL0pIgG0^Ty z17*lfDSiY_Z(ueMjB30QHeA_$qYB3`cCi5p?|Zxtq|?w}gR;u_Ye1l|hHX4zj{m)k zM|?Xsi9bLTzh_2Ny@2gJ366QFjq5(YNy;4!)i(ox{GGY?vGRdD{Iud18aSI;mhbUi zhhYUAl^Wrta-oT{U|fbLgs~m`fYlRK^pD`hAF?1fprE^$?hp&ZZ!=&f#R%|fx?EFI zLbCJYETQ;~_Qaf4R=cR|^6>XRzs@|=ic8|PM9!u3dAzSQ#9)uLo;DTy0b3OPfMOlCH24+&a{wPvXQX*1LMx?|yD)|am zd{zVVhu6UT;WUtc=Vx;!@ySp1MAiis(fNiTUCYL-Lv6f3am7g?l zhF|icwGLbsDg*7DA0AclIijjt6&AVz;tk+oXKRz|rK_U8c xf2DWi?Hs-y_u>AlK%|A};@+5&`*Znx{FZ!Ceb7jJ|49AzAxElj6g|)b;6LgDcX0p! literal 0 HcmV?d00001 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 new file mode 100644 index 0000000000000000000000000000000000000000..5a78a2e6100eb71d3de3df485d5c8896fa5705fe GIT binary patch literal 4900 zcmb_gNpIUm6prjzj-R|vHbqGqM%kRjQsX3OA}4LM*%9j6uI&U}1PBy0l9x(}qjR z95pFZU0PGBZN+U;#b%akX_lc>TlG3+ie|0Zx7 z!?GF%O>2hLs-u~m&Kb4$5TsH<|>@|@5v=ec&d z;Axki-JSu^4ApUzoU{TPpx{5dRW)=?aa`5K|1RrJMK^UN-sG2M18wuGXYOoO^X z@c1v2*S&4IIlZn-N{pFI56DM~%UU$NyP`1awwO61aB~Bj!BcsMXk~4^oHb30N5L|k zOs3;g$HZ=mc|)hBdpMn0of@?qZK~_K#SW*sOua%mFvy--D6ceCMr#M(ciu7^tYwAyezO6Q?~3s;y(Y@+y$MnYa*IsPj};s$Q-=fioci<|Wiy zy5cSM_P-;t=80YM#EedA(pHcfPw1>CBp3s`FHL#yy+t2nu;}^`mIBFNB0%ztBAW@$ zSf(#qm;rJRqBfR~>Bb{UWO68X<*#htKiLc9d=MJBD@MghA>E~gHn{@>g23W^s1=*O zkdjipVND77TtAv6C*hb-s_3DZ9bK z-e8kIq3iRyBP~(KxAl&$pMoJ4f|_CfjzhGr8%UHP-*_x6 zR->#^ZN~>XF29E3T}T}p8H|$mVNgVlI_P=-0RoOe9W&`yZY2bXr)r4AA=Wan4z#9P zH7Mfj$E>3R{mBxL0yXHi0(qy1{|+!9@MOOIg~>754> zkN>(AKeiv5Whq@kVHwy5Fu>1e8XrQ{(dj)L5gVsgxUf`BU@Z7s1^L~}8GWRfTotT1HC|e{3 z{V!-+GCmoBfpyhrN#Y&K^xcmn84L)AkWwdBR}@J1QRKuPaaU`C_qvuLA@iI-4!c<8w6g z<=gCM`q|anrvEq&KRZJT`NqFf5+DVoLssDGL)9 zxdS!N5p!F0%~0ER(kph=oQ`vImWY#JsUBao%?`G%Tlrdrb11$eZkafBH!8 zJ(dPq{)Kxhds0rrw?qfZzc`hC{pa7`_uWn2hQy@RWh+H#xnOVE^UsBYb2Yq=M24sTUH%AT^w4U6WX&JzFRvK0AZ zMvC}#jTf?p75c6;oyOg;NPT>Eb*A%JjfyDTxfWcXZ^@4>p>H$%(AKpbzRL(n`Tb-Q HHUa(xpI;NL literal 0 HcmV?d00001 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 new file mode 100644 index 0000000000000000000000000000000000000000..3962d2eb574def42308956d327997996057cce11 GIT binary patch literal 15194 zcmd5@O>7%UcAh3JSuR>K)sk(Q_IT*_Y(_I{Q)ABV?2PQ0gcK=>D~V)CY7A!;bSSb# z^@w6K-A#G40|Sdp4!b}O+1*nDEH=m`KZjfrAi)AT6&|)PRAlCSRH3|wST5Q zi*bZ&ZPVzuFGsU(8trD*IIN$Tmi=<16+^1Zxi>ka411+6sp-odb(l-_ux=a8^Y4D! z>a^@$r(d5is7o9(@IPS>O^iHRxh z!&06POPxGQ+>|WpT@(I{%tm;##2bNu1F{W$UmAy;a4RsumKGp~-j+jrxsc1Wd^ML- zzcO~J!*y9syDz7;`wF`<#Otn{#N9DG+e%YvrDSq@aNHohlY^d{_ld=!kD*<1h9?n! zhU=-2oG`ThbEzkCJR#S2p$seho}mn4O#9P^P5#-~QZ)y?LTl2n$jWTXF< ziKw^ORT*=1iZx4-{?HRP-LN_bW@{;mFJtMww^CxY;X6;sb=LTN;;g7ucH_jf-Cn(| zdn-tGjI&FP=k|%98^JWorrY&>qwOrsB%|2V!|_Zcb!wZ>&v#t=RBR0AqA1gImM)$5 zTva}w$fIhG%?Wb-&~y;kPM0q8t(-$VK{f%w_jaY_6$G4JL6BV(J(@*i%Tl7S=b3sgf5jvNMgc$7dp5W zAe0T;>UD#P2v*N6`>4-K=-)+HRoP9)z=oQ2`&17zy~@vd5vJ?xnqwWf&k<+6!_J;{ z?Nvz-Jm*t(!-sV|?(21q-JGQuSJ3qMJ1AOBqu@b8PMhJR;x4|)=8aCnKJ5~i@V0pE ztb5J-B*9H?Gqv7xEvEtS*=c#qRL<p=-X6G#3;;Qywywoxt z8R;CiRjy>(??%|-D8H}X=Ki)t+A{2ozQt}G_4bi#7_Q+Ax*l?=vGk+yd)e|yhdfYZ z^ELGuyVXCWW7sEVgBB4n@$y;B{exB|Wk7z}o9w#TIk0hCcCUdX#?w0O?-X`(45d0s zCn%K1(i60Fq)zPZvD-*1?ISOS>2$olha|5aOHXhZRU+OL@sG}D*n!h&KT+6RSgF-A zV~4KW)w`DMI*2C}yuUI2X2R5|O^}v}(huWN^-Xru=+yUNus&lrJlv4OLCg$StHir( zE=+u8IDEk7hrA8PPZo0MQytDG5Dv92iw`HCa_}KRD@Y>+zjSRm_5rOWIpXc^R3s}953;ZWBtfJm$HwH#^rvWJM z0Jug4&{fo{?2=n=5$3~JYKhIj7xHS#(iB(54_;!gWK-l*eQi{r-;2mtutynr4-P06 zpCa^ZG3ung z!+xb)DSVQt<@G}OllS$FQfXs5uV>cQ^3|%oTdbDzYlZbfJ{Nxtk>_TixS6jMYWjMm zw4+ydv&DSvX{oXmCw-bJ?bfoT-C`~tQRmrgwva1S@@ut1shHW0N3#oT9uzJu?UuQ8n>%{FI2YlnELU#O+ z-Il|&*%pUV#};(gvJrB5>L3 zJ%u!j>Z(20;OwtIl#-Rz9O{qKg&XkSH z;g4CYX*x%qeNJ)vd~>`BoA-{EYm0~)I>2)Zim-SD$ z2Z|bUc2FQBZxgvox2Jd8b@#xsk9lq_<$agU({Na2D27Ru`Av4)*NTI-@tL{L4-GU! zm|#ix95-a|u{SVt5{Y)q<~@b;%?Su+*1rN?sp4=-U0^Z)YgAD< z!ckRJyLiikz!!I6R{(|L@;jqp0>;w_w>a(h6s8XAAE64LGgUmGHpT#ui;}1EC$%U8 z(uMxp1J$&sy7v}KjG0Ov-}ens?XRQkRzXJSA%y|%y6LlVpz2)8dK;4GZY-A0UqB60 z-g;G!qfksYu;>0_06M)kP&}clSbFP~tOpnbp4{jY+5Y|e`yr1W^q3-tkmftjF4^_Y z5x;$5u?YvUTguSqA=ZFVTn%#Sqxq;nwh1jDj=G_Xi!c z_4L;MK+GfO*0xZ0(H*BLawO^9kgxay0w(r`s-Kkl_(gq!{-mG!^VMSM z`{T92CnTN`9-@6}s!I2>6YX!K?212~pnJgLpRg(0Y9l67)SgREsEzs@QWX%0Rd?8Y zf6tz`74_{2Al*}?f%v4L80^)fDX)m7SI%+#p^Eg&7HpT9VEC0y7`8lO8AGIi(1J26l@~;;w-AEPcz9 zt=BC{c`ZVrr2i82>(~fVsPC&8Hibk-BF4E%S(vQ<2)Y#gkLwEoxalUcJ+m#+$xry7Lm3fGg+(TGqpl-1JN8qmEB^IK19?jY${)=lq&HkDjEy?Pd&Gr*J~wx zx12*#6u&~`x%_sXlV74we1zzy=u@>;DwpZgG_mHNkStvmLzxOEn?al5N+n;;6e={6 zX-_~Ww@&aPtgx87i!>{Z*Hpv}qNrC`mB0eThJ^KY@azhjO6eK}_kM{eQ*j$)D*K<*y@^;GgTqG_89BlID zsG)QkW*1($i-#Mi)HDYxHK^fuWuy>LP^fnY6eCK+G!#f65G+txblm&hobaXy#Y+|_z6JP)m;?$lnAN}yIRJe1_OZ?>#NR>ijqME2I%+m}S|Zo` zD!V&8r`{ycPUREB=7knHInBN@JX!R9!v`XSFKHk!EU7p5dA*LLNuXX1zQI(t5 z&w&iJ)>C1Asa-IuinXLFBwGuR608nf6h%p9BbZO z9v~8r*tG%nXP*6w2)j1W=TW~wJ_BXvCa^M60@rQxGwpnK45_ zGvY&bEkuk}1#CGZEQ0g{x#2*l5}og}LREH(MR7b$XV(VW2aYx$_lu0ilKzB21R|AJ`@;yElaUS!Q70P}+N+1n14p*3yq3X-<832MpV|bmRn{5t2-k1xc%%AY*)HF(uaFt*@0Y(!q+ zAf(6qD}`MZTM$H;e`_aSs}$DsYH7E!Hi&d-xKu3EN`x}>%tpRg({uUt%7N67cX{zqh z7uZXNrse^6z;b=NP~3{oX#c6O#WlEp*L%lML3slY!NxzjSzyxwRQFT32;9o$hQQU* zDcl<`Z>j4-s(9N&1r@AFSyTW7e8Q5V2!jreegF)MA`S4yasTmxgXRa7{w5Wg)TC8#d`dJh|SIs7wRZ4?Y|ZrbrXHKqW8qU9FMCnzpK&m7<|<>`0naFqC&fTe#5wcpw6`=?R&V1 zZ4~h2k)4-N4}bR&R6?hbOrzh#ZCWB%^dGv^exQ;NcPkRG(tAMq-nEX5PTvbDsPrs` zx8eY8IR-GqOhY~@M>wF!c|MDbQXbSXK0~I{U(Z+SsP>mpb|YujTOG@}fHOIld}#;J z^Zk0et+yHu3TSrFOMVNfk{qQ<9G(vdpZM{3_d9ySshVH|C=M><5ft@(rZ&at_@jH= z4qo5!W=t%7-CKZ)d8ojOK|zO#=BL)agA~YbVBcel9KQhJqv;^p%q9wX)S8k3w8dsa zd!YJ%EmO&6wzo%jI1vM719WY>w3|bRvs^A!Y6zZp*peJUSs+ucl-BfIA+u2|RrAQm zAC0&)UK6I6hl&l_bm6B6QSHB>msBhmEF<7{5qHfjbgs+Z_cso#m9Tor^3>V%hAp^4HzBwqIvDDZ?iRq~!g zYd=YqXcAsjJD1fhxN6v03K@*+r&6#;MYc=C7@0W_QcTq~8QA1$aCaS(SWTL;&R z+&izp64ZY}H>{7r)Co@j`m;Q#oDEg9qc1b(I*a-$&hoF&?I6mUq}#!H-gzbjituy+ z-n37@%*+p6)R&p1q3<3D1j(=M>*__EyZYy-m<`|~bwYn*V5)b*GeX8XvpFBpAWtF zEZH_a#5?vd!BFuy>;1^XDU;oomEU+Q=6JXOuS{E3;HOpT73>A!-P>Sy|8f7%{b?wV lYrXfD{~NLg;s=_6-*ckgh~Jxz_$?=&DSmVLg1unue*rXGGHd_< literal 0 HcmV?d00001 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 new file mode 100644 index 0000000000000000000000000000000000000000..6a0b55eed31874b606ecd41982aee55e0c99247c GIT binary patch literal 10877 zcmdT~O>7(25e`X9B8QelZT!Q^39?=%wG!B5%%p}x|Aitcn+ZiR66L_HfW?Y>BG+E- zZuUos>iW`4i(Gr|v4;X}fud+n>7mEwnD)^6Q1sBAi{5hRq4VC`KT`aYfFzC&)^hjF zyqWoC=FOY;ZrwGzCR`Hl5uI3yL-xeoL(%CH(X+bIpOKclGQ`Lx-6UEAg z*w|=^)k>{(5lL;swc4a8b_}DVk$hV-+`ass;wZ?Xoj-i&2DSO(nW>JeoC?XnU)qs~o6?H9cwF&^wl^ z>#E+_*)XY#9Z%c<1++o6XF7+|PaTjl(bpCG@d;>KD*CIV^vvP3%xSLPQ9Tza?d=5~ zv4+vI5@1LXy$qkN!=)+0M9A_%ITlMfKbCR_*Ot$F z%7(tLc7zXMY0pv*h$U-AN7l#z(d=woOsu2}w{oM*kn7`-t1t%muFlA-x?>$K6F4*M zy^w~)V{({{iLsTGa0_M*6wM_#V{B!iaCO=l*+j+ojhJM@4ErIRg{6A+LA5S#H@2G9 za&4_vtz=#h<{(k3*E2C81v9P9Qn{Lm)5l76b^Bf>Atd2ct+BR|IYpm7ENwP2GxT$H zb8}-eGfN-WO07~oGe;S1tgU5|(tqQSy07dRhKX5GxByE%Mb+g;iY4!(%gL^#a^>#7 zAe;eUA6XJ*I;QaL5}Z=3j-5@Ql~b#Uf0kmxGR#LA*x6Izw{wv48Qa;J@cnn-v|_cp zh#j5N&d!FP>Hz2h=v^v;SBR-^U&!U`hc%fgyVr@)AZpv_REkNAowc%etifAZ;!?x)b2S$LAnU3 z4_sm$)>YfVEHd{I{-B{8^DP^fexHE3`xyK*AhNJPM;s2Ig1P1$0RBZoPAmhZ3ztS) zB$yOQMR*az-BERy$P{oz)m)2U){3npd1Bax46n%K1I1F6T@59qi7Q>WK6(mI=G+#m zuuYls(21dNM3#sO-54#30n&Cw3v@tY3&Fgk}|Klkmy{ts9qvT)j@@V^9$Z0Q`V z5J#?>eI;L{OdKrvB2{94$;VL{Q}PAEO}p})DDaM7@=2d2Al0;R&u4stfrG1t;X0=4 z$oq!XQyg5?aJRx&lq{tA#!q$>EaD>tc|QcymB&`yftJ%ka3cRdJ_M_g#pqq!+P3D}*m;y`%arfvdA^Q(a$R+gZ|mu&gzx|sd@4=Z zrJWRBbiFfrd5q4QEAuJqj5e%@m){2A=%-0_s`PhErO18@dz7v%+=dz259O*X6kZ=I z5~s=0KZL7x9_IG2U97V15KV@&s4#6^yn{ss9VX-dmLt=S6Sg8~e_+|4!t`3XxuBcJ zd6pq*ySt1Un-sJGbj2q*(s|1Tn&h@T8pcHWWejGRoU{Y9)he~B10A3=%r&cxO097Z zyFd#7Th-QfQ?6_@s+lC(aBg$E(V!pWf&dHUQlpGLB%dG=d563=Ti8>Y6Xqes$JOyC z>l`s|eVwBhVX@R|Ro9y>d975dZ*NvJDd|2oF+AagMM(E|s*vl}_Ud{KsVXQb!0ZRx z)opx^3mG_#v)8LK)o*(%laOvPf88W_G(fPEE}UmY*(1_+WOPZ^T%+cR2`|FzBV(7o zq%AhShDpDO!{S55(o3d^y?oXarknRcPcQo}!@G0&(cla)3mqqps3Z~p4le058e%JP zDp#Bam}4pJ$F!^DT3Td1yJ>UTLnJ^)ohGeN+t~RMbPeq}g zp`X@jjoQ|I{4`5#O+muvIr{v5txlhl(q91*=y$>$NLjwAnQ_yF?~XPGQUt(o5Rl&V zQ;W9=A5R}7B5tfZ0A1E`lo3m2#j(5ipr6NP$F2M=NZGV`#>iwWc4iLaDI{yK~?C} zBX$n0z!>>UjC>4sejO8`-lsJKqkef3wZBmN)Hh(3W@p#-I=*9!hi0Q$*tIEbLUNJLzioy)N79ddYOJp#f`O<7^H zgl1uhF(JGLS#Kb1eOZRaI%+l>wiph(1GC=xE=&>#?UEZ@&(S(yx4UG|MQA$NGYpn- z-E?Z)U_1kdrqxH7*I5N}E|d(j_@1GYY!+X!E?ojoczm70IsHcd1vd4V-8(5QNuS0bgUfVJb&&Zc!Tu>W zVMi>mOfZXd@KlxMW#&h5ArA>u(@XU)kIol30ap*%TYM(EREOJ5={GS*<0${AKC+$% zi+n-|@Ftu>dH6Xa$HCzur2%#SSG~mOcyP@CM5hehT920 zi3x9vPC>ySPs`=;R+Sz;E1kuH-rH(i;koY$qVnUv{Of1&o6>c9<;WXg=bwZ_pXT{k ze90f4vYSaon@L%Wy&?P~h9@$<%q2UxuW~Z+BNr`l0W0ar=Ouv`_0hEYtaLsU^a|bu zq6z(q=xenml}@HrL0!*MPZ z4Dz*^5D`@-(cQv{&0M6#g78O_FGxA#E(DIXbXOb#&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"��A@ + NodeGroup3google.cloud.dataproc.v1.NodeGroupOperationMetadata�Aparent,node_group,node_group_id���E"7/v1/{parent=projects/*/regions/*/clusters/*}/nodeGroups: +node_group� +ResizeNodeGroup0.google.cloud.dataproc.v1.ResizeNodeGroupRequest.google.longrunning.Operation"��A@ + NodeGroup3google.cloud.dataproc.v1.NodeGroupOperationMetadata�A name,size���C">/v1/{name=projects/*/regions/*/clusters/*/nodeGroups/*}:resize:*� + GetNodeGroup-.google.cloud.dataproc.v1.GetNodeGroupRequest#.google.cloud.dataproc.v1.NodeGroup"F�Aname���97/v1/{name=projects/*/regions/*/clusters/*/nodeGroups/*}K�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 new file mode 100644 index 0000000000000000000000000000000000000000..76a822f36b983e41f62bf0e8c4235806908b0c91 GIT binary patch literal 3289 zcmcgvTW{k;6edlYHYaTwc}ryq5<@6#D^Z6Q2`%Y%As25pZ0kh1fLJ0~jy+9AxVGg> zQ9=CyJn@J4B|IVVFL+`ui4&TnyX{Kk$uo22T)+9w$}PXc?hF zRhY%AqoV6E)x>oIg=+0TMcy z?4IY+$WPJ4r4~yDO+>%pgxGfsyI;eB=@Tz>{T3B1m4-NsQ^pA&3b6+AMoi0hY1)2OCO7F~@4>k?X# z(75y#-{lE8d`8CMmn|!f_Blnxe(WFf_A&gi4F_)w2T2y93P+AIL5^~DwEN*$35N~M ze=(f6DUek7I|(}#BQ!@bG$v@0Heq$ZPUHki>}MnifG_nZB9^?u_ll4;eN0iWGre+> zZf1{nm9aY$qe`3`=@2rO>x{)yuND6haxwPx@Y=(2n%>DBS0^UsB32d$b8EXxRY{K^ zYmGrjaV)R#h|VBw8v|?y@;XY=V4mLF(iy+5I-!3pywl)Kdzdb6dr%iTs()4M;kRK2HlT57fN zyrI_e??@R~SV!0DQL zrqb_Z;kOmosoGIM**Hc-hjxJ|kiLag#OI8;cp zI3o7!87F>z-y{kP=a3U>^brYYtGt$hv(f|Ay+8NFvQw97sb=YLV|vnw-^eDne#aYG zmPTdfjfl|RouS4Yqeiif;E_2Zwxv&bpICvs6-(TgLH|j?uI5^}?z@o}Lp?6=xH|2EEhzik|ntg3Q-9^)~f2=jyvktC%}}xg34VQ=`luaT>ja6V{N& zwd=(=S>sWB^B}W#B84?&VeP&+2w-PPKnL)N)~u;|z1{4!-ke-1oAz3@Ic8-n+g3Y` zS86_0ao__w_AgCCWh(|`zz4}z;?;>5X(kh$ds!U1Gk*q-i-t$&UxLYy=M7G#pMx|X fxxRQDPm`aC*?4A@W_&`-1!FXq6vOTf+yMLwsV(?y literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Dataproc/v1/proto/src/GPBMetadata/Google/Cloud/Dataproc/V1/SessionTemplates.php b/owl-bot-staging/Dataproc/v1/proto/src/GPBMetadata/Google/Cloud/Dataproc/V1/SessionTemplates.php new file mode 100644 index 0000000000000000000000000000000000000000..e7a914ac62446e8a2ed1ebdd2f9bbe2eb3a4b01b GIT binary patch literal 4164 zcmbtXPjlNu6vuIs)@x|mrD+s5GYC^Ae@G;fmJZ_(I(CvKDS>3tzziKT9$8-7YGg^3 zRtX{FONVd3SKz`7!=10daDrP-9D3@356}~DcO}J^WfP~lL}R`8+u!@Wx9>fD_RwiM z=mU9^Sj5#Rsmaw7nKp^+xHh$Q+mx$*y-r+Nw_A>35?7Js^iu+ z;ZWP%1JgpGL1?5W`(<`6IF`W~b$M2BEEIZ3uFBN)N$2UZ>=Np`)(Yp%0NT-0IYG9f zW0Z@QWiu6Q%PSPlV>*ZE=eTAX#G=FbJTiz`E0LylWZ3R-uKOgYoePufDT;DX3_}E( zfYH=kQoA_!r~*L$jg~`CF5!A$K5SN;SxQU@+BT;0EapUX^Ep zcl^Ah4iPkl+=u-Qd8PuuJAoPRCU7BDXbAKq#x#0KL&1eX{+AS*UULcbqgX%LC(nII z4StBm9HwQuhu(Hc@ig4}K zUWtK}(r|3PiKf4H;Mjg#lTKo+hd=2ln%X2ZMk17C6}5{oAxBVN3V#_EO%ja<6Iv&^jXFQ7J( zd3p{sRf4zC&3I-#P$fOI;AvnsZjtY4rGp;hoymWPrq_u{`sVyilkwvi8js}}-|R{- zD?KcsY%Q2?Fi@mSq!PZ5vO2#&6?V6{+S%n?SlQvlQ=(4C1W)5lH2%zYPC)TWAYpJP z$}^#BPeW233y(G1sv8ZSxUIMFKAM2-!9A?#wq+5WMtE7^m|b4z5BG$*0T}b@#=M2D z@|bK_8Vw^&Qiz&uBc*bS zDBBS+&Z6`oIT8H=zk^1PG}9NAk|~UQnkqbhRkSYNKkyn9)icPMr=A8+ZPm1OvFfO& z;bS{oIinR(Jq?%7cIgJX9^PG%faTZM&{XUufH>5(O;~vG%M_YO92EFLf1MK@f;N}C zc=yjY&x(^`3N3`B!$@BI{qm=gt^9qqVxJ0|)kvTD4qfJZ^(gcVCj2jinK)wxg_-DZ zi7?%>Vh9^L~i z(l=x@_|Fu&l{BF6fX4 z#b^xiMLplG{`{rX&wcSnak9@2_*YSBQtEgGRXsjF4oE}`qUO`4_&{D{U&3|UZIvjR zhTSow+cWw~6S2Mb8PF1&^q#=pz*b9Mg% zXUjp?%%D9a!=KaGG!0$$e9ecS8-`agEW+ z^av=o%hno}?t?=zRamujGI2}hHmU3l$A+lq<-nme3Iu>qE?PcuEzK-15Kngv$G6=z z5Y1-m#1G-4ZzgVuZK*k=M7>T64^AYG6NnDjxxt>KJ9! zvTTY1K%C7sV``e{q?k7iV)ucN2(R;J3nSS38IigmpVM;7Q*-V5aQcB0suUAlc z{FDWQlUz_?m8ArgrR>b4#)JvYF`(`!nY_kQS0f8G%2;JnP$mQ}M+98Ki&(lTmX0W7 z2EGuxF2u|x!Wlb6_>dp0@}Y<_egGpENdF?C(Y#Bb^N8|ZCtoxGXnYs-I6$@KCnZ^$ z=+BkM|4_SLsn_t;5CHA~#O^83oif4zX!eSZlk5W3`0O=>OSS{32%TIEjN>tcgkr_0 zCSz>dV8P{X(S`HDf|P!UMwW;#j0B$FLFZ|QJLESy$?x>H61uQ#c!4=Du=n~%TtfYh zRwoq?S|Y=un+7V;K-qiWenzZjpc1}-dTNFVZ7v$5fks>1@*L$~s3Qe7;HJYX#G=`xd zRtbL;K)MB8%XW8@!z|=Gooxppi(f|11Fp=OD58YN$GnP9wjGnwonSj=pmDuYZ^5y7 zLjNxbz0^<8PmkCLhj~N~mN(C%NZq~%-m^S{|E_0>cmb;Csqms&T!!cF?B{=}pPhJc;Vg8dr%>=-W=}lr zXG~k?qgG}wc-#*!0+~HQ@_sIXh62KQf~J3z&|phf!gg@1&RN{pLwC zbJENcY6ds31NAbWxTXXn!7mIwU;X~)H(htrQ}jBw$ED^&)+ZxuPc~W324fihUP7oj zC*fn7Pg5$0`sCp)J$In8iHkX@VD2O(xr2+%Je=IeKTBvJI^N)8I(Aep@b4HFTgCa* zl%79O#bDdw?kO?Fe@iHFctpZ8L1wg{?}udrw@*l>uireGnv~3?-(`7oN=mXY!SE3< zD^219sGF8K?YO#W5jJI+FD=vbkgVD6cFsg^!8NF3D&z)5Q}Wj67mYRP(>b0lL8E{xRNanzxS7qsc2Mtu rgU;q$^Kr8W%HOwdkB1lADgG@Z^67(~g@%5_XAdUHKTqtVeT4o40iz=M literal 0 HcmV?d00001 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 new file mode 100644 index 0000000000000000000000000000000000000000..230fe8832bb2db1baa1b8d93305b376d13ed2adb GIT binary patch literal 5596 zcmbVQ&2!tv6%R>C79S-ULhP7koCIc*Saw>{Rx(W^*X@8LBvO(|4oRtv%P9r~R}?A` zzyJ%ysz>+!3%%sf=}Zs3H<#Y}A9Om?YtKD)rk9@jcJV=wG$l=V;STnF{@%yF-Jky4 zId$L%(jKvht5GtP1{V@NC6eRX)YffN8u%wC#Fcb=>=-6-OOjM;NzGPIQfiIfLuB=A z-_^;EG_viHNy@ru`@`~3qZ*3P%jeI^-l^u2VTnrwu(UDp98D+EUc2&=P>qrH_c(LE z%9#7Lkhy>S>^XpLYMv)`xe#~*68;>2U>dsQQH|o?$A+gGmO%~8G=7U7ypT>b(<8__ zPkZ89IyG!dVhk-yCtHuDKqjO8*s;;$7gA(Sn}L7;^cxl>uBDm%8u4`3aH#FJk#uKg zL}&~h`?B>oRLjH}C(>46T$&%p3gZS1_Amq*}7KQltS<>4@f zcNf!dD+YwY^9cU_34C&+yc6>QS&64-DN4`M`Ln|PP=MwbWjDkmNY=uK;TBI_%!BeU zbUfVuXm+1Q-US53|E6KR<6G==)wWKIk$4AgofFqX@bW1swUw=8{w1fx2XI@rEvgw< zg{m>uMkJq}?6v{W0*AQNAYMKrWwvtLUzQd*RGLy)LgYhE#iH&-pl=^GUE+SIoUYZS>^xlWcGvm|A`3oE*PYP&RlD|Wx|3~tXj zA?6@+MlJ#b#dTOd*GxZzY$yGbRPoO#*i@`@!?mq3v1p(|tb;&a6WwR28yU)iklTK| z*l8u=NZNS_B7$l-r`R-2FOtPVmfQYpv8?ulCn2r)hcw)tQNuFABksAO6IIi78*?a` z5e3LugnnbYXR7ZS`K1`F`a9wWu;KZGXp7Y$*#Gw}5@Lh}%tTgk$$ z(AeTvkncL0dsa6*mb6_2hqz&2KL8=BXjM0T51VzOx{80nY?y;ytit9Pj~^zDs3F!N z*A~{~|KuV_F+u1t_6V{o8OGr>u!~E=BG!YN3Q}S_0&K4Plot8K zku3f*4Y{zK8`g;}9zvE_L&wJc=%KBw5qz;&c7n5{L~L;v$cXmy47{DRJ zIJK1tvbz5W3f?JBLs$zeY0wdMG>9n~d?Dqha6gcQl}m7D(vUi)V-SXPn6^m@df|{n zDHnf-hX=PXa#ef}vayLt(>?-m-ZI`VLQPY?IW8F+{+O$}+P8?3HIP|J3Cnrdukb0+ zOnwaOUKlu)or-vxv1k{fV8>oPH5bRRuuaA# zjByOk)lfxT!l5j29|X%D5|zz>Bp$V<0QoCg)5MW( z$Qt0zU9GILqngbP#lNK?zlc`UVUt}QY>O56Wb$F1s~!b?zAG*gSE@#`j)NhJcQf&L zYCuZ!;8nhd^qDcE@Fm=RyTWVckMA?Ge4B>NxvXLpA1CJ|Q_^A$mR;M#X^=U)vHf(h zvvV>_9c1JwGM)NiwgqW%v(%sD!%|U&B_zq%0;0dpzDX5vPQ0dCqlzukEGbp$t@jRufoQ?94uCDR)5-g#vPCt#me z###m&enUwK-G$#{!=EyV4QpdfKgDZ-%1?*sD+4psR6TEqCCvsz)@PS_b&7e&Ve=+q zhZ+Nu@R4dY*wJAv(Yn2Sj#tYSwRp8BlM^oC3C^Ix*uWXv@m0sv=!xx)5zJ@`Wk>D6 zwy8QayfZZ#IqyyOH(|+hY?_zwQ($(%h6f2l2 zr`F|eUEOarnpl7UD=(Fot$kwAhRGMcbH_7dY?* z+=Io3z5zlYgWj8+U2UgS*w%%XX`&GMxW^y(;$*pjB9^AJrOy$XeU}QTyv2 zN=h-Q?T*szwS*PM-|IA*En$;=?#RtOBw1se-PU1801*v(rL@}$>Jygm8k>F9Y8@y_ z8_8Cm?8Ex5W|+Q9Wd34>MN`<78;3_7MU|_)MyomF9`ZL^;Z|TtO*vG0ijc1SDFYAi z6kZsUN-lU_!}E{Y?bNI1!HFEbFyMV>WG9~Vw#zs~;lo~Z=W+(mC(D1!zXp6Qyk_Xy z!9njgM5kW)O}M%&$9=c_CR$$Nb0WXaAziq-H^-UJ9uWG23)BwF43(>40DXH*|qy}u!2IV{rRK#o$H6eGhyOY Qap8+1rwrcxF5wd3|4d@!rvLx| literal 0 HcmV?d00001 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 new file mode 100644 index 0000000000000000000000000000000000000000..7689931173d2258b7084bc729989e3c1dfcec0c5 GIT binary patch literal 9293 zcmd5?O>Eo96%Hl;J|(d;+c=IkX&ENnIBp`Xoumnrzm+Z7aqY-z?Chec0fCmrG836( zNXl8S;Y%*P^is69#U6?lxfQ*%=iZ7U$Nm6CP6b-*p}p>DPkr-4nx;tEO3|V@IFdNu zn>TO1_r1p?|MZMdk;QxIaMt! ztCi(dwOm?Qy?{{HYCCmWP@9(3Y|(tZWwjgmhVJQTqMqNL%D=Rn=Nm2SWzC~ob_*wQ zbKE+Bsc%u&*6UQAug*N8p3Y!v^W4zdEHkuLl7`kkp1K22Z|Sb9ej*L7`u1QKRQzYR z*IPzibv@m~|1KGB%`gqm&|Ai5xUhTbhTd{1TIn3S(KhRzVVNoeESq&YaYYq2+1N|A zg@L%I`kqx;Y%nfs3#LaMQ*W)6s9Sdo+q0Z14lNX#)C(fYewnx;r)B1h4Ru2JSSWNj zc~AA6HVx0Nst)zqj(Las%?#`XpVngHR3j1r?H<1LKZ5h<`dc({a zwAGlQoBFn4IlVz2Q^}qqJK4bsWO0E!!5-m<-&cYv-Mn021MWyfPV+ppa>B)5x=MnL5`RDg+qe2j{h;dc*U zs^`=v;{uZ7YLWBRBDX!2JtK|jwt-s0*eKK@`>oK04Mw@zy5yW3a5gl+k;Iah)-KCy ze7*zfRG0LTBQGWne1;r}3~KEYA#Vjlkb}M{Epe?wwa7Q*Zp-WMN3Wxrc{}o=zt{lm z`I{yNXulqW(WnlR5l9)0@sz4e49}$hR!oso(8n}(T=9QOlW)M_Hf9Slc07&0_OpQs zxdEBFLs6S+Y@+c#ypoyD=7fu4N?bxNpbkT&8LDmL=1Ell(NK#p(9+jw%N-w3(>Tp{ z{b@SLkc+M`x5R;E({px&NmQ@#8 zpWpRA9?_htXunb5Y}Da^e`FR$wscc((nd`x5|3_XdLnrf9|?dgfDez6GK@-a&801j zgXQpOW~Q$sTaoY;33zyHCKJjj?e7YlJU9_K3&;IwxVnS{=PnFL3NmrYOs`!&bmD!! zrN}}c4ShU^ZX}}*`qUu|JyK2ktpX#FNHF#M%rZmjsgNJQNq^~5!&2PQyUC75tmfqR zP#$m%$=(3cdFike(OwM#?5hz|cWj328kT`T^HbzLz^2}?EW3vCCK+)t+2e>pQ40ka+BCK)pI#K13(3Ve-oNIoy%TYd$Jio6E{ymxgm3+2QqGLCg$-az_o8Smc| zG6#S)(ZKr0E{M#zmK?-j>W>2uU%vKp1>TFfh_$>Qt0MhW)|xI=;xQYxZx%)24h-;m z&6dJ;qzf2vZ5js8oPrSq%Y}&;u3d(a$Sh3GxPR0|5B+#)AHYb&B8w~9Yabl<=Yjnm z**{$%r(wvG=LY){d7v$3%i(Qtn#`lzi?&#*KJS?`)04@2AT>O=FJv2##$fd~9o^oP zd)Tck`aQxt8!yo4Mgz+;^451ls9?`-l%SuTJW%Ysm5GznUGmZQ!jD^Sh2exd(fZG1 zjT1IaDhC>2k@bb-V0FwAkksWpKDmym@9B;wZc9Y!A9`Cd1w+(q2#9E+4~2x5)NW(( zWMVIu6zR%^0(bAq)8rQJ7`E~u--YxZ>c~wv&VYgcLURv;Wv5^y8oEQ8Ywb4l^F75D zWAI63v9kP0W%L;PQY}|X3zhj%g?)Maq*7sDQe+7FO3Rhpkiy)V67EvCWbhxv_&}K(}7c;iIZueF!I#TOn-1VjVd@?82d#Ej{DZw zud$6$nk1HmK%LV}TA0owDVVd;{~(cAA|5G`m=`(rCzMD*WLP>1%i1#-4n~nIj8&FP z<=V<>akX4~Qdy~%XBXxc$|bQ=GfT^}i}*z$$6<)=RB>jhj9V4jw=~{Y4bLt=sxFmR zabzC>7?>+AEaB&V?UxFipXK`I$I35akFio>(}AUTz}6jhZ!Ox%5Ajst>*6Fi`Yl;8 zq_?6_bWyFS8*DREngiK+>P4^lF5W+I#vvW-;hr&cAQC9QqWvlb+JcGsYvKX2NB^gj zlQRIURlyBlv||+G4qrenq8cpV%Dbq^AMiFkG~I%Uy;@?_{vTKs z338Czinb2tpYT(yq)iV~nx#e8ejsW@Q2HkdoLe&74pO^5tN-&5jp1E9o+s2?eEPv# zGe|yOy)E>2O}o^)T@PjU}-0H z6pujs(^m!ohdI^zm;wv9R^pQm6fUOvgK z%}h$n8?+v13j=d1p{y!z8WewuovXgArDw_S1ZUT~B(nfK4F-27zB(N!Vn zjh{Zyt|yqlj+`H;bvHo1!h4Pw*(P1ibYh0TOI&u}7WuI^kA+D@DA-9=LLg#J1Sj{N z-XtObQDCtASQzP1VU#-7oKCeQL9&*9GhW1zGP4Nnxjvm|dCq*Q9 zUf}oiGE7J!w#KVS7I}ir1NUP^D{=-z0}!H6YzXjKUQjm+%H-3M_8`_y_drIhkgrm3 zArzqa0z+o}_;en59|}HVjQ`bRjAJwOwW7@@q*o}saTyv4u82V>XTPtN6O0D2?$IQ9 zjT#qU4ZCSvJi-rfFBBH>Z?zV!!#Zx`7M1GWl z)3Mc)ba}oN3-H6#rG_NnM48t1-WFxoen0_xEe3%Cb^?Q_#L$U+slZr#sqRLZc!VE| zF+Z=dl<{{ja$M82gHk{Fu2MhwE>fRed{aD=@M!9f#oVUn*=`}9fBEvIbUt`)rMJCJ z@uJK%_Cm~toD5}cSJ7TaDefGeuX@wqfPv>!7YzBN! q?e#nRAJ+$XK(Aj8p6Xu}FQA0pS3xny_i19@RpBGWJ0*Lt2k>uIh6vXH literal 0 HcmV?d00001 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 new file mode 100644 index 000000000000..ddc545cd74ed --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/AcceleratorConfig.php @@ -0,0 +1,151 @@ +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-t4` + * * `projects/[project_id]/zones/[zone]/acceleratorTypes/nvidia-tesla-t4` + * * `nvidia-tesla-t4` + * **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-t4`. + * + * 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-t4` + * * `projects/[project_id]/zones/[zone]/acceleratorTypes/nvidia-tesla-t4` + * * `nvidia-tesla-t4` + * **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-t4`. + * @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-t4` + * * `projects/[project_id]/zones/[zone]/acceleratorTypes/nvidia-tesla-t4` + * * `nvidia-tesla-t4` + * **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-t4`. + * + * 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-t4` + * * `projects/[project_id]/zones/[zone]/acceleratorTypes/nvidia-tesla-t4` + * * `nvidia-tesla-t4` + * **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-t4`. + * + * 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 new file mode 100644 index 000000000000..14572342be6b --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/AutoscalingConfig.php @@ -0,0 +1,87 @@ +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 new file mode 100644 index 000000000000..09769d54f229 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/AutoscalingPolicy.php @@ -0,0 +1,324 @@ +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/AutotuningConfig.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/AutotuningConfig.php new file mode 100644 index 000000000000..f1d3fec86b7d --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/AutotuningConfig.php @@ -0,0 +1,67 @@ +google.cloud.dataproc.v1.AutotuningConfig + */ +class AutotuningConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Scenarios for which tunings are applied. + * + * Generated from protobuf field repeated .google.cloud.dataproc.v1.AutotuningConfig.Scenario scenarios = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $scenarios; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $scenarios + * Optional. Scenarios for which tunings are applied. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataproc\V1\Shared::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Scenarios for which tunings are applied. + * + * Generated from protobuf field repeated .google.cloud.dataproc.v1.AutotuningConfig.Scenario scenarios = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getScenarios() + { + return $this->scenarios; + } + + /** + * Optional. Scenarios for which tunings are applied. + * + * Generated from protobuf field repeated .google.cloud.dataproc.v1.AutotuningConfig.Scenario scenarios = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setScenarios($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Dataproc\V1\AutotuningConfig\Scenario::class); + $this->scenarios = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/AutotuningConfig/Scenario.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/AutotuningConfig/Scenario.php new file mode 100644 index 000000000000..a2249a38e36b --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/AutotuningConfig/Scenario.php @@ -0,0 +1,72 @@ +google.cloud.dataproc.v1.AutotuningConfig.Scenario + */ +class Scenario +{ + /** + * Default value. + * + * Generated from protobuf enum SCENARIO_UNSPECIFIED = 0; + */ + const SCENARIO_UNSPECIFIED = 0; + /** + * Scaling recommendations such as initialExecutors. + * + * Generated from protobuf enum SCALING = 2; + */ + const SCALING = 2; + /** + * Adding hints for potential relation broadcasts. + * + * Generated from protobuf enum BROADCAST_HASH_JOIN = 3; + */ + const BROADCAST_HASH_JOIN = 3; + /** + * Memory management for workloads. + * + * Generated from protobuf enum MEMORY = 4; + */ + const MEMORY = 4; + + private static $valueToName = [ + self::SCENARIO_UNSPECIFIED => 'SCENARIO_UNSPECIFIED', + self::SCALING => 'SCALING', + self::BROADCAST_HASH_JOIN => 'BROADCAST_HASH_JOIN', + self::MEMORY => 'MEMORY', + ]; + + 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(Scenario::class, \Google\Cloud\Dataproc\V1\AutotuningConfig_Scenario::class); + 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 new file mode 100644 index 000000000000..3ad500577c26 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/AuxiliaryNodeGroup.php @@ -0,0 +1,123 @@ +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 new file mode 100644 index 000000000000..ee5d549ff6e5 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/AuxiliaryServicesConfig.php @@ -0,0 +1,121 @@ +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 new file mode 100644 index 000000000000..17f45730410c --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/BasicAutoscalingAlgorithm.php @@ -0,0 +1,127 @@ +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 new file mode 100644 index 000000000000..e8bc82e70337 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/BasicYarnAutoscalingConfig.php @@ -0,0 +1,333 @@ +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 new file mode 100644 index 000000000000..d9001a4cb37a --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/Batch.php @@ -0,0 +1,698 @@ +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 new file mode 100644 index 000000000000..7c4844fe1a61 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/Batch/State.php @@ -0,0 +1,92 @@ +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 new file mode 100644 index 000000000000..d3028d266da5 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/Batch/StateHistory.php @@ -0,0 +1,148 @@ +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 new file mode 100644 index 000000000000..c3647cb58e14 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/BatchOperationMetadata.php @@ -0,0 +1,325 @@ +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 new file mode 100644 index 000000000000..0f59fea5709d --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/BatchOperationMetadata/BatchOperationType.php @@ -0,0 +1,57 @@ +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 new file mode 100644 index 000000000000..a563926f111a --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/CancelJobRequest.php @@ -0,0 +1,157 @@ +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 new file mode 100644 index 000000000000..258dd9380939 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/Cluster.php @@ -0,0 +1,472 @@ +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 new file mode 100644 index 000000000000..0e1c963c9a2e --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ClusterConfig.php @@ -0,0 +1,841 @@ +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 new file mode 100644 index 000000000000..a189db9bf529 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ClusterMetrics.php @@ -0,0 +1,103 @@ +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 new file mode 100644 index 000000000000..73c47e2fb46c --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ClusterOperation.php @@ -0,0 +1,135 @@ +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 new file mode 100644 index 000000000000..1b7c5cd9858a --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ClusterOperationMetadata.php @@ -0,0 +1,349 @@ +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 new file mode 100644 index 000000000000..cee3013511b6 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ClusterOperationStatus.php @@ -0,0 +1,179 @@ +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 new file mode 100644 index 000000000000..9e2131ca2a80 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ClusterOperationStatus/State.php @@ -0,0 +1,71 @@ +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 new file mode 100644 index 000000000000..cb91bc96ca40 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ClusterSelector.php @@ -0,0 +1,117 @@ +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 new file mode 100644 index 000000000000..917d1baa0510 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ClusterStatus.php @@ -0,0 +1,187 @@ +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 new file mode 100644 index 000000000000..9f05d75f830f --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ClusterStatus/State.php @@ -0,0 +1,124 @@ +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 new file mode 100644 index 000000000000..470978df8dca --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ClusterStatus/Substate.php @@ -0,0 +1,69 @@ +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 new file mode 100644 index 000000000000..765ac34f3243 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/Component.php @@ -0,0 +1,149 @@ +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 component is no longer supported or applicable to + * [supported Dataproc on Compute Engine image versions] + * (https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-version-clusters#supported-dataproc-image-versions). + * It cannot be activated on clusters created with supported Dataproc on + * Compute Engine image versions. + * + * 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 new file mode 100644 index 000000000000..dfd65edcbb0a --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ConfidentialInstanceConfig.php @@ -0,0 +1,72 @@ +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 new file mode 100644 index 000000000000..be90e29c436a --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/CreateAutoscalingPolicyRequest.php @@ -0,0 +1,164 @@ +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 new file mode 100644 index 000000000000..31df96ea6ed1 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/CreateBatchRequest.php @@ -0,0 +1,244 @@ +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 new file mode 100644 index 000000000000..2900a99c4bff --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/CreateClusterRequest.php @@ -0,0 +1,271 @@ +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 new file mode 100644 index 000000000000..e63d8691ba82 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/CreateNodeGroupRequest.php @@ -0,0 +1,254 @@ +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/CreateSessionRequest.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/CreateSessionRequest.php new file mode 100644 index 000000000000..83a61eeefbbd --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/CreateSessionRequest.php @@ -0,0 +1,249 @@ +google.cloud.dataproc.v1.CreateSessionRequest + */ +class CreateSessionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource where this session will be created. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The interactive session to create. + * + * Generated from protobuf field .google.cloud.dataproc.v1.Session session = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $session = null; + /** + * Required. The ID to use for the session, which becomes the final component + * of the session's resource name. + * This value must be 4-63 characters. Valid characters + * are /[a-z][0-9]-/. + * + * Generated from protobuf field string session_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $session_id = ''; + /** + * Optional. A unique ID used to identify the request. If the service + * receives two + * [CreateSessionRequests](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateSessionRequest)s + * with the same ID, the second request is ignored, and the + * first [Session][google.cloud.dataproc.v1.Session] is created and stored in + * the backend. + * 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 session will be created. Please see + * {@see SessionControllerClient::locationName()} for help formatting this field. + * @param \Google\Cloud\Dataproc\V1\Session $session Required. The interactive session to create. + * @param string $sessionId Required. The ID to use for the session, which becomes the final component + * of the session's resource name. + * + * This value must be 4-63 characters. Valid characters + * are /[a-z][0-9]-/. + * + * @return \Google\Cloud\Dataproc\V1\CreateSessionRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Dataproc\V1\Session $session, string $sessionId): self + { + return (new self()) + ->setParent($parent) + ->setSession($session) + ->setSessionId($sessionId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource where this session will be created. + * @type \Google\Cloud\Dataproc\V1\Session $session + * Required. The interactive session to create. + * @type string $session_id + * Required. The ID to use for the session, which becomes the final component + * of the session'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 + * [CreateSessionRequests](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateSessionRequest)s + * with the same ID, the second request is ignored, and the + * first [Session][google.cloud.dataproc.v1.Session] is created and stored in + * the backend. + * 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\Sessions::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource where this session 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 session 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 interactive session to create. + * + * Generated from protobuf field .google.cloud.dataproc.v1.Session session = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dataproc\V1\Session|null + */ + public function getSession() + { + return $this->session; + } + + public function hasSession() + { + return isset($this->session); + } + + public function clearSession() + { + unset($this->session); + } + + /** + * Required. The interactive session to create. + * + * Generated from protobuf field .google.cloud.dataproc.v1.Session session = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dataproc\V1\Session $var + * @return $this + */ + public function setSession($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\Session::class); + $this->session = $var; + + return $this; + } + + /** + * Required. The ID to use for the session, which becomes the final component + * of the session's resource name. + * This value must be 4-63 characters. Valid characters + * are /[a-z][0-9]-/. + * + * Generated from protobuf field string session_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSessionId() + { + return $this->session_id; + } + + /** + * Required. The ID to use for the session, which becomes the final component + * of the session's resource name. + * This value must be 4-63 characters. Valid characters + * are /[a-z][0-9]-/. + * + * Generated from protobuf field string session_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSessionId($var) + { + GPBUtil::checkString($var, True); + $this->session_id = $var; + + return $this; + } + + /** + * Optional. A unique ID used to identify the request. If the service + * receives two + * [CreateSessionRequests](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateSessionRequest)s + * with the same ID, the second request is ignored, and the + * first [Session][google.cloud.dataproc.v1.Session] is created and stored in + * the backend. + * 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 + * [CreateSessionRequests](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateSessionRequest)s + * with the same ID, the second request is ignored, and the + * first [Session][google.cloud.dataproc.v1.Session] is created and stored in + * the backend. + * 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/CreateSessionTemplateRequest.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/CreateSessionTemplateRequest.php new file mode 100644 index 000000000000..424d788d922b --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/CreateSessionTemplateRequest.php @@ -0,0 +1,127 @@ +google.cloud.dataproc.v1.CreateSessionTemplateRequest + */ +class CreateSessionTemplateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource where this session template will be created. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The session template to create. + * + * Generated from protobuf field .google.cloud.dataproc.v1.SessionTemplate session_template = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $session_template = null; + + /** + * @param string $parent Required. The parent resource where this session template will be created. Please see + * {@see SessionTemplateControllerClient::locationName()} for help formatting this field. + * @param \Google\Cloud\Dataproc\V1\SessionTemplate $sessionTemplate Required. The session template to create. + * + * @return \Google\Cloud\Dataproc\V1\CreateSessionTemplateRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Dataproc\V1\SessionTemplate $sessionTemplate): self + { + return (new self()) + ->setParent($parent) + ->setSessionTemplate($sessionTemplate); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource where this session template will be created. + * @type \Google\Cloud\Dataproc\V1\SessionTemplate $session_template + * Required. The session template to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataproc\V1\SessionTemplates::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource where this session template 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 session template 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 session template to create. + * + * Generated from protobuf field .google.cloud.dataproc.v1.SessionTemplate session_template = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dataproc\V1\SessionTemplate|null + */ + public function getSessionTemplate() + { + return $this->session_template; + } + + public function hasSessionTemplate() + { + return isset($this->session_template); + } + + public function clearSessionTemplate() + { + unset($this->session_template); + } + + /** + * Required. The session template to create. + * + * Generated from protobuf field .google.cloud.dataproc.v1.SessionTemplate session_template = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dataproc\V1\SessionTemplate $var + * @return $this + */ + public function setSessionTemplate($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\SessionTemplate::class); + $this->session_template = $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 new file mode 100644 index 000000000000..90662856daac --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/CreateWorkflowTemplateRequest.php @@ -0,0 +1,164 @@ +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 new file mode 100644 index 000000000000..1470fdd1d000 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DataprocMetricConfig.php @@ -0,0 +1,67 @@ +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 new file mode 100644 index 000000000000..0e48ce2b953c --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DataprocMetricConfig/Metric.php @@ -0,0 +1,208 @@ +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 new file mode 100644 index 000000000000..116faf661c8f --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DataprocMetricConfig/MetricSource.php @@ -0,0 +1,111 @@ +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; + /** + * flink metric source + * + * Generated from protobuf enum FLINK = 8; + */ + const FLINK = 8; + + 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', + self::FLINK => 'FLINK', + ]; + + 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 new file mode 100644 index 000000000000..e1e82a759018 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DeleteAutoscalingPolicyRequest.php @@ -0,0 +1,119 @@ +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 new file mode 100644 index 000000000000..4d6d9dc486e4 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DeleteBatchRequest.php @@ -0,0 +1,91 @@ +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 new file mode 100644 index 000000000000..5b6ece38a4eb --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DeleteClusterRequest.php @@ -0,0 +1,265 @@ +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 new file mode 100644 index 000000000000..ea842f7a1560 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DeleteJobRequest.php @@ -0,0 +1,157 @@ +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/DeleteSessionRequest.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DeleteSessionRequest.php new file mode 100644 index 000000000000..f19d7dbcdeab --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DeleteSessionRequest.php @@ -0,0 +1,143 @@ +google.cloud.dataproc.v1.DeleteSessionRequest + */ +class DeleteSessionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the session resource to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. A unique ID used to identify the request. If the service + * receives two + * [DeleteSessionRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.DeleteSessionRequest)s + * with the same ID, the second request is ignored. + * 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 = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $name Required. The name of the session resource to delete. Please see + * {@see SessionControllerClient::sessionName()} for help formatting this field. + * + * @return \Google\Cloud\Dataproc\V1\DeleteSessionRequest + * + * @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 session resource to delete. + * @type string $request_id + * Optional. A unique ID used to identify the request. If the service + * receives two + * [DeleteSessionRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.DeleteSessionRequest)s + * with the same ID, the second request is ignored. + * 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\Sessions::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the session resource to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the session resource to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. A unique ID used to identify the request. If the service + * receives two + * [DeleteSessionRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.DeleteSessionRequest)s + * with the same ID, the second request is ignored. + * 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 = 2 [(.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 + * [DeleteSessionRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.DeleteSessionRequest)s + * with the same ID, the second request is ignored. + * 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 = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DeleteSessionTemplateRequest.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DeleteSessionTemplateRequest.php new file mode 100644 index 000000000000..f8ca8aee34e9 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DeleteSessionTemplateRequest.php @@ -0,0 +1,81 @@ +google.cloud.dataproc.v1.DeleteSessionTemplateRequest + */ +class DeleteSessionTemplateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the session template resource to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the session template resource to delete. Please see + * {@see SessionTemplateControllerClient::sessionTemplateName()} for help formatting this field. + * + * @return \Google\Cloud\Dataproc\V1\DeleteSessionTemplateRequest + * + * @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 session template resource to delete. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataproc\V1\SessionTemplates::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the session template resource to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the session template resource to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DeleteWorkflowTemplateRequest.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DeleteWorkflowTemplateRequest.php new file mode 100644 index 000000000000..4443408e2596 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DeleteWorkflowTemplateRequest.php @@ -0,0 +1,161 @@ +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 new file mode 100644 index 000000000000..27c9e44900e7 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DiagnoseClusterRequest.php @@ -0,0 +1,361 @@ +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. (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. (Optional) The access type to the diagnostic tarball. If not + * specified, falls back to default access of the bucket + * + * Generated from protobuf field .google.cloud.dataproc.v1.DiagnoseClusterRequest.TarballAccess tarball_access = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $tarball_access = 0; + /** + * 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. (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 int $tarball_access + * Optional. (Optional) The access type to the diagnostic tarball. If not + * specified, falls back to default access of the bucket + * @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. (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. (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. (Optional) The access type to the diagnostic tarball. If not + * specified, falls back to default access of the bucket + * + * Generated from protobuf field .google.cloud.dataproc.v1.DiagnoseClusterRequest.TarballAccess tarball_access = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getTarballAccess() + { + return $this->tarball_access; + } + + /** + * Optional. (Optional) The access type to the diagnostic tarball. If not + * specified, falls back to default access of the bucket + * + * Generated from protobuf field .google.cloud.dataproc.v1.DiagnoseClusterRequest.TarballAccess tarball_access = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setTarballAccess($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataproc\V1\DiagnoseClusterRequest\TarballAccess::class); + $this->tarball_access = $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/DiagnoseClusterRequest/TarballAccess.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DiagnoseClusterRequest/TarballAccess.php new file mode 100644 index 000000000000..e65b0ec95e59 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DiagnoseClusterRequest/TarballAccess.php @@ -0,0 +1,66 @@ +google.cloud.dataproc.v1.DiagnoseClusterRequest.TarballAccess + */ +class TarballAccess +{ + /** + * Tarball Access unspecified. Falls back to default access of the bucket + * + * Generated from protobuf enum TARBALL_ACCESS_UNSPECIFIED = 0; + */ + const TARBALL_ACCESS_UNSPECIFIED = 0; + /** + * Google Cloud Support group has read access to the + * diagnostic tarball + * + * Generated from protobuf enum GOOGLE_CLOUD_SUPPORT = 1; + */ + const GOOGLE_CLOUD_SUPPORT = 1; + /** + * Google Cloud Dataproc Diagnose service account has read access to the + * diagnostic tarball + * + * Generated from protobuf enum GOOGLE_DATAPROC_DIAGNOSE = 2; + */ + const GOOGLE_DATAPROC_DIAGNOSE = 2; + + private static $valueToName = [ + self::TARBALL_ACCESS_UNSPECIFIED => 'TARBALL_ACCESS_UNSPECIFIED', + self::GOOGLE_CLOUD_SUPPORT => 'GOOGLE_CLOUD_SUPPORT', + self::GOOGLE_DATAPROC_DIAGNOSE => 'GOOGLE_DATAPROC_DIAGNOSE', + ]; + + 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(TarballAccess::class, \Google\Cloud\Dataproc\V1\DiagnoseClusterRequest_TarballAccess::class); + 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 new file mode 100644 index 000000000000..c94fe3379a9f --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DiagnoseClusterResults.php @@ -0,0 +1,75 @@ +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 new file mode 100644 index 000000000000..23f3a85cd58b --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DiskConfig.php @@ -0,0 +1,229 @@ +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 new file mode 100644 index 000000000000..413acffe2aa7 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DriverSchedulingConfig.php @@ -0,0 +1,101 @@ +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 new file mode 100644 index 000000000000..cbd06d6f50a0 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/EncryptionConfig.php @@ -0,0 +1,209 @@ +google.cloud.dataproc.v1.EncryptionConfig + */ +class EncryptionConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The Cloud KMS key resource name to use for persistent disk + * encryption for all instances in the cluster. See [Use CMEK with cluster + * data] + * (https://cloud.google.com//dataproc/docs/concepts/configuring-clusters/customer-managed-encryption#use_cmek_with_cluster_data) + * for more information. + * + * Generated from protobuf field string gce_pd_kms_key_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $gce_pd_kms_key_name = ''; + /** + * Optional. The Cloud KMS key resource name to use for cluster persistent + * disk and job argument encryption. See [Use CMEK with cluster data] + * (https://cloud.google.com//dataproc/docs/concepts/configuring-clusters/customer-managed-encryption#use_cmek_with_cluster_data) + * for more information. + * When this key resource name is provided, the following job arguments of + * the following job types submitted to the cluster are encrypted using CMEK: + * * [FlinkJob + * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/FlinkJob) + * * [HadoopJob + * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/HadoopJob) + * * [SparkJob + * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/SparkJob) + * * [SparkRJob + * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/SparkRJob) + * * [PySparkJob + * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/PySparkJob) + * * [SparkSqlJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/SparkSqlJob) + * scriptVariables and queryList.queries + * * [HiveJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/HiveJob) + * scriptVariables and queryList.queries + * * [PigJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/PigJob) + * scriptVariables and queryList.queries + * * [PrestoJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/PrestoJob) + * scriptVariables and queryList.queries + * + * Generated from protobuf field string kms_key = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $kms_key = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $gce_pd_kms_key_name + * Optional. The Cloud KMS key resource name to use for persistent disk + * encryption for all instances in the cluster. See [Use CMEK with cluster + * data] + * (https://cloud.google.com//dataproc/docs/concepts/configuring-clusters/customer-managed-encryption#use_cmek_with_cluster_data) + * for more information. + * @type string $kms_key + * Optional. The Cloud KMS key resource name to use for cluster persistent + * disk and job argument encryption. See [Use CMEK with cluster data] + * (https://cloud.google.com//dataproc/docs/concepts/configuring-clusters/customer-managed-encryption#use_cmek_with_cluster_data) + * for more information. + * When this key resource name is provided, the following job arguments of + * the following job types submitted to the cluster are encrypted using CMEK: + * * [FlinkJob + * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/FlinkJob) + * * [HadoopJob + * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/HadoopJob) + * * [SparkJob + * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/SparkJob) + * * [SparkRJob + * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/SparkRJob) + * * [PySparkJob + * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/PySparkJob) + * * [SparkSqlJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/SparkSqlJob) + * scriptVariables and queryList.queries + * * [HiveJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/HiveJob) + * scriptVariables and queryList.queries + * * [PigJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/PigJob) + * scriptVariables and queryList.queries + * * [PrestoJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/PrestoJob) + * scriptVariables and queryList.queries + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataproc\V1\Clusters::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The Cloud KMS key resource name to use for persistent disk + * encryption for all instances in the cluster. See [Use CMEK with cluster + * data] + * (https://cloud.google.com//dataproc/docs/concepts/configuring-clusters/customer-managed-encryption#use_cmek_with_cluster_data) + * for more information. + * + * 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 resource name to use for persistent disk + * encryption for all instances in the cluster. See [Use CMEK with cluster + * data] + * (https://cloud.google.com//dataproc/docs/concepts/configuring-clusters/customer-managed-encryption#use_cmek_with_cluster_data) + * for more information. + * + * 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; + } + + /** + * Optional. The Cloud KMS key resource name to use for cluster persistent + * disk and job argument encryption. See [Use CMEK with cluster data] + * (https://cloud.google.com//dataproc/docs/concepts/configuring-clusters/customer-managed-encryption#use_cmek_with_cluster_data) + * for more information. + * When this key resource name is provided, the following job arguments of + * the following job types submitted to the cluster are encrypted using CMEK: + * * [FlinkJob + * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/FlinkJob) + * * [HadoopJob + * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/HadoopJob) + * * [SparkJob + * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/SparkJob) + * * [SparkRJob + * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/SparkRJob) + * * [PySparkJob + * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/PySparkJob) + * * [SparkSqlJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/SparkSqlJob) + * scriptVariables and queryList.queries + * * [HiveJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/HiveJob) + * scriptVariables and queryList.queries + * * [PigJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/PigJob) + * scriptVariables and queryList.queries + * * [PrestoJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/PrestoJob) + * scriptVariables and queryList.queries + * + * Generated from protobuf field string kms_key = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getKmsKey() + { + return $this->kms_key; + } + + /** + * Optional. The Cloud KMS key resource name to use for cluster persistent + * disk and job argument encryption. See [Use CMEK with cluster data] + * (https://cloud.google.com//dataproc/docs/concepts/configuring-clusters/customer-managed-encryption#use_cmek_with_cluster_data) + * for more information. + * When this key resource name is provided, the following job arguments of + * the following job types submitted to the cluster are encrypted using CMEK: + * * [FlinkJob + * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/FlinkJob) + * * [HadoopJob + * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/HadoopJob) + * * [SparkJob + * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/SparkJob) + * * [SparkRJob + * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/SparkRJob) + * * [PySparkJob + * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/PySparkJob) + * * [SparkSqlJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/SparkSqlJob) + * scriptVariables and queryList.queries + * * [HiveJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/HiveJob) + * scriptVariables and queryList.queries + * * [PigJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/PigJob) + * scriptVariables and queryList.queries + * * [PrestoJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/PrestoJob) + * scriptVariables and queryList.queries + * + * Generated from protobuf field string kms_key = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setKmsKey($var) + { + GPBUtil::checkString($var, True); + $this->kms_key = $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 new file mode 100644 index 000000000000..e03e28038d56 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/EndpointConfig.php @@ -0,0 +1,109 @@ +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 new file mode 100644 index 000000000000..7e55d7043f3c --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/EnvironmentConfig.php @@ -0,0 +1,121 @@ +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 new file mode 100644 index 000000000000..8b9b5e6a69f4 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ExecutionConfig.php @@ -0,0 +1,448 @@ +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. Applies to sessions only. The duration to keep the session alive + * while it's idling. Exceeding this threshold causes the session to + * terminate. This field cannot be set on a batch workload. Minimum value is + * 10 minutes; maximum value is 14 days (see JSON representation of + * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). + * Defaults to 1 hour if not set. + * If both `ttl` and `idle_ttl` are specified for an interactive session, + * the conditions are treated as `OR` conditions: the workload will be + * terminated when it has been idle for `idle_ttl` or when `ttl` has been + * exceeded, whichever occurs first. + * + * Generated from protobuf field .google.protobuf.Duration idle_ttl = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $idle_ttl = null; + /** + * Optional. The duration after which the workload will be terminated, + * specified as the JSON representation for + * [Duration](https://protobuf.dev/programming-guides/proto3/#json). + * When the workload exceeds this duration, it will be unconditionally + * terminated without waiting for ongoing work to finish. If `ttl` is not + * specified for a batch workload, the workload will be allowed to run until + * it exits naturally (or run forever without exiting). If `ttl` is not + * specified for an interactive session, it defaults to 24 hours. If `ttl` is + * not specified for a batch that uses 2.1+ runtime version, it defaults to 4 + * hours. Minimum value is 10 minutes; maximum value is 14 days. If both `ttl` + * and `idle_ttl` are specified (for an interactive session), the conditions + * are treated as `OR` conditions: the workload will be terminated when it has + * been idle for `idle_ttl` or when `ttl` has been exceeded, whichever occurs + * first. + * + * 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 $idle_ttl + * Optional. Applies to sessions only. The duration to keep the session alive + * while it's idling. Exceeding this threshold causes the session to + * terminate. This field cannot be set on a batch workload. Minimum value is + * 10 minutes; maximum value is 14 days (see JSON representation of + * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). + * Defaults to 1 hour if not set. + * If both `ttl` and `idle_ttl` are specified for an interactive session, + * the conditions are treated as `OR` conditions: the workload will be + * terminated when it has been idle for `idle_ttl` or when `ttl` has been + * exceeded, whichever occurs first. + * @type \Google\Protobuf\Duration $ttl + * Optional. The duration after which the workload will be terminated, + * specified as the JSON representation for + * [Duration](https://protobuf.dev/programming-guides/proto3/#json). + * When the workload exceeds this duration, it will be unconditionally + * terminated without waiting for ongoing work to finish. If `ttl` is not + * specified for a batch workload, the workload will be allowed to run until + * it exits naturally (or run forever without exiting). If `ttl` is not + * specified for an interactive session, it defaults to 24 hours. If `ttl` is + * not specified for a batch that uses 2.1+ runtime version, it defaults to 4 + * hours. Minimum value is 10 minutes; maximum value is 14 days. If both `ttl` + * and `idle_ttl` are specified (for an interactive session), the conditions + * are treated as `OR` conditions: the workload will be terminated when it has + * been idle for `idle_ttl` or when `ttl` has been exceeded, whichever occurs + * first. + * @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. Applies to sessions only. The duration to keep the session alive + * while it's idling. Exceeding this threshold causes the session to + * terminate. This field cannot be set on a batch workload. Minimum value is + * 10 minutes; maximum value is 14 days (see JSON representation of + * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). + * Defaults to 1 hour if not set. + * If both `ttl` and `idle_ttl` are specified for an interactive session, + * the conditions are treated as `OR` conditions: the workload will be + * terminated when it has been idle for `idle_ttl` or when `ttl` has been + * exceeded, whichever occurs first. + * + * Generated from protobuf field .google.protobuf.Duration idle_ttl = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Duration|null + */ + public function getIdleTtl() + { + return $this->idle_ttl; + } + + public function hasIdleTtl() + { + return isset($this->idle_ttl); + } + + public function clearIdleTtl() + { + unset($this->idle_ttl); + } + + /** + * Optional. Applies to sessions only. The duration to keep the session alive + * while it's idling. Exceeding this threshold causes the session to + * terminate. This field cannot be set on a batch workload. Minimum value is + * 10 minutes; maximum value is 14 days (see JSON representation of + * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). + * Defaults to 1 hour if not set. + * If both `ttl` and `idle_ttl` are specified for an interactive session, + * the conditions are treated as `OR` conditions: the workload will be + * terminated when it has been idle for `idle_ttl` or when `ttl` has been + * exceeded, whichever occurs first. + * + * Generated from protobuf field .google.protobuf.Duration idle_ttl = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setIdleTtl($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->idle_ttl = $var; + + return $this; + } + + /** + * Optional. The duration after which the workload will be terminated, + * specified as the JSON representation for + * [Duration](https://protobuf.dev/programming-guides/proto3/#json). + * When the workload exceeds this duration, it will be unconditionally + * terminated without waiting for ongoing work to finish. If `ttl` is not + * specified for a batch workload, the workload will be allowed to run until + * it exits naturally (or run forever without exiting). If `ttl` is not + * specified for an interactive session, it defaults to 24 hours. If `ttl` is + * not specified for a batch that uses 2.1+ runtime version, it defaults to 4 + * hours. Minimum value is 10 minutes; maximum value is 14 days. If both `ttl` + * and `idle_ttl` are specified (for an interactive session), the conditions + * are treated as `OR` conditions: the workload will be terminated when it has + * been idle for `idle_ttl` or when `ttl` has been exceeded, whichever occurs + * first. + * + * 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, + * specified as the JSON representation for + * [Duration](https://protobuf.dev/programming-guides/proto3/#json). + * When the workload exceeds this duration, it will be unconditionally + * terminated without waiting for ongoing work to finish. If `ttl` is not + * specified for a batch workload, the workload will be allowed to run until + * it exits naturally (or run forever without exiting). If `ttl` is not + * specified for an interactive session, it defaults to 24 hours. If `ttl` is + * not specified for a batch that uses 2.1+ runtime version, it defaults to 4 + * hours. Minimum value is 10 minutes; maximum value is 14 days. If both `ttl` + * and `idle_ttl` are specified (for an interactive session), the conditions + * are treated as `OR` conditions: the workload will be terminated when it has + * been idle for `idle_ttl` or when `ttl` has been exceeded, whichever occurs + * first. + * + * 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 new file mode 100644 index 000000000000..6a74c8aaacfc --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/FailureAction.php @@ -0,0 +1,62 @@ +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/FlinkJob.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/FlinkJob.php new file mode 100644 index 000000000000..2ff8f95df78c --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/FlinkJob.php @@ -0,0 +1,322 @@ +google.cloud.dataproc.v1.FlinkJob + */ +class FlinkJob 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 + * might 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 + * Flink driver and tasks. + * + * Generated from protobuf field repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $jar_file_uris; + /** + * Optional. HCFS URI of the savepoint, which contains the last saved progress + * for starting the current job. + * + * Generated from protobuf field string savepoint_uri = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $savepoint_uri = ''; + /** + * Optional. A mapping of property names to values, used to configure Flink. + * Properties that conflict with values set by the Dataproc API might be + * overwritten. Can include properties set in + * `/etc/flink/conf/flink-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 + * [jarFileUris][google.cloud.dataproc.v1.FlinkJob.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 + * might 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 + * Flink driver and tasks. + * @type string $savepoint_uri + * Optional. HCFS URI of the savepoint, which contains the last saved progress + * for starting the current job. + * @type array|\Google\Protobuf\Internal\MapField $properties + * Optional. A mapping of property names to values, used to configure Flink. + * Properties that conflict with values set by the Dataproc API might be + * overwritten. Can include properties set in + * `/etc/flink/conf/flink-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 + * [jarFileUris][google.cloud.dataproc.v1.FlinkJob.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 + * [jarFileUris][google.cloud.dataproc.v1.FlinkJob.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 + * might 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 + * might 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 + * Flink 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 + * Flink 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 URI of the savepoint, which contains the last saved progress + * for starting the current job. + * + * Generated from protobuf field string savepoint_uri = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getSavepointUri() + { + return $this->savepoint_uri; + } + + /** + * Optional. HCFS URI of the savepoint, which contains the last saved progress + * for starting the current job. + * + * Generated from protobuf field string savepoint_uri = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setSavepointUri($var) + { + GPBUtil::checkString($var, True); + $this->savepoint_uri = $var; + + return $this; + } + + /** + * Optional. A mapping of property names to values, used to configure Flink. + * Properties that conflict with values set by the Dataproc API might be + * overwritten. Can include properties set in + * `/etc/flink/conf/flink-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 Flink. + * Properties that conflict with values set by the Dataproc API might be + * overwritten. Can include properties set in + * `/etc/flink/conf/flink-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/GceClusterConfig.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GceClusterConfig.php new file mode 100644 index 000000000000..a3a2964165e4 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GceClusterConfig.php @@ -0,0 +1,750 @@ +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. This setting applies to subnetwork-enabled networks. It is set to + * `true` by default in clusters created with image versions 2.2.x. + * When set to `true`: + * * All cluster VMs have internal IP addresses. + * * [Google Private Access] + * (https://cloud.google.com/vpc/docs/private-google-access) + * must be enabled to access Dataproc and other Google Cloud APIs. + * * Off-cluster dependencies must be configured to be accessible + * without external IP addresses. + * When set to `false`: + * * Cluster VMs are not restricted to internal IP addresses. + * * Ephemeral external IP addresses are assigned to each cluster VM. + * + * 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 network tags to add to all instances (see [Tagging + * instances](https://cloud.google.com/vpc/docs/add-remove-network-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. This setting applies to subnetwork-enabled networks. It is set to + * `true` by default in clusters created with image versions 2.2.x. + * When set to `true`: + * * All cluster VMs have internal IP addresses. + * * [Google Private Access] + * (https://cloud.google.com/vpc/docs/private-google-access) + * must be enabled to access Dataproc and other Google Cloud APIs. + * * Off-cluster dependencies must be configured to be accessible + * without external IP addresses. + * When set to `false`: + * * Cluster VMs are not restricted to internal IP addresses. + * * Ephemeral external IP addresses are assigned to each cluster VM. + * @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 network tags to add to all instances (see [Tagging + * instances](https://cloud.google.com/vpc/docs/add-remove-network-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. This setting applies to subnetwork-enabled networks. It is set to + * `true` by default in clusters created with image versions 2.2.x. + * When set to `true`: + * * All cluster VMs have internal IP addresses. + * * [Google Private Access] + * (https://cloud.google.com/vpc/docs/private-google-access) + * must be enabled to access Dataproc and other Google Cloud APIs. + * * Off-cluster dependencies must be configured to be accessible + * without external IP addresses. + * When set to `false`: + * * Cluster VMs are not restricted to internal IP addresses. + * * Ephemeral external IP addresses are assigned to each cluster VM. + * + * 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. This setting applies to subnetwork-enabled networks. It is set to + * `true` by default in clusters created with image versions 2.2.x. + * When set to `true`: + * * All cluster VMs have internal IP addresses. + * * [Google Private Access] + * (https://cloud.google.com/vpc/docs/private-google-access) + * must be enabled to access Dataproc and other Google Cloud APIs. + * * Off-cluster dependencies must be configured to be accessible + * without external IP addresses. + * When set to `false`: + * * Cluster VMs are not restricted to internal IP addresses. + * * Ephemeral external IP addresses are assigned to each cluster VM. + * + * 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 network tags to add to all instances (see [Tagging + * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)). + * + * Generated from protobuf field repeated string tags = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTags() + { + return $this->tags; + } + + /** + * The Compute Engine network tags to add to all instances (see [Tagging + * instances](https://cloud.google.com/vpc/docs/add-remove-network-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 new file mode 100644 index 000000000000..5299b26dbe18 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GceClusterConfig/PrivateIpv6GoogleAccess.php @@ -0,0 +1,81 @@ +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 new file mode 100644 index 000000000000..bd24daba7580 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GetAutoscalingPolicyRequest.php @@ -0,0 +1,118 @@ +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 new file mode 100644 index 000000000000..539e529523b8 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GetBatchRequest.php @@ -0,0 +1,91 @@ +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 new file mode 100644 index 000000000000..987be48cf26b --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GetClusterRequest.php @@ -0,0 +1,157 @@ +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 new file mode 100644 index 000000000000..80b65f8ad5df --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GetJobRequest.php @@ -0,0 +1,157 @@ +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 new file mode 100644 index 000000000000..d2cb6179dbc3 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GetNodeGroupRequest.php @@ -0,0 +1,91 @@ +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/GetSessionRequest.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GetSessionRequest.php new file mode 100644 index 000000000000..c1b62a9bb571 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GetSessionRequest.php @@ -0,0 +1,81 @@ +google.cloud.dataproc.v1.GetSessionRequest + */ +class GetSessionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the session to retrieve. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the session to retrieve. Please see + * {@see SessionControllerClient::sessionName()} for help formatting this field. + * + * @return \Google\Cloud\Dataproc\V1\GetSessionRequest + * + * @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 session to retrieve. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataproc\V1\Sessions::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the session to retrieve. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the session to retrieve. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GetSessionTemplateRequest.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GetSessionTemplateRequest.php new file mode 100644 index 000000000000..e466caf200df --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GetSessionTemplateRequest.php @@ -0,0 +1,81 @@ +google.cloud.dataproc.v1.GetSessionTemplateRequest + */ +class GetSessionTemplateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the session template to retrieve. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the session template to retrieve. Please see + * {@see SessionTemplateControllerClient::sessionTemplateName()} for help formatting this field. + * + * @return \Google\Cloud\Dataproc\V1\GetSessionTemplateRequest + * + * @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 session template to retrieve. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataproc\V1\SessionTemplates::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the session template to retrieve. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the session template to retrieve. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GetWorkflowTemplateRequest.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GetWorkflowTemplateRequest.php new file mode 100644 index 000000000000..3206da406307 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GetWorkflowTemplateRequest.php @@ -0,0 +1,160 @@ +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 new file mode 100644 index 000000000000..42bd2b4175f2 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GkeClusterConfig.php @@ -0,0 +1,133 @@ +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 new file mode 100644 index 000000000000..590789b7e922 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GkeNodePoolConfig.php @@ -0,0 +1,192 @@ +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 new file mode 100644 index 000000000000..a3eb6f4595af --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GkeNodePoolConfig/GkeNodeConfig.php @@ -0,0 +1,398 @@ +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 new file mode 100644 index 000000000000..fdf2da66f5b1 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GkeNodePoolConfig/GkeNodePoolAcceleratorConfig.php @@ -0,0 +1,147 @@ +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 new file mode 100644 index 000000000000..b62f05b4c3db --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GkeNodePoolConfig/GkeNodePoolAutoscalingConfig.php @@ -0,0 +1,117 @@ +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 new file mode 100644 index 000000000000..3f4f9f452c4f --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GkeNodePoolTarget.php @@ -0,0 +1,185 @@ +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 new file mode 100644 index 000000000000..c6fe2d439dce --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GkeNodePoolTarget/Role.php @@ -0,0 +1,91 @@ +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 new file mode 100644 index 000000000000..71599754da5a --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/HadoopJob.php @@ -0,0 +1,385 @@ +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 might 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 might 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 might 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 might 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 might 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 might 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 might 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 might 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 new file mode 100644 index 000000000000..e607c9431397 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/HiveJob.php @@ -0,0 +1,277 @@ +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 might 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 might 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 might 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 might 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 new file mode 100644 index 000000000000..d733c1071b3f --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/IdentityConfig.php @@ -0,0 +1,68 @@ +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 new file mode 100644 index 000000000000..60e39ca8fc1d --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/InstanceFlexibilityPolicy.php @@ -0,0 +1,106 @@ +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 new file mode 100644 index 000000000000..4af40360b8fb --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/InstanceFlexibilityPolicy/InstanceSelection.php @@ -0,0 +1,120 @@ +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 new file mode 100644 index 000000000000..66834be9c204 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/InstanceFlexibilityPolicy/InstanceSelectionResult.php @@ -0,0 +1,125 @@ +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 new file mode 100644 index 000000000000..4e3adafefd96 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/InstanceGroupAutoscalingPolicyConfig.php @@ -0,0 +1,220 @@ +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 new file mode 100644 index 000000000000..a101ccec8866 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/InstanceGroupConfig.php @@ -0,0 +1,746 @@ +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; + /** + * Optional. Configuration to handle the startup of instances during cluster + * create and update process. + * + * Generated from protobuf field .google.cloud.dataproc.v1.StartupConfig startup_config = 14 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $startup_config = 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. + * @type \Google\Cloud\Dataproc\V1\StartupConfig $startup_config + * Optional. Configuration to handle the startup of instances during cluster + * create and update process. + * } + */ + 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; + } + + /** + * Optional. Configuration to handle the startup of instances during cluster + * create and update process. + * + * Generated from protobuf field .google.cloud.dataproc.v1.StartupConfig startup_config = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dataproc\V1\StartupConfig|null + */ + public function getStartupConfig() + { + return $this->startup_config; + } + + public function hasStartupConfig() + { + return isset($this->startup_config); + } + + public function clearStartupConfig() + { + unset($this->startup_config); + } + + /** + * Optional. Configuration to handle the startup of instances during cluster + * create and update process. + * + * Generated from protobuf field .google.cloud.dataproc.v1.StartupConfig startup_config = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dataproc\V1\StartupConfig $var + * @return $this + */ + public function setStartupConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\StartupConfig::class); + $this->startup_config = $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 new file mode 100644 index 000000000000..cf790907d9c7 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/InstanceGroupConfig/Preemptibility.php @@ -0,0 +1,84 @@ +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 new file mode 100644 index 000000000000..7b4c3ce1d828 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/InstanceReference.php @@ -0,0 +1,169 @@ +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 new file mode 100644 index 000000000000..5fe1c1f4f0e2 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/InstantiateInlineWorkflowTemplateRequest.php @@ -0,0 +1,222 @@ +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 new file mode 100644 index 000000000000..a8aacd6befb4 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/InstantiateWorkflowTemplateRequest.php @@ -0,0 +1,290 @@ +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 new file mode 100644 index 000000000000..e9ce2e8354f5 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/Job.php @@ -0,0 +1,918 @@ +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 might 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 + * might 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 can be used as part of job setup and handling. If not present, + * control files might 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** can 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 + * might 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\FlinkJob $flink_job + * Optional. Job is a Flink job. + * @type \Google\Cloud\Dataproc\V1\JobStatus $status + * Output only. The job status. Additional application-specific + * status information might 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 + * might 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 can be used as part of job setup and handling. If not present, + * control files might 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** can 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 + * might 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; + } + + /** + * Optional. Job is a Flink job. + * + * Generated from protobuf field .google.cloud.dataproc.v1.FlinkJob flink_job = 29 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dataproc\V1\FlinkJob|null + */ + public function getFlinkJob() + { + return $this->readOneof(29); + } + + public function hasFlinkJob() + { + return $this->hasOneof(29); + } + + /** + * Optional. Job is a Flink job. + * + * Generated from protobuf field .google.cloud.dataproc.v1.FlinkJob flink_job = 29 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dataproc\V1\FlinkJob $var + * @return $this + */ + public function setFlinkJob($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\FlinkJob::class); + $this->writeOneof(29, $var); + + return $this; + } + + /** + * Output only. The job status. Additional application-specific + * status information might 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 might 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 + * might 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 + * might 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 can be used as part of job setup and handling. If not present, + * control files might 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 can be used as part of job setup and handling. If not present, + * control files might 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** can 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** can 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 + * might 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 + * might 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 new file mode 100644 index 000000000000..f7c0393acb88 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/JobMetadata.php @@ -0,0 +1,189 @@ +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 new file mode 100644 index 000000000000..3e2f3be0343a --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/JobPlacement.php @@ -0,0 +1,143 @@ +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 new file mode 100644 index 000000000000..97004c388e88 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/JobReference.php @@ -0,0 +1,117 @@ +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 new file mode 100644 index 000000000000..a7499e413e7e --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/JobScheduling.php @@ -0,0 +1,161 @@ +google.cloud.dataproc.v1.JobScheduling + */ +class JobScheduling extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Maximum number of times per hour a driver can be restarted as + * a result of driver exiting with non-zero code before job is + * reported failed. + * A job might 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 can 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 can be restarted as + * a result of driver exiting with non-zero code before job is + * reported failed. + * A job might 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 can 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 can be restarted as + * a result of driver exiting with non-zero code before job is + * reported failed. + * A job might 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 can be restarted as + * a result of driver exiting with non-zero code before job is + * reported failed. + * A job might 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 can 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 can 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 new file mode 100644 index 000000000000..aaabdd201ad0 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/JobStatus.php @@ -0,0 +1,187 @@ +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 new file mode 100644 index 000000000000..1a9412ce3527 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/JobStatus/State.php @@ -0,0 +1,117 @@ +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 new file mode 100644 index 000000000000..5e435eeb041f --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/JobStatus/Substate.php @@ -0,0 +1,78 @@ +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 might 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 can 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/JupyterConfig.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/JupyterConfig.php new file mode 100644 index 000000000000..7893b56c9256 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/JupyterConfig.php @@ -0,0 +1,101 @@ +google.cloud.dataproc.v1.JupyterConfig + */ +class JupyterConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Kernel + * + * Generated from protobuf field .google.cloud.dataproc.v1.JupyterConfig.Kernel kernel = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $kernel = 0; + /** + * Optional. Display name, shown in the Jupyter kernelspec card. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $display_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $kernel + * Optional. Kernel + * @type string $display_name + * Optional. Display name, shown in the Jupyter kernelspec card. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataproc\V1\Sessions::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Kernel + * + * Generated from protobuf field .google.cloud.dataproc.v1.JupyterConfig.Kernel kernel = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getKernel() + { + return $this->kernel; + } + + /** + * Optional. Kernel + * + * Generated from protobuf field .google.cloud.dataproc.v1.JupyterConfig.Kernel kernel = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setKernel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataproc\V1\JupyterConfig\Kernel::class); + $this->kernel = $var; + + return $this; + } + + /** + * Optional. Display name, shown in the Jupyter kernelspec card. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Optional. Display name, shown in the Jupyter kernelspec card. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/JupyterConfig/Kernel.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/JupyterConfig/Kernel.php new file mode 100644 index 000000000000..18cb47ef1e68 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/JupyterConfig/Kernel.php @@ -0,0 +1,64 @@ +google.cloud.dataproc.v1.JupyterConfig.Kernel + */ +class Kernel +{ + /** + * The kernel is unknown. + * + * Generated from protobuf enum KERNEL_UNSPECIFIED = 0; + */ + const KERNEL_UNSPECIFIED = 0; + /** + * Python kernel. + * + * Generated from protobuf enum PYTHON = 1; + */ + const PYTHON = 1; + /** + * Scala kernel. + * + * Generated from protobuf enum SCALA = 2; + */ + const SCALA = 2; + + private static $valueToName = [ + self::KERNEL_UNSPECIFIED => 'KERNEL_UNSPECIFIED', + self::PYTHON => 'PYTHON', + self::SCALA => 'SCALA', + ]; + + 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(Kernel::class, \Google\Cloud\Dataproc\V1\JupyterConfig_Kernel::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 new file mode 100644 index 000000000000..2494c33cae09 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/KerberosConfig.php @@ -0,0 +1,631 @@ +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 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 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 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 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 new file mode 100644 index 000000000000..f0b276a7f954 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/KubernetesClusterConfig.php @@ -0,0 +1,169 @@ +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 new file mode 100644 index 000000000000..635bc891b2dd --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/KubernetesSoftwareConfig.php @@ -0,0 +1,137 @@ +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 new file mode 100644 index 000000000000..8e8de9ec351f --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/LifecycleConfig.php @@ -0,0 +1,239 @@ +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 new file mode 100644 index 000000000000..5a392f5cd1c7 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListAutoscalingPoliciesRequest.php @@ -0,0 +1,194 @@ +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 new file mode 100644 index 000000000000..8948f3e6861f --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListAutoscalingPoliciesResponse.php @@ -0,0 +1,105 @@ +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 new file mode 100644 index 000000000000..e732bf4b1819 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListBatchesRequest.php @@ -0,0 +1,273 @@ +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 new file mode 100644 index 000000000000..3e0d8d2d108f --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListBatchesResponse.php @@ -0,0 +1,147 @@ +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 = ''; + /** + * Output only. List of Batches that could not be included in the response. + * Attempting to get one of these resources may indicate why it was not + * included in the list response. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\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. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Output only. List of Batches that could not be included in the response. + * Attempting to get one of these resources may indicate why it was not + * included in the list response. + * } + */ + 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; + } + + /** + * Output only. List of Batches that could not be included in the response. + * Attempting to get one of these resources may indicate why it was not + * included in the list response. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Output only. List of Batches that could not be included in the response. + * Attempting to get one of these resources may indicate why it was not + * included in the list response. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListClustersRequest.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListClustersRequest.php new file mode 100644 index 000000000000..e09e47dd76cd --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListClustersRequest.php @@ -0,0 +1,315 @@ +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`, `UPDATING`, `STOPPING`, or + * `STOPPED`. `ACTIVE` contains the `CREATING`, `UPDATING`, and `RUNNING` + * states. `INACTIVE` contains the `DELETING`, `ERROR`, `STOPPING`, and + * `STOPPED` 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`, `UPDATING`, `STOPPING`, or + * `STOPPED`. `ACTIVE` contains the `CREATING`, `UPDATING`, and `RUNNING` + * states. `INACTIVE` contains the `DELETING`, `ERROR`, `STOPPING`, and + * `STOPPED` 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`, `UPDATING`, `STOPPING`, or + * `STOPPED`. `ACTIVE` contains the `CREATING`, `UPDATING`, and `RUNNING` + * states. `INACTIVE` contains the `DELETING`, `ERROR`, `STOPPING`, and + * `STOPPED` 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`, `UPDATING`, `STOPPING`, or + * `STOPPED`. `ACTIVE` contains the `CREATING`, `UPDATING`, and `RUNNING` + * states. `INACTIVE` contains the `DELETING`, `ERROR`, `STOPPING`, and + * `STOPPED` 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`, `UPDATING`, `STOPPING`, or + * `STOPPED`. `ACTIVE` contains the `CREATING`, `UPDATING`, and `RUNNING` + * states. `INACTIVE` contains the `DELETING`, `ERROR`, `STOPPING`, and + * `STOPPED` 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 new file mode 100644 index 000000000000..1bf146d4ec35 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListClustersResponse.php @@ -0,0 +1,109 @@ +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 new file mode 100644 index 000000000000..3edadf58a5ef --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListJobsRequest.php @@ -0,0 +1,374 @@ +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 new file mode 100644 index 000000000000..adfef5aece1b --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListJobsRequest/JobStateMatcher.php @@ -0,0 +1,65 @@ +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 new file mode 100644 index 000000000000..0ed83c9d6a98 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListJobsResponse.php @@ -0,0 +1,155 @@ +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 = ''; + /** + * Output only. List of jobs with + * [kms_key][google.cloud.dataproc.v1.EncryptionConfig.kms_key]-encrypted + * parameters that could not be decrypted. A response to a `jobs.get` request + * may indicate the reason for the decryption failure for a specific job. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\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. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Output only. List of jobs with + * [kms_key][google.cloud.dataproc.v1.EncryptionConfig.kms_key]-encrypted + * parameters that could not be decrypted. A response to a `jobs.get` request + * may indicate the reason for the decryption failure for a specific job. + * } + */ + 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; + } + + /** + * Output only. List of jobs with + * [kms_key][google.cloud.dataproc.v1.EncryptionConfig.kms_key]-encrypted + * parameters that could not be decrypted. A response to a `jobs.get` request + * may indicate the reason for the decryption failure for a specific job. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Output only. List of jobs with + * [kms_key][google.cloud.dataproc.v1.EncryptionConfig.kms_key]-encrypted + * parameters that could not be decrypted. A response to a `jobs.get` request + * may indicate the reason for the decryption failure for a specific job. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListSessionTemplatesRequest.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListSessionTemplatesRequest.php new file mode 100644 index 000000000000..bdf85c10b4db --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListSessionTemplatesRequest.php @@ -0,0 +1,199 @@ +google.cloud.dataproc.v1.ListSessionTemplatesRequest + */ +class ListSessionTemplatesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent that owns this collection of session templates. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of sessions to return in each response. + * The service may return fewer than this value. + * + * 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 `ListSessions` 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 session templates to return in the response. + * Filters are case sensitive and have the following syntax: + * [field = value] AND [field [= value]] ... + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + + /** + * @param string $parent Required. The parent that owns this collection of session templates. Please see + * {@see SessionTemplateControllerClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Dataproc\V1\ListSessionTemplatesRequest + * + * @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 that owns this collection of session templates. + * @type int $page_size + * Optional. The maximum number of sessions to return in each response. + * The service may return fewer than this value. + * @type string $page_token + * Optional. A page token received from a previous `ListSessions` call. + * Provide this token to retrieve the subsequent page. + * @type string $filter + * Optional. A filter for the session templates to return in the response. + * Filters are case sensitive and have the following syntax: + * [field = value] AND [field [= value]] ... + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataproc\V1\SessionTemplates::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent that owns this collection of session templates. + * + * 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 that owns this collection of session templates. + * + * 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 sessions to return in each response. + * The service may return fewer than this value. + * + * 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 sessions to return in each response. + * The service may return fewer than this value. + * + * 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 `ListSessions` 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 `ListSessions` 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 session templates to return in the response. + * Filters are case sensitive and have the following syntax: + * [field = value] AND [field [= value]] ... + * + * 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 session templates to return in the response. + * Filters are case sensitive and have the following syntax: + * [field = value] AND [field [= value]] ... + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListSessionTemplatesResponse.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListSessionTemplatesResponse.php new file mode 100644 index 000000000000..432d6458e84a --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListSessionTemplatesResponse.php @@ -0,0 +1,105 @@ +google.cloud.dataproc.v1.ListSessionTemplatesResponse + */ +class ListSessionTemplatesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Session template list + * + * Generated from protobuf field repeated .google.cloud.dataproc.v1.SessionTemplate session_templates = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $session_templates; + /** + * 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\SessionTemplate>|\Google\Protobuf\Internal\RepeatedField $session_templates + * Output only. Session template list + * @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\SessionTemplates::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Session template list + * + * Generated from protobuf field repeated .google.cloud.dataproc.v1.SessionTemplate session_templates = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSessionTemplates() + { + return $this->session_templates; + } + + /** + * Output only. Session template list + * + * Generated from protobuf field repeated .google.cloud.dataproc.v1.SessionTemplate session_templates = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\Dataproc\V1\SessionTemplate>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSessionTemplates($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataproc\V1\SessionTemplate::class); + $this->session_templates = $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/ListSessionsRequest.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListSessionsRequest.php new file mode 100644 index 000000000000..34b11a34bcdd --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListSessionsRequest.php @@ -0,0 +1,235 @@ +google.cloud.dataproc.v1.ListSessionsRequest + */ +class ListSessionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of sessions. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of sessions to return in each response. + * The service may return fewer than this value. + * + * 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 `ListSessions` 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 sessions to return in the response. + * A filter is a logical expression constraining the values of various fields + * in each session resource. Filters are case sensitive, and may contain + * multiple clauses combined with logical operators (AND, OR). + * Supported fields are `session_id`, `session_uuid`, `state`, `create_time`, + * and `labels`. + * Example: `state = ACTIVE and create_time < "2023-01-01T00:00:00Z"` + * is a filter for sessions in an ACTIVE state that were created before + * 2023-01-01. `state = ACTIVE and labels.environment=production` is a filter + * for sessions in an ACTIVE state that have a production environment label. + * See https://google.aip.dev/assets/misc/ebnf-filtering.txt for a detailed + * description of the filter syntax and a list of supported comparators. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + + /** + * @param string $parent Required. The parent, which owns this collection of sessions. Please see + * {@see SessionControllerClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Dataproc\V1\ListSessionsRequest + * + * @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 sessions. + * @type int $page_size + * Optional. The maximum number of sessions to return in each response. + * The service may return fewer than this value. + * @type string $page_token + * Optional. A page token received from a previous `ListSessions` call. + * Provide this token to retrieve the subsequent page. + * @type string $filter + * Optional. A filter for the sessions to return in the response. + * A filter is a logical expression constraining the values of various fields + * in each session resource. Filters are case sensitive, and may contain + * multiple clauses combined with logical operators (AND, OR). + * Supported fields are `session_id`, `session_uuid`, `state`, `create_time`, + * and `labels`. + * Example: `state = ACTIVE and create_time < "2023-01-01T00:00:00Z"` + * is a filter for sessions in an ACTIVE state that were created before + * 2023-01-01. `state = ACTIVE and labels.environment=production` is a filter + * for sessions in an ACTIVE state that have a production environment label. + * See https://google.aip.dev/assets/misc/ebnf-filtering.txt for a detailed + * description of the filter syntax and a list of supported comparators. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataproc\V1\Sessions::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of sessions. + * + * 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 sessions. + * + * 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 sessions to return in each response. + * The service may return fewer than this value. + * + * 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 sessions to return in each response. + * The service may return fewer than this value. + * + * 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 `ListSessions` 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 `ListSessions` 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 sessions to return in the response. + * A filter is a logical expression constraining the values of various fields + * in each session resource. Filters are case sensitive, and may contain + * multiple clauses combined with logical operators (AND, OR). + * Supported fields are `session_id`, `session_uuid`, `state`, `create_time`, + * and `labels`. + * Example: `state = ACTIVE and create_time < "2023-01-01T00:00:00Z"` + * is a filter for sessions in an ACTIVE state that were created before + * 2023-01-01. `state = ACTIVE and labels.environment=production` is a filter + * for sessions in an ACTIVE state that have a production environment label. + * See https://google.aip.dev/assets/misc/ebnf-filtering.txt for a detailed + * description of the filter syntax and a list of supported comparators. + * + * 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 sessions to return in the response. + * A filter is a logical expression constraining the values of various fields + * in each session resource. Filters are case sensitive, and may contain + * multiple clauses combined with logical operators (AND, OR). + * Supported fields are `session_id`, `session_uuid`, `state`, `create_time`, + * and `labels`. + * Example: `state = ACTIVE and create_time < "2023-01-01T00:00:00Z"` + * is a filter for sessions in an ACTIVE state that were created before + * 2023-01-01. `state = ACTIVE and labels.environment=production` is a filter + * for sessions in an ACTIVE state that have a production environment label. + * See https://google.aip.dev/assets/misc/ebnf-filtering.txt for a detailed + * description of the filter syntax and a list of supported comparators. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListSessionsResponse.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListSessionsResponse.php new file mode 100644 index 000000000000..64fcdd7ffa5d --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListSessionsResponse.php @@ -0,0 +1,105 @@ +google.cloud.dataproc.v1.ListSessionsResponse + */ +class ListSessionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The sessions from the specified collection. + * + * Generated from protobuf field repeated .google.cloud.dataproc.v1.Session sessions = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $sessions; + /** + * 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\Session>|\Google\Protobuf\Internal\RepeatedField $sessions + * Output only. The sessions 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\Sessions::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The sessions from the specified collection. + * + * Generated from protobuf field repeated .google.cloud.dataproc.v1.Session sessions = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSessions() + { + return $this->sessions; + } + + /** + * Output only. The sessions from the specified collection. + * + * Generated from protobuf field repeated .google.cloud.dataproc.v1.Session sessions = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\Dataproc\V1\Session>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSessions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataproc\V1\Session::class); + $this->sessions = $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/ListWorkflowTemplatesRequest.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListWorkflowTemplatesRequest.php new file mode 100644 index 000000000000..d5fb760a2281 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListWorkflowTemplatesRequest.php @@ -0,0 +1,190 @@ +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 new file mode 100644 index 000000000000..d6a22d2d4494 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListWorkflowTemplatesResponse.php @@ -0,0 +1,151 @@ +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 = ''; + /** + * Output only. List of workflow templates that could not be included in the + * response. Attempting to get one of these resources may indicate why it was + * not included in the list response. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\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. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Output only. List of workflow templates that could not be included in the + * response. Attempting to get one of these resources may indicate why it was + * not included in the list response. + * } + */ + 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; + } + + /** + * Output only. List of workflow templates that could not be included in the + * response. Attempting to get one of these resources may indicate why it was + * not included in the list response. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Output only. List of workflow templates that could not be included in the + * response. Attempting to get one of these resources may indicate why it was + * not included in the list response. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/LoggingConfig.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/LoggingConfig.php new file mode 100644 index 000000000000..234b9ee24744 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/LoggingConfig.php @@ -0,0 +1,87 @@ +google.cloud.dataproc.v1.LoggingConfig + */ +class LoggingConfig extends \Google\Protobuf\Internal\Message +{ + /** + * The per-package log levels for the driver. This can 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 can 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 can 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 can 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 new file mode 100644 index 000000000000..c5716a27bb36 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/LoggingConfig/Level.php @@ -0,0 +1,108 @@ +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 new file mode 100644 index 000000000000..4a8d6c006652 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ManagedCluster.php @@ -0,0 +1,185 @@ +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 new file mode 100644 index 000000000000..5b478879505f --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ManagedGroupConfig.php @@ -0,0 +1,143 @@ +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 new file mode 100644 index 000000000000..3ea1359c20b9 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/MetastoreConfig.php @@ -0,0 +1,75 @@ +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 new file mode 100644 index 000000000000..8a22a7a39371 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/NodeGroup.php @@ -0,0 +1,206 @@ +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 new file mode 100644 index 000000000000..f338f061458e --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/NodeGroup/Role.php @@ -0,0 +1,57 @@ +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 new file mode 100644 index 000000000000..83c1b6ae648b --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/NodeGroupAffinity.php @@ -0,0 +1,97 @@ +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 new file mode 100644 index 000000000000..9fe80bbd300b --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/NodeGroupOperationMetadata.php @@ -0,0 +1,315 @@ +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 new file mode 100644 index 000000000000..4d13ed48a9be --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/NodeGroupOperationMetadata/NodeGroupOperationType.php @@ -0,0 +1,78 @@ +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 new file mode 100644 index 000000000000..86c1f470e5e1 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/NodeInitializationAction.php @@ -0,0 +1,132 @@ +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 new file mode 100644 index 000000000000..69f01eeecf04 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/OrderedJob.php @@ -0,0 +1,578 @@ +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 \Google\Cloud\Dataproc\V1\TrinoJob $trino_job + * Optional. Job is a Trino job. + * @type \Google\Cloud\Dataproc\V1\FlinkJob $flink_job + * Optional. Job is a Flink 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. Job is a Trino job. + * + * Generated from protobuf field .google.cloud.dataproc.v1.TrinoJob trino_job = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dataproc\V1\TrinoJob|null + */ + public function getTrinoJob() + { + return $this->readOneof(13); + } + + public function hasTrinoJob() + { + return $this->hasOneof(13); + } + + /** + * Optional. Job is a Trino job. + * + * Generated from protobuf field .google.cloud.dataproc.v1.TrinoJob trino_job = 13 [(.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(13, $var); + + return $this; + } + + /** + * Optional. Job is a Flink job. + * + * Generated from protobuf field .google.cloud.dataproc.v1.FlinkJob flink_job = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dataproc\V1\FlinkJob|null + */ + public function getFlinkJob() + { + return $this->readOneof(14); + } + + public function hasFlinkJob() + { + return $this->hasOneof(14); + } + + /** + * Optional. Job is a Flink job. + * + * Generated from protobuf field .google.cloud.dataproc.v1.FlinkJob flink_job = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dataproc\V1\FlinkJob $var + * @return $this + */ + public function setFlinkJob($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\FlinkJob::class); + $this->writeOneof(14, $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 new file mode 100644 index 000000000000..2933604062b0 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ParameterValidation.php @@ -0,0 +1,108 @@ +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 new file mode 100644 index 000000000000..0964f0f90c06 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/PeripheralsConfig.php @@ -0,0 +1,119 @@ +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 new file mode 100644 index 000000000000..e8b4115ec40a --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/PigJob.php @@ -0,0 +1,317 @@ +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 might 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 might 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 might 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 might 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 new file mode 100644 index 000000000000..91086e0edea7 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/PrestoJob.php @@ -0,0 +1,312 @@ +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/PyPiRepositoryConfig.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/PyPiRepositoryConfig.php new file mode 100644 index 000000000000..983f928f9008 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/PyPiRepositoryConfig.php @@ -0,0 +1,67 @@ +google.cloud.dataproc.v1.PyPiRepositoryConfig + */ +class PyPiRepositoryConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. PyPi repository address + * + * Generated from protobuf field string pypi_repository = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $pypi_repository = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $pypi_repository + * Optional. PyPi repository address + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataproc\V1\Shared::initOnce(); + parent::__construct($data); + } + + /** + * Optional. PyPi repository address + * + * Generated from protobuf field string pypi_repository = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPypiRepository() + { + return $this->pypi_repository; + } + + /** + * Optional. PyPi repository address + * + * Generated from protobuf field string pypi_repository = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPypiRepository($var) + { + GPBUtil::checkString($var, True); + $this->pypi_repository = $var; + + return $this; + } + +} + 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 new file mode 100644 index 000000000000..6cf061fbc315 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/PySparkBatch.php @@ -0,0 +1,272 @@ +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 new file mode 100644 index 000000000000..f4572edb2ddb --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/PySparkJob.php @@ -0,0 +1,362 @@ +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 might 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 might 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 might 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 might 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 new file mode 100644 index 000000000000..6e1e7dda61c9 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/QueryList.php @@ -0,0 +1,115 @@ +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 new file mode 100644 index 000000000000..437eafd5cc5d --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/RegexValidation.php @@ -0,0 +1,75 @@ +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/RepositoryConfig.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/RepositoryConfig.php new file mode 100644 index 000000000000..c8b5538731cb --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/RepositoryConfig.php @@ -0,0 +1,77 @@ +google.cloud.dataproc.v1.RepositoryConfig + */ +class RepositoryConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Configuration for PyPi repository. + * + * Generated from protobuf field .google.cloud.dataproc.v1.PyPiRepositoryConfig pypi_repository_config = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $pypi_repository_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dataproc\V1\PyPiRepositoryConfig $pypi_repository_config + * Optional. Configuration for PyPi repository. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataproc\V1\Shared::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Configuration for PyPi repository. + * + * Generated from protobuf field .google.cloud.dataproc.v1.PyPiRepositoryConfig pypi_repository_config = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dataproc\V1\PyPiRepositoryConfig|null + */ + public function getPypiRepositoryConfig() + { + return $this->pypi_repository_config; + } + + public function hasPypiRepositoryConfig() + { + return isset($this->pypi_repository_config); + } + + public function clearPypiRepositoryConfig() + { + unset($this->pypi_repository_config); + } + + /** + * Optional. Configuration for PyPi repository. + * + * Generated from protobuf field .google.cloud.dataproc.v1.PyPiRepositoryConfig pypi_repository_config = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dataproc\V1\PyPiRepositoryConfig $var + * @return $this + */ + public function setPypiRepositoryConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\PyPiRepositoryConfig::class); + $this->pypi_repository_config = $var; + + 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 new file mode 100644 index 000000000000..9211155368d0 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ReservationAffinity.php @@ -0,0 +1,135 @@ +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 new file mode 100644 index 000000000000..ef2c252f01b8 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ReservationAffinity/Type.php @@ -0,0 +1,70 @@ +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 new file mode 100644 index 000000000000..fefac1c3e248 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ResizeNodeGroupRequest.php @@ -0,0 +1,290 @@ +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 new file mode 100644 index 000000000000..ae45de549e08 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/RuntimeConfig.php @@ -0,0 +1,269 @@ +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; + /** + * Optional. Dependency repository configuration. + * + * Generated from protobuf field .google.cloud.dataproc.v1.RepositoryConfig repository_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $repository_config = null; + /** + * Optional. Autotuning configuration of the workload. + * + * Generated from protobuf field .google.cloud.dataproc.v1.AutotuningConfig autotuning_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $autotuning_config = null; + /** + * Optional. Cohort identifier. Identifies families of the workloads having + * the same shape, e.g. daily ETL jobs. + * + * Generated from protobuf field string cohort = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $cohort = ''; + + /** + * 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. + * @type \Google\Cloud\Dataproc\V1\RepositoryConfig $repository_config + * Optional. Dependency repository configuration. + * @type \Google\Cloud\Dataproc\V1\AutotuningConfig $autotuning_config + * Optional. Autotuning configuration of the workload. + * @type string $cohort + * Optional. Cohort identifier. Identifies families of the workloads having + * the same shape, e.g. daily ETL jobs. + * } + */ + 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; + } + + /** + * Optional. Dependency repository configuration. + * + * Generated from protobuf field .google.cloud.dataproc.v1.RepositoryConfig repository_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dataproc\V1\RepositoryConfig|null + */ + public function getRepositoryConfig() + { + return $this->repository_config; + } + + public function hasRepositoryConfig() + { + return isset($this->repository_config); + } + + public function clearRepositoryConfig() + { + unset($this->repository_config); + } + + /** + * Optional. Dependency repository configuration. + * + * Generated from protobuf field .google.cloud.dataproc.v1.RepositoryConfig repository_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dataproc\V1\RepositoryConfig $var + * @return $this + */ + public function setRepositoryConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\RepositoryConfig::class); + $this->repository_config = $var; + + return $this; + } + + /** + * Optional. Autotuning configuration of the workload. + * + * Generated from protobuf field .google.cloud.dataproc.v1.AutotuningConfig autotuning_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dataproc\V1\AutotuningConfig|null + */ + public function getAutotuningConfig() + { + return $this->autotuning_config; + } + + public function hasAutotuningConfig() + { + return isset($this->autotuning_config); + } + + public function clearAutotuningConfig() + { + unset($this->autotuning_config); + } + + /** + * Optional. Autotuning configuration of the workload. + * + * Generated from protobuf field .google.cloud.dataproc.v1.AutotuningConfig autotuning_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dataproc\V1\AutotuningConfig $var + * @return $this + */ + public function setAutotuningConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\AutotuningConfig::class); + $this->autotuning_config = $var; + + return $this; + } + + /** + * Optional. Cohort identifier. Identifies families of the workloads having + * the same shape, e.g. daily ETL jobs. + * + * Generated from protobuf field string cohort = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getCohort() + { + return $this->cohort; + } + + /** + * Optional. Cohort identifier. Identifies families of the workloads having + * the same shape, e.g. daily ETL jobs. + * + * Generated from protobuf field string cohort = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setCohort($var) + { + GPBUtil::checkString($var, True); + $this->cohort = $var; + + 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 new file mode 100644 index 000000000000..1a2b8692da80 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/RuntimeInfo.php @@ -0,0 +1,267 @@ +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 when + * the workload completes (see [Dataproc Serverless pricing] + * (https://cloud.google.com/dataproc-serverless/pricing)). + * **Note:** This metric calculation may change in the future, for + * example, to capture cumulative workload resource + * consumption during workload execution (see the + * [Dataproc Serverless release notes] + * (https://cloud.google.com/dataproc-serverless/docs/release-notes) + * for announcements, changes, fixes + * and other Dataproc developments). + * + * 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 when + * the workload completes (see [Dataproc Serverless pricing] + * (https://cloud.google.com/dataproc-serverless/pricing)). + * **Note:** This metric calculation may change in the future, for + * example, to capture cumulative workload resource + * consumption during workload execution (see the + * [Dataproc Serverless release notes] + * (https://cloud.google.com/dataproc-serverless/docs/release-notes) + * for announcements, changes, fixes + * and other Dataproc developments). + * @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 when + * the workload completes (see [Dataproc Serverless pricing] + * (https://cloud.google.com/dataproc-serverless/pricing)). + * **Note:** This metric calculation may change in the future, for + * example, to capture cumulative workload resource + * consumption during workload execution (see the + * [Dataproc Serverless release notes] + * (https://cloud.google.com/dataproc-serverless/docs/release-notes) + * for announcements, changes, fixes + * and other Dataproc developments). + * + * 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 when + * the workload completes (see [Dataproc Serverless pricing] + * (https://cloud.google.com/dataproc-serverless/pricing)). + * **Note:** This metric calculation may change in the future, for + * example, to capture cumulative workload resource + * consumption during workload execution (see the + * [Dataproc Serverless release notes] + * (https://cloud.google.com/dataproc-serverless/docs/release-notes) + * for announcements, changes, fixes + * and other Dataproc developments). + * + * 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 new file mode 100644 index 000000000000..47a24e1e6270 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SecurityConfig.php @@ -0,0 +1,125 @@ +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/Session.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/Session.php new file mode 100644 index 000000000000..9c9a1bb3a6af --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/Session.php @@ -0,0 +1,690 @@ +google.cloud.dataproc.v1.Session + */ +class Session extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the session. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Output only. A session UUID (Unique Universal Identifier). The service + * generates this value when it creates the session. + * + * Generated from protobuf field string uuid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uuid = ''; + /** + * Output only. The time when the session 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 session execution. + * + * Generated from protobuf field .google.cloud.dataproc.v1.RuntimeInfo runtime_info = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $runtime_info = null; + /** + * Output only. A state of the session. + * + * Generated from protobuf field .google.cloud.dataproc.v1.Session.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. Session state details, such as the failure + * description if the state is `FAILED`. + * + * Generated from protobuf field string state_message = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state_message = ''; + /** + * Output only. The time when the session entered the current state. + * + * Generated from protobuf field .google.protobuf.Timestamp state_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state_time = null; + /** + * Output only. The email address of the user who created the session. + * + * Generated from protobuf field string creator = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $creator = ''; + /** + * Optional. The labels to associate with the session. + * 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 session. + * + * Generated from protobuf field map labels = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Optional. Runtime configuration for the session execution. + * + * Generated from protobuf field .google.cloud.dataproc.v1.RuntimeConfig runtime_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $runtime_config = null; + /** + * Optional. Environment configuration for the session execution. + * + * Generated from protobuf field .google.cloud.dataproc.v1.EnvironmentConfig environment_config = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $environment_config = null; + /** + * Optional. The email address of the user who owns the session. + * + * Generated from protobuf field string user = 14 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $user = ''; + /** + * Output only. Historical state information for the session. + * + * Generated from protobuf field repeated .google.cloud.dataproc.v1.Session.SessionStateHistory state_history = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $state_history; + /** + * Optional. The session template used by the session. + * Only resource names, including project ID and location, are valid. + * Example: + * * `https://www.googleapis.com/compute/v1/projects/[project_id]/locations/[dataproc_region]/sessionTemplates/[template_id]` + * * `projects/[project_id]/locations/[dataproc_region]/sessionTemplates/[template_id]` + * The template must be in the same project and Dataproc region as the + * session. + * + * Generated from protobuf field string session_template = 16 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $session_template = ''; + protected $session_config; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the session. + * @type string $uuid + * Output only. A session UUID (Unique Universal Identifier). The service + * generates this value when it creates the session. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time when the session was created. + * @type \Google\Cloud\Dataproc\V1\JupyterConfig $jupyter_session + * Optional. Jupyter session config. + * @type \Google\Cloud\Dataproc\V1\SparkConnectConfig $spark_connect_session + * Optional. Spark Connect session config. + * @type \Google\Cloud\Dataproc\V1\RuntimeInfo $runtime_info + * Output only. Runtime information about session execution. + * @type int $state + * Output only. A state of the session. + * @type string $state_message + * Output only. Session state details, such as the failure + * description if the state is `FAILED`. + * @type \Google\Protobuf\Timestamp $state_time + * Output only. The time when the session entered the current state. + * @type string $creator + * Output only. The email address of the user who created the session. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. The labels to associate with the session. + * 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 session. + * @type \Google\Cloud\Dataproc\V1\RuntimeConfig $runtime_config + * Optional. Runtime configuration for the session execution. + * @type \Google\Cloud\Dataproc\V1\EnvironmentConfig $environment_config + * Optional. Environment configuration for the session execution. + * @type string $user + * Optional. The email address of the user who owns the session. + * @type array<\Google\Cloud\Dataproc\V1\Session\SessionStateHistory>|\Google\Protobuf\Internal\RepeatedField $state_history + * Output only. Historical state information for the session. + * @type string $session_template + * Optional. The session template used by the session. + * Only resource names, including project ID and location, are valid. + * Example: + * * `https://www.googleapis.com/compute/v1/projects/[project_id]/locations/[dataproc_region]/sessionTemplates/[template_id]` + * * `projects/[project_id]/locations/[dataproc_region]/sessionTemplates/[template_id]` + * The template must be in the same project and Dataproc region as the + * session. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataproc\V1\Sessions::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the session. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the session. + * + * 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; + } + + /** + * Output only. A session UUID (Unique Universal Identifier). The service + * generates this value when it creates the session. + * + * Generated from protobuf field string uuid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUuid() + { + return $this->uuid; + } + + /** + * Output only. A session UUID (Unique Universal Identifier). The service + * generates this value when it creates the session. + * + * 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 session 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 session 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. Jupyter session config. + * + * Generated from protobuf field .google.cloud.dataproc.v1.JupyterConfig jupyter_session = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dataproc\V1\JupyterConfig|null + */ + public function getJupyterSession() + { + return $this->readOneof(4); + } + + public function hasJupyterSession() + { + return $this->hasOneof(4); + } + + /** + * Optional. Jupyter session config. + * + * Generated from protobuf field .google.cloud.dataproc.v1.JupyterConfig jupyter_session = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dataproc\V1\JupyterConfig $var + * @return $this + */ + public function setJupyterSession($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\JupyterConfig::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Optional. Spark Connect session config. + * + * Generated from protobuf field .google.cloud.dataproc.v1.SparkConnectConfig spark_connect_session = 17 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dataproc\V1\SparkConnectConfig|null + */ + public function getSparkConnectSession() + { + return $this->readOneof(17); + } + + public function hasSparkConnectSession() + { + return $this->hasOneof(17); + } + + /** + * Optional. Spark Connect session config. + * + * Generated from protobuf field .google.cloud.dataproc.v1.SparkConnectConfig spark_connect_session = 17 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dataproc\V1\SparkConnectConfig $var + * @return $this + */ + public function setSparkConnectSession($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\SparkConnectConfig::class); + $this->writeOneof(17, $var); + + return $this; + } + + /** + * Output only. Runtime information about session execution. + * + * Generated from protobuf field .google.cloud.dataproc.v1.RuntimeInfo runtime_info = 6 [(.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 session execution. + * + * Generated from protobuf field .google.cloud.dataproc.v1.RuntimeInfo runtime_info = 6 [(.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. A state of the session. + * + * Generated from protobuf field .google.cloud.dataproc.v1.Session.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. A state of the session. + * + * Generated from protobuf field .google.cloud.dataproc.v1.Session.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataproc\V1\Session\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. Session state details, such as the failure + * description if the state is `FAILED`. + * + * Generated from protobuf field string state_message = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getStateMessage() + { + return $this->state_message; + } + + /** + * Output only. Session state details, such as the failure + * description if the state is `FAILED`. + * + * Generated from protobuf field string state_message = 8 [(.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 session entered the current state. + * + * Generated from protobuf field .google.protobuf.Timestamp state_time = 9 [(.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 session entered the current state. + * + * Generated from protobuf field .google.protobuf.Timestamp state_time = 9 [(.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 session. + * + * Generated from protobuf field string creator = 10 [(.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 session. + * + * Generated from protobuf field string creator = 10 [(.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 the session. + * 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 session. + * + * Generated from protobuf field map labels = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. The labels to associate with the session. + * 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 session. + * + * Generated from protobuf field map labels = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Optional. Runtime configuration for the session execution. + * + * Generated from protobuf field .google.cloud.dataproc.v1.RuntimeConfig runtime_config = 12 [(.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 session execution. + * + * Generated from protobuf field .google.cloud.dataproc.v1.RuntimeConfig runtime_config = 12 [(.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 session execution. + * + * Generated from protobuf field .google.cloud.dataproc.v1.EnvironmentConfig environment_config = 13 [(.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 session execution. + * + * Generated from protobuf field .google.cloud.dataproc.v1.EnvironmentConfig environment_config = 13 [(.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; + } + + /** + * Optional. The email address of the user who owns the session. + * + * Generated from protobuf field string user = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getUser() + { + return $this->user; + } + + /** + * Optional. The email address of the user who owns the session. + * + * Generated from protobuf field string user = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setUser($var) + { + GPBUtil::checkString($var, True); + $this->user = $var; + + return $this; + } + + /** + * Output only. Historical state information for the session. + * + * Generated from protobuf field repeated .google.cloud.dataproc.v1.Session.SessionStateHistory state_history = 15 [(.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 session. + * + * Generated from protobuf field repeated .google.cloud.dataproc.v1.Session.SessionStateHistory state_history = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\Dataproc\V1\Session\SessionStateHistory>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setStateHistory($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataproc\V1\Session\SessionStateHistory::class); + $this->state_history = $arr; + + return $this; + } + + /** + * Optional. The session template used by the session. + * Only resource names, including project ID and location, are valid. + * Example: + * * `https://www.googleapis.com/compute/v1/projects/[project_id]/locations/[dataproc_region]/sessionTemplates/[template_id]` + * * `projects/[project_id]/locations/[dataproc_region]/sessionTemplates/[template_id]` + * The template must be in the same project and Dataproc region as the + * session. + * + * Generated from protobuf field string session_template = 16 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getSessionTemplate() + { + return $this->session_template; + } + + /** + * Optional. The session template used by the session. + * Only resource names, including project ID and location, are valid. + * Example: + * * `https://www.googleapis.com/compute/v1/projects/[project_id]/locations/[dataproc_region]/sessionTemplates/[template_id]` + * * `projects/[project_id]/locations/[dataproc_region]/sessionTemplates/[template_id]` + * The template must be in the same project and Dataproc region as the + * session. + * + * Generated from protobuf field string session_template = 16 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setSessionTemplate($var) + { + GPBUtil::checkString($var, True); + $this->session_template = $var; + + return $this; + } + + /** + * @return string + */ + public function getSessionConfig() + { + return $this->whichOneof("session_config"); + } + +} + diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/Session/SessionStateHistory.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/Session/SessionStateHistory.php new file mode 100644 index 000000000000..ffc2d80451b2 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/Session/SessionStateHistory.php @@ -0,0 +1,156 @@ +google.cloud.dataproc.v1.Session.SessionStateHistory + */ +class SessionStateHistory extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The state of the session at this point in the session + * history. + * + * Generated from protobuf field .google.cloud.dataproc.v1.Session.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. Details about the state at this point in the session + * history. + * + * Generated from protobuf field string state_message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state_message = ''; + /** + * Output only. The time when the session 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 session at this point in the session + * history. + * @type string $state_message + * Output only. Details about the state at this point in the session + * history. + * @type \Google\Protobuf\Timestamp $state_start_time + * Output only. The time when the session entered the historical state. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataproc\V1\Sessions::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The state of the session at this point in the session + * history. + * + * Generated from protobuf field .google.cloud.dataproc.v1.Session.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The state of the session at this point in the session + * history. + * + * Generated from protobuf field .google.cloud.dataproc.v1.Session.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\Session\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. Details about the state at this point in the session + * 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 the session + * 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 session 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 session 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(SessionStateHistory::class, \Google\Cloud\Dataproc\V1\Session_SessionStateHistory::class); + diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/Session/State.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/Session/State.php new file mode 100644 index 000000000000..35ea0f887235 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/Session/State.php @@ -0,0 +1,85 @@ +google.cloud.dataproc.v1.Session.State + */ +class State +{ + /** + * The session state is unknown. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The session is created prior to running. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * The session is running. + * + * Generated from protobuf enum ACTIVE = 2; + */ + const ACTIVE = 2; + /** + * The session is terminating. + * + * Generated from protobuf enum TERMINATING = 3; + */ + const TERMINATING = 3; + /** + * The session is terminated successfully. + * + * Generated from protobuf enum TERMINATED = 4; + */ + const TERMINATED = 4; + /** + * The session is no longer running due to an error. + * + * Generated from protobuf enum FAILED = 5; + */ + const FAILED = 5; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::ACTIVE => 'ACTIVE', + self::TERMINATING => 'TERMINATING', + self::TERMINATED => 'TERMINATED', + 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\Session_State::class); + diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SessionOperationMetadata.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SessionOperationMetadata.php new file mode 100644 index 000000000000..6998bf8db8d2 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SessionOperationMetadata.php @@ -0,0 +1,325 @@ +google.cloud.dataproc.v1.SessionOperationMetadata + */ +class SessionOperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Name of the session for the operation. + * + * Generated from protobuf field string session = 1; + */ + protected $session = ''; + /** + * Session UUID for the operation. + * + * Generated from protobuf field string session_uuid = 2; + */ + protected $session_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 was 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.SessionOperationMetadata.SessionOperationType 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 $session + * Name of the session for the operation. + * @type string $session_uuid + * Session 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 was 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 session for the operation. + * + * Generated from protobuf field string session = 1; + * @return string + */ + public function getSession() + { + return $this->session; + } + + /** + * Name of the session for the operation. + * + * Generated from protobuf field string session = 1; + * @param string $var + * @return $this + */ + public function setSession($var) + { + GPBUtil::checkString($var, True); + $this->session = $var; + + return $this; + } + + /** + * Session UUID for the operation. + * + * Generated from protobuf field string session_uuid = 2; + * @return string + */ + public function getSessionUuid() + { + return $this->session_uuid; + } + + /** + * Session UUID for the operation. + * + * Generated from protobuf field string session_uuid = 2; + * @param string $var + * @return $this + */ + public function setSessionUuid($var) + { + GPBUtil::checkString($var, True); + $this->session_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 was 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 was 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.SessionOperationMetadata.SessionOperationType operation_type = 6; + * @return int + */ + public function getOperationType() + { + return $this->operation_type; + } + + /** + * The operation type. + * + * Generated from protobuf field .google.cloud.dataproc.v1.SessionOperationMetadata.SessionOperationType operation_type = 6; + * @param int $var + * @return $this + */ + public function setOperationType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Dataproc\V1\SessionOperationMetadata\SessionOperationType::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/SessionOperationMetadata/SessionOperationType.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SessionOperationMetadata/SessionOperationType.php new file mode 100644 index 000000000000..0456842619d4 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SessionOperationMetadata/SessionOperationType.php @@ -0,0 +1,71 @@ +google.cloud.dataproc.v1.SessionOperationMetadata.SessionOperationType + */ +class SessionOperationType +{ + /** + * Session operation type is unknown. + * + * Generated from protobuf enum SESSION_OPERATION_TYPE_UNSPECIFIED = 0; + */ + const SESSION_OPERATION_TYPE_UNSPECIFIED = 0; + /** + * Create Session operation type. + * + * Generated from protobuf enum CREATE = 1; + */ + const CREATE = 1; + /** + * Terminate Session operation type. + * + * Generated from protobuf enum TERMINATE = 2; + */ + const TERMINATE = 2; + /** + * Delete Session operation type. + * + * Generated from protobuf enum DELETE = 3; + */ + const DELETE = 3; + + private static $valueToName = [ + self::SESSION_OPERATION_TYPE_UNSPECIFIED => 'SESSION_OPERATION_TYPE_UNSPECIFIED', + self::CREATE => 'CREATE', + self::TERMINATE => 'TERMINATE', + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SessionOperationType::class, \Google\Cloud\Dataproc\V1\SessionOperationMetadata_SessionOperationType::class); + diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SessionTemplate.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SessionTemplate.php new file mode 100644 index 000000000000..67f8bbc9f743 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SessionTemplate.php @@ -0,0 +1,482 @@ +google.cloud.dataproc.v1.SessionTemplate + */ +class SessionTemplate extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the session template. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Optional. Brief description of the template. + * + * Generated from protobuf field string description = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Output only. The time when the template was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The email address of the user who created the template. + * + * Generated from protobuf field string creator = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $creator = ''; + /** + * Optional. Labels to associate with sessions created using this template. + * Label **keys** must contain 1 to 63 characters, and must conform to + * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). + * Label **values** can be empty, but, if present, must contain 1 to 63 + * characters and conform to [RFC + * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be + * associated with a session. + * + * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Optional. Runtime configuration for session execution. + * + * Generated from protobuf field .google.cloud.dataproc.v1.RuntimeConfig runtime_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $runtime_config = null; + /** + * Optional. Environment configuration for session execution. + * + * Generated from protobuf field .google.cloud.dataproc.v1.EnvironmentConfig environment_config = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $environment_config = null; + /** + * Output only. The time the template was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. A session template UUID (Unique Universal Identifier). The + * service generates this value when it creates the session template. + * + * Generated from protobuf field string uuid = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uuid = ''; + protected $session_config; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the session template. + * @type string $description + * Optional. Brief description of the template. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time when the template was created. + * @type \Google\Cloud\Dataproc\V1\JupyterConfig $jupyter_session + * Optional. Jupyter session config. + * @type \Google\Cloud\Dataproc\V1\SparkConnectConfig $spark_connect_session + * Optional. Spark Connect session config. + * @type string $creator + * Output only. The email address of the user who created the template. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Labels to associate with sessions created using this template. + * Label **keys** must contain 1 to 63 characters, and must conform to + * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). + * Label **values** can be empty, but, if present, must contain 1 to 63 + * characters and conform to [RFC + * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be + * associated with a session. + * @type \Google\Cloud\Dataproc\V1\RuntimeConfig $runtime_config + * Optional. Runtime configuration for session execution. + * @type \Google\Cloud\Dataproc\V1\EnvironmentConfig $environment_config + * Optional. Environment configuration for session execution. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time the template was last updated. + * @type string $uuid + * Output only. A session template UUID (Unique Universal Identifier). The + * service generates this value when it creates the session template. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataproc\V1\SessionTemplates::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the session template. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the session template. + * + * 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; + } + + /** + * Optional. Brief description of the template. + * + * Generated from protobuf field string description = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. Brief description of the template. + * + * Generated from protobuf field string description = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. The time when the template was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time when the template was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Optional. Jupyter session config. + * + * Generated from protobuf field .google.cloud.dataproc.v1.JupyterConfig jupyter_session = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dataproc\V1\JupyterConfig|null + */ + public function getJupyterSession() + { + return $this->readOneof(3); + } + + public function hasJupyterSession() + { + return $this->hasOneof(3); + } + + /** + * Optional. Jupyter session config. + * + * Generated from protobuf field .google.cloud.dataproc.v1.JupyterConfig jupyter_session = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dataproc\V1\JupyterConfig $var + * @return $this + */ + public function setJupyterSession($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\JupyterConfig::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Optional. Spark Connect session config. + * + * Generated from protobuf field .google.cloud.dataproc.v1.SparkConnectConfig spark_connect_session = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dataproc\V1\SparkConnectConfig|null + */ + public function getSparkConnectSession() + { + return $this->readOneof(11); + } + + public function hasSparkConnectSession() + { + return $this->hasOneof(11); + } + + /** + * Optional. Spark Connect session config. + * + * Generated from protobuf field .google.cloud.dataproc.v1.SparkConnectConfig spark_connect_session = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dataproc\V1\SparkConnectConfig $var + * @return $this + */ + public function setSparkConnectSession($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\SparkConnectConfig::class); + $this->writeOneof(11, $var); + + return $this; + } + + /** + * Output only. The email address of the user who created the template. + * + * Generated from protobuf field string creator = 5 [(.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 template. + * + * Generated from protobuf field string creator = 5 [(.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. Labels to associate with sessions created using this template. + * Label **keys** must contain 1 to 63 characters, and must conform to + * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). + * Label **values** can be empty, but, if present, must contain 1 to 63 + * characters and conform to [RFC + * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be + * associated with a session. + * + * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Labels to associate with sessions created using this template. + * Label **keys** must contain 1 to 63 characters, and must conform to + * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). + * Label **values** can be empty, but, if present, must contain 1 to 63 + * characters and conform to [RFC + * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be + * associated with a session. + * + * 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; + } + + /** + * Optional. Runtime configuration for session execution. + * + * Generated from protobuf field .google.cloud.dataproc.v1.RuntimeConfig runtime_config = 7 [(.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 session execution. + * + * Generated from protobuf field .google.cloud.dataproc.v1.RuntimeConfig runtime_config = 7 [(.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 session execution. + * + * Generated from protobuf field .google.cloud.dataproc.v1.EnvironmentConfig environment_config = 8 [(.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 session execution. + * + * Generated from protobuf field .google.cloud.dataproc.v1.EnvironmentConfig environment_config = 8 [(.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 time the template was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The time the template was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. A session template UUID (Unique Universal Identifier). The + * service generates this value when it creates the session template. + * + * Generated from protobuf field string uuid = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUuid() + { + return $this->uuid; + } + + /** + * Output only. A session template UUID (Unique Universal Identifier). The + * service generates this value when it creates the session template. + * + * Generated from protobuf field string uuid = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUuid($var) + { + GPBUtil::checkString($var, True); + $this->uuid = $var; + + return $this; + } + + /** + * @return string + */ + public function getSessionConfig() + { + return $this->whichOneof("session_config"); + } + +} + 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 new file mode 100644 index 000000000000..c65d9547c15f --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ShieldedInstanceConfig.php @@ -0,0 +1,166 @@ +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 new file mode 100644 index 000000000000..a8aa8664a399 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SoftwareConfig.php @@ -0,0 +1,215 @@ +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-image-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-image-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-image-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-image-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 new file mode 100644 index 000000000000..e39b43d191b0 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SparkBatch.php @@ -0,0 +1,272 @@ +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/SparkConnectConfig.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SparkConnectConfig.php new file mode 100644 index 000000000000..abbf6f34ebbe --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SparkConnectConfig.php @@ -0,0 +1,33 @@ +google.cloud.dataproc.v1.SparkConnectConfig + */ +class SparkConnectConfig extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataproc\V1\Sessions::initOnce(); + parent::__construct($data); + } + +} + 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 new file mode 100644 index 000000000000..a7b81f1f713d --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SparkHistoryServerConfig.php @@ -0,0 +1,79 @@ +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 new file mode 100644 index 000000000000..f80b2d022e0d --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SparkJob.php @@ -0,0 +1,365 @@ +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 might 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 + * SparkJob.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 might 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 + * SparkJob.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 + * SparkJob.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 might 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 might 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 new file mode 100644 index 000000000000..aef6fba4598f --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SparkRBatch.php @@ -0,0 +1,195 @@ +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 new file mode 100644 index 000000000000..f1f76ab1504d --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SparkRJob.php @@ -0,0 +1,285 @@ +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 might 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 might 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 might 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 might 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 new file mode 100644 index 000000000000..7b5ebb396677 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SparkSqlBatch.php @@ -0,0 +1,145 @@ +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 new file mode 100644 index 000000000000..871a49648475 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SparkSqlJob.php @@ -0,0 +1,267 @@ +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 might 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 might 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 might 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 might 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 new file mode 100644 index 000000000000..fe1ab98be364 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/StartClusterRequest.php @@ -0,0 +1,247 @@ +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/StartupConfig.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/StartupConfig.php new file mode 100644 index 000000000000..3b841ad765dc --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/StartupConfig.php @@ -0,0 +1,98 @@ +google.cloud.dataproc.v1.StartupConfig + */ +class StartupConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The config setting to enable cluster creation/ updation to be + * successful only after required_registration_fraction of instances are up + * and running. This configuration is applicable to only secondary workers for + * now. The cluster will fail if required_registration_fraction of instances + * are not available. This will include instance creation, agent registration, + * and service registration (if enabled). + * + * Generated from protobuf field optional double required_registration_fraction = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $required_registration_fraction = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $required_registration_fraction + * Optional. The config setting to enable cluster creation/ updation to be + * successful only after required_registration_fraction of instances are up + * and running. This configuration is applicable to only secondary workers for + * now. The cluster will fail if required_registration_fraction of instances + * are not available. This will include instance creation, agent registration, + * and service registration (if enabled). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataproc\V1\Clusters::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The config setting to enable cluster creation/ updation to be + * successful only after required_registration_fraction of instances are up + * and running. This configuration is applicable to only secondary workers for + * now. The cluster will fail if required_registration_fraction of instances + * are not available. This will include instance creation, agent registration, + * and service registration (if enabled). + * + * Generated from protobuf field optional double required_registration_fraction = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return float + */ + public function getRequiredRegistrationFraction() + { + return isset($this->required_registration_fraction) ? $this->required_registration_fraction : 0.0; + } + + public function hasRequiredRegistrationFraction() + { + return isset($this->required_registration_fraction); + } + + public function clearRequiredRegistrationFraction() + { + unset($this->required_registration_fraction); + } + + /** + * Optional. The config setting to enable cluster creation/ updation to be + * successful only after required_registration_fraction of instances are up + * and running. This configuration is applicable to only secondary workers for + * now. The cluster will fail if required_registration_fraction of instances + * are not available. This will include instance creation, agent registration, + * and service registration (if enabled). + * + * Generated from protobuf field optional double required_registration_fraction = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param float $var + * @return $this + */ + public function setRequiredRegistrationFraction($var) + { + GPBUtil::checkDouble($var); + $this->required_registration_fraction = $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 new file mode 100644 index 000000000000..1d8c84aa4ef0 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/StopClusterRequest.php @@ -0,0 +1,247 @@ +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 new file mode 100644 index 000000000000..7df0693c12ce --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SubmitJobRequest.php @@ -0,0 +1,237 @@ +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 new file mode 100644 index 000000000000..bb62556d4ee6 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/TemplateParameter.php @@ -0,0 +1,355 @@ +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/TerminateSessionRequest.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/TerminateSessionRequest.php new file mode 100644 index 000000000000..dff6d72ad36a --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/TerminateSessionRequest.php @@ -0,0 +1,143 @@ +google.cloud.dataproc.v1.TerminateSessionRequest + */ +class TerminateSessionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the session resource to terminate. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. A unique ID used to identify the request. If the service + * receives two + * [TerminateSessionRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.TerminateSessionRequest)s + * with the same ID, the second request is ignored. + * 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 = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $name Required. The name of the session resource to terminate. Please see + * {@see SessionControllerClient::sessionName()} for help formatting this field. + * + * @return \Google\Cloud\Dataproc\V1\TerminateSessionRequest + * + * @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 session resource to terminate. + * @type string $request_id + * Optional. A unique ID used to identify the request. If the service + * receives two + * [TerminateSessionRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.TerminateSessionRequest)s + * with the same ID, the second request is ignored. + * 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\Sessions::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the session resource to terminate. + * + * 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 session resource to terminate. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. A unique ID used to identify the request. If the service + * receives two + * [TerminateSessionRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.TerminateSessionRequest)s + * with the same ID, the second request is ignored. + * 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 = 2 [(.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 + * [TerminateSessionRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.TerminateSessionRequest)s + * with the same ID, the second request is ignored. + * 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 = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/TrinoJob.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/TrinoJob.php new file mode 100644 index 000000000000..56fa989144aa --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/TrinoJob.php @@ -0,0 +1,312 @@ +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 new file mode 100644 index 000000000000..bbc2fc1ebe28 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/UpdateAutoscalingPolicyRequest.php @@ -0,0 +1,90 @@ +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 new file mode 100644 index 000000000000..d0b3e15cf5bb --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/UpdateClusterRequest.php @@ -0,0 +1,629 @@ +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 new file mode 100644 index 000000000000..5296661fcd6a --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/UpdateJobRequest.php @@ -0,0 +1,247 @@ +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/UpdateSessionTemplateRequest.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/UpdateSessionTemplateRequest.php new file mode 100644 index 000000000000..60b18bbb0d42 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/UpdateSessionTemplateRequest.php @@ -0,0 +1,90 @@ +google.cloud.dataproc.v1.UpdateSessionTemplateRequest + */ +class UpdateSessionTemplateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The updated session template. + * + * Generated from protobuf field .google.cloud.dataproc.v1.SessionTemplate session_template = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $session_template = null; + + /** + * @param \Google\Cloud\Dataproc\V1\SessionTemplate $sessionTemplate Required. The updated session template. + * + * @return \Google\Cloud\Dataproc\V1\UpdateSessionTemplateRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Dataproc\V1\SessionTemplate $sessionTemplate): self + { + return (new self()) + ->setSessionTemplate($sessionTemplate); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Dataproc\V1\SessionTemplate $session_template + * Required. The updated session template. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataproc\V1\SessionTemplates::initOnce(); + parent::__construct($data); + } + + /** + * Required. The updated session template. + * + * Generated from protobuf field .google.cloud.dataproc.v1.SessionTemplate session_template = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Dataproc\V1\SessionTemplate|null + */ + public function getSessionTemplate() + { + return $this->session_template; + } + + public function hasSessionTemplate() + { + return isset($this->session_template); + } + + public function clearSessionTemplate() + { + unset($this->session_template); + } + + /** + * Required. The updated session template. + * + * Generated from protobuf field .google.cloud.dataproc.v1.SessionTemplate session_template = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Dataproc\V1\SessionTemplate $var + * @return $this + */ + public function setSessionTemplate($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\SessionTemplate::class); + $this->session_template = $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 new file mode 100644 index 000000000000..3f24d19d355a --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/UpdateWorkflowTemplateRequest.php @@ -0,0 +1,96 @@ +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 new file mode 100644 index 000000000000..24ed37471fcd --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/UsageMetrics.php @@ -0,0 +1,193 @@ +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; + /** + * Optional. Accelerator usage in (`milliAccelerator` x `seconds`) (see + * [Dataproc Serverless pricing] + * (https://cloud.google.com/dataproc-serverless/pricing)). + * + * Generated from protobuf field int64 milli_accelerator_seconds = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $milli_accelerator_seconds = 0; + /** + * Optional. Accelerator type being used, if any + * + * Generated from protobuf field string accelerator_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $accelerator_type = ''; + + /** + * 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)). + * @type int|string $milli_accelerator_seconds + * Optional. Accelerator usage in (`milliAccelerator` x `seconds`) (see + * [Dataproc Serverless pricing] + * (https://cloud.google.com/dataproc-serverless/pricing)). + * @type string $accelerator_type + * Optional. Accelerator type being used, if any + * } + */ + 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; + } + + /** + * Optional. Accelerator usage in (`milliAccelerator` x `seconds`) (see + * [Dataproc Serverless pricing] + * (https://cloud.google.com/dataproc-serverless/pricing)). + * + * Generated from protobuf field int64 milli_accelerator_seconds = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getMilliAcceleratorSeconds() + { + return $this->milli_accelerator_seconds; + } + + /** + * Optional. Accelerator usage in (`milliAccelerator` x `seconds`) (see + * [Dataproc Serverless pricing] + * (https://cloud.google.com/dataproc-serverless/pricing)). + * + * Generated from protobuf field int64 milli_accelerator_seconds = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setMilliAcceleratorSeconds($var) + { + GPBUtil::checkInt64($var); + $this->milli_accelerator_seconds = $var; + + return $this; + } + + /** + * Optional. Accelerator type being used, if any + * + * Generated from protobuf field string accelerator_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getAcceleratorType() + { + return $this->accelerator_type; + } + + /** + * Optional. Accelerator type being used, if any + * + * Generated from protobuf field string accelerator_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setAcceleratorType($var) + { + GPBUtil::checkString($var, True); + $this->accelerator_type = $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 new file mode 100644 index 000000000000..da529591a7d0 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/UsageSnapshot.php @@ -0,0 +1,314 @@ +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. Milli (one-thousandth) Dataproc Compute Units (DCUs) charged at + * premium tier (see [Dataproc Serverless pricing] + * (https://cloud.google.com/dataproc-serverless/pricing)). + * + * Generated from protobuf field int64 milli_dcu_premium = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $milli_dcu_premium = 0; + /** + * Optional. Shuffle Storage in gigabytes (GB) charged at premium tier. (see + * [Dataproc Serverless pricing] + * (https://cloud.google.com/dataproc-serverless/pricing)) + * + * Generated from protobuf field int64 shuffle_storage_gb_premium = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $shuffle_storage_gb_premium = 0; + /** + * Optional. Milli (one-thousandth) accelerator. (see [Dataproc + * Serverless pricing] (https://cloud.google.com/dataproc-serverless/pricing)) + * + * Generated from protobuf field int64 milli_accelerator = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $milli_accelerator = 0; + /** + * Optional. Accelerator type being used, if any + * + * Generated from protobuf field string accelerator_type = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $accelerator_type = ''; + /** + * 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 int|string $milli_dcu_premium + * Optional. Milli (one-thousandth) Dataproc Compute Units (DCUs) charged at + * premium tier (see [Dataproc Serverless pricing] + * (https://cloud.google.com/dataproc-serverless/pricing)). + * @type int|string $shuffle_storage_gb_premium + * Optional. Shuffle Storage in gigabytes (GB) charged at premium tier. (see + * [Dataproc Serverless pricing] + * (https://cloud.google.com/dataproc-serverless/pricing)) + * @type int|string $milli_accelerator + * Optional. Milli (one-thousandth) accelerator. (see [Dataproc + * Serverless pricing] (https://cloud.google.com/dataproc-serverless/pricing)) + * @type string $accelerator_type + * Optional. Accelerator type being used, if any + * @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. Milli (one-thousandth) Dataproc Compute Units (DCUs) charged at + * premium tier (see [Dataproc Serverless pricing] + * (https://cloud.google.com/dataproc-serverless/pricing)). + * + * Generated from protobuf field int64 milli_dcu_premium = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getMilliDcuPremium() + { + return $this->milli_dcu_premium; + } + + /** + * Optional. Milli (one-thousandth) Dataproc Compute Units (DCUs) charged at + * premium tier (see [Dataproc Serverless pricing] + * (https://cloud.google.com/dataproc-serverless/pricing)). + * + * Generated from protobuf field int64 milli_dcu_premium = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setMilliDcuPremium($var) + { + GPBUtil::checkInt64($var); + $this->milli_dcu_premium = $var; + + return $this; + } + + /** + * Optional. Shuffle Storage in gigabytes (GB) charged at premium tier. (see + * [Dataproc Serverless pricing] + * (https://cloud.google.com/dataproc-serverless/pricing)) + * + * Generated from protobuf field int64 shuffle_storage_gb_premium = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getShuffleStorageGbPremium() + { + return $this->shuffle_storage_gb_premium; + } + + /** + * Optional. Shuffle Storage in gigabytes (GB) charged at premium tier. (see + * [Dataproc Serverless pricing] + * (https://cloud.google.com/dataproc-serverless/pricing)) + * + * Generated from protobuf field int64 shuffle_storage_gb_premium = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setShuffleStorageGbPremium($var) + { + GPBUtil::checkInt64($var); + $this->shuffle_storage_gb_premium = $var; + + return $this; + } + + /** + * Optional. Milli (one-thousandth) accelerator. (see [Dataproc + * Serverless pricing] (https://cloud.google.com/dataproc-serverless/pricing)) + * + * Generated from protobuf field int64 milli_accelerator = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getMilliAccelerator() + { + return $this->milli_accelerator; + } + + /** + * Optional. Milli (one-thousandth) accelerator. (see [Dataproc + * Serverless pricing] (https://cloud.google.com/dataproc-serverless/pricing)) + * + * Generated from protobuf field int64 milli_accelerator = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setMilliAccelerator($var) + { + GPBUtil::checkInt64($var); + $this->milli_accelerator = $var; + + return $this; + } + + /** + * Optional. Accelerator type being used, if any + * + * Generated from protobuf field string accelerator_type = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getAcceleratorType() + { + return $this->accelerator_type; + } + + /** + * Optional. Accelerator type being used, if any + * + * Generated from protobuf field string accelerator_type = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setAcceleratorType($var) + { + GPBUtil::checkString($var, True); + $this->accelerator_type = $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 new file mode 100644 index 000000000000..e351b56f72e9 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ValueValidation.php @@ -0,0 +1,67 @@ +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 new file mode 100644 index 000000000000..90c82f790992 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/VirtualClusterConfig.php @@ -0,0 +1,198 @@ +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 new file mode 100644 index 000000000000..f8a4362873db --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/WorkflowGraph.php @@ -0,0 +1,67 @@ +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 new file mode 100644 index 000000000000..cf6f521f1247 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/WorkflowMetadata.php @@ -0,0 +1,645 @@ +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 new file mode 100644 index 000000000000..d85de5685800 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/WorkflowMetadata/State.php @@ -0,0 +1,71 @@ +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 new file mode 100644 index 000000000000..f37caf64a7c6 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/WorkflowNode.php @@ -0,0 +1,203 @@ +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 new file mode 100644 index 000000000000..8cab1c16ca7b --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/WorkflowNode/NodeState.php @@ -0,0 +1,86 @@ +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 new file mode 100644 index 000000000000..d69494715ba0 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/WorkflowTemplate.php @@ -0,0 +1,586 @@ +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; + /** + * Optional. Encryption settings for encrypting workflow template job + * arguments. + * + * Generated from protobuf field .google.cloud.dataproc.v1.WorkflowTemplate.EncryptionConfig encryption_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $encryption_config = 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. + * @type \Google\Cloud\Dataproc\V1\WorkflowTemplate\EncryptionConfig $encryption_config + * Optional. Encryption settings for encrypting workflow template job + * arguments. + * } + */ + 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; + } + + /** + * Optional. Encryption settings for encrypting workflow template job + * arguments. + * + * Generated from protobuf field .google.cloud.dataproc.v1.WorkflowTemplate.EncryptionConfig encryption_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dataproc\V1\WorkflowTemplate\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 encrypting workflow template job + * arguments. + * + * Generated from protobuf field .google.cloud.dataproc.v1.WorkflowTemplate.EncryptionConfig encryption_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dataproc\V1\WorkflowTemplate\EncryptionConfig $var + * @return $this + */ + public function setEncryptionConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\WorkflowTemplate\EncryptionConfig::class); + $this->encryption_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/WorkflowTemplate/EncryptionConfig.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/WorkflowTemplate/EncryptionConfig.php new file mode 100644 index 000000000000..16a79742dd67 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/WorkflowTemplate/EncryptionConfig.php @@ -0,0 +1,170 @@ +google.cloud.dataproc.v1.WorkflowTemplate.EncryptionConfig + */ +class EncryptionConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The Cloud KMS key name to use for encrypting + * workflow template job arguments. + * When this this key is provided, the following workflow template + * [job arguments] + * (https://cloud.google.com/dataproc/docs/concepts/workflows/use-workflows#adding_jobs_to_a_template), + * if present, are + * [CMEK + * encrypted](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/customer-managed-encryption#use_cmek_with_workflow_template_data): + * * [FlinkJob + * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/FlinkJob) + * * [HadoopJob + * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/HadoopJob) + * * [SparkJob + * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/SparkJob) + * * [SparkRJob + * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/SparkRJob) + * * [PySparkJob + * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/PySparkJob) + * * [SparkSqlJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/SparkSqlJob) + * scriptVariables and queryList.queries + * * [HiveJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/HiveJob) + * scriptVariables and queryList.queries + * * [PigJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/PigJob) + * scriptVariables and queryList.queries + * * [PrestoJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/PrestoJob) + * scriptVariables and queryList.queries + * + * Generated from protobuf field string kms_key = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $kms_key = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kms_key + * Optional. The Cloud KMS key name to use for encrypting + * workflow template job arguments. + * When this this key is provided, the following workflow template + * [job arguments] + * (https://cloud.google.com/dataproc/docs/concepts/workflows/use-workflows#adding_jobs_to_a_template), + * if present, are + * [CMEK + * encrypted](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/customer-managed-encryption#use_cmek_with_workflow_template_data): + * * [FlinkJob + * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/FlinkJob) + * * [HadoopJob + * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/HadoopJob) + * * [SparkJob + * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/SparkJob) + * * [SparkRJob + * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/SparkRJob) + * * [PySparkJob + * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/PySparkJob) + * * [SparkSqlJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/SparkSqlJob) + * scriptVariables and queryList.queries + * * [HiveJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/HiveJob) + * scriptVariables and queryList.queries + * * [PigJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/PigJob) + * scriptVariables and queryList.queries + * * [PrestoJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/PrestoJob) + * scriptVariables and queryList.queries + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataproc\V1\WorkflowTemplates::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The Cloud KMS key name to use for encrypting + * workflow template job arguments. + * When this this key is provided, the following workflow template + * [job arguments] + * (https://cloud.google.com/dataproc/docs/concepts/workflows/use-workflows#adding_jobs_to_a_template), + * if present, are + * [CMEK + * encrypted](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/customer-managed-encryption#use_cmek_with_workflow_template_data): + * * [FlinkJob + * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/FlinkJob) + * * [HadoopJob + * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/HadoopJob) + * * [SparkJob + * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/SparkJob) + * * [SparkRJob + * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/SparkRJob) + * * [PySparkJob + * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/PySparkJob) + * * [SparkSqlJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/SparkSqlJob) + * scriptVariables and queryList.queries + * * [HiveJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/HiveJob) + * scriptVariables and queryList.queries + * * [PigJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/PigJob) + * scriptVariables and queryList.queries + * * [PrestoJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/PrestoJob) + * scriptVariables and queryList.queries + * + * Generated from protobuf field string kms_key = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getKmsKey() + { + return $this->kms_key; + } + + /** + * Optional. The Cloud KMS key name to use for encrypting + * workflow template job arguments. + * When this this key is provided, the following workflow template + * [job arguments] + * (https://cloud.google.com/dataproc/docs/concepts/workflows/use-workflows#adding_jobs_to_a_template), + * if present, are + * [CMEK + * encrypted](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/customer-managed-encryption#use_cmek_with_workflow_template_data): + * * [FlinkJob + * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/FlinkJob) + * * [HadoopJob + * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/HadoopJob) + * * [SparkJob + * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/SparkJob) + * * [SparkRJob + * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/SparkRJob) + * * [PySparkJob + * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/PySparkJob) + * * [SparkSqlJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/SparkSqlJob) + * scriptVariables and queryList.queries + * * [HiveJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/HiveJob) + * scriptVariables and queryList.queries + * * [PigJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/PigJob) + * scriptVariables and queryList.queries + * * [PrestoJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/PrestoJob) + * scriptVariables and queryList.queries + * + * Generated from protobuf field string kms_key = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setKmsKey($var) + { + GPBUtil::checkString($var, True); + $this->kms_key = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(EncryptionConfig::class, \Google\Cloud\Dataproc\V1\WorkflowTemplate_EncryptionConfig::class); + 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 new file mode 100644 index 000000000000..d22db2371427 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/WorkflowTemplatePlacement.php @@ -0,0 +1,115 @@ +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 new file mode 100644 index 000000000000..e0d5a57ef629 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/YarnApplication.php @@ -0,0 +1,184 @@ +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 new file mode 100644 index 000000000000..5ecf1fa19c5f --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/YarnApplication/State.php @@ -0,0 +1,111 @@ +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 new file mode 100644 index 000000000000..1fc9fba56898 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/AutoscalingPolicyServiceClient/create_autoscaling_policy.php @@ -0,0 +1,135 @@ +setGracefulDecommissionTimeout($policyBasicAlgorithmYarnConfigGracefulDecommissionTimeout) + ->setScaleUpFactor($policyBasicAlgorithmYarnConfigScaleUpFactor) + ->setScaleDownFactor($policyBasicAlgorithmYarnConfigScaleDownFactor); + $policyBasicAlgorithm = (new BasicAutoscalingAlgorithm()) + ->setYarnConfig($policyBasicAlgorithmYarnConfig); + $policyWorkerConfig = (new InstanceGroupAutoscalingPolicyConfig()) + ->setMaxInstances($policyWorkerConfigMaxInstances); + $policy = (new AutoscalingPolicy()) + ->setBasicAlgorithm($policyBasicAlgorithm) + ->setWorkerConfig($policyWorkerConfig); + $request = (new CreateAutoscalingPolicyRequest()) + ->setParent($formattedParent) + ->setPolicy($policy); + + // Call the API and handle any network failures. + try { + /** @var AutoscalingPolicy $response */ + $response = $autoscalingPolicyServiceClient->createAutoscalingPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = 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 new file mode 100644 index 000000000000..9b9cc983b84f --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/AutoscalingPolicyServiceClient/delete_autoscaling_policy.php @@ -0,0 +1,83 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $autoscalingPolicyServiceClient->deleteAutoscalingPolicy($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = 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 new file mode 100644 index 000000000000..08eac5726a30 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/AutoscalingPolicyServiceClient/get_autoscaling_policy.php @@ -0,0 +1,84 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var AutoscalingPolicy $response */ + $response = $autoscalingPolicyServiceClient->getAutoscalingPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = 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 new file mode 100644 index 000000000000..a34da99d7bda --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/AutoscalingPolicyServiceClient/get_iam_policy.php @@ -0,0 +1,72 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $autoscalingPolicyServiceClient->getIamPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + get_iam_policy_sample($resource); +} +// [END 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 new file mode 100644 index 000000000000..b455d23482f9 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/AutoscalingPolicyServiceClient/list_autoscaling_policies.php @@ -0,0 +1,85 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $autoscalingPolicyServiceClient->listAutoscalingPolicies($request); + + /** @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 new file mode 100644 index 000000000000..dd7690ea5d02 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/AutoscalingPolicyServiceClient/set_iam_policy.php @@ -0,0 +1,77 @@ +setResource($resource) + ->setPolicy($policy); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $autoscalingPolicyServiceClient->setIamPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + set_iam_policy_sample($resource); +} +// [END 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 new file mode 100644 index 000000000000..cb579028d6c5 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/AutoscalingPolicyServiceClient/test_iam_permissions.php @@ -0,0 +1,84 @@ +setResource($resource) + ->setPermissions($permissions); + + // Call the API and handle any network failures. + try { + /** @var TestIamPermissionsResponse $response */ + $response = $autoscalingPolicyServiceClient->testIamPermissions($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + $permissionsElement = '[PERMISSIONS]'; + + test_iam_permissions_sample($resource, $permissionsElement); +} +// [END 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 new file mode 100644 index 000000000000..9452c13069f7 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/AutoscalingPolicyServiceClient/update_autoscaling_policy.php @@ -0,0 +1,123 @@ +setGracefulDecommissionTimeout($policyBasicAlgorithmYarnConfigGracefulDecommissionTimeout) + ->setScaleUpFactor($policyBasicAlgorithmYarnConfigScaleUpFactor) + ->setScaleDownFactor($policyBasicAlgorithmYarnConfigScaleDownFactor); + $policyBasicAlgorithm = (new BasicAutoscalingAlgorithm()) + ->setYarnConfig($policyBasicAlgorithmYarnConfig); + $policyWorkerConfig = (new InstanceGroupAutoscalingPolicyConfig()) + ->setMaxInstances($policyWorkerConfigMaxInstances); + $policy = (new AutoscalingPolicy()) + ->setBasicAlgorithm($policyBasicAlgorithm) + ->setWorkerConfig($policyWorkerConfig); + $request = (new UpdateAutoscalingPolicyRequest()) + ->setPolicy($policy); + + // Call the API and handle any network failures. + try { + /** @var AutoscalingPolicy $response */ + $response = $autoscalingPolicyServiceClient->updateAutoscalingPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $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 new file mode 100644 index 000000000000..d0fb0b421ea7 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/BatchControllerClient/create_batch.php @@ -0,0 +1,85 @@ +setParent($formattedParent) + ->setBatch($batch); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $batchControllerClient->createBatch($request); + $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 new file mode 100644 index 000000000000..8c5d5d90f13d --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/BatchControllerClient/delete_batch.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $batchControllerClient->deleteBatch($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = 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 new file mode 100644 index 000000000000..a2e4cae61900 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/BatchControllerClient/get_batch.php @@ -0,0 +1,73 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Batch $response */ + $response = $batchControllerClient->getBatch($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = 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 new file mode 100644 index 000000000000..6db264c757b7 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/BatchControllerClient/get_iam_policy.php @@ -0,0 +1,72 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $batchControllerClient->getIamPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + get_iam_policy_sample($resource); +} +// [END 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 new file mode 100644 index 000000000000..bae348289f02 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/BatchControllerClient/list_batches.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $batchControllerClient->listBatches($request); + + /** @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 new file mode 100644 index 000000000000..ed5ae5bc1390 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/BatchControllerClient/set_iam_policy.php @@ -0,0 +1,77 @@ +setResource($resource) + ->setPolicy($policy); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $batchControllerClient->setIamPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + set_iam_policy_sample($resource); +} +// [END 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 new file mode 100644 index 000000000000..0ced80161653 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/BatchControllerClient/test_iam_permissions.php @@ -0,0 +1,84 @@ +setResource($resource) + ->setPermissions($permissions); + + // Call the API and handle any network failures. + try { + /** @var TestIamPermissionsResponse $response */ + $response = $batchControllerClient->testIamPermissions($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + $permissionsElement = '[PERMISSIONS]'; + + test_iam_permissions_sample($resource, $permissionsElement); +} +// [END 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 new file mode 100644 index 000000000000..2ad67d9aac6c --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/create_cluster.php @@ -0,0 +1,103 @@ +setProjectId($clusterProjectId) + ->setClusterName($clusterClusterName); + $request = (new CreateClusterRequest()) + ->setProjectId($projectId) + ->setRegion($region) + ->setCluster($cluster); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $clusterControllerClient->createCluster($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Cluster $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $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 new file mode 100644 index 000000000000..e578c053a010 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/delete_cluster.php @@ -0,0 +1,88 @@ +setProjectId($projectId) + ->setRegion($region) + ->setClusterName($clusterName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $clusterControllerClient->deleteCluster($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $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 new file mode 100644 index 000000000000..79bcf48a7e74 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/diagnose_cluster.php @@ -0,0 +1,95 @@ +setProjectId($projectId) + ->setRegion($region) + ->setClusterName($clusterName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $clusterControllerClient->diagnoseCluster($request); + $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 new file mode 100644 index 000000000000..cde6f1a636ae --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/get_cluster.php @@ -0,0 +1,77 @@ +setProjectId($projectId) + ->setRegion($region) + ->setClusterName($clusterName); + + // Call the API and handle any network failures. + try { + /** @var Cluster $response */ + $response = $clusterControllerClient->getCluster($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $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 new file mode 100644 index 000000000000..dba0402deb8c --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/get_iam_policy.php @@ -0,0 +1,72 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $clusterControllerClient->getIamPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + get_iam_policy_sample($resource); +} +// [END 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 new file mode 100644 index 000000000000..18f6c2314b5c --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/list_clusters.php @@ -0,0 +1,79 @@ +setProjectId($projectId) + ->setRegion($region); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $clusterControllerClient->listClusters($request); + + /** @var Cluster $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $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 new file mode 100644 index 000000000000..0653336cc4b9 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/set_iam_policy.php @@ -0,0 +1,77 @@ +setResource($resource) + ->setPolicy($policy); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $clusterControllerClient->setIamPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + set_iam_policy_sample($resource); +} +// [END 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 new file mode 100644 index 000000000000..afba3ef14997 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/start_cluster.php @@ -0,0 +1,89 @@ +setProjectId($projectId) + ->setRegion($region) + ->setClusterName($clusterName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $clusterControllerClient->startCluster($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Cluster $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $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 new file mode 100644 index 000000000000..73b6ac9eded7 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/stop_cluster.php @@ -0,0 +1,89 @@ +setProjectId($projectId) + ->setRegion($region) + ->setClusterName($clusterName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $clusterControllerClient->stopCluster($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Cluster $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $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 new file mode 100644 index 000000000000..60271b82943d --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/test_iam_permissions.php @@ -0,0 +1,84 @@ +setResource($resource) + ->setPermissions($permissions); + + // Call the API and handle any network failures. + try { + /** @var TestIamPermissionsResponse $response */ + $response = $clusterControllerClient->testIamPermissions($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + $permissionsElement = '[PERMISSIONS]'; + + test_iam_permissions_sample($resource, $permissionsElement); +} +// [END 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 new file mode 100644 index 000000000000..78d0c667a899 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/update_cluster.php @@ -0,0 +1,113 @@ +setProjectId($clusterProjectId) + ->setClusterName($clusterClusterName); + $updateMask = new FieldMask(); + $request = (new UpdateClusterRequest()) + ->setProjectId($projectId) + ->setRegion($region) + ->setClusterName($clusterName) + ->setCluster($cluster) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $clusterControllerClient->updateCluster($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Cluster $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - 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 new file mode 100644 index 000000000000..09e8c0de1236 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/cancel_job.php @@ -0,0 +1,81 @@ +setProjectId($projectId) + ->setRegion($region) + ->setJobId($jobId); + + // Call the API and handle any network failures. + try { + /** @var Job $response */ + $response = $jobControllerClient->cancelJob($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $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 new file mode 100644 index 000000000000..79f3b2bffe4e --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/delete_job.php @@ -0,0 +1,76 @@ +setProjectId($projectId) + ->setRegion($region) + ->setJobId($jobId); + + // Call the API and handle any network failures. + try { + $jobControllerClient->deleteJob($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $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 new file mode 100644 index 000000000000..8ced38c26a8b --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/get_iam_policy.php @@ -0,0 +1,72 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $jobControllerClient->getIamPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + get_iam_policy_sample($resource); +} +// [END 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 new file mode 100644 index 000000000000..5c67464a8fab --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/get_job.php @@ -0,0 +1,77 @@ +setProjectId($projectId) + ->setRegion($region) + ->setJobId($jobId); + + // Call the API and handle any network failures. + try { + /** @var Job $response */ + $response = $jobControllerClient->getJob($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $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 new file mode 100644 index 000000000000..22611bf8419b --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/list_jobs.php @@ -0,0 +1,79 @@ +setProjectId($projectId) + ->setRegion($region); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $jobControllerClient->listJobs($request); + + /** @var Job $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $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 new file mode 100644 index 000000000000..cb1fd36f22b7 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/set_iam_policy.php @@ -0,0 +1,77 @@ +setResource($resource) + ->setPolicy($policy); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $jobControllerClient->setIamPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + set_iam_policy_sample($resource); +} +// [END 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 new file mode 100644 index 000000000000..4cda02aeb8e5 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/submit_job.php @@ -0,0 +1,85 @@ +setClusterName($jobPlacementClusterName); + $job = (new Job()) + ->setPlacement($jobPlacement); + $request = (new SubmitJobRequest()) + ->setProjectId($projectId) + ->setRegion($region) + ->setJob($job); + + // Call the API and handle any network failures. + try { + /** @var Job $response */ + $response = $jobControllerClient->submitJob($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $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 new file mode 100644 index 000000000000..5eafc42ec493 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/submit_job_as_operation.php @@ -0,0 +1,97 @@ +setClusterName($jobPlacementClusterName); + $job = (new Job()) + ->setPlacement($jobPlacement); + $request = (new SubmitJobRequest()) + ->setProjectId($projectId) + ->setRegion($region) + ->setJob($job); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $jobControllerClient->submitJobAsOperation($request); + $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 new file mode 100644 index 000000000000..d59f3168e462 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/test_iam_permissions.php @@ -0,0 +1,84 @@ +setResource($resource) + ->setPermissions($permissions); + + // Call the API and handle any network failures. + try { + /** @var TestIamPermissionsResponse $response */ + $response = $jobControllerClient->testIamPermissions($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + $permissionsElement = '[PERMISSIONS]'; + + test_iam_permissions_sample($resource, $permissionsElement); +} +// [END 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 new file mode 100644 index 000000000000..6c2c9c3144f1 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/update_job.php @@ -0,0 +1,92 @@ +setClusterName($jobPlacementClusterName); + $job = (new Job()) + ->setPlacement($jobPlacement); + $updateMask = new FieldMask(); + $request = (new UpdateJobRequest()) + ->setProjectId($projectId) + ->setRegion($region) + ->setJobId($jobId) + ->setJob($job) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var Job $response */ + $response = $jobControllerClient->updateJob($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $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 new file mode 100644 index 000000000000..c05b189503c9 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/NodeGroupControllerClient/create_node_group.php @@ -0,0 +1,97 @@ +setRoles($nodeGroupRoles); + $request = (new CreateNodeGroupRequest()) + ->setParent($formattedParent) + ->setNodeGroup($nodeGroup); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $nodeGroupControllerClient->createNodeGroup($request); + $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 new file mode 100644 index 000000000000..6f431ccd8836 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/NodeGroupControllerClient/get_iam_policy.php @@ -0,0 +1,72 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $nodeGroupControllerClient->getIamPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + get_iam_policy_sample($resource); +} +// [END 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 new file mode 100644 index 000000000000..793c10edaf5e --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/NodeGroupControllerClient/get_node_group.php @@ -0,0 +1,79 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var NodeGroup $response */ + $response = $nodeGroupControllerClient->getNodeGroup($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = 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 new file mode 100644 index 000000000000..09a7b9b7c277 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/NodeGroupControllerClient/resize_node_group.php @@ -0,0 +1,91 @@ +setName($name) + ->setSize($size); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $nodeGroupControllerClient->resizeNodeGroup($request); + $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 new file mode 100644 index 000000000000..7d0f0f3d55d7 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/NodeGroupControllerClient/set_iam_policy.php @@ -0,0 +1,77 @@ +setResource($resource) + ->setPolicy($policy); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $nodeGroupControllerClient->setIamPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + set_iam_policy_sample($resource); +} +// [END 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 new file mode 100644 index 000000000000..67d22b4d434d --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/NodeGroupControllerClient/test_iam_permissions.php @@ -0,0 +1,84 @@ +setResource($resource) + ->setPermissions($permissions); + + // Call the API and handle any network failures. + try { + /** @var TestIamPermissionsResponse $response */ + $response = $nodeGroupControllerClient->testIamPermissions($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + $permissionsElement = '[PERMISSIONS]'; + + test_iam_permissions_sample($resource, $permissionsElement); +} +// [END dataproc_v1_generated_NodeGroupController_TestIamPermissions_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/create_session.php b/owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/create_session.php new file mode 100644 index 000000000000..af43f2d4cf55 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/create_session.php @@ -0,0 +1,98 @@ +setName($sessionName); + $request = (new CreateSessionRequest()) + ->setParent($formattedParent) + ->setSession($session) + ->setSessionId($sessionId); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $sessionControllerClient->createSession($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Session $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 = SessionControllerClient::locationName('[PROJECT]', '[LOCATION]'); + $sessionName = '[NAME]'; + $sessionId = '[SESSION_ID]'; + + create_session_sample($formattedParent, $sessionName, $sessionId); +} +// [END dataproc_v1_generated_SessionController_CreateSession_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/delete_session.php b/owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/delete_session.php new file mode 100644 index 000000000000..45d0545e4cd0 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/delete_session.php @@ -0,0 +1,84 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $sessionControllerClient->deleteSession($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Session $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = SessionControllerClient::sessionName('[PROJECT]', '[LOCATION]', '[SESSION]'); + + delete_session_sample($formattedName); +} +// [END dataproc_v1_generated_SessionController_DeleteSession_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/get_iam_policy.php b/owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/get_iam_policy.php new file mode 100644 index 000000000000..a32c7b3f01be --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/get_iam_policy.php @@ -0,0 +1,72 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $sessionControllerClient->getIamPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + get_iam_policy_sample($resource); +} +// [END dataproc_v1_generated_SessionController_GetIamPolicy_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/get_session.php b/owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/get_session.php new file mode 100644 index 000000000000..3eef31275fe0 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/get_session.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Session $response */ + $response = $sessionControllerClient->getSession($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = SessionControllerClient::sessionName('[PROJECT]', '[LOCATION]', '[SESSION]'); + + get_session_sample($formattedName); +} +// [END dataproc_v1_generated_SessionController_GetSession_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/list_sessions.php b/owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/list_sessions.php new file mode 100644 index 000000000000..84432d65342b --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/list_sessions.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $sessionControllerClient->listSessions($request); + + /** @var Session $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 = SessionControllerClient::locationName('[PROJECT]', '[LOCATION]'); + + list_sessions_sample($formattedParent); +} +// [END dataproc_v1_generated_SessionController_ListSessions_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/set_iam_policy.php b/owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/set_iam_policy.php new file mode 100644 index 000000000000..b8723828af92 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/set_iam_policy.php @@ -0,0 +1,77 @@ +setResource($resource) + ->setPolicy($policy); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $sessionControllerClient->setIamPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + set_iam_policy_sample($resource); +} +// [END dataproc_v1_generated_SessionController_SetIamPolicy_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/terminate_session.php b/owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/terminate_session.php new file mode 100644 index 000000000000..1e6634a79be8 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/terminate_session.php @@ -0,0 +1,83 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $sessionControllerClient->terminateSession($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Session $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = SessionControllerClient::sessionName('[PROJECT]', '[LOCATION]', '[SESSION]'); + + terminate_session_sample($formattedName); +} +// [END dataproc_v1_generated_SessionController_TerminateSession_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/test_iam_permissions.php b/owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/test_iam_permissions.php new file mode 100644 index 000000000000..9dbcd2ea1584 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/test_iam_permissions.php @@ -0,0 +1,84 @@ +setResource($resource) + ->setPermissions($permissions); + + // Call the API and handle any network failures. + try { + /** @var TestIamPermissionsResponse $response */ + $response = $sessionControllerClient->testIamPermissions($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + $permissionsElement = '[PERMISSIONS]'; + + test_iam_permissions_sample($resource, $permissionsElement); +} +// [END dataproc_v1_generated_SessionController_TestIamPermissions_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/create_session_template.php b/owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/create_session_template.php new file mode 100644 index 000000000000..86b276bc9c97 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/create_session_template.php @@ -0,0 +1,78 @@ +setName($sessionTemplateName); + $request = (new CreateSessionTemplateRequest()) + ->setParent($formattedParent) + ->setSessionTemplate($sessionTemplate); + + // Call the API and handle any network failures. + try { + /** @var SessionTemplate $response */ + $response = $sessionTemplateControllerClient->createSessionTemplate($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = SessionTemplateControllerClient::locationName('[PROJECT]', '[LOCATION]'); + $sessionTemplateName = '[NAME]'; + + create_session_template_sample($formattedParent, $sessionTemplateName); +} +// [END dataproc_v1_generated_SessionTemplateController_CreateSessionTemplate_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/delete_session_template.php b/owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/delete_session_template.php new file mode 100644 index 000000000000..988e45b9b763 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/delete_session_template.php @@ -0,0 +1,73 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $sessionTemplateControllerClient->deleteSessionTemplate($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = SessionTemplateControllerClient::sessionTemplateName( + '[PROJECT]', + '[LOCATION]', + '[TEMPLATE]' + ); + + delete_session_template_sample($formattedName); +} +// [END dataproc_v1_generated_SessionTemplateController_DeleteSessionTemplate_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/get_iam_policy.php b/owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/get_iam_policy.php new file mode 100644 index 000000000000..e1fcd0f42f68 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/get_iam_policy.php @@ -0,0 +1,72 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $sessionTemplateControllerClient->getIamPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + get_iam_policy_sample($resource); +} +// [END dataproc_v1_generated_SessionTemplateController_GetIamPolicy_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/get_session_template.php b/owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/get_session_template.php new file mode 100644 index 000000000000..391ae074b525 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/get_session_template.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var SessionTemplate $response */ + $response = $sessionTemplateControllerClient->getSessionTemplate($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = SessionTemplateControllerClient::sessionTemplateName( + '[PROJECT]', + '[LOCATION]', + '[TEMPLATE]' + ); + + get_session_template_sample($formattedName); +} +// [END dataproc_v1_generated_SessionTemplateController_GetSessionTemplate_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/list_session_templates.php b/owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/list_session_templates.php new file mode 100644 index 000000000000..2e81c34c2dec --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/list_session_templates.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $sessionTemplateControllerClient->listSessionTemplates($request); + + /** @var SessionTemplate $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 = SessionTemplateControllerClient::locationName('[PROJECT]', '[LOCATION]'); + + list_session_templates_sample($formattedParent); +} +// [END dataproc_v1_generated_SessionTemplateController_ListSessionTemplates_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/set_iam_policy.php b/owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/set_iam_policy.php new file mode 100644 index 000000000000..c4f9b4a6820f --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/set_iam_policy.php @@ -0,0 +1,77 @@ +setResource($resource) + ->setPolicy($policy); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $sessionTemplateControllerClient->setIamPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + set_iam_policy_sample($resource); +} +// [END dataproc_v1_generated_SessionTemplateController_SetIamPolicy_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/test_iam_permissions.php b/owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/test_iam_permissions.php new file mode 100644 index 000000000000..8820d402c367 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/test_iam_permissions.php @@ -0,0 +1,84 @@ +setResource($resource) + ->setPermissions($permissions); + + // Call the API and handle any network failures. + try { + /** @var TestIamPermissionsResponse $response */ + $response = $sessionTemplateControllerClient->testIamPermissions($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + $permissionsElement = '[PERMISSIONS]'; + + test_iam_permissions_sample($resource, $permissionsElement); +} +// [END dataproc_v1_generated_SessionTemplateController_TestIamPermissions_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/update_session_template.php b/owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/update_session_template.php new file mode 100644 index 000000000000..541516e5afc5 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/update_session_template.php @@ -0,0 +1,72 @@ +setName($sessionTemplateName); + $request = (new UpdateSessionTemplateRequest()) + ->setSessionTemplate($sessionTemplate); + + // Call the API and handle any network failures. + try { + /** @var SessionTemplate $response */ + $response = $sessionTemplateControllerClient->updateSessionTemplate($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $sessionTemplateName = '[NAME]'; + + update_session_template_sample($sessionTemplateName); +} +// [END dataproc_v1_generated_SessionTemplateController_UpdateSessionTemplate_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 new file mode 100644 index 000000000000..b40b1b274bd5 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/create_workflow_template.php @@ -0,0 +1,108 @@ +setStepId($templateJobsStepId); + $templateJobs = [$orderedJob,]; + $template = (new WorkflowTemplate()) + ->setId($templateId) + ->setPlacement($templatePlacement) + ->setJobs($templateJobs); + $request = (new CreateWorkflowTemplateRequest()) + ->setParent($formattedParent) + ->setTemplate($template); + + // Call the API and handle any network failures. + try { + /** @var WorkflowTemplate $response */ + $response = $workflowTemplateServiceClient->createWorkflowTemplate($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = 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 new file mode 100644 index 000000000000..61eab2a44f21 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/delete_workflow_template.php @@ -0,0 +1,82 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $workflowTemplateServiceClient->deleteWorkflowTemplate($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = 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 new file mode 100644 index 000000000000..b4e128134da0 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/get_iam_policy.php @@ -0,0 +1,72 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $workflowTemplateServiceClient->getIamPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + get_iam_policy_sample($resource); +} +// [END 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 new file mode 100644 index 000000000000..1ccd6517208d --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/get_workflow_template.php @@ -0,0 +1,87 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var WorkflowTemplate $response */ + $response = $workflowTemplateServiceClient->getWorkflowTemplate($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = 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 new file mode 100644 index 000000000000..0d204bfeaaac --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/instantiate_inline_workflow_template.php @@ -0,0 +1,142 @@ +setStepId($templateJobsStepId); + $templateJobs = [$orderedJob,]; + $template = (new WorkflowTemplate()) + ->setId($templateId) + ->setPlacement($templatePlacement) + ->setJobs($templateJobs); + $request = (new InstantiateInlineWorkflowTemplateRequest()) + ->setParent($formattedParent) + ->setTemplate($template); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $workflowTemplateServiceClient->instantiateInlineWorkflowTemplate($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $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 new file mode 100644 index 000000000000..bb7e605ae819 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/instantiate_workflow_template.php @@ -0,0 +1,112 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $workflowTemplateServiceClient->instantiateWorkflowTemplate($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = 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 new file mode 100644 index 000000000000..f1dde8cde371 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/list_workflow_templates.php @@ -0,0 +1,85 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $workflowTemplateServiceClient->listWorkflowTemplates($request); + + /** @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 new file mode 100644 index 000000000000..2045b4cbdd01 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/set_iam_policy.php @@ -0,0 +1,77 @@ +setResource($resource) + ->setPolicy($policy); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $workflowTemplateServiceClient->setIamPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + set_iam_policy_sample($resource); +} +// [END 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 new file mode 100644 index 000000000000..29b230724740 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/test_iam_permissions.php @@ -0,0 +1,84 @@ +setResource($resource) + ->setPermissions($permissions); + + // Call the API and handle any network failures. + try { + /** @var TestIamPermissionsResponse $response */ + $response = $workflowTemplateServiceClient->testIamPermissions($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + $permissionsElement = '[PERMISSIONS]'; + + test_iam_permissions_sample($resource, $permissionsElement); +} +// [END 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 new file mode 100644 index 000000000000..b87f16471f2c --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/update_workflow_template.php @@ -0,0 +1,93 @@ +setStepId($templateJobsStepId); + $templateJobs = [$orderedJob,]; + $template = (new WorkflowTemplate()) + ->setId($templateId) + ->setPlacement($templatePlacement) + ->setJobs($templateJobs); + $request = (new UpdateWorkflowTemplateRequest()) + ->setTemplate($template); + + // Call the API and handle any network failures. + try { + /** @var WorkflowTemplate $response */ + $response = $workflowTemplateServiceClient->updateWorkflowTemplate($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $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/Client/AutoscalingPolicyServiceClient.php b/owl-bot-staging/Dataproc/v1/src/V1/Client/AutoscalingPolicyServiceClient.php new file mode 100644 index 000000000000..0be99fe06615 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/src/V1/Client/AutoscalingPolicyServiceClient.php @@ -0,0 +1,536 @@ + 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 AutoscalingPolicyServiceClient::createAutoscalingPolicyAsync()} . + * + * @example samples/V1/AutoscalingPolicyServiceClient/create_autoscaling_policy.php + * + * @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 AutoscalingPolicyServiceClient::deleteAutoscalingPolicyAsync()} . + * + * @example samples/V1/AutoscalingPolicyServiceClient/delete_autoscaling_policy.php + * + * @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 AutoscalingPolicyServiceClient::getAutoscalingPolicyAsync()} . + * + * @example samples/V1/AutoscalingPolicyServiceClient/get_autoscaling_policy.php + * + * @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 AutoscalingPolicyServiceClient::listAutoscalingPoliciesAsync()} . + * + * @example samples/V1/AutoscalingPolicyServiceClient/list_autoscaling_policies.php + * + * @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 AutoscalingPolicyServiceClient::updateAutoscalingPolicyAsync()} . + * + * @example samples/V1/AutoscalingPolicyServiceClient/update_autoscaling_policy.php + * + * @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 AutoscalingPolicyServiceClient::getIamPolicyAsync()} + * . + * + * @example samples/V1/AutoscalingPolicyServiceClient/get_iam_policy.php + * + * @param GetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * 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 AutoscalingPolicyServiceClient::setIamPolicyAsync()} + * . + * + * @example samples/V1/AutoscalingPolicyServiceClient/set_iam_policy.php + * + * @param SetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * 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 AutoscalingPolicyServiceClient::testIamPermissionsAsync()} . + * + * @example samples/V1/AutoscalingPolicyServiceClient/test_iam_permissions.php + * + * @param TestIamPermissionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TestIamPermissionsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse + { + return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Dataproc/v1/src/V1/Client/BatchControllerClient.php b/owl-bot-staging/Dataproc/v1/src/V1/Client/BatchControllerClient.php new file mode 100644 index 000000000000..81ae98447824 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/src/V1/Client/BatchControllerClient.php @@ -0,0 +1,512 @@ + 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; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a 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 BatchControllerClient::createBatchAsync()} . + * + * @example samples/V1/BatchControllerClient/create_batch.php + * + * @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 BatchControllerClient::deleteBatchAsync()} . + * + * @example samples/V1/BatchControllerClient/delete_batch.php + * + * @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 BatchControllerClient::getBatchAsync()} . + * + * @example samples/V1/BatchControllerClient/get_batch.php + * + * @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 BatchControllerClient::listBatchesAsync()} . + * + * @example samples/V1/BatchControllerClient/list_batches.php + * + * @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 BatchControllerClient::getIamPolicyAsync()} . + * + * @example samples/V1/BatchControllerClient/get_iam_policy.php + * + * @param GetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * 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 BatchControllerClient::setIamPolicyAsync()} . + * + * @example samples/V1/BatchControllerClient/set_iam_policy.php + * + * @param SetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * 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 BatchControllerClient::testIamPermissionsAsync()} . + * + * @example samples/V1/BatchControllerClient/test_iam_permissions.php + * + * @param TestIamPermissionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TestIamPermissionsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse + { + return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Dataproc/v1/src/V1/Client/ClusterControllerClient.php b/owl-bot-staging/Dataproc/v1/src/V1/Client/ClusterControllerClient.php new file mode 100644 index 000000000000..71cf72d2bc68 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/src/V1/Client/ClusterControllerClient.php @@ -0,0 +1,689 @@ + 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; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a 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 crypto_key + * resource. + * + * @param string $project + * @param string $location + * @param string $keyRing + * @param string $cryptoKey + * + * @return string The formatted crypto_key resource. + */ + public static function cryptoKeyName(string $project, string $location, string $keyRing, string $cryptoKey): string + { + return self::getPathTemplate('cryptoKey')->render([ + 'project' => $project, + 'location' => $location, + 'key_ring' => $keyRing, + 'crypto_key' => $cryptoKey, + ]); + } + + /** + * 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} + * - cryptoKey: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key} + * - 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 ClusterControllerClient::createClusterAsync()} . + * + * @example samples/V1/ClusterControllerClient/create_cluster.php + * + * @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 ClusterControllerClient::deleteClusterAsync()} . + * + * @example samples/V1/ClusterControllerClient/delete_cluster.php + * + * @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 ClusterControllerClient::diagnoseClusterAsync()} . + * + * @example samples/V1/ClusterControllerClient/diagnose_cluster.php + * + * @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 ClusterControllerClient::getClusterAsync()} . + * + * @example samples/V1/ClusterControllerClient/get_cluster.php + * + * @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 ClusterControllerClient::listClustersAsync()} . + * + * @example samples/V1/ClusterControllerClient/list_clusters.php + * + * @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 ClusterControllerClient::startClusterAsync()} . + * + * @example samples/V1/ClusterControllerClient/start_cluster.php + * + * @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 ClusterControllerClient::stopClusterAsync()} . + * + * @example samples/V1/ClusterControllerClient/stop_cluster.php + * + * @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 ClusterControllerClient::updateClusterAsync()} . + * + * @example samples/V1/ClusterControllerClient/update_cluster.php + * + * @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 ClusterControllerClient::getIamPolicyAsync()} . + * + * @example samples/V1/ClusterControllerClient/get_iam_policy.php + * + * @param GetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * 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 ClusterControllerClient::setIamPolicyAsync()} . + * + * @example samples/V1/ClusterControllerClient/set_iam_policy.php + * + * @param SetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * 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 ClusterControllerClient::testIamPermissionsAsync()} . + * + * @example samples/V1/ClusterControllerClient/test_iam_permissions.php + * + * @param TestIamPermissionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TestIamPermissionsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse + { + return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Dataproc/v1/src/V1/Client/JobControllerClient.php b/owl-bot-staging/Dataproc/v1/src/V1/Client/JobControllerClient.php new file mode 100644 index 000000000000..b2fba9940053 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/src/V1/Client/JobControllerClient.php @@ -0,0 +1,511 @@ + 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; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * 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 JobControllerClient::cancelJobAsync()} . + * + * @example samples/V1/JobControllerClient/cancel_job.php + * + * @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 JobControllerClient::deleteJobAsync()} . + * + * @example samples/V1/JobControllerClient/delete_job.php + * + * @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 JobControllerClient::getJobAsync()} . + * + * @example samples/V1/JobControllerClient/get_job.php + * + * @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 JobControllerClient::listJobsAsync()} . + * + * @example samples/V1/JobControllerClient/list_jobs.php + * + * @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 JobControllerClient::submitJobAsync()} . + * + * @example samples/V1/JobControllerClient/submit_job.php + * + * @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 JobControllerClient::submitJobAsOperationAsync()} . + * + * @example samples/V1/JobControllerClient/submit_job_as_operation.php + * + * @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 JobControllerClient::updateJobAsync()} . + * + * @example samples/V1/JobControllerClient/update_job.php + * + * @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 JobControllerClient::getIamPolicyAsync()} . + * + * @example samples/V1/JobControllerClient/get_iam_policy.php + * + * @param GetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * 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 JobControllerClient::setIamPolicyAsync()} . + * + * @example samples/V1/JobControllerClient/set_iam_policy.php + * + * @param SetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * 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 JobControllerClient::testIamPermissionsAsync()} . + * + * @example samples/V1/JobControllerClient/test_iam_permissions.php + * + * @param TestIamPermissionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TestIamPermissionsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse + { + return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Dataproc/v1/src/V1/Client/NodeGroupControllerClient.php b/owl-bot-staging/Dataproc/v1/src/V1/Client/NodeGroupControllerClient.php new file mode 100644 index 000000000000..ed255210b0af --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/src/V1/Client/NodeGroupControllerClient.php @@ -0,0 +1,476 @@ + 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; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * 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 NodeGroupControllerClient::createNodeGroupAsync()} . + * + * @example samples/V1/NodeGroupControllerClient/create_node_group.php + * + * @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 NodeGroupControllerClient::getNodeGroupAsync()} . + * + * @example samples/V1/NodeGroupControllerClient/get_node_group.php + * + * @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 NodeGroupControllerClient::resizeNodeGroupAsync()} . + * + * @example samples/V1/NodeGroupControllerClient/resize_node_group.php + * + * @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 NodeGroupControllerClient::getIamPolicyAsync()} . + * + * @example samples/V1/NodeGroupControllerClient/get_iam_policy.php + * + * @param GetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * 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 NodeGroupControllerClient::setIamPolicyAsync()} . + * + * @example samples/V1/NodeGroupControllerClient/set_iam_policy.php + * + * @param SetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * 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 NodeGroupControllerClient::testIamPermissionsAsync()} + * . + * + * @example samples/V1/NodeGroupControllerClient/test_iam_permissions.php + * + * @param TestIamPermissionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TestIamPermissionsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse + { + return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Dataproc/v1/src/V1/Client/SessionControllerClient.php b/owl-bot-staging/Dataproc/v1/src/V1/Client/SessionControllerClient.php new file mode 100644 index 000000000000..55a70070419c --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/src/V1/Client/SessionControllerClient.php @@ -0,0 +1,562 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/session_controller_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/session_controller_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/session_controller_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/session_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; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a 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, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a session + * resource. + * + * @param string $project + * @param string $location + * @param string $session + * + * @return string The formatted session resource. + */ + public static function sessionName(string $project, string $location, string $session): string + { + return self::getPathTemplate('session')->render([ + 'project' => $project, + 'location' => $location, + 'session' => $session, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * session_template resource. + * + * @param string $project + * @param string $location + * @param string $template + * + * @return string The formatted session_template resource. + */ + public static function sessionTemplateName(string $project, string $location, string $template): string + { + return self::getPathTemplate('sessionTemplate')->render([ + 'project' => $project, + 'location' => $location, + 'template' => $template, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - location: projects/{project}/locations/{location} + * - service: projects/{project}/locations/{location}/services/{service} + * - session: projects/{project}/locations/{location}/sessions/{session} + * - sessionTemplate: projects/{project}/locations/{location}/sessionTemplates/{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); + } + + /** + * Create an interactive session asynchronously. + * + * The async variant is {@see SessionControllerClient::createSessionAsync()} . + * + * @example samples/V1/SessionControllerClient/create_session.php + * + * @param CreateSessionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 createSession(CreateSessionRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateSession', $request, $callOptions)->wait(); + } + + /** + * Deletes the interactive session resource. If the session is not in terminal + * state, it is terminated, and then deleted. + * + * The async variant is {@see SessionControllerClient::deleteSessionAsync()} . + * + * @example samples/V1/SessionControllerClient/delete_session.php + * + * @param DeleteSessionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 deleteSession(DeleteSessionRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteSession', $request, $callOptions)->wait(); + } + + /** + * Gets the resource representation for an interactive session. + * + * The async variant is {@see SessionControllerClient::getSessionAsync()} . + * + * @example samples/V1/SessionControllerClient/get_session.php + * + * @param GetSessionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Session + * + * @throws ApiException Thrown if the API call fails. + */ + public function getSession(GetSessionRequest $request, array $callOptions = []): Session + { + return $this->startApiCall('GetSession', $request, $callOptions)->wait(); + } + + /** + * Lists interactive sessions. + * + * The async variant is {@see SessionControllerClient::listSessionsAsync()} . + * + * @example samples/V1/SessionControllerClient/list_sessions.php + * + * @param ListSessionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listSessions(ListSessionsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListSessions', $request, $callOptions); + } + + /** + * Terminates the interactive session. + * + * The async variant is {@see SessionControllerClient::terminateSessionAsync()} . + * + * @example samples/V1/SessionControllerClient/terminate_session.php + * + * @param TerminateSessionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 terminateSession(TerminateSessionRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('TerminateSession', $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 SessionControllerClient::getIamPolicyAsync()} . + * + * @example samples/V1/SessionControllerClient/get_iam_policy.php + * + * @param GetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * 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 SessionControllerClient::setIamPolicyAsync()} . + * + * @example samples/V1/SessionControllerClient/set_iam_policy.php + * + * @param SetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * 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 SessionControllerClient::testIamPermissionsAsync()} . + * + * @example samples/V1/SessionControllerClient/test_iam_permissions.php + * + * @param TestIamPermissionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TestIamPermissionsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse + { + return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Dataproc/v1/src/V1/Client/SessionTemplateControllerClient.php b/owl-bot-staging/Dataproc/v1/src/V1/Client/SessionTemplateControllerClient.php new file mode 100644 index 000000000000..e4ee66f3a22d --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/src/V1/Client/SessionTemplateControllerClient.php @@ -0,0 +1,493 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/session_template_controller_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/session_template_controller_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/session_template_controller_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/session_template_controller_rest_client_config.php', + ], + ], + ]; + } + + /** + * 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, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * session_template resource. + * + * @param string $project + * @param string $location + * @param string $template + * + * @return string The formatted session_template resource. + */ + public static function sessionTemplateName(string $project, string $location, string $template): string + { + return self::getPathTemplate('sessionTemplate')->render([ + 'project' => $project, + 'location' => $location, + 'template' => $template, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - location: projects/{project}/locations/{location} + * - service: projects/{project}/locations/{location}/services/{service} + * - sessionTemplate: projects/{project}/locations/{location}/sessionTemplates/{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); + } + + /** 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); + } + + /** + * Create a session template synchronously. + * + * The async variant is + * {@see SessionTemplateControllerClient::createSessionTemplateAsync()} . + * + * @example samples/V1/SessionTemplateControllerClient/create_session_template.php + * + * @param CreateSessionTemplateRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return SessionTemplate + * + * @throws ApiException Thrown if the API call fails. + */ + public function createSessionTemplate(CreateSessionTemplateRequest $request, array $callOptions = []): SessionTemplate + { + return $this->startApiCall('CreateSessionTemplate', $request, $callOptions)->wait(); + } + + /** + * Deletes a session template. + * + * The async variant is + * {@see SessionTemplateControllerClient::deleteSessionTemplateAsync()} . + * + * @example samples/V1/SessionTemplateControllerClient/delete_session_template.php + * + * @param DeleteSessionTemplateRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteSessionTemplate(DeleteSessionTemplateRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteSessionTemplate', $request, $callOptions)->wait(); + } + + /** + * Gets the resource representation for a session template. + * + * The async variant is + * {@see SessionTemplateControllerClient::getSessionTemplateAsync()} . + * + * @example samples/V1/SessionTemplateControllerClient/get_session_template.php + * + * @param GetSessionTemplateRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return SessionTemplate + * + * @throws ApiException Thrown if the API call fails. + */ + public function getSessionTemplate(GetSessionTemplateRequest $request, array $callOptions = []): SessionTemplate + { + return $this->startApiCall('GetSessionTemplate', $request, $callOptions)->wait(); + } + + /** + * Lists session templates. + * + * The async variant is + * {@see SessionTemplateControllerClient::listSessionTemplatesAsync()} . + * + * @example samples/V1/SessionTemplateControllerClient/list_session_templates.php + * + * @param ListSessionTemplatesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listSessionTemplates(ListSessionTemplatesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListSessionTemplates', $request, $callOptions); + } + + /** + * Updates the session template synchronously. + * + * The async variant is + * {@see SessionTemplateControllerClient::updateSessionTemplateAsync()} . + * + * @example samples/V1/SessionTemplateControllerClient/update_session_template.php + * + * @param UpdateSessionTemplateRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return SessionTemplate + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateSessionTemplate(UpdateSessionTemplateRequest $request, array $callOptions = []): SessionTemplate + { + return $this->startApiCall('UpdateSessionTemplate', $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 SessionTemplateControllerClient::getIamPolicyAsync()} + * . + * + * @example samples/V1/SessionTemplateControllerClient/get_iam_policy.php + * + * @param GetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * 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 SessionTemplateControllerClient::setIamPolicyAsync()} + * . + * + * @example samples/V1/SessionTemplateControllerClient/set_iam_policy.php + * + * @param SetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * 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 SessionTemplateControllerClient::testIamPermissionsAsync()} . + * + * @example samples/V1/SessionTemplateControllerClient/test_iam_permissions.php + * + * @param TestIamPermissionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TestIamPermissionsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse + { + return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Dataproc/v1/src/V1/Client/WorkflowTemplateServiceClient.php b/owl-bot-staging/Dataproc/v1/src/V1/Client/WorkflowTemplateServiceClient.php new file mode 100644 index 000000000000..05964f36f77d --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/src/V1/Client/WorkflowTemplateServiceClient.php @@ -0,0 +1,774 @@ + 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; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * 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 crypto_key + * resource. + * + * @param string $project + * @param string $location + * @param string $keyRing + * @param string $cryptoKey + * + * @return string The formatted crypto_key resource. + */ + public static function cryptoKeyName(string $project, string $location, string $keyRing, string $cryptoKey): string + { + return self::getPathTemplate('cryptoKey')->render([ + 'project' => $project, + 'location' => $location, + 'key_ring' => $keyRing, + 'crypto_key' => $cryptoKey, + ]); + } + + /** + * 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} + * - cryptoKey: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key} + * - 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 WorkflowTemplateServiceClient::createWorkflowTemplateAsync()} . + * + * @example samples/V1/WorkflowTemplateServiceClient/create_workflow_template.php + * + * @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 WorkflowTemplateServiceClient::deleteWorkflowTemplateAsync()} . + * + * @example samples/V1/WorkflowTemplateServiceClient/delete_workflow_template.php + * + * @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 WorkflowTemplateServiceClient::getWorkflowTemplateAsync()} . + * + * @example samples/V1/WorkflowTemplateServiceClient/get_workflow_template.php + * + * @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 WorkflowTemplateServiceClient::instantiateInlineWorkflowTemplateAsync()} . + * + * @example samples/V1/WorkflowTemplateServiceClient/instantiate_inline_workflow_template.php + * + * @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 WorkflowTemplateServiceClient::instantiateWorkflowTemplateAsync()} . + * + * @example samples/V1/WorkflowTemplateServiceClient/instantiate_workflow_template.php + * + * @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 WorkflowTemplateServiceClient::listWorkflowTemplatesAsync()} . + * + * @example samples/V1/WorkflowTemplateServiceClient/list_workflow_templates.php + * + * @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 WorkflowTemplateServiceClient::updateWorkflowTemplateAsync()} . + * + * @example samples/V1/WorkflowTemplateServiceClient/update_workflow_template.php + * + * @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 WorkflowTemplateServiceClient::getIamPolicyAsync()} . + * + * @example samples/V1/WorkflowTemplateServiceClient/get_iam_policy.php + * + * @param GetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * 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 WorkflowTemplateServiceClient::setIamPolicyAsync()} . + * + * @example samples/V1/WorkflowTemplateServiceClient/set_iam_policy.php + * + * @param SetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * 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 WorkflowTemplateServiceClient::testIamPermissionsAsync()} . + * + * @example samples/V1/WorkflowTemplateServiceClient/test_iam_permissions.php + * + * @param TestIamPermissionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TestIamPermissionsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse + { + return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Dataproc/v1/src/V1/gapic_metadata.json b/owl-bot-staging/Dataproc/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..31b7826cb3c0 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/src/V1/gapic_metadata.json @@ -0,0 +1,421 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.dataproc.v1", + "libraryPackage": "Google\\Cloud\\Dataproc\\V1", + "services": { + "AutoscalingPolicyService": { + "clients": { + "grpc": { + "libraryClient": "AutoscalingPolicyServiceGapicClient", + "rpcs": { + "CreateAutoscalingPolicy": { + "methods": [ + "createAutoscalingPolicy" + ] + }, + "DeleteAutoscalingPolicy": { + "methods": [ + "deleteAutoscalingPolicy" + ] + }, + "GetAutoscalingPolicy": { + "methods": [ + "getAutoscalingPolicy" + ] + }, + "ListAutoscalingPolicies": { + "methods": [ + "listAutoscalingPolicies" + ] + }, + "UpdateAutoscalingPolicy": { + "methods": [ + "updateAutoscalingPolicy" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + } + } + } + } + }, + "BatchController": { + "clients": { + "grpc": { + "libraryClient": "BatchControllerGapicClient", + "rpcs": { + "CreateBatch": { + "methods": [ + "createBatch" + ] + }, + "DeleteBatch": { + "methods": [ + "deleteBatch" + ] + }, + "GetBatch": { + "methods": [ + "getBatch" + ] + }, + "ListBatches": { + "methods": [ + "listBatches" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + } + } + } + } + }, + "ClusterController": { + "clients": { + "grpc": { + "libraryClient": "ClusterControllerGapicClient", + "rpcs": { + "CreateCluster": { + "methods": [ + "createCluster" + ] + }, + "DeleteCluster": { + "methods": [ + "deleteCluster" + ] + }, + "DiagnoseCluster": { + "methods": [ + "diagnoseCluster" + ] + }, + "GetCluster": { + "methods": [ + "getCluster" + ] + }, + "ListClusters": { + "methods": [ + "listClusters" + ] + }, + "StartCluster": { + "methods": [ + "startCluster" + ] + }, + "StopCluster": { + "methods": [ + "stopCluster" + ] + }, + "UpdateCluster": { + "methods": [ + "updateCluster" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + } + } + } + } + }, + "JobController": { + "clients": { + "grpc": { + "libraryClient": "JobControllerGapicClient", + "rpcs": { + "CancelJob": { + "methods": [ + "cancelJob" + ] + }, + "DeleteJob": { + "methods": [ + "deleteJob" + ] + }, + "GetJob": { + "methods": [ + "getJob" + ] + }, + "ListJobs": { + "methods": [ + "listJobs" + ] + }, + "SubmitJob": { + "methods": [ + "submitJob" + ] + }, + "SubmitJobAsOperation": { + "methods": [ + "submitJobAsOperation" + ] + }, + "UpdateJob": { + "methods": [ + "updateJob" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + } + } + } + } + }, + "NodeGroupController": { + "clients": { + "grpc": { + "libraryClient": "NodeGroupControllerGapicClient", + "rpcs": { + "CreateNodeGroup": { + "methods": [ + "createNodeGroup" + ] + }, + "GetNodeGroup": { + "methods": [ + "getNodeGroup" + ] + }, + "ResizeNodeGroup": { + "methods": [ + "resizeNodeGroup" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + } + } + } + } + }, + "SessionController": { + "clients": { + "grpc": { + "libraryClient": "SessionControllerGapicClient", + "rpcs": { + "CreateSession": { + "methods": [ + "createSession" + ] + }, + "DeleteSession": { + "methods": [ + "deleteSession" + ] + }, + "GetSession": { + "methods": [ + "getSession" + ] + }, + "ListSessions": { + "methods": [ + "listSessions" + ] + }, + "TerminateSession": { + "methods": [ + "terminateSession" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + } + } + } + } + }, + "SessionTemplateController": { + "clients": { + "grpc": { + "libraryClient": "SessionTemplateControllerGapicClient", + "rpcs": { + "CreateSessionTemplate": { + "methods": [ + "createSessionTemplate" + ] + }, + "DeleteSessionTemplate": { + "methods": [ + "deleteSessionTemplate" + ] + }, + "GetSessionTemplate": { + "methods": [ + "getSessionTemplate" + ] + }, + "ListSessionTemplates": { + "methods": [ + "listSessionTemplates" + ] + }, + "UpdateSessionTemplate": { + "methods": [ + "updateSessionTemplate" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + } + } + } + } + }, + "WorkflowTemplateService": { + "clients": { + "grpc": { + "libraryClient": "WorkflowTemplateServiceGapicClient", + "rpcs": { + "CreateWorkflowTemplate": { + "methods": [ + "createWorkflowTemplate" + ] + }, + "DeleteWorkflowTemplate": { + "methods": [ + "deleteWorkflowTemplate" + ] + }, + "GetWorkflowTemplate": { + "methods": [ + "getWorkflowTemplate" + ] + }, + "InstantiateInlineWorkflowTemplate": { + "methods": [ + "instantiateInlineWorkflowTemplate" + ] + }, + "InstantiateWorkflowTemplate": { + "methods": [ + "instantiateWorkflowTemplate" + ] + }, + "ListWorkflowTemplates": { + "methods": [ + "listWorkflowTemplates" + ] + }, + "UpdateWorkflowTemplate": { + "methods": [ + "updateWorkflowTemplate" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/Dataproc/v1/src/V1/resources/autoscaling_policy_service_client_config.json b/owl-bot-staging/Dataproc/v1/src/V1/resources/autoscaling_policy_service_client_config.json new file mode 100644 index 000000000000..c00d68d4355d --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/src/V1/resources/autoscaling_policy_service_client_config.json @@ -0,0 +1,85 @@ +{ + "interfaces": { + "google.cloud.dataproc.v1.AutoscalingPolicyService": { + "retry_codes": { + "no_retry_codes": [], + "no_retry_1_codes": [], + "retry_policy_1_codes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 600000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 600000, + "total_timeout_millis": 600000 + }, + "retry_policy_1_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": { + "CreateAutoscalingPolicy": { + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteAutoscalingPolicy": { + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetAutoscalingPolicy": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListAutoscalingPolicies": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateAutoscalingPolicy": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_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/autoscaling_policy_service_descriptor_config.php b/owl-bot-staging/Dataproc/v1/src/V1/resources/autoscaling_policy_service_descriptor_config.php new file mode 100644 index 000000000000..bcd0647b0a39 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/src/V1/resources/autoscaling_policy_service_descriptor_config.php @@ -0,0 +1,143 @@ + [ + '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 new file mode 100644 index 000000000000..44063647d781 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/src/V1/resources/autoscaling_policy_service_rest_client_config.php @@ -0,0 +1,323 @@ + [ + '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 new file mode 100644 index 000000000000..595eb6d972d2 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/src/V1/resources/batch_controller_client_config.json @@ -0,0 +1,57 @@ +{ + "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 new file mode 100644 index 000000000000..19bfb52172a6 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/src/V1/resources/batch_controller_descriptor_config.php @@ -0,0 +1,135 @@ + [ + '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 new file mode 100644 index 000000000000..659966269563 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/src/V1/resources/batch_controller_rest_client_config.php @@ -0,0 +1,278 @@ + [ + '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 new file mode 100644 index 000000000000..ffb0cf898459 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/src/V1/resources/cluster_controller_client_config.json @@ -0,0 +1,103 @@ +{ + "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 new file mode 100644 index 000000000000..0f22e5235cd4 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/src/V1/resources/cluster_controller_descriptor_config.php @@ -0,0 +1,304 @@ + [ + '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}', + 'cryptoKey' => 'projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}', + '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 new file mode 100644 index 000000000000..8b8101084039 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/src/V1/resources/cluster_controller_rest_client_config.php @@ -0,0 +1,399 @@ + [ + '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 new file mode 100644 index 000000000000..9e57cda3b3ec --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/src/V1/resources/job_controller_client_config.json @@ -0,0 +1,98 @@ +{ + "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 new file mode 100644 index 000000000000..453069a0a0ea --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/src/V1/resources/job_controller_descriptor_config.php @@ -0,0 +1,232 @@ + [ + '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 new file mode 100644 index 000000000000..53e1947a7087 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/src/V1/resources/job_controller_rest_client_config.php @@ -0,0 +1,372 @@ + [ + '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 new file mode 100644 index 000000000000..273c3e016458 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/src/V1/resources/node_group_controller_client_config.json @@ -0,0 +1,52 @@ +{ + "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 new file mode 100644 index 000000000000..bd02f3ee961a --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/src/V1/resources/node_group_controller_descriptor_config.php @@ -0,0 +1,121 @@ + [ + '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 new file mode 100644 index 000000000000..944ebcf8c317 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/src/V1/resources/node_group_controller_rest_client_config.php @@ -0,0 +1,268 @@ + [ + '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/session_controller_client_config.json b/owl-bot-staging/Dataproc/v1/src/V1/resources/session_controller_client_config.json new file mode 100644 index 000000000000..ebb0dc3a4d62 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/src/V1/resources/session_controller_client_config.json @@ -0,0 +1,62 @@ +{ + "interfaces": { + "google.cloud.dataproc.v1.SessionController": { + "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": { + "CreateSession": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteSession": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetSession": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListSessions": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "TerminateSession": { + "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/session_controller_descriptor_config.php b/owl-bot-staging/Dataproc/v1/src/V1/resources/session_controller_descriptor_config.php new file mode 100644 index 000000000000..8be59bd1856c --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/src/V1/resources/session_controller_descriptor_config.php @@ -0,0 +1,162 @@ + [ + 'google.cloud.dataproc.v1.SessionController' => [ + 'CreateSession' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Dataproc\V1\Session', + 'metadataReturnType' => '\Google\Cloud\Dataproc\V1\SessionOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteSession' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Dataproc\V1\Session', + 'metadataReturnType' => '\Google\Cloud\Dataproc\V1\SessionOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'TerminateSession' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Dataproc\V1\Session', + 'metadataReturnType' => '\Google\Cloud\Dataproc\V1\SessionOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetSession' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dataproc\V1\Session', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListSessions' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getSessions', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Dataproc\V1\ListSessionsResponse', + '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' => [ + 'location' => 'projects/{project}/locations/{location}', + 'service' => 'projects/{project}/locations/{location}/services/{service}', + 'session' => 'projects/{project}/locations/{location}/sessions/{session}', + 'sessionTemplate' => 'projects/{project}/locations/{location}/sessionTemplates/{template}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Dataproc/v1/src/V1/resources/session_controller_rest_client_config.php b/owl-bot-staging/Dataproc/v1/src/V1/resources/session_controller_rest_client_config.php new file mode 100644 index 000000000000..8eba90b341fc --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/src/V1/resources/session_controller_rest_client_config.php @@ -0,0 +1,293 @@ + [ + 'google.cloud.dataproc.v1.SessionController' => [ + 'CreateSession' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/sessions', + 'body' => 'session', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'session_id', + ], + ], + 'DeleteSession' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/sessions/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetSession' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/sessions/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListSessions' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/sessions', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'TerminateSession' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/sessions/*}:terminate', + '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/session_template_controller_client_config.json b/owl-bot-staging/Dataproc/v1/src/V1/resources/session_template_controller_client_config.json new file mode 100644 index 000000000000..a8312e05c9a3 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/src/V1/resources/session_template_controller_client_config.json @@ -0,0 +1,62 @@ +{ + "interfaces": { + "google.cloud.dataproc.v1.SessionTemplateController": { + "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": { + "CreateSessionTemplate": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteSessionTemplate": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetSessionTemplate": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListSessionTemplates": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateSessionTemplate": { + "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/session_template_controller_descriptor_config.php b/owl-bot-staging/Dataproc/v1/src/V1/resources/session_template_controller_descriptor_config.php new file mode 100644 index 000000000000..7f0e4054e33f --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/src/V1/resources/session_template_controller_descriptor_config.php @@ -0,0 +1,141 @@ + [ + 'google.cloud.dataproc.v1.SessionTemplateController' => [ + 'CreateSessionTemplate' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dataproc\V1\SessionTemplate', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteSessionTemplate' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetSessionTemplate' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dataproc\V1\SessionTemplate', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListSessionTemplates' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getSessionTemplates', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Dataproc\V1\ListSessionTemplatesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateSessionTemplate' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Dataproc\V1\SessionTemplate', + 'headerParams' => [ + [ + 'keyName' => 'session_template.name', + 'fieldAccessors' => [ + 'getSessionTemplate', + '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' => [ + 'location' => 'projects/{project}/locations/{location}', + 'service' => 'projects/{project}/locations/{location}/services/{service}', + 'sessionTemplate' => 'projects/{project}/locations/{location}/sessionTemplates/{template}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Dataproc/v1/src/V1/resources/session_template_controller_rest_client_config.php b/owl-bot-staging/Dataproc/v1/src/V1/resources/session_template_controller_rest_client_config.php new file mode 100644 index 000000000000..76c40e9cd267 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/src/V1/resources/session_template_controller_rest_client_config.php @@ -0,0 +1,291 @@ + [ + 'google.cloud.dataproc.v1.SessionTemplateController' => [ + 'CreateSessionTemplate' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/sessionTemplates', + 'body' => 'session_template', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteSessionTemplate' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/sessionTemplates/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetSessionTemplate' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/sessionTemplates/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListSessionTemplates' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/sessionTemplates', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateSessionTemplate' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{session_template.name=projects/*/locations/*/sessionTemplates/*}', + 'body' => 'session_template', + 'placeholders' => [ + 'session_template.name' => [ + 'getters' => [ + 'getSessionTemplate', + '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 new file mode 100644 index 000000000000..c54531343ad1 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/src/V1/resources/workflow_template_service_client_config.json @@ -0,0 +1,98 @@ +{ + "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 new file mode 100644 index 000000000000..af73a590df7a --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/src/V1/resources/workflow_template_service_descriptor_config.php @@ -0,0 +1,185 @@ + [ + '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}', + 'cryptoKey' => 'projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}', + '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 new file mode 100644 index 000000000000..67af15034a23 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/src/V1/resources/workflow_template_service_rest_client_config.php @@ -0,0 +1,361 @@ + [ + '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/Client/AutoscalingPolicyServiceClientTest.php b/owl-bot-staging/Dataproc/v1/tests/Unit/V1/Client/AutoscalingPolicyServiceClientTest.php new file mode 100644 index 000000000000..ce4a337062c2 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/tests/Unit/V1/Client/AutoscalingPolicyServiceClientTest.php @@ -0,0 +1,725 @@ +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 new file mode 100644 index 000000000000..e12d6379dda5 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/tests/Unit/V1/Client/BatchControllerClientTest.php @@ -0,0 +1,702 @@ +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 new file mode 100644 index 000000000000..147d9dfea2fb --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/tests/Unit/V1/Client/ClusterControllerClientTest.php @@ -0,0 +1,1380 @@ +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 new file mode 100644 index 000000000000..570e88d87f9a --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/tests/Unit/V1/Client/JobControllerClientTest.php @@ -0,0 +1,985 @@ +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 new file mode 100644 index 000000000000..b153e5f9d1a1 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/tests/Unit/V1/Client/NodeGroupControllerClientTest.php @@ -0,0 +1,677 @@ +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/SessionControllerClientTest.php b/owl-bot-staging/Dataproc/v1/tests/Unit/V1/Client/SessionControllerClientTest.php new file mode 100644 index 000000000000..11ae84d199c1 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/tests/Unit/V1/Client/SessionControllerClientTest.php @@ -0,0 +1,929 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return SessionControllerClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SessionControllerClient($options); + } + + /** @test */ + public function createSessionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createSessionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uuid = 'uuid3601339'; + $stateMessage = 'stateMessage29641305'; + $creator = 'creator1028554796'; + $user = 'user3599307'; + $sessionTemplate = 'sessionTemplate-926284797'; + $expectedResponse = new Session(); + $expectedResponse->setName($name); + $expectedResponse->setUuid($uuid); + $expectedResponse->setStateMessage($stateMessage); + $expectedResponse->setCreator($creator); + $expectedResponse->setUser($user); + $expectedResponse->setSessionTemplate($sessionTemplate); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createSessionTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $session = new Session(); + $sessionName = 'sessionName-22661567'; + $session->setName($sessionName); + $sessionId = 'sessionId1661853540'; + $request = (new CreateSessionRequest()) + ->setParent($formattedParent) + ->setSession($session) + ->setSessionId($sessionId); + $response = $gapicClient->createSession($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.SessionController/CreateSession', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getSession(); + $this->assertProtobufEquals($session, $actualValue); + $actualValue = $actualApiRequestObject->getSessionId(); + $this->assertProtobufEquals($sessionId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createSessionTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createSessionExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createSessionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $session = new Session(); + $sessionName = 'sessionName-22661567'; + $session->setName($sessionName); + $sessionId = 'sessionId1661853540'; + $request = (new CreateSessionRequest()) + ->setParent($formattedParent) + ->setSession($session) + ->setSessionId($sessionId); + $response = $gapicClient->createSession($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createSessionTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteSessionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteSessionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $uuid = 'uuid3601339'; + $stateMessage = 'stateMessage29641305'; + $creator = 'creator1028554796'; + $user = 'user3599307'; + $sessionTemplate = 'sessionTemplate-926284797'; + $expectedResponse = new Session(); + $expectedResponse->setName($name2); + $expectedResponse->setUuid($uuid); + $expectedResponse->setStateMessage($stateMessage); + $expectedResponse->setCreator($creator); + $expectedResponse->setUser($user); + $expectedResponse->setSessionTemplate($sessionTemplate); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteSessionTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->sessionName('[PROJECT]', '[LOCATION]', '[SESSION]'); + $request = (new DeleteSessionRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteSession($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.SessionController/DeleteSession', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteSessionTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteSessionExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteSessionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->sessionName('[PROJECT]', '[LOCATION]', '[SESSION]'); + $request = (new DeleteSessionRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteSession($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteSessionTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getSessionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $uuid = 'uuid3601339'; + $stateMessage = 'stateMessage29641305'; + $creator = 'creator1028554796'; + $user = 'user3599307'; + $sessionTemplate = 'sessionTemplate-926284797'; + $expectedResponse = new Session(); + $expectedResponse->setName($name2); + $expectedResponse->setUuid($uuid); + $expectedResponse->setStateMessage($stateMessage); + $expectedResponse->setCreator($creator); + $expectedResponse->setUser($user); + $expectedResponse->setSessionTemplate($sessionTemplate); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->sessionName('[PROJECT]', '[LOCATION]', '[SESSION]'); + $request = (new GetSessionRequest()) + ->setName($formattedName); + $response = $gapicClient->getSession($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.SessionController/GetSession', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSessionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->sessionName('[PROJECT]', '[LOCATION]', '[SESSION]'); + $request = (new GetSessionRequest()) + ->setName($formattedName); + try { + $gapicClient->getSession($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSessionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $sessionsElement = new Session(); + $sessions = [ + $sessionsElement, + ]; + $expectedResponse = new ListSessionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSessions($sessions); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListSessionsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listSessions($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getSessions()[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.SessionController/ListSessions', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSessionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListSessionsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listSessions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function terminateSessionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/terminateSessionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $uuid = 'uuid3601339'; + $stateMessage = 'stateMessage29641305'; + $creator = 'creator1028554796'; + $user = 'user3599307'; + $sessionTemplate = 'sessionTemplate-926284797'; + $expectedResponse = new Session(); + $expectedResponse->setName($name2); + $expectedResponse->setUuid($uuid); + $expectedResponse->setStateMessage($stateMessage); + $expectedResponse->setCreator($creator); + $expectedResponse->setUser($user); + $expectedResponse->setSessionTemplate($sessionTemplate); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/terminateSessionTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->sessionName('[PROJECT]', '[LOCATION]', '[SESSION]'); + $request = (new TerminateSessionRequest()) + ->setName($formattedName); + $response = $gapicClient->terminateSession($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.SessionController/TerminateSession', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/terminateSessionTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function terminateSessionExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/terminateSessionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->sessionName('[PROJECT]', '[LOCATION]', '[SESSION]'); + $request = (new TerminateSessionRequest()) + ->setName($formattedName); + $response = $gapicClient->terminateSession($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/terminateSessionTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->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 createSessionAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createSessionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uuid = 'uuid3601339'; + $stateMessage = 'stateMessage29641305'; + $creator = 'creator1028554796'; + $user = 'user3599307'; + $sessionTemplate = 'sessionTemplate-926284797'; + $expectedResponse = new Session(); + $expectedResponse->setName($name); + $expectedResponse->setUuid($uuid); + $expectedResponse->setStateMessage($stateMessage); + $expectedResponse->setCreator($creator); + $expectedResponse->setUser($user); + $expectedResponse->setSessionTemplate($sessionTemplate); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createSessionTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $session = new Session(); + $sessionName = 'sessionName-22661567'; + $session->setName($sessionName); + $sessionId = 'sessionId1661853540'; + $request = (new CreateSessionRequest()) + ->setParent($formattedParent) + ->setSession($session) + ->setSessionId($sessionId); + $response = $gapicClient->createSessionAsync($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.SessionController/CreateSession', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getSession(); + $this->assertProtobufEquals($session, $actualValue); + $actualValue = $actualApiRequestObject->getSessionId(); + $this->assertProtobufEquals($sessionId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createSessionTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->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/SessionTemplateControllerClientTest.php b/owl-bot-staging/Dataproc/v1/tests/Unit/V1/Client/SessionTemplateControllerClientTest.php new file mode 100644 index 000000000000..42eb98386508 --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/tests/Unit/V1/Client/SessionTemplateControllerClientTest.php @@ -0,0 +1,677 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return SessionTemplateControllerClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SessionTemplateControllerClient($options); + } + + /** @test */ + public function createSessionTemplateTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $description = 'description-1724546052'; + $creator = 'creator1028554796'; + $uuid = 'uuid3601339'; + $expectedResponse = new SessionTemplate(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setCreator($creator); + $expectedResponse->setUuid($uuid); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $sessionTemplate = new SessionTemplate(); + $sessionTemplateName = 'sessionTemplateName-1744858149'; + $sessionTemplate->setName($sessionTemplateName); + $request = (new CreateSessionTemplateRequest()) + ->setParent($formattedParent) + ->setSessionTemplate($sessionTemplate); + $response = $gapicClient->createSessionTemplate($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.SessionTemplateController/CreateSessionTemplate', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getSessionTemplate(); + $this->assertProtobufEquals($sessionTemplate, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createSessionTemplateExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $sessionTemplate = new SessionTemplate(); + $sessionTemplateName = 'sessionTemplateName-1744858149'; + $sessionTemplate->setName($sessionTemplateName); + $request = (new CreateSessionTemplateRequest()) + ->setParent($formattedParent) + ->setSessionTemplate($sessionTemplate); + try { + $gapicClient->createSessionTemplate($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteSessionTemplateTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->sessionTemplateName('[PROJECT]', '[LOCATION]', '[TEMPLATE]'); + $request = (new DeleteSessionTemplateRequest()) + ->setName($formattedName); + $gapicClient->deleteSessionTemplate($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.dataproc.v1.SessionTemplateController/DeleteSessionTemplate', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteSessionTemplateExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->sessionTemplateName('[PROJECT]', '[LOCATION]', '[TEMPLATE]'); + $request = (new DeleteSessionTemplateRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteSessionTemplate($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSessionTemplateTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $creator = 'creator1028554796'; + $uuid = 'uuid3601339'; + $expectedResponse = new SessionTemplate(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setCreator($creator); + $expectedResponse->setUuid($uuid); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->sessionTemplateName('[PROJECT]', '[LOCATION]', '[TEMPLATE]'); + $request = (new GetSessionTemplateRequest()) + ->setName($formattedName); + $response = $gapicClient->getSessionTemplate($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.SessionTemplateController/GetSessionTemplate', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSessionTemplateExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->sessionTemplateName('[PROJECT]', '[LOCATION]', '[TEMPLATE]'); + $request = (new GetSessionTemplateRequest()) + ->setName($formattedName); + try { + $gapicClient->getSessionTemplate($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSessionTemplatesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $sessionTemplatesElement = new SessionTemplate(); + $sessionTemplates = [ + $sessionTemplatesElement, + ]; + $expectedResponse = new ListSessionTemplatesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSessionTemplates($sessionTemplates); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListSessionTemplatesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listSessionTemplates($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getSessionTemplates()[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.SessionTemplateController/ListSessionTemplates', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSessionTemplatesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListSessionTemplatesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listSessionTemplates($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateSessionTemplateTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $description = 'description-1724546052'; + $creator = 'creator1028554796'; + $uuid = 'uuid3601339'; + $expectedResponse = new SessionTemplate(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setCreator($creator); + $expectedResponse->setUuid($uuid); + $transport->addResponse($expectedResponse); + // Mock request + $sessionTemplate = new SessionTemplate(); + $sessionTemplateName = 'sessionTemplateName-1744858149'; + $sessionTemplate->setName($sessionTemplateName); + $request = (new UpdateSessionTemplateRequest()) + ->setSessionTemplate($sessionTemplate); + $response = $gapicClient->updateSessionTemplate($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.SessionTemplateController/UpdateSessionTemplate', $actualFuncCall); + $actualValue = $actualRequestObject->getSessionTemplate(); + $this->assertProtobufEquals($sessionTemplate, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateSessionTemplateExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $sessionTemplate = new SessionTemplate(); + $sessionTemplateName = 'sessionTemplateName-1744858149'; + $sessionTemplate->setName($sessionTemplateName); + $request = (new UpdateSessionTemplateRequest()) + ->setSessionTemplate($sessionTemplate); + try { + $gapicClient->updateSessionTemplate($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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 createSessionTemplateAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $description = 'description-1724546052'; + $creator = 'creator1028554796'; + $uuid = 'uuid3601339'; + $expectedResponse = new SessionTemplate(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setCreator($creator); + $expectedResponse->setUuid($uuid); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $sessionTemplate = new SessionTemplate(); + $sessionTemplateName = 'sessionTemplateName-1744858149'; + $sessionTemplate->setName($sessionTemplateName); + $request = (new CreateSessionTemplateRequest()) + ->setParent($formattedParent) + ->setSessionTemplate($sessionTemplate); + $response = $gapicClient->createSessionTemplateAsync($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.SessionTemplateController/CreateSessionTemplate', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getSessionTemplate(); + $this->assertProtobufEquals($sessionTemplate, $actualValue); + $this->assertTrue($transport->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 new file mode 100644 index 000000000000..2998d5f41ceb --- /dev/null +++ b/owl-bot-staging/Dataproc/v1/tests/Unit/V1/Client/WorkflowTemplateServiceClientTest.php @@ -0,0 +1,956 @@ +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()); + } +} From 99f89ef921e801e246d8a2b42e54458623a6c80a Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Wed, 25 Sep 2024 04:03:59 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- Dataproc/metadata/V1/SessionTemplates.php | Bin 4080 -> 4164 bytes Dataproc/metadata/V1/Sessions.php | Bin 4635 -> 4741 bytes Dataproc/src/V1/ListSessionsRequest.php | 28 +- Dataproc/src/V1/Session.php | 33 + Dataproc/src/V1/SessionTemplate.php | 33 + .../src}/V1/SparkConnectConfig.php | 0 .../Cloud/Dataproc/V1/AutoscalingPolicies.php | Bin 4769 -> 0 bytes .../Google/Cloud/Dataproc/V1/Batches.php | Bin 4900 -> 0 bytes .../Google/Cloud/Dataproc/V1/Clusters.php | Bin 15194 -> 0 bytes .../Google/Cloud/Dataproc/V1/Jobs.php | Bin 10877 -> 0 bytes .../Google/Cloud/Dataproc/V1/NodeGroups.php | 58 - .../Google/Cloud/Dataproc/V1/Operations.php | Bin 3289 -> 0 bytes .../Cloud/Dataproc/V1/SessionTemplates.php | Bin 4164 -> 0 bytes .../Google/Cloud/Dataproc/V1/Sessions.php | Bin 4741 -> 0 bytes .../Google/Cloud/Dataproc/V1/Shared.php | Bin 5596 -> 0 bytes .../Cloud/Dataproc/V1/WorkflowTemplates.php | Bin 9293 -> 0 bytes .../Cloud/Dataproc/V1/AcceleratorConfig.php | 151 -- .../Cloud/Dataproc/V1/AutoscalingConfig.php | 87 -- .../Cloud/Dataproc/V1/AutoscalingPolicy.php | 324 ---- .../Cloud/Dataproc/V1/AutotuningConfig.php | 67 - .../Dataproc/V1/AutotuningConfig/Scenario.php | 72 - .../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 --- .../Dataproc/V1/CreateSessionRequest.php | 249 --- .../V1/CreateSessionTemplateRequest.php | 127 -- .../V1/CreateWorkflowTemplateRequest.php | 164 -- .../Dataproc/V1/DataprocMetricConfig.php | 67 - .../V1/DataprocMetricConfig/Metric.php | 208 --- .../V1/DataprocMetricConfig/MetricSource.php | 111 -- .../V1/DeleteAutoscalingPolicyRequest.php | 119 -- .../Cloud/Dataproc/V1/DeleteBatchRequest.php | 91 -- .../Dataproc/V1/DeleteClusterRequest.php | 265 ---- .../Cloud/Dataproc/V1/DeleteJobRequest.php | 157 -- .../Dataproc/V1/DeleteSessionRequest.php | 143 -- .../V1/DeleteSessionTemplateRequest.php | 81 - .../V1/DeleteWorkflowTemplateRequest.php | 161 -- .../Dataproc/V1/DiagnoseClusterRequest.php | 361 ----- .../DiagnoseClusterRequest/TarballAccess.php | 66 - .../Dataproc/V1/DiagnoseClusterResults.php | 75 - .../Google/Cloud/Dataproc/V1/DiskConfig.php | 229 --- .../Dataproc/V1/DriverSchedulingConfig.php | 101 -- .../Cloud/Dataproc/V1/EncryptionConfig.php | 209 --- .../Cloud/Dataproc/V1/EndpointConfig.php | 109 -- .../Cloud/Dataproc/V1/EnvironmentConfig.php | 121 -- .../Cloud/Dataproc/V1/ExecutionConfig.php | 448 ------ .../Cloud/Dataproc/V1/FailureAction.php | 62 - .../src/Google/Cloud/Dataproc/V1/FlinkJob.php | 322 ---- .../Cloud/Dataproc/V1/GceClusterConfig.php | 750 --------- .../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 -- .../Cloud/Dataproc/V1/GetSessionRequest.php | 81 - .../Dataproc/V1/GetSessionTemplateRequest.php | 81 - .../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 | 746 --------- .../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 | 918 ----------- .../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/JupyterConfig.php | 101 -- .../Dataproc/V1/JupyterConfig/Kernel.php | 64 - .../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 | 147 -- .../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 | 155 -- .../V1/ListSessionTemplatesRequest.php | 199 --- .../V1/ListSessionTemplatesResponse.php | 105 -- .../Cloud/Dataproc/V1/ListSessionsRequest.php | 235 --- .../Dataproc/V1/ListSessionsResponse.php | 105 -- .../V1/ListWorkflowTemplatesRequest.php | 190 --- .../V1/ListWorkflowTemplatesResponse.php | 151 -- .../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 | 578 ------- .../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 ---- .../Dataproc/V1/PyPiRepositoryConfig.php | 67 - .../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/RepositoryConfig.php | 77 - .../Cloud/Dataproc/V1/ReservationAffinity.php | 135 -- .../Dataproc/V1/ReservationAffinity/Type.php | 70 - .../Dataproc/V1/ResizeNodeGroupRequest.php | 290 ---- .../Cloud/Dataproc/V1/RuntimeConfig.php | 269 ---- .../Google/Cloud/Dataproc/V1/RuntimeInfo.php | 267 ---- .../Cloud/Dataproc/V1/SecurityConfig.php | 125 -- .../src/Google/Cloud/Dataproc/V1/Session.php | 690 --------- .../V1/Session/SessionStateHistory.php | 156 -- .../Cloud/Dataproc/V1/Session/State.php | 85 - .../Dataproc/V1/SessionOperationMetadata.php | 325 ---- .../SessionOperationType.php | 71 - .../Cloud/Dataproc/V1/SessionTemplate.php | 482 ------ .../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 | 365 ----- .../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/StartupConfig.php | 98 -- .../Cloud/Dataproc/V1/StopClusterRequest.php | 247 --- .../Cloud/Dataproc/V1/SubmitJobRequest.php | 237 --- .../Cloud/Dataproc/V1/TemplateParameter.php | 355 ----- .../Dataproc/V1/TerminateSessionRequest.php | 143 -- .../src/Google/Cloud/Dataproc/V1/TrinoJob.php | 312 ---- .../V1/UpdateAutoscalingPolicyRequest.php | 90 -- .../Dataproc/V1/UpdateClusterRequest.php | 629 -------- .../Cloud/Dataproc/V1/UpdateJobRequest.php | 247 --- .../V1/UpdateSessionTemplateRequest.php | 90 -- .../V1/UpdateWorkflowTemplateRequest.php | 96 -- .../Google/Cloud/Dataproc/V1/UsageMetrics.php | 193 --- .../Cloud/Dataproc/V1/UsageSnapshot.php | 314 ---- .../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 | 586 ------- .../V1/WorkflowTemplate/EncryptionConfig.php | 170 -- .../Dataproc/V1/WorkflowTemplatePlacement.php | 115 -- .../Cloud/Dataproc/V1/YarnApplication.php | 184 --- .../Dataproc/V1/YarnApplication/State.php | 111 -- .../create_autoscaling_policy.php | 135 -- .../delete_autoscaling_policy.php | 83 - .../get_autoscaling_policy.php | 84 - .../get_iam_policy.php | 72 - .../list_autoscaling_policies.php | 85 - .../set_iam_policy.php | 77 - .../test_iam_permissions.php | 84 - .../update_autoscaling_policy.php | 123 -- .../V1/BatchControllerClient/create_batch.php | 85 - .../V1/BatchControllerClient/delete_batch.php | 72 - .../V1/BatchControllerClient/get_batch.php | 73 - .../BatchControllerClient/get_iam_policy.php | 72 - .../V1/BatchControllerClient/list_batches.php | 76 - .../BatchControllerClient/set_iam_policy.php | 77 - .../test_iam_permissions.php | 84 - .../create_cluster.php | 103 -- .../delete_cluster.php | 88 -- .../diagnose_cluster.php | 95 -- .../ClusterControllerClient/get_cluster.php | 77 - .../get_iam_policy.php | 72 - .../ClusterControllerClient/list_clusters.php | 79 - .../set_iam_policy.php | 77 - .../ClusterControllerClient/start_cluster.php | 89 -- .../ClusterControllerClient/stop_cluster.php | 89 -- .../test_iam_permissions.php | 84 - .../update_cluster.php | 113 -- .../V1/JobControllerClient/cancel_job.php | 81 - .../V1/JobControllerClient/delete_job.php | 76 - .../V1/JobControllerClient/get_iam_policy.php | 72 - .../V1/JobControllerClient/get_job.php | 77 - .../V1/JobControllerClient/list_jobs.php | 79 - .../V1/JobControllerClient/set_iam_policy.php | 77 - .../V1/JobControllerClient/submit_job.php | 85 - .../submit_job_as_operation.php | 97 -- .../test_iam_permissions.php | 84 - .../V1/JobControllerClient/update_job.php | 92 -- .../create_node_group.php | 97 -- .../get_iam_policy.php | 72 - .../get_node_group.php | 79 - .../resize_node_group.php | 91 -- .../set_iam_policy.php | 77 - .../test_iam_permissions.php | 84 - .../create_session.php | 98 -- .../delete_session.php | 84 - .../get_iam_policy.php | 72 - .../SessionControllerClient/get_session.php | 71 - .../SessionControllerClient/list_sessions.php | 76 - .../set_iam_policy.php | 77 - .../terminate_session.php | 83 - .../test_iam_permissions.php | 84 - .../create_session_template.php | 78 - .../delete_session_template.php | 73 - .../get_iam_policy.php | 72 - .../get_session_template.php | 75 - .../list_session_templates.php | 76 - .../set_iam_policy.php | 77 - .../test_iam_permissions.php | 84 - .../update_session_template.php | 72 - .../create_workflow_template.php | 108 -- .../delete_workflow_template.php | 82 - .../get_iam_policy.php | 72 - .../get_workflow_template.php | 87 -- .../instantiate_inline_workflow_template.php | 142 -- .../instantiate_workflow_template.php | 112 -- .../list_workflow_templates.php | 85 - .../set_iam_policy.php | 77 - .../test_iam_permissions.php | 84 - .../update_workflow_template.php | 93 -- .../Client/AutoscalingPolicyServiceClient.php | 536 ------- .../src/V1/Client/BatchControllerClient.php | 512 ------ .../src/V1/Client/ClusterControllerClient.php | 689 -------- .../v1/src/V1/Client/JobControllerClient.php | 511 ------ .../V1/Client/NodeGroupControllerClient.php | 476 ------ .../src/V1/Client/SessionControllerClient.php | 562 ------- .../SessionTemplateControllerClient.php | 493 ------ .../Client/WorkflowTemplateServiceClient.php | 774 --------- .../Dataproc/v1/src/V1/gapic_metadata.json | 421 ----- ...oscaling_policy_service_client_config.json | 85 - ...aling_policy_service_descriptor_config.php | 143 -- ...ling_policy_service_rest_client_config.php | 323 ---- .../batch_controller_client_config.json | 57 - .../batch_controller_descriptor_config.php | 135 -- .../batch_controller_rest_client_config.php | 278 ---- .../cluster_controller_client_config.json | 103 -- .../cluster_controller_descriptor_config.php | 304 ---- .../cluster_controller_rest_client_config.php | 399 ----- .../job_controller_client_config.json | 98 -- .../job_controller_descriptor_config.php | 232 --- .../job_controller_rest_client_config.php | 372 ----- .../node_group_controller_client_config.json | 52 - ...ode_group_controller_descriptor_config.php | 121 -- ...de_group_controller_rest_client_config.php | 268 ---- .../session_controller_client_config.json | 62 - .../session_controller_descriptor_config.php | 162 -- .../session_controller_rest_client_config.php | 293 ---- ...ion_template_controller_client_config.json | 62 - ..._template_controller_descriptor_config.php | 141 -- ...template_controller_rest_client_config.php | 291 ---- ...rkflow_template_service_client_config.json | 98 -- ...low_template_service_descriptor_config.php | 185 --- ...ow_template_service_rest_client_config.php | 361 ----- .../AutoscalingPolicyServiceClientTest.php | 725 --------- .../V1/Client/BatchControllerClientTest.php | 702 --------- .../V1/Client/ClusterControllerClientTest.php | 1380 ----------------- .../V1/Client/JobControllerClientTest.php | 985 ------------ .../Client/NodeGroupControllerClientTest.php | 677 -------- .../V1/Client/SessionControllerClientTest.php | 929 ----------- .../SessionTemplateControllerClientTest.php | 677 -------- .../WorkflowTemplateServiceClientTest.php | 956 ------------ 308 files changed, 82 insertions(+), 59646 deletions(-) rename {owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc => Dataproc/src}/V1/SparkConnectConfig.php (100%) 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/SessionTemplates.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/GPBMetadata/Google/Cloud/Dataproc/V1/Sessions.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/AutotuningConfig.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/AutotuningConfig/Scenario.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/CreateSessionRequest.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/CreateSessionTemplateRequest.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/DeleteSessionRequest.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DeleteSessionTemplateRequest.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/DiagnoseClusterRequest/TarballAccess.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/FlinkJob.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/GetSessionRequest.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GetSessionTemplateRequest.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/JupyterConfig.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/JupyterConfig/Kernel.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/ListSessionTemplatesRequest.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListSessionTemplatesResponse.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListSessionsRequest.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListSessionsResponse.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/PyPiRepositoryConfig.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/RepositoryConfig.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/Session.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/Session/SessionStateHistory.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/Session/State.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SessionOperationMetadata.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SessionOperationMetadata/SessionOperationType.php delete mode 100644 owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SessionTemplate.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/StartupConfig.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/TerminateSessionRequest.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/UpdateSessionTemplateRequest.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/WorkflowTemplate/EncryptionConfig.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/SessionControllerClient/create_session.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/delete_session.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/get_iam_policy.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/get_session.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/list_sessions.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/set_iam_policy.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/terminate_session.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/create_session_template.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/delete_session_template.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/get_iam_policy.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/get_session_template.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/list_session_templates.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/set_iam_policy.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/update_session_template.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/Client/AutoscalingPolicyServiceClient.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/SessionControllerClient.php delete mode 100644 owl-bot-staging/Dataproc/v1/src/V1/Client/SessionTemplateControllerClient.php delete mode 100644 owl-bot-staging/Dataproc/v1/src/V1/Client/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/session_controller_client_config.json delete mode 100644 owl-bot-staging/Dataproc/v1/src/V1/resources/session_controller_descriptor_config.php delete mode 100644 owl-bot-staging/Dataproc/v1/src/V1/resources/session_controller_rest_client_config.php delete mode 100644 owl-bot-staging/Dataproc/v1/src/V1/resources/session_template_controller_client_config.json delete mode 100644 owl-bot-staging/Dataproc/v1/src/V1/resources/session_template_controller_descriptor_config.php delete mode 100644 owl-bot-staging/Dataproc/v1/src/V1/resources/session_template_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/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/SessionControllerClientTest.php delete mode 100644 owl-bot-staging/Dataproc/v1/tests/Unit/V1/Client/SessionTemplateControllerClientTest.php delete mode 100644 owl-bot-staging/Dataproc/v1/tests/Unit/V1/Client/WorkflowTemplateServiceClientTest.php diff --git a/Dataproc/metadata/V1/SessionTemplates.php b/Dataproc/metadata/V1/SessionTemplates.php index 2dfa7b62e8102a1a42c701f3734ce3b0a315940f..e7a914ac62446e8a2ed1ebdd2f9bbe2eb3a4b01b 100644 GIT binary patch delta 83 zcmew$e?(!!ab}iv5?lt8b6FHNzh)L-VQOKU{Fi;dLJ*f|aY15Hc6@SvUS4W)Nqli? iadBpTo&>i7qXxH;&g6^SQar&R70wU^o7ZtTu>%0Z`W$iq delta 33 pcmX@2@IijVab}iV;#>xkb6FHNzh)L-VcNht`7ita%>tYz>;To!3yJ^$ diff --git a/Dataproc/metadata/V1/Sessions.php b/Dataproc/metadata/V1/Sessions.php index 4b9e4dfa3e268a7b703fa46dd5b80de121a755da..df6cb9893dc2229e0459df677bae1b7ac044c2af 100644 GIT binary patch delta 105 zcmbQO(yF?loSA8l?B+`5SIkVyxhAKwZ%_#05-l!BEXs~g&d.google.cloud.dataproc.v1.SparkConnectConfig spark_connect_session = 17 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dataproc\V1\SparkConnectConfig|null + */ + public function getSparkConnectSession() + { + return $this->readOneof(17); + } + + public function hasSparkConnectSession() + { + return $this->hasOneof(17); + } + + /** + * Optional. Spark Connect session config. + * + * Generated from protobuf field .google.cloud.dataproc.v1.SparkConnectConfig spark_connect_session = 17 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dataproc\V1\SparkConnectConfig $var + * @return $this + */ + public function setSparkConnectSession($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\SparkConnectConfig::class); + $this->writeOneof(17, $var); + + return $this; + } + /** * Output only. Runtime information about session execution. * diff --git a/Dataproc/src/V1/SessionTemplate.php b/Dataproc/src/V1/SessionTemplate.php index 3c96f753f7cd..67f8bbc9f743 100644 --- a/Dataproc/src/V1/SessionTemplate.php +++ b/Dataproc/src/V1/SessionTemplate.php @@ -92,6 +92,8 @@ class SessionTemplate extends \Google\Protobuf\Internal\Message * Output only. The time when the template was created. * @type \Google\Cloud\Dataproc\V1\JupyterConfig $jupyter_session * Optional. Jupyter session config. + * @type \Google\Cloud\Dataproc\V1\SparkConnectConfig $spark_connect_session + * Optional. Spark Connect session config. * @type string $creator * Output only. The email address of the user who created the template. * @type array|\Google\Protobuf\Internal\MapField $labels @@ -237,6 +239,37 @@ public function setJupyterSession($var) return $this; } + /** + * Optional. Spark Connect session config. + * + * Generated from protobuf field .google.cloud.dataproc.v1.SparkConnectConfig spark_connect_session = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Dataproc\V1\SparkConnectConfig|null + */ + public function getSparkConnectSession() + { + return $this->readOneof(11); + } + + public function hasSparkConnectSession() + { + return $this->hasOneof(11); + } + + /** + * Optional. Spark Connect session config. + * + * Generated from protobuf field .google.cloud.dataproc.v1.SparkConnectConfig spark_connect_session = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Dataproc\V1\SparkConnectConfig $var + * @return $this + */ + public function setSparkConnectSession($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\SparkConnectConfig::class); + $this->writeOneof(11, $var); + + return $this; + } + /** * Output only. The email address of the user who created the template. * diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SparkConnectConfig.php b/Dataproc/src/V1/SparkConnectConfig.php similarity index 100% rename from owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SparkConnectConfig.php rename to Dataproc/src/V1/SparkConnectConfig.php 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 98b0e6cfe0333a52130f4349319bb8a979803766..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~VGcGuh3>&BtIbmMp4XWn_{dES}b zYd5@Y54^5#U|8jlfFmt^R@GQ84-~ngGaBIJ?7B`d3#hX!>lOgL z_^CF8InyIG({WtEg6sI@a(_*Ih_u92n_!2HmvfU~yIH~8Xot9Tywp25RM3HojJaP6 zxMukR4?ba>%1K-Ac&s}-Rqpns>m=M;v)PQd@+Nn|Y)rn`iu2%60bD+W{9#Tdm854% zk!MOf3;CH44taz-O6-SnO#W;l&=REA8zJlAfK!P9G^92R6~d789@nnX4EYP=r}xLP zU`Pdvk0-&2{kH2u05YVR({ye27(4-v2s`I8;;+iYALazS3ywFCPpmq!+b$(+yOW#X z(d^>olA3F9>7|NDNX%qLsRAewU z3250nx~mdJqQfSb@iB*OBHFD#JImyYnni<~V9G`fZ2P$>eS)*GlwSHkwWUp&x$ZF9 z6*X)5OCX#04Q9c_ecTQAWExEFAUg;*rJT8{m4DTqn!jjZE|#0x39dB1#JjvPFe9vT z!F-G@<{NwAQ_rwnOZ66GFM8}HJAKrajXl)w)vEn>dvJ3IBE@adtBgJMaB#Fr795N9 zRs2x{r&1*Zt03D&)QOZMgqvM_Bb|PU^dZkku#(UVSK|^mZt?Ekba$P)hbeKJ(g4}T zQxR%pw^G!uw#BqA&Z|=QX`rYegT|NQMr&XE}R_3=fIgbyF;AF8!cX#=)ls}a;OF` zfIIq>P~liI}Kc#xn3_Ftv+Gdz;A$RYLKx z1`4Yb^ZQO>TU9f-gFgwd&!7pWJVbflRYs~T@ZR%}c>#`Lo3}WGxSVuDL0pIgG0^Ty z17*lfDSiY_Z(ueMjB30QHeA_$qYB3`cCi5p?|Zxtq|?w}gR;u_Ye1l|hHX4zj{m)k zM|?Xsi9bLTzh_2Ny@2gJ366QFjq5(YNy;4!)i(ox{GGY?vGRdD{Iud18aSI;mhbUi zhhYUAl^Wrta-oT{U|fbLgs~m`fYlRK^pD`hAF?1fprE^$?hp&ZZ!=&f#R%|fx?EFI zLbCJYETQ;~_Qaf4R=cR|^6>XRzs@|=ic8|PM9!u3dAzSQ#9)uLo;DTy0b3OPfMOlCH24+&a{wPvXQX*1LMx?|yD)|am zd{zVVhu6UT;WUtc=Vx;!@ySp1MAiis(fNiTUCYL-Lv6f3am7g?l zhF|icwGLbsDg*7DA0AclIijjt6&AVz;tk+oXKRz|rK_U8c xf2DWi?Hs-y_u>AlK%|A};@+5&`*Znx{FZ!Ceb7jJ|49AzAxElj6g|)b;6LgDcX0p! 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 5a78a2e6100eb71d3de3df485d5c8896fa5705fe..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4900 zcmb_gNpIUm6prjzj-R|vHbqGqM%kRjQsX3OA}4LM*%9j6uI&U}1PBy0l9x(}qjR z95pFZU0PGBZN+U;#b%akX_lc>TlG3+ie|0Zx7 z!?GF%O>2hLs-u~m&Kb4$5TsH<|>@|@5v=ec&d z;Axki-JSu^4ApUzoU{TPpx{5dRW)=?aa`5K|1RrJMK^UN-sG2M18wuGXYOoO^X z@c1v2*S&4IIlZn-N{pFI56DM~%UU$NyP`1awwO61aB~Bj!BcsMXk~4^oHb30N5L|k zOs3;g$HZ=mc|)hBdpMn0of@?qZK~_K#SW*sOua%mFvy--D6ceCMr#M(ciu7^tYwAyezO6Q?~3s;y(Y@+y$MnYa*IsPj};s$Q-=fioci<|Wiy zy5cSM_P-;t=80YM#EedA(pHcfPw1>CBp3s`FHL#yy+t2nu;}^`mIBFNB0%ztBAW@$ zSf(#qm;rJRqBfR~>Bb{UWO68X<*#htKiLc9d=MJBD@MghA>E~gHn{@>g23W^s1=*O zkdjipVND77TtAv6C*hb-s_3DZ9bK z-e8kIq3iRyBP~(KxAl&$pMoJ4f|_CfjzhGr8%UHP-*_x6 zR->#^ZN~>XF29E3T}T}p8H|$mVNgVlI_P=-0RoOe9W&`yZY2bXr)r4AA=Wan4z#9P zH7Mfj$E>3R{mBxL0yXHi0(qy1{|+!9@MOOIg~>754> zkN>(AKeiv5Whq@kVHwy5Fu>1e8XrQ{(dj)L5gVsgxUf`BU@Z7s1^L~}8GWRfTotT1HC|e{3 z{V!-+GCmoBfpyhrN#Y&K^xcmn84L)AkWwdBR}@J1QRKuPaaU`C_qvuLA@iI-4!c<8w6g z<=gCM`q|anrvEq&KRZJT`NqFf5+DVoLssDGL)9 zxdS!N5p!F0%~0ER(kph=oQ`vImWY#JsUBao%?`G%Tlrdrb11$eZkafBH!8 zJ(dPq{)Kxhds0rrw?qfZzc`hC{pa7`_uWn2hQy@RWh+H#xnOVE^UsBYb2Yq=M24sTUH%AT^w4U6WX&JzFRvK0AZ zMvC}#jTf?p75c6;oyOg;NPT>Eb*A%JjfyDTxfWcXZ^@4>p>H$%(AKpbzRL(n`Tb-Q HHUa(xpI;NL 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 3962d2eb574def42308956d327997996057cce11..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 15194 zcmd5@O>7%UcAh3JSuR>K)sk(Q_IT*_Y(_I{Q)ABV?2PQ0gcK=>D~V)CY7A!;bSSb# z^@w6K-A#G40|Sdp4!b}O+1*nDEH=m`KZjfrAi)AT6&|)PRAlCSRH3|wST5Q zi*bZ&ZPVzuFGsU(8trD*IIN$Tmi=<16+^1Zxi>ka411+6sp-odb(l-_ux=a8^Y4D! z>a^@$r(d5is7o9(@IPS>O^iHRxh z!&06POPxGQ+>|WpT@(I{%tm;##2bNu1F{W$UmAy;a4RsumKGp~-j+jrxsc1Wd^ML- zzcO~J!*y9syDz7;`wF`<#Otn{#N9DG+e%YvrDSq@aNHohlY^d{_ld=!kD*<1h9?n! zhU=-2oG`ThbEzkCJR#S2p$seho}mn4O#9P^P5#-~QZ)y?LTl2n$jWTXF< ziKw^ORT*=1iZx4-{?HRP-LN_bW@{;mFJtMww^CxY;X6;sb=LTN;;g7ucH_jf-Cn(| zdn-tGjI&FP=k|%98^JWorrY&>qwOrsB%|2V!|_Zcb!wZ>&v#t=RBR0AqA1gImM)$5 zTva}w$fIhG%?Wb-&~y;kPM0q8t(-$VK{f%w_jaY_6$G4JL6BV(J(@*i%Tl7S=b3sgf5jvNMgc$7dp5W zAe0T;>UD#P2v*N6`>4-K=-)+HRoP9)z=oQ2`&17zy~@vd5vJ?xnqwWf&k<+6!_J;{ z?Nvz-Jm*t(!-sV|?(21q-JGQuSJ3qMJ1AOBqu@b8PMhJR;x4|)=8aCnKJ5~i@V0pE ztb5J-B*9H?Gqv7xEvEtS*=c#qRL<p=-X6G#3;;Qywywoxt z8R;CiRjy>(??%|-D8H}X=Ki)t+A{2ozQt}G_4bi#7_Q+Ax*l?=vGk+yd)e|yhdfYZ z^ELGuyVXCWW7sEVgBB4n@$y;B{exB|Wk7z}o9w#TIk0hCcCUdX#?w0O?-X`(45d0s zCn%K1(i60Fq)zPZvD-*1?ISOS>2$olha|5aOHXhZRU+OL@sG}D*n!h&KT+6RSgF-A zV~4KW)w`DMI*2C}yuUI2X2R5|O^}v}(huWN^-Xru=+yUNus&lrJlv4OLCg$StHir( zE=+u8IDEk7hrA8PPZo0MQytDG5Dv92iw`HCa_}KRD@Y>+zjSRm_5rOWIpXc^R3s}953;ZWBtfJm$HwH#^rvWJM z0Jug4&{fo{?2=n=5$3~JYKhIj7xHS#(iB(54_;!gWK-l*eQi{r-;2mtutynr4-P06 zpCa^ZG3ung z!+xb)DSVQt<@G}OllS$FQfXs5uV>cQ^3|%oTdbDzYlZbfJ{Nxtk>_TixS6jMYWjMm zw4+ydv&DSvX{oXmCw-bJ?bfoT-C`~tQRmrgwva1S@@ut1shHW0N3#oT9uzJu?UuQ8n>%{FI2YlnELU#O+ z-Il|&*%pUV#};(gvJrB5>L3 zJ%u!j>Z(20;OwtIl#-Rz9O{qKg&XkSH z;g4CYX*x%qeNJ)vd~>`BoA-{EYm0~)I>2)Zim-SD$ z2Z|bUc2FQBZxgvox2Jd8b@#xsk9lq_<$agU({Na2D27Ru`Av4)*NTI-@tL{L4-GU! zm|#ix95-a|u{SVt5{Y)q<~@b;%?Su+*1rN?sp4=-U0^Z)YgAD< z!ckRJyLiikz!!I6R{(|L@;jqp0>;w_w>a(h6s8XAAE64LGgUmGHpT#ui;}1EC$%U8 z(uMxp1J$&sy7v}KjG0Ov-}ens?XRQkRzXJSA%y|%y6LlVpz2)8dK;4GZY-A0UqB60 z-g;G!qfksYu;>0_06M)kP&}clSbFP~tOpnbp4{jY+5Y|e`yr1W^q3-tkmftjF4^_Y z5x;$5u?YvUTguSqA=ZFVTn%#Sqxq;nwh1jDj=G_Xi!c z_4L;MK+GfO*0xZ0(H*BLawO^9kgxay0w(r`s-Kkl_(gq!{-mG!^VMSM z`{T92CnTN`9-@6}s!I2>6YX!K?212~pnJgLpRg(0Y9l67)SgREsEzs@QWX%0Rd?8Y zf6tz`74_{2Al*}?f%v4L80^)fDX)m7SI%+#p^Eg&7HpT9VEC0y7`8lO8AGIi(1J26l@~;;w-AEPcz9 zt=BC{c`ZVrr2i82>(~fVsPC&8Hibk-BF4E%S(vQ<2)Y#gkLwEoxalUcJ+m#+$xry7Lm3fGg+(TGqpl-1JN8qmEB^IK19?jY${)=lq&HkDjEy?Pd&Gr*J~wx zx12*#6u&~`x%_sXlV74we1zzy=u@>;DwpZgG_mHNkStvmLzxOEn?al5N+n;;6e={6 zX-_~Ww@&aPtgx87i!>{Z*Hpv}qNrC`mB0eThJ^KY@azhjO6eK}_kM{eQ*j$)D*K<*y@^;GgTqG_89BlID zsG)QkW*1($i-#Mi)HDYxHK^fuWuy>LP^fnY6eCK+G!#f65G+txblm&hobaXy#Y+|_z6JP)m;?$lnAN}yIRJe1_OZ?>#NR>ijqME2I%+m}S|Zo` zD!V&8r`{ycPUREB=7knHInBN@JX!R9!v`XSFKHk!EU7p5dA*LLNuXX1zQI(t5 z&w&iJ)>C1Asa-IuinXLFBwGuR608nf6h%p9BbZO z9v~8r*tG%nXP*6w2)j1W=TW~wJ_BXvCa^M60@rQxGwpnK45_ zGvY&bEkuk}1#CGZEQ0g{x#2*l5}og}LREH(MR7b$XV(VW2aYx$_lu0ilKzB21R|AJ`@;yElaUS!Q70P}+N+1n14p*3yq3X-<832MpV|bmRn{5t2-k1xc%%AY*)HF(uaFt*@0Y(!q+ zAf(6qD}`MZTM$H;e`_aSs}$DsYH7E!Hi&d-xKu3EN`x}>%tpRg({uUt%7N67cX{zqh z7uZXNrse^6z;b=NP~3{oX#c6O#WlEp*L%lML3slY!NxzjSzyxwRQFT32;9o$hQQU* zDcl<`Z>j4-s(9N&1r@AFSyTW7e8Q5V2!jreegF)MA`S4yasTmxgXRa7{w5Wg)TC8#d`dJh|SIs7wRZ4?Y|ZrbrXHKqW8qU9FMCnzpK&m7<|<>`0naFqC&fTe#5wcpw6`=?R&V1 zZ4~h2k)4-N4}bR&R6?hbOrzh#ZCWB%^dGv^exQ;NcPkRG(tAMq-nEX5PTvbDsPrs` zx8eY8IR-GqOhY~@M>wF!c|MDbQXbSXK0~I{U(Z+SsP>mpb|YujTOG@}fHOIld}#;J z^Zk0et+yHu3TSrFOMVNfk{qQ<9G(vdpZM{3_d9ySshVH|C=M><5ft@(rZ&at_@jH= z4qo5!W=t%7-CKZ)d8ojOK|zO#=BL)agA~YbVBcel9KQhJqv;^p%q9wX)S8k3w8dsa zd!YJ%EmO&6wzo%jI1vM719WY>w3|bRvs^A!Y6zZp*peJUSs+ucl-BfIA+u2|RrAQm zAC0&)UK6I6hl&l_bm6B6QSHB>msBhmEF<7{5qHfjbgs+Z_cso#m9Tor^3>V%hAp^4HzBwqIvDDZ?iRq~!g zYd=YqXcAsjJD1fhxN6v03K@*+r&6#;MYc=C7@0W_QcTq~8QA1$aCaS(SWTL;&R z+&izp64ZY}H>{7r)Co@j`m;Q#oDEg9qc1b(I*a-$&hoF&?I6mUq}#!H-gzbjituy+ z-n37@%*+p6)R&p1q3<3D1j(=M>*__EyZYy-m<`|~bwYn*V5)b*GeX8XvpFBpAWtF zEZH_a#5?vd!BFuy>;1^XDU;oomEU+Q=6JXOuS{E3;HOpT73>A!-P>Sy|8f7%{b?wV lYrXfD{~NLg;s=_6-*ckgh~Jxz_$?=&DSmVLg1unue*rXGGHd_< 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 6a0b55eed31874b606ecd41982aee55e0c99247c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10877 zcmdT~O>7(25e`X9B8QelZT!Q^39?=%wG!B5%%p}x|Aitcn+ZiR66L_HfW?Y>BG+E- zZuUos>iW`4i(Gr|v4;X}fud+n>7mEwnD)^6Q1sBAi{5hRq4VC`KT`aYfFzC&)^hjF zyqWoC=FOY;ZrwGzCR`Hl5uI3yL-xeoL(%CH(X+bIpOKclGQ`Lx-6UEAg z*w|=^)k>{(5lL;swc4a8b_}DVk$hV-+`ass;wZ?Xoj-i&2DSO(nW>JeoC?XnU)qs~o6?H9cwF&^wl^ z>#E+_*)XY#9Z%c<1++o6XF7+|PaTjl(bpCG@d;>KD*CIV^vvP3%xSLPQ9Tza?d=5~ zv4+vI5@1LXy$qkN!=)+0M9A_%ITlMfKbCR_*Ot$F z%7(tLc7zXMY0pv*h$U-AN7l#z(d=woOsu2}w{oM*kn7`-t1t%muFlA-x?>$K6F4*M zy^w~)V{({{iLsTGa0_M*6wM_#V{B!iaCO=l*+j+ojhJM@4ErIRg{6A+LA5S#H@2G9 za&4_vtz=#h<{(k3*E2C81v9P9Qn{Lm)5l76b^Bf>Atd2ct+BR|IYpm7ENwP2GxT$H zb8}-eGfN-WO07~oGe;S1tgU5|(tqQSy07dRhKX5GxByE%Mb+g;iY4!(%gL^#a^>#7 zAe;eUA6XJ*I;QaL5}Z=3j-5@Ql~b#Uf0kmxGR#LA*x6Izw{wv48Qa;J@cnn-v|_cp zh#j5N&d!FP>Hz2h=v^v;SBR-^U&!U`hc%fgyVr@)AZpv_REkNAowc%etifAZ;!?x)b2S$LAnU3 z4_sm$)>YfVEHd{I{-B{8^DP^fexHE3`xyK*AhNJPM;s2Ig1P1$0RBZoPAmhZ3ztS) zB$yOQMR*az-BERy$P{oz)m)2U){3npd1Bax46n%K1I1F6T@59qi7Q>WK6(mI=G+#m zuuYls(21dNM3#sO-54#30n&Cw3v@tY3&Fgk}|Klkmy{ts9qvT)j@@V^9$Z0Q`V z5J#?>eI;L{OdKrvB2{94$;VL{Q}PAEO}p})DDaM7@=2d2Al0;R&u4stfrG1t;X0=4 z$oq!XQyg5?aJRx&lq{tA#!q$>EaD>tc|QcymB&`yftJ%ka3cRdJ_M_g#pqq!+P3D}*m;y`%arfvdA^Q(a$R+gZ|mu&gzx|sd@4=Z zrJWRBbiFfrd5q4QEAuJqj5e%@m){2A=%-0_s`PhErO18@dz7v%+=dz259O*X6kZ=I z5~s=0KZL7x9_IG2U97V15KV@&s4#6^yn{ss9VX-dmLt=S6Sg8~e_+|4!t`3XxuBcJ zd6pq*ySt1Un-sJGbj2q*(s|1Tn&h@T8pcHWWejGRoU{Y9)he~B10A3=%r&cxO097Z zyFd#7Th-QfQ?6_@s+lC(aBg$E(V!pWf&dHUQlpGLB%dG=d563=Ti8>Y6Xqes$JOyC z>l`s|eVwBhVX@R|Ro9y>d975dZ*NvJDd|2oF+AagMM(E|s*vl}_Ud{KsVXQb!0ZRx z)opx^3mG_#v)8LK)o*(%laOvPf88W_G(fPEE}UmY*(1_+WOPZ^T%+cR2`|FzBV(7o zq%AhShDpDO!{S55(o3d^y?oXarknRcPcQo}!@G0&(cla)3mqqps3Z~p4le058e%JP zDp#Bam}4pJ$F!^DT3Td1yJ>UTLnJ^)ohGeN+t~RMbPeq}g zp`X@jjoQ|I{4`5#O+muvIr{v5txlhl(q91*=y$>$NLjwAnQ_yF?~XPGQUt(o5Rl&V zQ;W9=A5R}7B5tfZ0A1E`lo3m2#j(5ipr6NP$F2M=NZGV`#>iwWc4iLaDI{yK~?C} zBX$n0z!>>UjC>4sejO8`-lsJKqkef3wZBmN)Hh(3W@p#-I=*9!hi0Q$*tIEbLUNJLzioy)N79ddYOJp#f`O<7^H zgl1uhF(JGLS#Kb1eOZRaI%+l>wiph(1GC=xE=&>#?UEZ@&(S(yx4UG|MQA$NGYpn- z-E?Z)U_1kdrqxH7*I5N}E|d(j_@1GYY!+X!E?ojoczm70IsHcd1vd4V-8(5QNuS0bgUfVJb&&Zc!Tu>W zVMi>mOfZXd@KlxMW#&h5ArA>u(@XU)kIol30ap*%TYM(EREOJ5={GS*<0${AKC+$% zi+n-|@Ftu>dH6Xa$HCzur2%#SSG~mOcyP@CM5hehT920 zi3x9vPC>ySPs`=;R+Sz;E1kuH-rH(i;koY$qVnUv{Of1&o6>c9<;WXg=bwZ_pXT{k ze90f4vYSaon@L%Wy&?P~h9@$<%q2UxuW~Z+BNr`l0W0ar=Ouv`_0hEYtaLsU^a|bu zq6z(q=xenml}@HrL0!*MPZ z4Dz*^5D`@-(cQv{&0M6#g78O_FGxA#E(DIXbXOb#&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"��A@ - NodeGroup3google.cloud.dataproc.v1.NodeGroupOperationMetadata�Aparent,node_group,node_group_id���E"7/v1/{parent=projects/*/regions/*/clusters/*}/nodeGroups: -node_group� -ResizeNodeGroup0.google.cloud.dataproc.v1.ResizeNodeGroupRequest.google.longrunning.Operation"��A@ - NodeGroup3google.cloud.dataproc.v1.NodeGroupOperationMetadata�A name,size���C">/v1/{name=projects/*/regions/*/clusters/*/nodeGroups/*}:resize:*� - GetNodeGroup-.google.cloud.dataproc.v1.GetNodeGroupRequest#.google.cloud.dataproc.v1.NodeGroup"F�Aname���97/v1/{name=projects/*/regions/*/clusters/*/nodeGroups/*}K�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 76a822f36b983e41f62bf0e8c4235806908b0c91..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3289 zcmcgvTW{k;6edlYHYaTwc}ryq5<@6#D^Z6Q2`%Y%As25pZ0kh1fLJ0~jy+9AxVGg> zQ9=CyJn@J4B|IVVFL+`ui4&TnyX{Kk$uo22T)+9w$}PXc?hF zRhY%AqoV6E)x>oIg=+0TMcy z?4IY+$WPJ4r4~yDO+>%pgxGfsyI;eB=@Tz>{T3B1m4-NsQ^pA&3b6+AMoi0hY1)2OCO7F~@4>k?X# z(75y#-{lE8d`8CMmn|!f_Blnxe(WFf_A&gi4F_)w2T2y93P+AIL5^~DwEN*$35N~M ze=(f6DUek7I|(}#BQ!@bG$v@0Heq$ZPUHki>}MnifG_nZB9^?u_ll4;eN0iWGre+> zZf1{nm9aY$qe`3`=@2rO>x{)yuND6haxwPx@Y=(2n%>DBS0^UsB32d$b8EXxRY{K^ zYmGrjaV)R#h|VBw8v|?y@;XY=V4mLF(iy+5I-!3pywl)Kdzdb6dr%iTs()4M;kRK2HlT57fN zyrI_e??@R~SV!0DQL zrqb_Z;kOmosoGIM**Hc-hjxJ|kiLag#OI8;cp zI3o7!87F>z-y{kP=a3U>^brYYtGt$hv(f|Ay+8NFvQw97sb=YLV|vnw-^eDne#aYG zmPTdfjfl|RouS4Yqeiif;E_2Zwxv&bpICvs6-(TgLH|j?uI5^}?z@o}Lp?6=xH|2EEhzik|ntg3Q-9^)~f2=jyvktC%}}xg34VQ=`luaT>ja6V{N& zwd=(=S>sWB^B}W#B84?&VeP&+2w-PPKnL)N)~u;|z1{4!-ke-1oAz3@Ic8-n+g3Y` zS86_0ao__w_AgCCWh(|`zz4}z;?;>5X(kh$ds!U1Gk*q-i-t$&UxLYy=M7G#pMx|X fxxRQDPm`aC*?4A@W_&`-1!FXq6vOTf+yMLwsV(?y diff --git a/owl-bot-staging/Dataproc/v1/proto/src/GPBMetadata/Google/Cloud/Dataproc/V1/SessionTemplates.php b/owl-bot-staging/Dataproc/v1/proto/src/GPBMetadata/Google/Cloud/Dataproc/V1/SessionTemplates.php deleted file mode 100644 index e7a914ac62446e8a2ed1ebdd2f9bbe2eb3a4b01b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4164 zcmbtXPjlNu6vuIs)@x|mrD+s5GYC^Ae@G;fmJZ_(I(CvKDS>3tzziKT9$8-7YGg^3 zRtX{FONVd3SKz`7!=10daDrP-9D3@356}~DcO}J^WfP~lL}R`8+u!@Wx9>fD_RwiM z=mU9^Sj5#Rsmaw7nKp^+xHh$Q+mx$*y-r+Nw_A>35?7Js^iu+ z;ZWP%1JgpGL1?5W`(<`6IF`W~b$M2BEEIZ3uFBN)N$2UZ>=Np`)(Yp%0NT-0IYG9f zW0Z@QWiu6Q%PSPlV>*ZE=eTAX#G=FbJTiz`E0LylWZ3R-uKOgYoePufDT;DX3_}E( zfYH=kQoA_!r~*L$jg~`CF5!A$K5SN;SxQU@+BT;0EapUX^Ep zcl^Ah4iPkl+=u-Qd8PuuJAoPRCU7BDXbAKq#x#0KL&1eX{+AS*UULcbqgX%LC(nII z4StBm9HwQuhu(Hc@ig4}K zUWtK}(r|3PiKf4H;Mjg#lTKo+hd=2ln%X2ZMk17C6}5{oAxBVN3V#_EO%ja<6Iv&^jXFQ7J( zd3p{sRf4zC&3I-#P$fOI;AvnsZjtY4rGp;hoymWPrq_u{`sVyilkwvi8js}}-|R{- zD?KcsY%Q2?Fi@mSq!PZ5vO2#&6?V6{+S%n?SlQvlQ=(4C1W)5lH2%zYPC)TWAYpJP z$}^#BPeW233y(G1sv8ZSxUIMFKAM2-!9A?#wq+5WMtE7^m|b4z5BG$*0T}b@#=M2D z@|bK_8Vw^&Qiz&uBc*bS zDBBS+&Z6`oIT8H=zk^1PG}9NAk|~UQnkqbhRkSYNKkyn9)icPMr=A8+ZPm1OvFfO& z;bS{oIinR(Jq?%7cIgJX9^PG%faTZM&{XUufH>5(O;~vG%M_YO92EFLf1MK@f;N}C zc=yjY&x(^`3N3`B!$@BI{qm=gt^9qqVxJ0|)kvTD4qfJZ^(gcVCj2jinK)wxg_-DZ zi7?%>Vh9^L~i z(l=x@_|Fu&l{BF6fX4 z#b^xiMLplG{`{rX&wcSnak9@2_*YSBQtEgGRXsjF4oE}`qUO`4_&{D{U&3|UZIvjR zhTSow+cWw~6S2Mb8PF1&^q#=pz*b9Mg% zXUjp?%%D9a!=KaGG!0$$e9ecS8-`agEW+ z^av=o%hno}?t?=zRamujGI2}hHmU3l$A+lq<-nme3Iu>qE?PcuEzK-15Kngv$G6=z z5Y1-m#1G-4ZzgVuZK*k=M7>T64^AYG6NnDjxxt>KJ9! zvTTY1K%C7sV``e{q?k7iV)ucN2(R;J3nSS38IigmpVM;7Q*-V5aQcB0suUAlc z{FDWQlUz_?m8ArgrR>b4#)JvYF`(`!nY_kQS0f8G%2;JnP$mQ}M+98Ki&(lTmX0W7 z2EGuxF2u|x!Wlb6_>dp0@}Y<_egGpENdF?C(Y#Bb^N8|ZCtoxGXnYs-I6$@KCnZ^$ z=+BkM|4_SLsn_t;5CHA~#O^83oif4zX!eSZlk5W3`0O=>OSS{32%TIEjN>tcgkr_0 zCSz>dV8P{X(S`HDf|P!UMwW;#j0B$FLFZ|QJLESy$?x>H61uQ#c!4=Du=n~%TtfYh zRwoq?S|Y=un+7V;K-qiWenzZjpc1}-dTNFVZ7v$5fks>1@*L$~s3Qe7;HJYX#G=`xd zRtbL;K)MB8%XW8@!z|=Gooxppi(f|11Fp=OD58YN$GnP9wjGnwonSj=pmDuYZ^5y7 zLjNxbz0^<8PmkCLhj~N~mN(C%NZq~%-m^S{|E_0>cmb;Csqms&T!!cF?B{=}pPhJc;Vg8dr%>=-W=}lr zXG~k?qgG}wc-#*!0+~HQ@_sIXh62KQf~J3z&|phf!gg@1&RN{pLwC zbJENcY6ds31NAbWxTXXn!7mIwU;X~)H(htrQ}jBw$ED^&)+ZxuPc~W324fihUP7oj zC*fn7Pg5$0`sCp)J$In8iHkX@VD2O(xr2+%Je=IeKTBvJI^N)8I(Aep@b4HFTgCa* zl%79O#bDdw?kO?Fe@iHFctpZ8L1wg{?}udrw@*l>uireGnv~3?-(`7oN=mXY!SE3< zD^219sGF8K?YO#W5jJI+FD=vbkgVD6cFsg^!8NF3D&z)5Q}Wj67mYRP(>b0lL8E{xRNanzxS7qsc2Mtu rgU;q$^Kr8W%HOwdkB1lADgG@Z^67(~g@%5_XAdUHKTqtVeT4o40iz=M 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 230fe8832bb2db1baa1b8d93305b376d13ed2adb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5596 zcmbVQ&2!tv6%R>C79S-ULhP7koCIc*Saw>{Rx(W^*X@8LBvO(|4oRtv%P9r~R}?A` zzyJ%ysz>+!3%%sf=}Zs3H<#Y}A9Om?YtKD)rk9@jcJV=wG$l=V;STnF{@%yF-Jky4 zId$L%(jKvht5GtP1{V@NC6eRX)YffN8u%wC#Fcb=>=-6-OOjM;NzGPIQfiIfLuB=A z-_^;EG_viHNy@ru`@`~3qZ*3P%jeI^-l^u2VTnrwu(UDp98D+EUc2&=P>qrH_c(LE z%9#7Lkhy>S>^XpLYMv)`xe#~*68;>2U>dsQQH|o?$A+gGmO%~8G=7U7ypT>b(<8__ zPkZ89IyG!dVhk-yCtHuDKqjO8*s;;$7gA(Sn}L7;^cxl>uBDm%8u4`3aH#FJk#uKg zL}&~h`?B>oRLjH}C(>46T$&%p3gZS1_Amq*}7KQltS<>4@f zcNf!dD+YwY^9cU_34C&+yc6>QS&64-DN4`M`Ln|PP=MwbWjDkmNY=uK;TBI_%!BeU zbUfVuXm+1Q-US53|E6KR<6G==)wWKIk$4AgofFqX@bW1swUw=8{w1fx2XI@rEvgw< zg{m>uMkJq}?6v{W0*AQNAYMKrWwvtLUzQd*RGLy)LgYhE#iH&-pl=^GUE+SIoUYZS>^xlWcGvm|A`3oE*PYP&RlD|Wx|3~tXj zA?6@+MlJ#b#dTOd*GxZzY$yGbRPoO#*i@`@!?mq3v1p(|tb;&a6WwR28yU)iklTK| z*l8u=NZNS_B7$l-r`R-2FOtPVmfQYpv8?ulCn2r)hcw)tQNuFABksAO6IIi78*?a` z5e3LugnnbYXR7ZS`K1`F`a9wWu;KZGXp7Y$*#Gw}5@Lh}%tTgk$$ z(AeTvkncL0dsa6*mb6_2hqz&2KL8=BXjM0T51VzOx{80nY?y;ytit9Pj~^zDs3F!N z*A~{~|KuV_F+u1t_6V{o8OGr>u!~E=BG!YN3Q}S_0&K4Plot8K zku3f*4Y{zK8`g;}9zvE_L&wJc=%KBw5qz;&c7n5{L~L;v$cXmy47{DRJ zIJK1tvbz5W3f?JBLs$zeY0wdMG>9n~d?Dqha6gcQl}m7D(vUi)V-SXPn6^m@df|{n zDHnf-hX=PXa#ef}vayLt(>?-m-ZI`VLQPY?IW8F+{+O$}+P8?3HIP|J3Cnrdukb0+ zOnwaOUKlu)or-vxv1k{fV8>oPH5bRRuuaA# zjByOk)lfxT!l5j29|X%D5|zz>Bp$V<0QoCg)5MW( z$Qt0zU9GILqngbP#lNK?zlc`UVUt}QY>O56Wb$F1s~!b?zAG*gSE@#`j)NhJcQf&L zYCuZ!;8nhd^qDcE@Fm=RyTWVckMA?Ge4B>NxvXLpA1CJ|Q_^A$mR;M#X^=U)vHf(h zvvV>_9c1JwGM)NiwgqW%v(%sD!%|U&B_zq%0;0dpzDX5vPQ0dCqlzukEGbp$t@jRufoQ?94uCDR)5-g#vPCt#me z###m&enUwK-G$#{!=EyV4QpdfKgDZ-%1?*sD+4psR6TEqCCvsz)@PS_b&7e&Ve=+q zhZ+Nu@R4dY*wJAv(Yn2Sj#tYSwRp8BlM^oC3C^Ix*uWXv@m0sv=!xx)5zJ@`Wk>D6 zwy8QayfZZ#IqyyOH(|+hY?_zwQ($(%h6f2l2 zr`F|eUEOarnpl7UD=(Fot$kwAhRGMcbH_7dY?* z+=Io3z5zlYgWj8+U2UgS*w%%XX`&GMxW^y(;$*pjB9^AJrOy$XeU}QTyv2 zN=h-Q?T*szwS*PM-|IA*En$;=?#RtOBw1se-PU1801*v(rL@}$>Jygm8k>F9Y8@y_ z8_8Cm?8Ex5W|+Q9Wd34>MN`<78;3_7MU|_)MyomF9`ZL^;Z|TtO*vG0ijc1SDFYAi z6kZsUN-lU_!}E{Y?bNI1!HFEbFyMV>WG9~Vw#zs~;lo~Z=W+(mC(D1!zXp6Qyk_Xy z!9njgM5kW)O}M%&$9=c_CR$$Nb0WXaAziq-H^-UJ9uWG23)BwF43(>40DXH*|qy}u!2IV{rRK#o$H6eGhyOY Qap8+1rwrcxF5wd3|4d@!rvLx| 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 7689931173d2258b7084bc729989e3c1dfcec0c5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9293 zcmd5?O>Eo96%Hl;J|(d;+c=IkX&ENnIBp`Xoumnrzm+Z7aqY-z?Chec0fCmrG836( zNXl8S;Y%*P^is69#U6?lxfQ*%=iZ7U$Nm6CP6b-*p}p>DPkr-4nx;tEO3|V@IFdNu zn>TO1_r1p?|MZMdk;QxIaMt! ztCi(dwOm?Qy?{{HYCCmWP@9(3Y|(tZWwjgmhVJQTqMqNL%D=Rn=Nm2SWzC~ob_*wQ zbKE+Bsc%u&*6UQAug*N8p3Y!v^W4zdEHkuLl7`kkp1K22Z|Sb9ej*L7`u1QKRQzYR z*IPzibv@m~|1KGB%`gqm&|Ai5xUhTbhTd{1TIn3S(KhRzVVNoeESq&YaYYq2+1N|A zg@L%I`kqx;Y%nfs3#LaMQ*W)6s9Sdo+q0Z14lNX#)C(fYewnx;r)B1h4Ru2JSSWNj zc~AA6HVx0Nst)zqj(Las%?#`XpVngHR3j1r?H<1LKZ5h<`dc({a zwAGlQoBFn4IlVz2Q^}qqJK4bsWO0E!!5-m<-&cYv-Mn021MWyfPV+ppa>B)5x=MnL5`RDg+qe2j{h;dc*U zs^`=v;{uZ7YLWBRBDX!2JtK|jwt-s0*eKK@`>oK04Mw@zy5yW3a5gl+k;Iah)-KCy ze7*zfRG0LTBQGWne1;r}3~KEYA#Vjlkb}M{Epe?wwa7Q*Zp-WMN3Wxrc{}o=zt{lm z`I{yNXulqW(WnlR5l9)0@sz4e49}$hR!oso(8n}(T=9QOlW)M_Hf9Slc07&0_OpQs zxdEBFLs6S+Y@+c#ypoyD=7fu4N?bxNpbkT&8LDmL=1Ell(NK#p(9+jw%N-w3(>Tp{ z{b@SLkc+M`x5R;E({px&NmQ@#8 zpWpRA9?_htXunb5Y}Da^e`FR$wscc((nd`x5|3_XdLnrf9|?dgfDez6GK@-a&801j zgXQpOW~Q$sTaoY;33zyHCKJjj?e7YlJU9_K3&;IwxVnS{=PnFL3NmrYOs`!&bmD!! zrN}}c4ShU^ZX}}*`qUu|JyK2ktpX#FNHF#M%rZmjsgNJQNq^~5!&2PQyUC75tmfqR zP#$m%$=(3cdFike(OwM#?5hz|cWj328kT`T^HbzLz^2}?EW3vCCK+)t+2e>pQ40ka+BCK)pI#K13(3Ve-oNIoy%TYd$Jio6E{ymxgm3+2QqGLCg$-az_o8Smc| zG6#S)(ZKr0E{M#zmK?-j>W>2uU%vKp1>TFfh_$>Qt0MhW)|xI=;xQYxZx%)24h-;m z&6dJ;qzf2vZ5js8oPrSq%Y}&;u3d(a$Sh3GxPR0|5B+#)AHYb&B8w~9Yabl<=Yjnm z**{$%r(wvG=LY){d7v$3%i(Qtn#`lzi?&#*KJS?`)04@2AT>O=FJv2##$fd~9o^oP zd)Tck`aQxt8!yo4Mgz+;^451ls9?`-l%SuTJW%Ysm5GznUGmZQ!jD^Sh2exd(fZG1 zjT1IaDhC>2k@bb-V0FwAkksWpKDmym@9B;wZc9Y!A9`Cd1w+(q2#9E+4~2x5)NW(( zWMVIu6zR%^0(bAq)8rQJ7`E~u--YxZ>c~wv&VYgcLURv;Wv5^y8oEQ8Ywb4l^F75D zWAI63v9kP0W%L;PQY}|X3zhj%g?)Maq*7sDQe+7FO3Rhpkiy)V67EvCWbhxv_&}K(}7c;iIZueF!I#TOn-1VjVd@?82d#Ej{DZw zud$6$nk1HmK%LV}TA0owDVVd;{~(cAA|5G`m=`(rCzMD*WLP>1%i1#-4n~nIj8&FP z<=V<>akX4~Qdy~%XBXxc$|bQ=GfT^}i}*z$$6<)=RB>jhj9V4jw=~{Y4bLt=sxFmR zabzC>7?>+AEaB&V?UxFipXK`I$I35akFio>(}AUTz}6jhZ!Ox%5Ajst>*6Fi`Yl;8 zq_?6_bWyFS8*DREngiK+>P4^lF5W+I#vvW-;hr&cAQC9QqWvlb+JcGsYvKX2NB^gj zlQRIURlyBlv||+G4qrenq8cpV%Dbq^AMiFkG~I%Uy;@?_{vTKs z338Czinb2tpYT(yq)iV~nx#e8ejsW@Q2HkdoLe&74pO^5tN-&5jp1E9o+s2?eEPv# zGe|yOy)E>2O}o^)T@PjU}-0H z6pujs(^m!ohdI^zm;wv9R^pQm6fUOvgK z%}h$n8?+v13j=d1p{y!z8WewuovXgArDw_S1ZUT~B(nfK4F-27zB(N!Vn zjh{Zyt|yqlj+`H;bvHo1!h4Pw*(P1ibYh0TOI&u}7WuI^kA+D@DA-9=LLg#J1Sj{N z-XtObQDCtASQzP1VU#-7oKCeQL9&*9GhW1zGP4Nnxjvm|dCq*Q9 zUf}oiGE7J!w#KVS7I}ir1NUP^D{=-z0}!H6YzXjKUQjm+%H-3M_8`_y_drIhkgrm3 zArzqa0z+o}_;en59|}HVjQ`bRjAJwOwW7@@q*o}saTyv4u82V>XTPtN6O0D2?$IQ9 zjT#qU4ZCSvJi-rfFBBH>Z?zV!!#Zx`7M1GWl z)3Mc)ba}oN3-H6#rG_NnM48t1-WFxoen0_xEe3%Cb^?Q_#L$U+slZr#sqRLZc!VE| zF+Z=dl<{{ja$M82gHk{Fu2MhwE>fRed{aD=@M!9f#oVUn*=`}9fBEvIbUt`)rMJCJ z@uJK%_Cm~toD5}cSJ7TaDefGeuX@wqfPv>!7YzBN! q?e#nRAJ+$XK(Aj8p6Xu}FQA0pS3xny_i19@RpBGWJ0*Lt2k>uIh6vXH 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 ddc545cd74ed..000000000000 --- 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-t4` - * * `projects/[project_id]/zones/[zone]/acceleratorTypes/nvidia-tesla-t4` - * * `nvidia-tesla-t4` - * **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-t4`. - * - * 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-t4` - * * `projects/[project_id]/zones/[zone]/acceleratorTypes/nvidia-tesla-t4` - * * `nvidia-tesla-t4` - * **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-t4`. - * @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-t4` - * * `projects/[project_id]/zones/[zone]/acceleratorTypes/nvidia-tesla-t4` - * * `nvidia-tesla-t4` - * **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-t4`. - * - * 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-t4` - * * `projects/[project_id]/zones/[zone]/acceleratorTypes/nvidia-tesla-t4` - * * `nvidia-tesla-t4` - * **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-t4`. - * - * 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 14572342be6b..000000000000 --- 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 09769d54f229..000000000000 --- 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/AutotuningConfig.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/AutotuningConfig.php deleted file mode 100644 index f1d3fec86b7d..000000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/AutotuningConfig.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.dataproc.v1.AutotuningConfig - */ -class AutotuningConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Scenarios for which tunings are applied. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.AutotuningConfig.Scenario scenarios = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $scenarios; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $scenarios - * Optional. Scenarios for which tunings are applied. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Shared::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Scenarios for which tunings are applied. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.AutotuningConfig.Scenario scenarios = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getScenarios() - { - return $this->scenarios; - } - - /** - * Optional. Scenarios for which tunings are applied. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.AutotuningConfig.Scenario scenarios = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setScenarios($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Dataproc\V1\AutotuningConfig\Scenario::class); - $this->scenarios = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/AutotuningConfig/Scenario.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/AutotuningConfig/Scenario.php deleted file mode 100644 index a2249a38e36b..000000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/AutotuningConfig/Scenario.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.dataproc.v1.AutotuningConfig.Scenario - */ -class Scenario -{ - /** - * Default value. - * - * Generated from protobuf enum SCENARIO_UNSPECIFIED = 0; - */ - const SCENARIO_UNSPECIFIED = 0; - /** - * Scaling recommendations such as initialExecutors. - * - * Generated from protobuf enum SCALING = 2; - */ - const SCALING = 2; - /** - * Adding hints for potential relation broadcasts. - * - * Generated from protobuf enum BROADCAST_HASH_JOIN = 3; - */ - const BROADCAST_HASH_JOIN = 3; - /** - * Memory management for workloads. - * - * Generated from protobuf enum MEMORY = 4; - */ - const MEMORY = 4; - - private static $valueToName = [ - self::SCENARIO_UNSPECIFIED => 'SCENARIO_UNSPECIFIED', - self::SCALING => 'SCALING', - self::BROADCAST_HASH_JOIN => 'BROADCAST_HASH_JOIN', - self::MEMORY => 'MEMORY', - ]; - - 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(Scenario::class, \Google\Cloud\Dataproc\V1\AutotuningConfig_Scenario::class); - 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 3ad500577c26..000000000000 --- 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 ee5d549ff6e5..000000000000 --- 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 17f45730410c..000000000000 --- 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 e8bc82e70337..000000000000 --- 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 d9001a4cb37a..000000000000 --- 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 7c4844fe1a61..000000000000 --- 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 d3028d266da5..000000000000 --- 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 c3647cb58e14..000000000000 --- 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 0f59fea5709d..000000000000 --- 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 a563926f111a..000000000000 --- 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 258dd9380939..000000000000 --- 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 0e1c963c9a2e..000000000000 --- 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 a189db9bf529..000000000000 --- 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 73c47e2fb46c..000000000000 --- 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 1b7c5cd9858a..000000000000 --- 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 cee3013511b6..000000000000 --- 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 9e2131ca2a80..000000000000 --- 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 cb91bc96ca40..000000000000 --- 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 917d1baa0510..000000000000 --- 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 9f05d75f830f..000000000000 --- 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 470978df8dca..000000000000 --- 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 765ac34f3243..000000000000 --- 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 component is no longer supported or applicable to - * [supported Dataproc on Compute Engine image versions] - * (https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-version-clusters#supported-dataproc-image-versions). - * It cannot be activated on clusters created with supported Dataproc on - * Compute Engine image versions. - * - * 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 dfd65edcbb0a..000000000000 --- 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 be90e29c436a..000000000000 --- 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 31df96ea6ed1..000000000000 --- 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 2900a99c4bff..000000000000 --- 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 e63d8691ba82..000000000000 --- 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/CreateSessionRequest.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/CreateSessionRequest.php deleted file mode 100644 index 83a61eeefbbd..000000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/CreateSessionRequest.php +++ /dev/null @@ -1,249 +0,0 @@ -google.cloud.dataproc.v1.CreateSessionRequest - */ -class CreateSessionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource where this session will be created. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The interactive session to create. - * - * Generated from protobuf field .google.cloud.dataproc.v1.Session session = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $session = null; - /** - * Required. The ID to use for the session, which becomes the final component - * of the session's resource name. - * This value must be 4-63 characters. Valid characters - * are /[a-z][0-9]-/. - * - * Generated from protobuf field string session_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $session_id = ''; - /** - * Optional. A unique ID used to identify the request. If the service - * receives two - * [CreateSessionRequests](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateSessionRequest)s - * with the same ID, the second request is ignored, and the - * first [Session][google.cloud.dataproc.v1.Session] is created and stored in - * the backend. - * 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 session will be created. Please see - * {@see SessionControllerClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Dataproc\V1\Session $session Required. The interactive session to create. - * @param string $sessionId Required. The ID to use for the session, which becomes the final component - * of the session's resource name. - * - * This value must be 4-63 characters. Valid characters - * are /[a-z][0-9]-/. - * - * @return \Google\Cloud\Dataproc\V1\CreateSessionRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Dataproc\V1\Session $session, string $sessionId): self - { - return (new self()) - ->setParent($parent) - ->setSession($session) - ->setSessionId($sessionId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource where this session will be created. - * @type \Google\Cloud\Dataproc\V1\Session $session - * Required. The interactive session to create. - * @type string $session_id - * Required. The ID to use for the session, which becomes the final component - * of the session'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 - * [CreateSessionRequests](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateSessionRequest)s - * with the same ID, the second request is ignored, and the - * first [Session][google.cloud.dataproc.v1.Session] is created and stored in - * the backend. - * 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\Sessions::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource where this session 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 session 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 interactive session to create. - * - * Generated from protobuf field .google.cloud.dataproc.v1.Session session = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataproc\V1\Session|null - */ - public function getSession() - { - return $this->session; - } - - public function hasSession() - { - return isset($this->session); - } - - public function clearSession() - { - unset($this->session); - } - - /** - * Required. The interactive session to create. - * - * Generated from protobuf field .google.cloud.dataproc.v1.Session session = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataproc\V1\Session $var - * @return $this - */ - public function setSession($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\Session::class); - $this->session = $var; - - return $this; - } - - /** - * Required. The ID to use for the session, which becomes the final component - * of the session's resource name. - * This value must be 4-63 characters. Valid characters - * are /[a-z][0-9]-/. - * - * Generated from protobuf field string session_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getSessionId() - { - return $this->session_id; - } - - /** - * Required. The ID to use for the session, which becomes the final component - * of the session's resource name. - * This value must be 4-63 characters. Valid characters - * are /[a-z][0-9]-/. - * - * Generated from protobuf field string session_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setSessionId($var) - { - GPBUtil::checkString($var, True); - $this->session_id = $var; - - return $this; - } - - /** - * Optional. A unique ID used to identify the request. If the service - * receives two - * [CreateSessionRequests](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateSessionRequest)s - * with the same ID, the second request is ignored, and the - * first [Session][google.cloud.dataproc.v1.Session] is created and stored in - * the backend. - * 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 - * [CreateSessionRequests](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateSessionRequest)s - * with the same ID, the second request is ignored, and the - * first [Session][google.cloud.dataproc.v1.Session] is created and stored in - * the backend. - * 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/CreateSessionTemplateRequest.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/CreateSessionTemplateRequest.php deleted file mode 100644 index 424d788d922b..000000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/CreateSessionTemplateRequest.php +++ /dev/null @@ -1,127 +0,0 @@ -google.cloud.dataproc.v1.CreateSessionTemplateRequest - */ -class CreateSessionTemplateRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource where this session template will be created. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The session template to create. - * - * Generated from protobuf field .google.cloud.dataproc.v1.SessionTemplate session_template = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $session_template = null; - - /** - * @param string $parent Required. The parent resource where this session template will be created. Please see - * {@see SessionTemplateControllerClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Dataproc\V1\SessionTemplate $sessionTemplate Required. The session template to create. - * - * @return \Google\Cloud\Dataproc\V1\CreateSessionTemplateRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Dataproc\V1\SessionTemplate $sessionTemplate): self - { - return (new self()) - ->setParent($parent) - ->setSessionTemplate($sessionTemplate); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource where this session template will be created. - * @type \Google\Cloud\Dataproc\V1\SessionTemplate $session_template - * Required. The session template to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\SessionTemplates::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource where this session template 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 session template 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 session template to create. - * - * Generated from protobuf field .google.cloud.dataproc.v1.SessionTemplate session_template = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataproc\V1\SessionTemplate|null - */ - public function getSessionTemplate() - { - return $this->session_template; - } - - public function hasSessionTemplate() - { - return isset($this->session_template); - } - - public function clearSessionTemplate() - { - unset($this->session_template); - } - - /** - * Required. The session template to create. - * - * Generated from protobuf field .google.cloud.dataproc.v1.SessionTemplate session_template = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataproc\V1\SessionTemplate $var - * @return $this - */ - public function setSessionTemplate($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\SessionTemplate::class); - $this->session_template = $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 90662856daac..000000000000 --- 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 1470fdd1d000..000000000000 --- 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 0e48ce2b953c..000000000000 --- 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 116faf661c8f..000000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DataprocMetricConfig/MetricSource.php +++ /dev/null @@ -1,111 +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; - /** - * flink metric source - * - * Generated from protobuf enum FLINK = 8; - */ - const FLINK = 8; - - 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', - self::FLINK => 'FLINK', - ]; - - 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 e1e82a759018..000000000000 --- 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 4d6d9dc486e4..000000000000 --- 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 5b6ece38a4eb..000000000000 --- 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 ea842f7a1560..000000000000 --- 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/DeleteSessionRequest.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DeleteSessionRequest.php deleted file mode 100644 index f19d7dbcdeab..000000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DeleteSessionRequest.php +++ /dev/null @@ -1,143 +0,0 @@ -google.cloud.dataproc.v1.DeleteSessionRequest - */ -class DeleteSessionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the session resource to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. A unique ID used to identify the request. If the service - * receives two - * [DeleteSessionRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.DeleteSessionRequest)s - * with the same ID, the second request is ignored. - * 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 = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $name Required. The name of the session resource to delete. Please see - * {@see SessionControllerClient::sessionName()} for help formatting this field. - * - * @return \Google\Cloud\Dataproc\V1\DeleteSessionRequest - * - * @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 session resource to delete. - * @type string $request_id - * Optional. A unique ID used to identify the request. If the service - * receives two - * [DeleteSessionRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.DeleteSessionRequest)s - * with the same ID, the second request is ignored. - * 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\Sessions::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the session resource to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the session resource to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. A unique ID used to identify the request. If the service - * receives two - * [DeleteSessionRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.DeleteSessionRequest)s - * with the same ID, the second request is ignored. - * 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 = 2 [(.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 - * [DeleteSessionRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.DeleteSessionRequest)s - * with the same ID, the second request is ignored. - * 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 = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DeleteSessionTemplateRequest.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DeleteSessionTemplateRequest.php deleted file mode 100644 index f8ca8aee34e9..000000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DeleteSessionTemplateRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.dataproc.v1.DeleteSessionTemplateRequest - */ -class DeleteSessionTemplateRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the session template resource to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the session template resource to delete. Please see - * {@see SessionTemplateControllerClient::sessionTemplateName()} for help formatting this field. - * - * @return \Google\Cloud\Dataproc\V1\DeleteSessionTemplateRequest - * - * @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 session template resource to delete. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\SessionTemplates::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the session template resource to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the session template resource to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/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 4443408e2596..000000000000 --- 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 27c9e44900e7..000000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DiagnoseClusterRequest.php +++ /dev/null @@ -1,361 +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. (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. (Optional) The access type to the diagnostic tarball. If not - * specified, falls back to default access of the bucket - * - * Generated from protobuf field .google.cloud.dataproc.v1.DiagnoseClusterRequest.TarballAccess tarball_access = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $tarball_access = 0; - /** - * 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. (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 int $tarball_access - * Optional. (Optional) The access type to the diagnostic tarball. If not - * specified, falls back to default access of the bucket - * @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. (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. (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. (Optional) The access type to the diagnostic tarball. If not - * specified, falls back to default access of the bucket - * - * Generated from protobuf field .google.cloud.dataproc.v1.DiagnoseClusterRequest.TarballAccess tarball_access = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getTarballAccess() - { - return $this->tarball_access; - } - - /** - * Optional. (Optional) The access type to the diagnostic tarball. If not - * specified, falls back to default access of the bucket - * - * Generated from protobuf field .google.cloud.dataproc.v1.DiagnoseClusterRequest.TarballAccess tarball_access = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setTarballAccess($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataproc\V1\DiagnoseClusterRequest\TarballAccess::class); - $this->tarball_access = $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/DiagnoseClusterRequest/TarballAccess.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DiagnoseClusterRequest/TarballAccess.php deleted file mode 100644 index e65b0ec95e59..000000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/DiagnoseClusterRequest/TarballAccess.php +++ /dev/null @@ -1,66 +0,0 @@ -google.cloud.dataproc.v1.DiagnoseClusterRequest.TarballAccess - */ -class TarballAccess -{ - /** - * Tarball Access unspecified. Falls back to default access of the bucket - * - * Generated from protobuf enum TARBALL_ACCESS_UNSPECIFIED = 0; - */ - const TARBALL_ACCESS_UNSPECIFIED = 0; - /** - * Google Cloud Support group has read access to the - * diagnostic tarball - * - * Generated from protobuf enum GOOGLE_CLOUD_SUPPORT = 1; - */ - const GOOGLE_CLOUD_SUPPORT = 1; - /** - * Google Cloud Dataproc Diagnose service account has read access to the - * diagnostic tarball - * - * Generated from protobuf enum GOOGLE_DATAPROC_DIAGNOSE = 2; - */ - const GOOGLE_DATAPROC_DIAGNOSE = 2; - - private static $valueToName = [ - self::TARBALL_ACCESS_UNSPECIFIED => 'TARBALL_ACCESS_UNSPECIFIED', - self::GOOGLE_CLOUD_SUPPORT => 'GOOGLE_CLOUD_SUPPORT', - self::GOOGLE_DATAPROC_DIAGNOSE => 'GOOGLE_DATAPROC_DIAGNOSE', - ]; - - 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(TarballAccess::class, \Google\Cloud\Dataproc\V1\DiagnoseClusterRequest_TarballAccess::class); - 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 c94fe3379a9f..000000000000 --- 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 23f3a85cd58b..000000000000 --- 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 413acffe2aa7..000000000000 --- 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 cbd06d6f50a0..000000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/EncryptionConfig.php +++ /dev/null @@ -1,209 +0,0 @@ -google.cloud.dataproc.v1.EncryptionConfig - */ -class EncryptionConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The Cloud KMS key resource name to use for persistent disk - * encryption for all instances in the cluster. See [Use CMEK with cluster - * data] - * (https://cloud.google.com//dataproc/docs/concepts/configuring-clusters/customer-managed-encryption#use_cmek_with_cluster_data) - * for more information. - * - * Generated from protobuf field string gce_pd_kms_key_name = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $gce_pd_kms_key_name = ''; - /** - * Optional. The Cloud KMS key resource name to use for cluster persistent - * disk and job argument encryption. See [Use CMEK with cluster data] - * (https://cloud.google.com//dataproc/docs/concepts/configuring-clusters/customer-managed-encryption#use_cmek_with_cluster_data) - * for more information. - * When this key resource name is provided, the following job arguments of - * the following job types submitted to the cluster are encrypted using CMEK: - * * [FlinkJob - * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/FlinkJob) - * * [HadoopJob - * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/HadoopJob) - * * [SparkJob - * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/SparkJob) - * * [SparkRJob - * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/SparkRJob) - * * [PySparkJob - * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/PySparkJob) - * * [SparkSqlJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/SparkSqlJob) - * scriptVariables and queryList.queries - * * [HiveJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/HiveJob) - * scriptVariables and queryList.queries - * * [PigJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/PigJob) - * scriptVariables and queryList.queries - * * [PrestoJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/PrestoJob) - * scriptVariables and queryList.queries - * - * Generated from protobuf field string kms_key = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $kms_key = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $gce_pd_kms_key_name - * Optional. The Cloud KMS key resource name to use for persistent disk - * encryption for all instances in the cluster. See [Use CMEK with cluster - * data] - * (https://cloud.google.com//dataproc/docs/concepts/configuring-clusters/customer-managed-encryption#use_cmek_with_cluster_data) - * for more information. - * @type string $kms_key - * Optional. The Cloud KMS key resource name to use for cluster persistent - * disk and job argument encryption. See [Use CMEK with cluster data] - * (https://cloud.google.com//dataproc/docs/concepts/configuring-clusters/customer-managed-encryption#use_cmek_with_cluster_data) - * for more information. - * When this key resource name is provided, the following job arguments of - * the following job types submitted to the cluster are encrypted using CMEK: - * * [FlinkJob - * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/FlinkJob) - * * [HadoopJob - * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/HadoopJob) - * * [SparkJob - * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/SparkJob) - * * [SparkRJob - * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/SparkRJob) - * * [PySparkJob - * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/PySparkJob) - * * [SparkSqlJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/SparkSqlJob) - * scriptVariables and queryList.queries - * * [HiveJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/HiveJob) - * scriptVariables and queryList.queries - * * [PigJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/PigJob) - * scriptVariables and queryList.queries - * * [PrestoJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/PrestoJob) - * scriptVariables and queryList.queries - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Clusters::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The Cloud KMS key resource name to use for persistent disk - * encryption for all instances in the cluster. See [Use CMEK with cluster - * data] - * (https://cloud.google.com//dataproc/docs/concepts/configuring-clusters/customer-managed-encryption#use_cmek_with_cluster_data) - * for more information. - * - * 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 resource name to use for persistent disk - * encryption for all instances in the cluster. See [Use CMEK with cluster - * data] - * (https://cloud.google.com//dataproc/docs/concepts/configuring-clusters/customer-managed-encryption#use_cmek_with_cluster_data) - * for more information. - * - * 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; - } - - /** - * Optional. The Cloud KMS key resource name to use for cluster persistent - * disk and job argument encryption. See [Use CMEK with cluster data] - * (https://cloud.google.com//dataproc/docs/concepts/configuring-clusters/customer-managed-encryption#use_cmek_with_cluster_data) - * for more information. - * When this key resource name is provided, the following job arguments of - * the following job types submitted to the cluster are encrypted using CMEK: - * * [FlinkJob - * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/FlinkJob) - * * [HadoopJob - * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/HadoopJob) - * * [SparkJob - * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/SparkJob) - * * [SparkRJob - * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/SparkRJob) - * * [PySparkJob - * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/PySparkJob) - * * [SparkSqlJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/SparkSqlJob) - * scriptVariables and queryList.queries - * * [HiveJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/HiveJob) - * scriptVariables and queryList.queries - * * [PigJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/PigJob) - * scriptVariables and queryList.queries - * * [PrestoJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/PrestoJob) - * scriptVariables and queryList.queries - * - * Generated from protobuf field string kms_key = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getKmsKey() - { - return $this->kms_key; - } - - /** - * Optional. The Cloud KMS key resource name to use for cluster persistent - * disk and job argument encryption. See [Use CMEK with cluster data] - * (https://cloud.google.com//dataproc/docs/concepts/configuring-clusters/customer-managed-encryption#use_cmek_with_cluster_data) - * for more information. - * When this key resource name is provided, the following job arguments of - * the following job types submitted to the cluster are encrypted using CMEK: - * * [FlinkJob - * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/FlinkJob) - * * [HadoopJob - * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/HadoopJob) - * * [SparkJob - * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/SparkJob) - * * [SparkRJob - * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/SparkRJob) - * * [PySparkJob - * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/PySparkJob) - * * [SparkSqlJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/SparkSqlJob) - * scriptVariables and queryList.queries - * * [HiveJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/HiveJob) - * scriptVariables and queryList.queries - * * [PigJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/PigJob) - * scriptVariables and queryList.queries - * * [PrestoJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/PrestoJob) - * scriptVariables and queryList.queries - * - * Generated from protobuf field string kms_key = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setKmsKey($var) - { - GPBUtil::checkString($var, True); - $this->kms_key = $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 e03e28038d56..000000000000 --- 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 7e55d7043f3c..000000000000 --- 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 8b9b5e6a69f4..000000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ExecutionConfig.php +++ /dev/null @@ -1,448 +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. Applies to sessions only. The duration to keep the session alive - * while it's idling. Exceeding this threshold causes the session to - * terminate. This field cannot be set on a batch workload. Minimum value is - * 10 minutes; maximum value is 14 days (see JSON representation of - * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). - * Defaults to 1 hour if not set. - * If both `ttl` and `idle_ttl` are specified for an interactive session, - * the conditions are treated as `OR` conditions: the workload will be - * terminated when it has been idle for `idle_ttl` or when `ttl` has been - * exceeded, whichever occurs first. - * - * Generated from protobuf field .google.protobuf.Duration idle_ttl = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $idle_ttl = null; - /** - * Optional. The duration after which the workload will be terminated, - * specified as the JSON representation for - * [Duration](https://protobuf.dev/programming-guides/proto3/#json). - * When the workload exceeds this duration, it will be unconditionally - * terminated without waiting for ongoing work to finish. If `ttl` is not - * specified for a batch workload, the workload will be allowed to run until - * it exits naturally (or run forever without exiting). If `ttl` is not - * specified for an interactive session, it defaults to 24 hours. If `ttl` is - * not specified for a batch that uses 2.1+ runtime version, it defaults to 4 - * hours. Minimum value is 10 minutes; maximum value is 14 days. If both `ttl` - * and `idle_ttl` are specified (for an interactive session), the conditions - * are treated as `OR` conditions: the workload will be terminated when it has - * been idle for `idle_ttl` or when `ttl` has been exceeded, whichever occurs - * first. - * - * 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 $idle_ttl - * Optional. Applies to sessions only. The duration to keep the session alive - * while it's idling. Exceeding this threshold causes the session to - * terminate. This field cannot be set on a batch workload. Minimum value is - * 10 minutes; maximum value is 14 days (see JSON representation of - * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). - * Defaults to 1 hour if not set. - * If both `ttl` and `idle_ttl` are specified for an interactive session, - * the conditions are treated as `OR` conditions: the workload will be - * terminated when it has been idle for `idle_ttl` or when `ttl` has been - * exceeded, whichever occurs first. - * @type \Google\Protobuf\Duration $ttl - * Optional. The duration after which the workload will be terminated, - * specified as the JSON representation for - * [Duration](https://protobuf.dev/programming-guides/proto3/#json). - * When the workload exceeds this duration, it will be unconditionally - * terminated without waiting for ongoing work to finish. If `ttl` is not - * specified for a batch workload, the workload will be allowed to run until - * it exits naturally (or run forever without exiting). If `ttl` is not - * specified for an interactive session, it defaults to 24 hours. If `ttl` is - * not specified for a batch that uses 2.1+ runtime version, it defaults to 4 - * hours. Minimum value is 10 minutes; maximum value is 14 days. If both `ttl` - * and `idle_ttl` are specified (for an interactive session), the conditions - * are treated as `OR` conditions: the workload will be terminated when it has - * been idle for `idle_ttl` or when `ttl` has been exceeded, whichever occurs - * first. - * @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. Applies to sessions only. The duration to keep the session alive - * while it's idling. Exceeding this threshold causes the session to - * terminate. This field cannot be set on a batch workload. Minimum value is - * 10 minutes; maximum value is 14 days (see JSON representation of - * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). - * Defaults to 1 hour if not set. - * If both `ttl` and `idle_ttl` are specified for an interactive session, - * the conditions are treated as `OR` conditions: the workload will be - * terminated when it has been idle for `idle_ttl` or when `ttl` has been - * exceeded, whichever occurs first. - * - * Generated from protobuf field .google.protobuf.Duration idle_ttl = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Duration|null - */ - public function getIdleTtl() - { - return $this->idle_ttl; - } - - public function hasIdleTtl() - { - return isset($this->idle_ttl); - } - - public function clearIdleTtl() - { - unset($this->idle_ttl); - } - - /** - * Optional. Applies to sessions only. The duration to keep the session alive - * while it's idling. Exceeding this threshold causes the session to - * terminate. This field cannot be set on a batch workload. Minimum value is - * 10 minutes; maximum value is 14 days (see JSON representation of - * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). - * Defaults to 1 hour if not set. - * If both `ttl` and `idle_ttl` are specified for an interactive session, - * the conditions are treated as `OR` conditions: the workload will be - * terminated when it has been idle for `idle_ttl` or when `ttl` has been - * exceeded, whichever occurs first. - * - * Generated from protobuf field .google.protobuf.Duration idle_ttl = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setIdleTtl($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->idle_ttl = $var; - - return $this; - } - - /** - * Optional. The duration after which the workload will be terminated, - * specified as the JSON representation for - * [Duration](https://protobuf.dev/programming-guides/proto3/#json). - * When the workload exceeds this duration, it will be unconditionally - * terminated without waiting for ongoing work to finish. If `ttl` is not - * specified for a batch workload, the workload will be allowed to run until - * it exits naturally (or run forever without exiting). If `ttl` is not - * specified for an interactive session, it defaults to 24 hours. If `ttl` is - * not specified for a batch that uses 2.1+ runtime version, it defaults to 4 - * hours. Minimum value is 10 minutes; maximum value is 14 days. If both `ttl` - * and `idle_ttl` are specified (for an interactive session), the conditions - * are treated as `OR` conditions: the workload will be terminated when it has - * been idle for `idle_ttl` or when `ttl` has been exceeded, whichever occurs - * first. - * - * 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, - * specified as the JSON representation for - * [Duration](https://protobuf.dev/programming-guides/proto3/#json). - * When the workload exceeds this duration, it will be unconditionally - * terminated without waiting for ongoing work to finish. If `ttl` is not - * specified for a batch workload, the workload will be allowed to run until - * it exits naturally (or run forever without exiting). If `ttl` is not - * specified for an interactive session, it defaults to 24 hours. If `ttl` is - * not specified for a batch that uses 2.1+ runtime version, it defaults to 4 - * hours. Minimum value is 10 minutes; maximum value is 14 days. If both `ttl` - * and `idle_ttl` are specified (for an interactive session), the conditions - * are treated as `OR` conditions: the workload will be terminated when it has - * been idle for `idle_ttl` or when `ttl` has been exceeded, whichever occurs - * first. - * - * 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 6a74c8aaacfc..000000000000 --- 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/FlinkJob.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/FlinkJob.php deleted file mode 100644 index 2ff8f95df78c..000000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/FlinkJob.php +++ /dev/null @@ -1,322 +0,0 @@ -google.cloud.dataproc.v1.FlinkJob - */ -class FlinkJob 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 - * might 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 - * Flink driver and tasks. - * - * Generated from protobuf field repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $jar_file_uris; - /** - * Optional. HCFS URI of the savepoint, which contains the last saved progress - * for starting the current job. - * - * Generated from protobuf field string savepoint_uri = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $savepoint_uri = ''; - /** - * Optional. A mapping of property names to values, used to configure Flink. - * Properties that conflict with values set by the Dataproc API might be - * overwritten. Can include properties set in - * `/etc/flink/conf/flink-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 - * [jarFileUris][google.cloud.dataproc.v1.FlinkJob.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 - * might 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 - * Flink driver and tasks. - * @type string $savepoint_uri - * Optional. HCFS URI of the savepoint, which contains the last saved progress - * for starting the current job. - * @type array|\Google\Protobuf\Internal\MapField $properties - * Optional. A mapping of property names to values, used to configure Flink. - * Properties that conflict with values set by the Dataproc API might be - * overwritten. Can include properties set in - * `/etc/flink/conf/flink-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 - * [jarFileUris][google.cloud.dataproc.v1.FlinkJob.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 - * [jarFileUris][google.cloud.dataproc.v1.FlinkJob.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 - * might 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 - * might 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 - * Flink 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 - * Flink 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 URI of the savepoint, which contains the last saved progress - * for starting the current job. - * - * Generated from protobuf field string savepoint_uri = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getSavepointUri() - { - return $this->savepoint_uri; - } - - /** - * Optional. HCFS URI of the savepoint, which contains the last saved progress - * for starting the current job. - * - * Generated from protobuf field string savepoint_uri = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setSavepointUri($var) - { - GPBUtil::checkString($var, True); - $this->savepoint_uri = $var; - - return $this; - } - - /** - * Optional. A mapping of property names to values, used to configure Flink. - * Properties that conflict with values set by the Dataproc API might be - * overwritten. Can include properties set in - * `/etc/flink/conf/flink-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 Flink. - * Properties that conflict with values set by the Dataproc API might be - * overwritten. Can include properties set in - * `/etc/flink/conf/flink-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/GceClusterConfig.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GceClusterConfig.php deleted file mode 100644 index a3a2964165e4..000000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GceClusterConfig.php +++ /dev/null @@ -1,750 +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. This setting applies to subnetwork-enabled networks. It is set to - * `true` by default in clusters created with image versions 2.2.x. - * When set to `true`: - * * All cluster VMs have internal IP addresses. - * * [Google Private Access] - * (https://cloud.google.com/vpc/docs/private-google-access) - * must be enabled to access Dataproc and other Google Cloud APIs. - * * Off-cluster dependencies must be configured to be accessible - * without external IP addresses. - * When set to `false`: - * * Cluster VMs are not restricted to internal IP addresses. - * * Ephemeral external IP addresses are assigned to each cluster VM. - * - * 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 network tags to add to all instances (see [Tagging - * instances](https://cloud.google.com/vpc/docs/add-remove-network-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. This setting applies to subnetwork-enabled networks. It is set to - * `true` by default in clusters created with image versions 2.2.x. - * When set to `true`: - * * All cluster VMs have internal IP addresses. - * * [Google Private Access] - * (https://cloud.google.com/vpc/docs/private-google-access) - * must be enabled to access Dataproc and other Google Cloud APIs. - * * Off-cluster dependencies must be configured to be accessible - * without external IP addresses. - * When set to `false`: - * * Cluster VMs are not restricted to internal IP addresses. - * * Ephemeral external IP addresses are assigned to each cluster VM. - * @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 network tags to add to all instances (see [Tagging - * instances](https://cloud.google.com/vpc/docs/add-remove-network-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. This setting applies to subnetwork-enabled networks. It is set to - * `true` by default in clusters created with image versions 2.2.x. - * When set to `true`: - * * All cluster VMs have internal IP addresses. - * * [Google Private Access] - * (https://cloud.google.com/vpc/docs/private-google-access) - * must be enabled to access Dataproc and other Google Cloud APIs. - * * Off-cluster dependencies must be configured to be accessible - * without external IP addresses. - * When set to `false`: - * * Cluster VMs are not restricted to internal IP addresses. - * * Ephemeral external IP addresses are assigned to each cluster VM. - * - * 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. This setting applies to subnetwork-enabled networks. It is set to - * `true` by default in clusters created with image versions 2.2.x. - * When set to `true`: - * * All cluster VMs have internal IP addresses. - * * [Google Private Access] - * (https://cloud.google.com/vpc/docs/private-google-access) - * must be enabled to access Dataproc and other Google Cloud APIs. - * * Off-cluster dependencies must be configured to be accessible - * without external IP addresses. - * When set to `false`: - * * Cluster VMs are not restricted to internal IP addresses. - * * Ephemeral external IP addresses are assigned to each cluster VM. - * - * 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 network tags to add to all instances (see [Tagging - * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)). - * - * Generated from protobuf field repeated string tags = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTags() - { - return $this->tags; - } - - /** - * The Compute Engine network tags to add to all instances (see [Tagging - * instances](https://cloud.google.com/vpc/docs/add-remove-network-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 5299b26dbe18..000000000000 --- 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 bd24daba7580..000000000000 --- 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 539e529523b8..000000000000 --- 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 987be48cf26b..000000000000 --- 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 80b65f8ad5df..000000000000 --- 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 d2cb6179dbc3..000000000000 --- 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/GetSessionRequest.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GetSessionRequest.php deleted file mode 100644 index c1b62a9bb571..000000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GetSessionRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.dataproc.v1.GetSessionRequest - */ -class GetSessionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the session to retrieve. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the session to retrieve. Please see - * {@see SessionControllerClient::sessionName()} for help formatting this field. - * - * @return \Google\Cloud\Dataproc\V1\GetSessionRequest - * - * @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 session to retrieve. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Sessions::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the session to retrieve. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the session to retrieve. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GetSessionTemplateRequest.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GetSessionTemplateRequest.php deleted file mode 100644 index e466caf200df..000000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/GetSessionTemplateRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.dataproc.v1.GetSessionTemplateRequest - */ -class GetSessionTemplateRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the session template to retrieve. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the session template to retrieve. Please see - * {@see SessionTemplateControllerClient::sessionTemplateName()} for help formatting this field. - * - * @return \Google\Cloud\Dataproc\V1\GetSessionTemplateRequest - * - * @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 session template to retrieve. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\SessionTemplates::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the session template to retrieve. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the session template to retrieve. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/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 3206da406307..000000000000 --- 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 42bd2b4175f2..000000000000 --- 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 590789b7e922..000000000000 --- 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 a3eb6f4595af..000000000000 --- 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 fdf2da66f5b1..000000000000 --- 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 b62f05b4c3db..000000000000 --- 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 3f4f9f452c4f..000000000000 --- 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 c6fe2d439dce..000000000000 --- 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 71599754da5a..000000000000 --- 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 might 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 might 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 might 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 might 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 might 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 might 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 might 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 might 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 e607c9431397..000000000000 --- 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 might 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 might 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 might 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 might 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 d733c1071b3f..000000000000 --- 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 60e39ca8fc1d..000000000000 --- 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 4af40360b8fb..000000000000 --- 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 66834be9c204..000000000000 --- 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 4e3adafefd96..000000000000 --- 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 a101ccec8866..000000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/InstanceGroupConfig.php +++ /dev/null @@ -1,746 +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; - /** - * Optional. Configuration to handle the startup of instances during cluster - * create and update process. - * - * Generated from protobuf field .google.cloud.dataproc.v1.StartupConfig startup_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $startup_config = 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. - * @type \Google\Cloud\Dataproc\V1\StartupConfig $startup_config - * Optional. Configuration to handle the startup of instances during cluster - * create and update process. - * } - */ - 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; - } - - /** - * Optional. Configuration to handle the startup of instances during cluster - * create and update process. - * - * Generated from protobuf field .google.cloud.dataproc.v1.StartupConfig startup_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\StartupConfig|null - */ - public function getStartupConfig() - { - return $this->startup_config; - } - - public function hasStartupConfig() - { - return isset($this->startup_config); - } - - public function clearStartupConfig() - { - unset($this->startup_config); - } - - /** - * Optional. Configuration to handle the startup of instances during cluster - * create and update process. - * - * Generated from protobuf field .google.cloud.dataproc.v1.StartupConfig startup_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\StartupConfig $var - * @return $this - */ - public function setStartupConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\StartupConfig::class); - $this->startup_config = $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 cf790907d9c7..000000000000 --- 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 7b4c3ce1d828..000000000000 --- 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 5fe1c1f4f0e2..000000000000 --- 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 a8aacd6befb4..000000000000 --- 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 e9ce2e8354f5..000000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/Job.php +++ /dev/null @@ -1,918 +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 might 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 - * might 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 can be used as part of job setup and handling. If not present, - * control files might 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** can 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 - * might 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\FlinkJob $flink_job - * Optional. Job is a Flink job. - * @type \Google\Cloud\Dataproc\V1\JobStatus $status - * Output only. The job status. Additional application-specific - * status information might 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 - * might 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 can be used as part of job setup and handling. If not present, - * control files might 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** can 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 - * might 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; - } - - /** - * Optional. Job is a Flink job. - * - * Generated from protobuf field .google.cloud.dataproc.v1.FlinkJob flink_job = 29 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\FlinkJob|null - */ - public function getFlinkJob() - { - return $this->readOneof(29); - } - - public function hasFlinkJob() - { - return $this->hasOneof(29); - } - - /** - * Optional. Job is a Flink job. - * - * Generated from protobuf field .google.cloud.dataproc.v1.FlinkJob flink_job = 29 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\FlinkJob $var - * @return $this - */ - public function setFlinkJob($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\FlinkJob::class); - $this->writeOneof(29, $var); - - return $this; - } - - /** - * Output only. The job status. Additional application-specific - * status information might 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 might 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 - * might 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 - * might 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 can be used as part of job setup and handling. If not present, - * control files might 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 can be used as part of job setup and handling. If not present, - * control files might 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** can 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** can 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 - * might 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 - * might 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 f7c0393acb88..000000000000 --- 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 3e2f3be0343a..000000000000 --- 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 97004c388e88..000000000000 --- 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 a7499e413e7e..000000000000 --- 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 can be restarted as - * a result of driver exiting with non-zero code before job is - * reported failed. - * A job might 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 can 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 can be restarted as - * a result of driver exiting with non-zero code before job is - * reported failed. - * A job might 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 can 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 can be restarted as - * a result of driver exiting with non-zero code before job is - * reported failed. - * A job might 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 can be restarted as - * a result of driver exiting with non-zero code before job is - * reported failed. - * A job might 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 can 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 can 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 aaabdd201ad0..000000000000 --- 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 1a9412ce3527..000000000000 --- 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 5e435eeb041f..000000000000 --- 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 might 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 can 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/JupyterConfig.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/JupyterConfig.php deleted file mode 100644 index 7893b56c9256..000000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/JupyterConfig.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.dataproc.v1.JupyterConfig - */ -class JupyterConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Kernel - * - * Generated from protobuf field .google.cloud.dataproc.v1.JupyterConfig.Kernel kernel = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $kernel = 0; - /** - * Optional. Display name, shown in the Jupyter kernelspec card. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $display_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $kernel - * Optional. Kernel - * @type string $display_name - * Optional. Display name, shown in the Jupyter kernelspec card. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Sessions::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Kernel - * - * Generated from protobuf field .google.cloud.dataproc.v1.JupyterConfig.Kernel kernel = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getKernel() - { - return $this->kernel; - } - - /** - * Optional. Kernel - * - * Generated from protobuf field .google.cloud.dataproc.v1.JupyterConfig.Kernel kernel = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setKernel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataproc\V1\JupyterConfig\Kernel::class); - $this->kernel = $var; - - return $this; - } - - /** - * Optional. Display name, shown in the Jupyter kernelspec card. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Optional. Display name, shown in the Jupyter kernelspec card. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/JupyterConfig/Kernel.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/JupyterConfig/Kernel.php deleted file mode 100644 index 18cb47ef1e68..000000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/JupyterConfig/Kernel.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.dataproc.v1.JupyterConfig.Kernel - */ -class Kernel -{ - /** - * The kernel is unknown. - * - * Generated from protobuf enum KERNEL_UNSPECIFIED = 0; - */ - const KERNEL_UNSPECIFIED = 0; - /** - * Python kernel. - * - * Generated from protobuf enum PYTHON = 1; - */ - const PYTHON = 1; - /** - * Scala kernel. - * - * Generated from protobuf enum SCALA = 2; - */ - const SCALA = 2; - - private static $valueToName = [ - self::KERNEL_UNSPECIFIED => 'KERNEL_UNSPECIFIED', - self::PYTHON => 'PYTHON', - self::SCALA => 'SCALA', - ]; - - 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(Kernel::class, \Google\Cloud\Dataproc\V1\JupyterConfig_Kernel::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 2494c33cae09..000000000000 --- 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 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 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 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 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 f0b276a7f954..000000000000 --- 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 635bc891b2dd..000000000000 --- 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 8e8de9ec351f..000000000000 --- 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 5a392f5cd1c7..000000000000 --- 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 8948f3e6861f..000000000000 --- 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 e732bf4b1819..000000000000 --- 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 3e0d8d2d108f..000000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListBatchesResponse.php +++ /dev/null @@ -1,147 +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 = ''; - /** - * Output only. List of Batches that could not be included in the response. - * Attempting to get one of these resources may indicate why it was not - * included in the list response. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\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. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Output only. List of Batches that could not be included in the response. - * Attempting to get one of these resources may indicate why it was not - * included in the list response. - * } - */ - 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; - } - - /** - * Output only. List of Batches that could not be included in the response. - * Attempting to get one of these resources may indicate why it was not - * included in the list response. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Output only. List of Batches that could not be included in the response. - * Attempting to get one of these resources may indicate why it was not - * included in the list response. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/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 e09e47dd76cd..000000000000 --- 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`, `UPDATING`, `STOPPING`, or - * `STOPPED`. `ACTIVE` contains the `CREATING`, `UPDATING`, and `RUNNING` - * states. `INACTIVE` contains the `DELETING`, `ERROR`, `STOPPING`, and - * `STOPPED` 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`, `UPDATING`, `STOPPING`, or - * `STOPPED`. `ACTIVE` contains the `CREATING`, `UPDATING`, and `RUNNING` - * states. `INACTIVE` contains the `DELETING`, `ERROR`, `STOPPING`, and - * `STOPPED` 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`, `UPDATING`, `STOPPING`, or - * `STOPPED`. `ACTIVE` contains the `CREATING`, `UPDATING`, and `RUNNING` - * states. `INACTIVE` contains the `DELETING`, `ERROR`, `STOPPING`, and - * `STOPPED` 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`, `UPDATING`, `STOPPING`, or - * `STOPPED`. `ACTIVE` contains the `CREATING`, `UPDATING`, and `RUNNING` - * states. `INACTIVE` contains the `DELETING`, `ERROR`, `STOPPING`, and - * `STOPPED` 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`, `UPDATING`, `STOPPING`, or - * `STOPPED`. `ACTIVE` contains the `CREATING`, `UPDATING`, and `RUNNING` - * states. `INACTIVE` contains the `DELETING`, `ERROR`, `STOPPING`, and - * `STOPPED` 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 1bf146d4ec35..000000000000 --- 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 3edadf58a5ef..000000000000 --- 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 adfef5aece1b..000000000000 --- 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 0ed83c9d6a98..000000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListJobsResponse.php +++ /dev/null @@ -1,155 +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 = ''; - /** - * Output only. List of jobs with - * [kms_key][google.cloud.dataproc.v1.EncryptionConfig.kms_key]-encrypted - * parameters that could not be decrypted. A response to a `jobs.get` request - * may indicate the reason for the decryption failure for a specific job. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\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. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Output only. List of jobs with - * [kms_key][google.cloud.dataproc.v1.EncryptionConfig.kms_key]-encrypted - * parameters that could not be decrypted. A response to a `jobs.get` request - * may indicate the reason for the decryption failure for a specific job. - * } - */ - 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; - } - - /** - * Output only. List of jobs with - * [kms_key][google.cloud.dataproc.v1.EncryptionConfig.kms_key]-encrypted - * parameters that could not be decrypted. A response to a `jobs.get` request - * may indicate the reason for the decryption failure for a specific job. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Output only. List of jobs with - * [kms_key][google.cloud.dataproc.v1.EncryptionConfig.kms_key]-encrypted - * parameters that could not be decrypted. A response to a `jobs.get` request - * may indicate the reason for the decryption failure for a specific job. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListSessionTemplatesRequest.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListSessionTemplatesRequest.php deleted file mode 100644 index bdf85c10b4db..000000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListSessionTemplatesRequest.php +++ /dev/null @@ -1,199 +0,0 @@ -google.cloud.dataproc.v1.ListSessionTemplatesRequest - */ -class ListSessionTemplatesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent that owns this collection of session templates. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of sessions to return in each response. - * The service may return fewer than this value. - * - * 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 `ListSessions` 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 session templates to return in the response. - * Filters are case sensitive and have the following syntax: - * [field = value] AND [field [= value]] ... - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - - /** - * @param string $parent Required. The parent that owns this collection of session templates. Please see - * {@see SessionTemplateControllerClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Dataproc\V1\ListSessionTemplatesRequest - * - * @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 that owns this collection of session templates. - * @type int $page_size - * Optional. The maximum number of sessions to return in each response. - * The service may return fewer than this value. - * @type string $page_token - * Optional. A page token received from a previous `ListSessions` call. - * Provide this token to retrieve the subsequent page. - * @type string $filter - * Optional. A filter for the session templates to return in the response. - * Filters are case sensitive and have the following syntax: - * [field = value] AND [field [= value]] ... - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\SessionTemplates::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent that owns this collection of session templates. - * - * 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 that owns this collection of session templates. - * - * 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 sessions to return in each response. - * The service may return fewer than this value. - * - * 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 sessions to return in each response. - * The service may return fewer than this value. - * - * 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 `ListSessions` 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 `ListSessions` 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 session templates to return in the response. - * Filters are case sensitive and have the following syntax: - * [field = value] AND [field [= value]] ... - * - * 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 session templates to return in the response. - * Filters are case sensitive and have the following syntax: - * [field = value] AND [field [= value]] ... - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListSessionTemplatesResponse.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListSessionTemplatesResponse.php deleted file mode 100644 index 432d6458e84a..000000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListSessionTemplatesResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.dataproc.v1.ListSessionTemplatesResponse - */ -class ListSessionTemplatesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Session template list - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.SessionTemplate session_templates = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $session_templates; - /** - * 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\SessionTemplate>|\Google\Protobuf\Internal\RepeatedField $session_templates - * Output only. Session template list - * @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\SessionTemplates::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Session template list - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.SessionTemplate session_templates = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSessionTemplates() - { - return $this->session_templates; - } - - /** - * Output only. Session template list - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.SessionTemplate session_templates = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\Dataproc\V1\SessionTemplate>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSessionTemplates($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataproc\V1\SessionTemplate::class); - $this->session_templates = $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/ListSessionsRequest.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListSessionsRequest.php deleted file mode 100644 index 34b11a34bcdd..000000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListSessionsRequest.php +++ /dev/null @@ -1,235 +0,0 @@ -google.cloud.dataproc.v1.ListSessionsRequest - */ -class ListSessionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent, which owns this collection of sessions. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of sessions to return in each response. - * The service may return fewer than this value. - * - * 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 `ListSessions` 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 sessions to return in the response. - * A filter is a logical expression constraining the values of various fields - * in each session resource. Filters are case sensitive, and may contain - * multiple clauses combined with logical operators (AND, OR). - * Supported fields are `session_id`, `session_uuid`, `state`, `create_time`, - * and `labels`. - * Example: `state = ACTIVE and create_time < "2023-01-01T00:00:00Z"` - * is a filter for sessions in an ACTIVE state that were created before - * 2023-01-01. `state = ACTIVE and labels.environment=production` is a filter - * for sessions in an ACTIVE state that have a production environment label. - * See https://google.aip.dev/assets/misc/ebnf-filtering.txt for a detailed - * description of the filter syntax and a list of supported comparators. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - - /** - * @param string $parent Required. The parent, which owns this collection of sessions. Please see - * {@see SessionControllerClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Dataproc\V1\ListSessionsRequest - * - * @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 sessions. - * @type int $page_size - * Optional. The maximum number of sessions to return in each response. - * The service may return fewer than this value. - * @type string $page_token - * Optional. A page token received from a previous `ListSessions` call. - * Provide this token to retrieve the subsequent page. - * @type string $filter - * Optional. A filter for the sessions to return in the response. - * A filter is a logical expression constraining the values of various fields - * in each session resource. Filters are case sensitive, and may contain - * multiple clauses combined with logical operators (AND, OR). - * Supported fields are `session_id`, `session_uuid`, `state`, `create_time`, - * and `labels`. - * Example: `state = ACTIVE and create_time < "2023-01-01T00:00:00Z"` - * is a filter for sessions in an ACTIVE state that were created before - * 2023-01-01. `state = ACTIVE and labels.environment=production` is a filter - * for sessions in an ACTIVE state that have a production environment label. - * See https://google.aip.dev/assets/misc/ebnf-filtering.txt for a detailed - * description of the filter syntax and a list of supported comparators. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Sessions::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent, which owns this collection of sessions. - * - * 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 sessions. - * - * 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 sessions to return in each response. - * The service may return fewer than this value. - * - * 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 sessions to return in each response. - * The service may return fewer than this value. - * - * 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 `ListSessions` 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 `ListSessions` 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 sessions to return in the response. - * A filter is a logical expression constraining the values of various fields - * in each session resource. Filters are case sensitive, and may contain - * multiple clauses combined with logical operators (AND, OR). - * Supported fields are `session_id`, `session_uuid`, `state`, `create_time`, - * and `labels`. - * Example: `state = ACTIVE and create_time < "2023-01-01T00:00:00Z"` - * is a filter for sessions in an ACTIVE state that were created before - * 2023-01-01. `state = ACTIVE and labels.environment=production` is a filter - * for sessions in an ACTIVE state that have a production environment label. - * See https://google.aip.dev/assets/misc/ebnf-filtering.txt for a detailed - * description of the filter syntax and a list of supported comparators. - * - * 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 sessions to return in the response. - * A filter is a logical expression constraining the values of various fields - * in each session resource. Filters are case sensitive, and may contain - * multiple clauses combined with logical operators (AND, OR). - * Supported fields are `session_id`, `session_uuid`, `state`, `create_time`, - * and `labels`. - * Example: `state = ACTIVE and create_time < "2023-01-01T00:00:00Z"` - * is a filter for sessions in an ACTIVE state that were created before - * 2023-01-01. `state = ACTIVE and labels.environment=production` is a filter - * for sessions in an ACTIVE state that have a production environment label. - * See https://google.aip.dev/assets/misc/ebnf-filtering.txt for a detailed - * description of the filter syntax and a list of supported comparators. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListSessionsResponse.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListSessionsResponse.php deleted file mode 100644 index 64fcdd7ffa5d..000000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListSessionsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.dataproc.v1.ListSessionsResponse - */ -class ListSessionsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The sessions from the specified collection. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.Session sessions = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $sessions; - /** - * 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\Session>|\Google\Protobuf\Internal\RepeatedField $sessions - * Output only. The sessions 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\Sessions::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The sessions from the specified collection. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.Session sessions = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSessions() - { - return $this->sessions; - } - - /** - * Output only. The sessions from the specified collection. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.Session sessions = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\Dataproc\V1\Session>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSessions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataproc\V1\Session::class); - $this->sessions = $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/ListWorkflowTemplatesRequest.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListWorkflowTemplatesRequest.php deleted file mode 100644 index d5fb760a2281..000000000000 --- 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 d6a22d2d4494..000000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/ListWorkflowTemplatesResponse.php +++ /dev/null @@ -1,151 +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 = ''; - /** - * Output only. List of workflow templates that could not be included in the - * response. Attempting to get one of these resources may indicate why it was - * not included in the list response. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\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. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Output only. List of workflow templates that could not be included in the - * response. Attempting to get one of these resources may indicate why it was - * not included in the list response. - * } - */ - 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; - } - - /** - * Output only. List of workflow templates that could not be included in the - * response. Attempting to get one of these resources may indicate why it was - * not included in the list response. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Output only. List of workflow templates that could not be included in the - * response. Attempting to get one of these resources may indicate why it was - * not included in the list response. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/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 234b9ee24744..000000000000 --- 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 can 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 can 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 can 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 can 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 c5716a27bb36..000000000000 --- 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 4a8d6c006652..000000000000 --- 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 5b478879505f..000000000000 --- 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 3ea1359c20b9..000000000000 --- 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 8a22a7a39371..000000000000 --- 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 f338f061458e..000000000000 --- 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 83c1b6ae648b..000000000000 --- 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 9fe80bbd300b..000000000000 --- 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 4d13ed48a9be..000000000000 --- 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 86c1f470e5e1..000000000000 --- 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 69f01eeecf04..000000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/OrderedJob.php +++ /dev/null @@ -1,578 +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 \Google\Cloud\Dataproc\V1\TrinoJob $trino_job - * Optional. Job is a Trino job. - * @type \Google\Cloud\Dataproc\V1\FlinkJob $flink_job - * Optional. Job is a Flink 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. Job is a Trino job. - * - * Generated from protobuf field .google.cloud.dataproc.v1.TrinoJob trino_job = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\TrinoJob|null - */ - public function getTrinoJob() - { - return $this->readOneof(13); - } - - public function hasTrinoJob() - { - return $this->hasOneof(13); - } - - /** - * Optional. Job is a Trino job. - * - * Generated from protobuf field .google.cloud.dataproc.v1.TrinoJob trino_job = 13 [(.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(13, $var); - - return $this; - } - - /** - * Optional. Job is a Flink job. - * - * Generated from protobuf field .google.cloud.dataproc.v1.FlinkJob flink_job = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\FlinkJob|null - */ - public function getFlinkJob() - { - return $this->readOneof(14); - } - - public function hasFlinkJob() - { - return $this->hasOneof(14); - } - - /** - * Optional. Job is a Flink job. - * - * Generated from protobuf field .google.cloud.dataproc.v1.FlinkJob flink_job = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\FlinkJob $var - * @return $this - */ - public function setFlinkJob($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\FlinkJob::class); - $this->writeOneof(14, $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 2933604062b0..000000000000 --- 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 0964f0f90c06..000000000000 --- 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 e8b4115ec40a..000000000000 --- 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 might 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 might 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 might 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 might 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 91086e0edea7..000000000000 --- 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/PyPiRepositoryConfig.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/PyPiRepositoryConfig.php deleted file mode 100644 index 983f928f9008..000000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/PyPiRepositoryConfig.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.dataproc.v1.PyPiRepositoryConfig - */ -class PyPiRepositoryConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. PyPi repository address - * - * Generated from protobuf field string pypi_repository = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $pypi_repository = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $pypi_repository - * Optional. PyPi repository address - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Shared::initOnce(); - parent::__construct($data); - } - - /** - * Optional. PyPi repository address - * - * Generated from protobuf field string pypi_repository = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPypiRepository() - { - return $this->pypi_repository; - } - - /** - * Optional. PyPi repository address - * - * Generated from protobuf field string pypi_repository = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPypiRepository($var) - { - GPBUtil::checkString($var, True); - $this->pypi_repository = $var; - - return $this; - } - -} - 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 6cf061fbc315..000000000000 --- 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 f4572edb2ddb..000000000000 --- 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 might 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 might 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 might 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 might 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 6e1e7dda61c9..000000000000 --- 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 437eafd5cc5d..000000000000 --- 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/RepositoryConfig.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/RepositoryConfig.php deleted file mode 100644 index c8b5538731cb..000000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/RepositoryConfig.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.dataproc.v1.RepositoryConfig - */ -class RepositoryConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Configuration for PyPi repository. - * - * Generated from protobuf field .google.cloud.dataproc.v1.PyPiRepositoryConfig pypi_repository_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $pypi_repository_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dataproc\V1\PyPiRepositoryConfig $pypi_repository_config - * Optional. Configuration for PyPi repository. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Shared::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Configuration for PyPi repository. - * - * Generated from protobuf field .google.cloud.dataproc.v1.PyPiRepositoryConfig pypi_repository_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\PyPiRepositoryConfig|null - */ - public function getPypiRepositoryConfig() - { - return $this->pypi_repository_config; - } - - public function hasPypiRepositoryConfig() - { - return isset($this->pypi_repository_config); - } - - public function clearPypiRepositoryConfig() - { - unset($this->pypi_repository_config); - } - - /** - * Optional. Configuration for PyPi repository. - * - * Generated from protobuf field .google.cloud.dataproc.v1.PyPiRepositoryConfig pypi_repository_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\PyPiRepositoryConfig $var - * @return $this - */ - public function setPypiRepositoryConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\PyPiRepositoryConfig::class); - $this->pypi_repository_config = $var; - - 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 9211155368d0..000000000000 --- 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 ef2c252f01b8..000000000000 --- 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 fefac1c3e248..000000000000 --- 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 ae45de549e08..000000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/RuntimeConfig.php +++ /dev/null @@ -1,269 +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; - /** - * Optional. Dependency repository configuration. - * - * Generated from protobuf field .google.cloud.dataproc.v1.RepositoryConfig repository_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $repository_config = null; - /** - * Optional. Autotuning configuration of the workload. - * - * Generated from protobuf field .google.cloud.dataproc.v1.AutotuningConfig autotuning_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $autotuning_config = null; - /** - * Optional. Cohort identifier. Identifies families of the workloads having - * the same shape, e.g. daily ETL jobs. - * - * Generated from protobuf field string cohort = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $cohort = ''; - - /** - * 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. - * @type \Google\Cloud\Dataproc\V1\RepositoryConfig $repository_config - * Optional. Dependency repository configuration. - * @type \Google\Cloud\Dataproc\V1\AutotuningConfig $autotuning_config - * Optional. Autotuning configuration of the workload. - * @type string $cohort - * Optional. Cohort identifier. Identifies families of the workloads having - * the same shape, e.g. daily ETL jobs. - * } - */ - 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; - } - - /** - * Optional. Dependency repository configuration. - * - * Generated from protobuf field .google.cloud.dataproc.v1.RepositoryConfig repository_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\RepositoryConfig|null - */ - public function getRepositoryConfig() - { - return $this->repository_config; - } - - public function hasRepositoryConfig() - { - return isset($this->repository_config); - } - - public function clearRepositoryConfig() - { - unset($this->repository_config); - } - - /** - * Optional. Dependency repository configuration. - * - * Generated from protobuf field .google.cloud.dataproc.v1.RepositoryConfig repository_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\RepositoryConfig $var - * @return $this - */ - public function setRepositoryConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\RepositoryConfig::class); - $this->repository_config = $var; - - return $this; - } - - /** - * Optional. Autotuning configuration of the workload. - * - * Generated from protobuf field .google.cloud.dataproc.v1.AutotuningConfig autotuning_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\AutotuningConfig|null - */ - public function getAutotuningConfig() - { - return $this->autotuning_config; - } - - public function hasAutotuningConfig() - { - return isset($this->autotuning_config); - } - - public function clearAutotuningConfig() - { - unset($this->autotuning_config); - } - - /** - * Optional. Autotuning configuration of the workload. - * - * Generated from protobuf field .google.cloud.dataproc.v1.AutotuningConfig autotuning_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\AutotuningConfig $var - * @return $this - */ - public function setAutotuningConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\AutotuningConfig::class); - $this->autotuning_config = $var; - - return $this; - } - - /** - * Optional. Cohort identifier. Identifies families of the workloads having - * the same shape, e.g. daily ETL jobs. - * - * Generated from protobuf field string cohort = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getCohort() - { - return $this->cohort; - } - - /** - * Optional. Cohort identifier. Identifies families of the workloads having - * the same shape, e.g. daily ETL jobs. - * - * Generated from protobuf field string cohort = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setCohort($var) - { - GPBUtil::checkString($var, True); - $this->cohort = $var; - - 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 1a2b8692da80..000000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/RuntimeInfo.php +++ /dev/null @@ -1,267 +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 when - * the workload completes (see [Dataproc Serverless pricing] - * (https://cloud.google.com/dataproc-serverless/pricing)). - * **Note:** This metric calculation may change in the future, for - * example, to capture cumulative workload resource - * consumption during workload execution (see the - * [Dataproc Serverless release notes] - * (https://cloud.google.com/dataproc-serverless/docs/release-notes) - * for announcements, changes, fixes - * and other Dataproc developments). - * - * 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 when - * the workload completes (see [Dataproc Serverless pricing] - * (https://cloud.google.com/dataproc-serverless/pricing)). - * **Note:** This metric calculation may change in the future, for - * example, to capture cumulative workload resource - * consumption during workload execution (see the - * [Dataproc Serverless release notes] - * (https://cloud.google.com/dataproc-serverless/docs/release-notes) - * for announcements, changes, fixes - * and other Dataproc developments). - * @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 when - * the workload completes (see [Dataproc Serverless pricing] - * (https://cloud.google.com/dataproc-serverless/pricing)). - * **Note:** This metric calculation may change in the future, for - * example, to capture cumulative workload resource - * consumption during workload execution (see the - * [Dataproc Serverless release notes] - * (https://cloud.google.com/dataproc-serverless/docs/release-notes) - * for announcements, changes, fixes - * and other Dataproc developments). - * - * 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 when - * the workload completes (see [Dataproc Serverless pricing] - * (https://cloud.google.com/dataproc-serverless/pricing)). - * **Note:** This metric calculation may change in the future, for - * example, to capture cumulative workload resource - * consumption during workload execution (see the - * [Dataproc Serverless release notes] - * (https://cloud.google.com/dataproc-serverless/docs/release-notes) - * for announcements, changes, fixes - * and other Dataproc developments). - * - * 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 47a24e1e6270..000000000000 --- 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/Session.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/Session.php deleted file mode 100644 index 9c9a1bb3a6af..000000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/Session.php +++ /dev/null @@ -1,690 +0,0 @@ -google.cloud.dataproc.v1.Session - */ -class Session extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the session. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Output only. A session UUID (Unique Universal Identifier). The service - * generates this value when it creates the session. - * - * Generated from protobuf field string uuid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uuid = ''; - /** - * Output only. The time when the session 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 session execution. - * - * Generated from protobuf field .google.cloud.dataproc.v1.RuntimeInfo runtime_info = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $runtime_info = null; - /** - * Output only. A state of the session. - * - * Generated from protobuf field .google.cloud.dataproc.v1.Session.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. Session state details, such as the failure - * description if the state is `FAILED`. - * - * Generated from protobuf field string state_message = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state_message = ''; - /** - * Output only. The time when the session entered the current state. - * - * Generated from protobuf field .google.protobuf.Timestamp state_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state_time = null; - /** - * Output only. The email address of the user who created the session. - * - * Generated from protobuf field string creator = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $creator = ''; - /** - * Optional. The labels to associate with the session. - * 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 session. - * - * Generated from protobuf field map labels = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Optional. Runtime configuration for the session execution. - * - * Generated from protobuf field .google.cloud.dataproc.v1.RuntimeConfig runtime_config = 12 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $runtime_config = null; - /** - * Optional. Environment configuration for the session execution. - * - * Generated from protobuf field .google.cloud.dataproc.v1.EnvironmentConfig environment_config = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $environment_config = null; - /** - * Optional. The email address of the user who owns the session. - * - * Generated from protobuf field string user = 14 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $user = ''; - /** - * Output only. Historical state information for the session. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.Session.SessionStateHistory state_history = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $state_history; - /** - * Optional. The session template used by the session. - * Only resource names, including project ID and location, are valid. - * Example: - * * `https://www.googleapis.com/compute/v1/projects/[project_id]/locations/[dataproc_region]/sessionTemplates/[template_id]` - * * `projects/[project_id]/locations/[dataproc_region]/sessionTemplates/[template_id]` - * The template must be in the same project and Dataproc region as the - * session. - * - * Generated from protobuf field string session_template = 16 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $session_template = ''; - protected $session_config; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the session. - * @type string $uuid - * Output only. A session UUID (Unique Universal Identifier). The service - * generates this value when it creates the session. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time when the session was created. - * @type \Google\Cloud\Dataproc\V1\JupyterConfig $jupyter_session - * Optional. Jupyter session config. - * @type \Google\Cloud\Dataproc\V1\SparkConnectConfig $spark_connect_session - * Optional. Spark Connect session config. - * @type \Google\Cloud\Dataproc\V1\RuntimeInfo $runtime_info - * Output only. Runtime information about session execution. - * @type int $state - * Output only. A state of the session. - * @type string $state_message - * Output only. Session state details, such as the failure - * description if the state is `FAILED`. - * @type \Google\Protobuf\Timestamp $state_time - * Output only. The time when the session entered the current state. - * @type string $creator - * Output only. The email address of the user who created the session. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. The labels to associate with the session. - * 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 session. - * @type \Google\Cloud\Dataproc\V1\RuntimeConfig $runtime_config - * Optional. Runtime configuration for the session execution. - * @type \Google\Cloud\Dataproc\V1\EnvironmentConfig $environment_config - * Optional. Environment configuration for the session execution. - * @type string $user - * Optional. The email address of the user who owns the session. - * @type array<\Google\Cloud\Dataproc\V1\Session\SessionStateHistory>|\Google\Protobuf\Internal\RepeatedField $state_history - * Output only. Historical state information for the session. - * @type string $session_template - * Optional. The session template used by the session. - * Only resource names, including project ID and location, are valid. - * Example: - * * `https://www.googleapis.com/compute/v1/projects/[project_id]/locations/[dataproc_region]/sessionTemplates/[template_id]` - * * `projects/[project_id]/locations/[dataproc_region]/sessionTemplates/[template_id]` - * The template must be in the same project and Dataproc region as the - * session. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Sessions::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the session. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the session. - * - * 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; - } - - /** - * Output only. A session UUID (Unique Universal Identifier). The service - * generates this value when it creates the session. - * - * Generated from protobuf field string uuid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUuid() - { - return $this->uuid; - } - - /** - * Output only. A session UUID (Unique Universal Identifier). The service - * generates this value when it creates the session. - * - * 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 session 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 session 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. Jupyter session config. - * - * Generated from protobuf field .google.cloud.dataproc.v1.JupyterConfig jupyter_session = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\JupyterConfig|null - */ - public function getJupyterSession() - { - return $this->readOneof(4); - } - - public function hasJupyterSession() - { - return $this->hasOneof(4); - } - - /** - * Optional. Jupyter session config. - * - * Generated from protobuf field .google.cloud.dataproc.v1.JupyterConfig jupyter_session = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\JupyterConfig $var - * @return $this - */ - public function setJupyterSession($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\JupyterConfig::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Optional. Spark Connect session config. - * - * Generated from protobuf field .google.cloud.dataproc.v1.SparkConnectConfig spark_connect_session = 17 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\SparkConnectConfig|null - */ - public function getSparkConnectSession() - { - return $this->readOneof(17); - } - - public function hasSparkConnectSession() - { - return $this->hasOneof(17); - } - - /** - * Optional. Spark Connect session config. - * - * Generated from protobuf field .google.cloud.dataproc.v1.SparkConnectConfig spark_connect_session = 17 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\SparkConnectConfig $var - * @return $this - */ - public function setSparkConnectSession($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\SparkConnectConfig::class); - $this->writeOneof(17, $var); - - return $this; - } - - /** - * Output only. Runtime information about session execution. - * - * Generated from protobuf field .google.cloud.dataproc.v1.RuntimeInfo runtime_info = 6 [(.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 session execution. - * - * Generated from protobuf field .google.cloud.dataproc.v1.RuntimeInfo runtime_info = 6 [(.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. A state of the session. - * - * Generated from protobuf field .google.cloud.dataproc.v1.Session.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. A state of the session. - * - * Generated from protobuf field .google.cloud.dataproc.v1.Session.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataproc\V1\Session\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. Session state details, such as the failure - * description if the state is `FAILED`. - * - * Generated from protobuf field string state_message = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStateMessage() - { - return $this->state_message; - } - - /** - * Output only. Session state details, such as the failure - * description if the state is `FAILED`. - * - * Generated from protobuf field string state_message = 8 [(.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 session entered the current state. - * - * Generated from protobuf field .google.protobuf.Timestamp state_time = 9 [(.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 session entered the current state. - * - * Generated from protobuf field .google.protobuf.Timestamp state_time = 9 [(.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 session. - * - * Generated from protobuf field string creator = 10 [(.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 session. - * - * Generated from protobuf field string creator = 10 [(.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 the session. - * 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 session. - * - * Generated from protobuf field map labels = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. The labels to associate with the session. - * 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 session. - * - * Generated from protobuf field map labels = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Optional. Runtime configuration for the session execution. - * - * Generated from protobuf field .google.cloud.dataproc.v1.RuntimeConfig runtime_config = 12 [(.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 session execution. - * - * Generated from protobuf field .google.cloud.dataproc.v1.RuntimeConfig runtime_config = 12 [(.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 session execution. - * - * Generated from protobuf field .google.cloud.dataproc.v1.EnvironmentConfig environment_config = 13 [(.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 session execution. - * - * Generated from protobuf field .google.cloud.dataproc.v1.EnvironmentConfig environment_config = 13 [(.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; - } - - /** - * Optional. The email address of the user who owns the session. - * - * Generated from protobuf field string user = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getUser() - { - return $this->user; - } - - /** - * Optional. The email address of the user who owns the session. - * - * Generated from protobuf field string user = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setUser($var) - { - GPBUtil::checkString($var, True); - $this->user = $var; - - return $this; - } - - /** - * Output only. Historical state information for the session. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.Session.SessionStateHistory state_history = 15 [(.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 session. - * - * Generated from protobuf field repeated .google.cloud.dataproc.v1.Session.SessionStateHistory state_history = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\Dataproc\V1\Session\SessionStateHistory>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setStateHistory($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataproc\V1\Session\SessionStateHistory::class); - $this->state_history = $arr; - - return $this; - } - - /** - * Optional. The session template used by the session. - * Only resource names, including project ID and location, are valid. - * Example: - * * `https://www.googleapis.com/compute/v1/projects/[project_id]/locations/[dataproc_region]/sessionTemplates/[template_id]` - * * `projects/[project_id]/locations/[dataproc_region]/sessionTemplates/[template_id]` - * The template must be in the same project and Dataproc region as the - * session. - * - * Generated from protobuf field string session_template = 16 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getSessionTemplate() - { - return $this->session_template; - } - - /** - * Optional. The session template used by the session. - * Only resource names, including project ID and location, are valid. - * Example: - * * `https://www.googleapis.com/compute/v1/projects/[project_id]/locations/[dataproc_region]/sessionTemplates/[template_id]` - * * `projects/[project_id]/locations/[dataproc_region]/sessionTemplates/[template_id]` - * The template must be in the same project and Dataproc region as the - * session. - * - * Generated from protobuf field string session_template = 16 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setSessionTemplate($var) - { - GPBUtil::checkString($var, True); - $this->session_template = $var; - - return $this; - } - - /** - * @return string - */ - public function getSessionConfig() - { - return $this->whichOneof("session_config"); - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/Session/SessionStateHistory.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/Session/SessionStateHistory.php deleted file mode 100644 index ffc2d80451b2..000000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/Session/SessionStateHistory.php +++ /dev/null @@ -1,156 +0,0 @@ -google.cloud.dataproc.v1.Session.SessionStateHistory - */ -class SessionStateHistory extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The state of the session at this point in the session - * history. - * - * Generated from protobuf field .google.cloud.dataproc.v1.Session.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. Details about the state at this point in the session - * history. - * - * Generated from protobuf field string state_message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state_message = ''; - /** - * Output only. The time when the session 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 session at this point in the session - * history. - * @type string $state_message - * Output only. Details about the state at this point in the session - * history. - * @type \Google\Protobuf\Timestamp $state_start_time - * Output only. The time when the session entered the historical state. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Sessions::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The state of the session at this point in the session - * history. - * - * Generated from protobuf field .google.cloud.dataproc.v1.Session.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The state of the session at this point in the session - * history. - * - * Generated from protobuf field .google.cloud.dataproc.v1.Session.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\Session\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. Details about the state at this point in the session - * 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 the session - * 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 session 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 session 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(SessionStateHistory::class, \Google\Cloud\Dataproc\V1\Session_SessionStateHistory::class); - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/Session/State.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/Session/State.php deleted file mode 100644 index 35ea0f887235..000000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/Session/State.php +++ /dev/null @@ -1,85 +0,0 @@ -google.cloud.dataproc.v1.Session.State - */ -class State -{ - /** - * The session state is unknown. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The session is created prior to running. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * The session is running. - * - * Generated from protobuf enum ACTIVE = 2; - */ - const ACTIVE = 2; - /** - * The session is terminating. - * - * Generated from protobuf enum TERMINATING = 3; - */ - const TERMINATING = 3; - /** - * The session is terminated successfully. - * - * Generated from protobuf enum TERMINATED = 4; - */ - const TERMINATED = 4; - /** - * The session is no longer running due to an error. - * - * Generated from protobuf enum FAILED = 5; - */ - const FAILED = 5; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::ACTIVE => 'ACTIVE', - self::TERMINATING => 'TERMINATING', - self::TERMINATED => 'TERMINATED', - 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\Session_State::class); - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SessionOperationMetadata.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SessionOperationMetadata.php deleted file mode 100644 index 6998bf8db8d2..000000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SessionOperationMetadata.php +++ /dev/null @@ -1,325 +0,0 @@ -google.cloud.dataproc.v1.SessionOperationMetadata - */ -class SessionOperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Name of the session for the operation. - * - * Generated from protobuf field string session = 1; - */ - protected $session = ''; - /** - * Session UUID for the operation. - * - * Generated from protobuf field string session_uuid = 2; - */ - protected $session_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 was 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.SessionOperationMetadata.SessionOperationType 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 $session - * Name of the session for the operation. - * @type string $session_uuid - * Session 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 was 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 session for the operation. - * - * Generated from protobuf field string session = 1; - * @return string - */ - public function getSession() - { - return $this->session; - } - - /** - * Name of the session for the operation. - * - * Generated from protobuf field string session = 1; - * @param string $var - * @return $this - */ - public function setSession($var) - { - GPBUtil::checkString($var, True); - $this->session = $var; - - return $this; - } - - /** - * Session UUID for the operation. - * - * Generated from protobuf field string session_uuid = 2; - * @return string - */ - public function getSessionUuid() - { - return $this->session_uuid; - } - - /** - * Session UUID for the operation. - * - * Generated from protobuf field string session_uuid = 2; - * @param string $var - * @return $this - */ - public function setSessionUuid($var) - { - GPBUtil::checkString($var, True); - $this->session_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 was 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 was 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.SessionOperationMetadata.SessionOperationType operation_type = 6; - * @return int - */ - public function getOperationType() - { - return $this->operation_type; - } - - /** - * The operation type. - * - * Generated from protobuf field .google.cloud.dataproc.v1.SessionOperationMetadata.SessionOperationType operation_type = 6; - * @param int $var - * @return $this - */ - public function setOperationType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataproc\V1\SessionOperationMetadata\SessionOperationType::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/SessionOperationMetadata/SessionOperationType.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SessionOperationMetadata/SessionOperationType.php deleted file mode 100644 index 0456842619d4..000000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SessionOperationMetadata/SessionOperationType.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.dataproc.v1.SessionOperationMetadata.SessionOperationType - */ -class SessionOperationType -{ - /** - * Session operation type is unknown. - * - * Generated from protobuf enum SESSION_OPERATION_TYPE_UNSPECIFIED = 0; - */ - const SESSION_OPERATION_TYPE_UNSPECIFIED = 0; - /** - * Create Session operation type. - * - * Generated from protobuf enum CREATE = 1; - */ - const CREATE = 1; - /** - * Terminate Session operation type. - * - * Generated from protobuf enum TERMINATE = 2; - */ - const TERMINATE = 2; - /** - * Delete Session operation type. - * - * Generated from protobuf enum DELETE = 3; - */ - const DELETE = 3; - - private static $valueToName = [ - self::SESSION_OPERATION_TYPE_UNSPECIFIED => 'SESSION_OPERATION_TYPE_UNSPECIFIED', - self::CREATE => 'CREATE', - self::TERMINATE => 'TERMINATE', - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SessionOperationType::class, \Google\Cloud\Dataproc\V1\SessionOperationMetadata_SessionOperationType::class); - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SessionTemplate.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SessionTemplate.php deleted file mode 100644 index 67f8bbc9f743..000000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SessionTemplate.php +++ /dev/null @@ -1,482 +0,0 @@ -google.cloud.dataproc.v1.SessionTemplate - */ -class SessionTemplate extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the session template. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Optional. Brief description of the template. - * - * Generated from protobuf field string description = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Output only. The time when the template was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The email address of the user who created the template. - * - * Generated from protobuf field string creator = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $creator = ''; - /** - * Optional. Labels to associate with sessions created using this template. - * Label **keys** must contain 1 to 63 characters, and must conform to - * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). - * Label **values** can be empty, but, if present, must contain 1 to 63 - * characters and conform to [RFC - * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be - * associated with a session. - * - * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Optional. Runtime configuration for session execution. - * - * Generated from protobuf field .google.cloud.dataproc.v1.RuntimeConfig runtime_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $runtime_config = null; - /** - * Optional. Environment configuration for session execution. - * - * Generated from protobuf field .google.cloud.dataproc.v1.EnvironmentConfig environment_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $environment_config = null; - /** - * Output only. The time the template was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. A session template UUID (Unique Universal Identifier). The - * service generates this value when it creates the session template. - * - * Generated from protobuf field string uuid = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uuid = ''; - protected $session_config; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the session template. - * @type string $description - * Optional. Brief description of the template. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time when the template was created. - * @type \Google\Cloud\Dataproc\V1\JupyterConfig $jupyter_session - * Optional. Jupyter session config. - * @type \Google\Cloud\Dataproc\V1\SparkConnectConfig $spark_connect_session - * Optional. Spark Connect session config. - * @type string $creator - * Output only. The email address of the user who created the template. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. Labels to associate with sessions created using this template. - * Label **keys** must contain 1 to 63 characters, and must conform to - * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). - * Label **values** can be empty, but, if present, must contain 1 to 63 - * characters and conform to [RFC - * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be - * associated with a session. - * @type \Google\Cloud\Dataproc\V1\RuntimeConfig $runtime_config - * Optional. Runtime configuration for session execution. - * @type \Google\Cloud\Dataproc\V1\EnvironmentConfig $environment_config - * Optional. Environment configuration for session execution. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time the template was last updated. - * @type string $uuid - * Output only. A session template UUID (Unique Universal Identifier). The - * service generates this value when it creates the session template. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\SessionTemplates::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the session template. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the session template. - * - * 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; - } - - /** - * Optional. Brief description of the template. - * - * Generated from protobuf field string description = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. Brief description of the template. - * - * Generated from protobuf field string description = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. The time when the template was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time when the template was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Optional. Jupyter session config. - * - * Generated from protobuf field .google.cloud.dataproc.v1.JupyterConfig jupyter_session = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\JupyterConfig|null - */ - public function getJupyterSession() - { - return $this->readOneof(3); - } - - public function hasJupyterSession() - { - return $this->hasOneof(3); - } - - /** - * Optional. Jupyter session config. - * - * Generated from protobuf field .google.cloud.dataproc.v1.JupyterConfig jupyter_session = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\JupyterConfig $var - * @return $this - */ - public function setJupyterSession($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\JupyterConfig::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Optional. Spark Connect session config. - * - * Generated from protobuf field .google.cloud.dataproc.v1.SparkConnectConfig spark_connect_session = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\SparkConnectConfig|null - */ - public function getSparkConnectSession() - { - return $this->readOneof(11); - } - - public function hasSparkConnectSession() - { - return $this->hasOneof(11); - } - - /** - * Optional. Spark Connect session config. - * - * Generated from protobuf field .google.cloud.dataproc.v1.SparkConnectConfig spark_connect_session = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\SparkConnectConfig $var - * @return $this - */ - public function setSparkConnectSession($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\SparkConnectConfig::class); - $this->writeOneof(11, $var); - - return $this; - } - - /** - * Output only. The email address of the user who created the template. - * - * Generated from protobuf field string creator = 5 [(.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 template. - * - * Generated from protobuf field string creator = 5 [(.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. Labels to associate with sessions created using this template. - * Label **keys** must contain 1 to 63 characters, and must conform to - * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). - * Label **values** can be empty, but, if present, must contain 1 to 63 - * characters and conform to [RFC - * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be - * associated with a session. - * - * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. Labels to associate with sessions created using this template. - * Label **keys** must contain 1 to 63 characters, and must conform to - * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). - * Label **values** can be empty, but, if present, must contain 1 to 63 - * characters and conform to [RFC - * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be - * associated with a session. - * - * 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; - } - - /** - * Optional. Runtime configuration for session execution. - * - * Generated from protobuf field .google.cloud.dataproc.v1.RuntimeConfig runtime_config = 7 [(.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 session execution. - * - * Generated from protobuf field .google.cloud.dataproc.v1.RuntimeConfig runtime_config = 7 [(.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 session execution. - * - * Generated from protobuf field .google.cloud.dataproc.v1.EnvironmentConfig environment_config = 8 [(.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 session execution. - * - * Generated from protobuf field .google.cloud.dataproc.v1.EnvironmentConfig environment_config = 8 [(.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 time the template was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The time the template was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Output only. A session template UUID (Unique Universal Identifier). The - * service generates this value when it creates the session template. - * - * Generated from protobuf field string uuid = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUuid() - { - return $this->uuid; - } - - /** - * Output only. A session template UUID (Unique Universal Identifier). The - * service generates this value when it creates the session template. - * - * Generated from protobuf field string uuid = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUuid($var) - { - GPBUtil::checkString($var, True); - $this->uuid = $var; - - return $this; - } - - /** - * @return string - */ - public function getSessionConfig() - { - return $this->whichOneof("session_config"); - } - -} - 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 c65d9547c15f..000000000000 --- 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 a8aa8664a399..000000000000 --- 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-image-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-image-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-image-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-image-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 e39b43d191b0..000000000000 --- 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 a7b81f1f713d..000000000000 --- 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 f80b2d022e0d..000000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/SparkJob.php +++ /dev/null @@ -1,365 +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 might 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 - * SparkJob.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 might 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 - * SparkJob.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 - * SparkJob.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 might 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 might 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 aef6fba4598f..000000000000 --- 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 f1f76ab1504d..000000000000 --- 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 might 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 might 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 might 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 might 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 7b5ebb396677..000000000000 --- 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 871a49648475..000000000000 --- 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 might 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 might 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 might 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 might 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 fe1ab98be364..000000000000 --- 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/StartupConfig.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/StartupConfig.php deleted file mode 100644 index 3b841ad765dc..000000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/StartupConfig.php +++ /dev/null @@ -1,98 +0,0 @@ -google.cloud.dataproc.v1.StartupConfig - */ -class StartupConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The config setting to enable cluster creation/ updation to be - * successful only after required_registration_fraction of instances are up - * and running. This configuration is applicable to only secondary workers for - * now. The cluster will fail if required_registration_fraction of instances - * are not available. This will include instance creation, agent registration, - * and service registration (if enabled). - * - * Generated from protobuf field optional double required_registration_fraction = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $required_registration_fraction = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $required_registration_fraction - * Optional. The config setting to enable cluster creation/ updation to be - * successful only after required_registration_fraction of instances are up - * and running. This configuration is applicable to only secondary workers for - * now. The cluster will fail if required_registration_fraction of instances - * are not available. This will include instance creation, agent registration, - * and service registration (if enabled). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\Clusters::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The config setting to enable cluster creation/ updation to be - * successful only after required_registration_fraction of instances are up - * and running. This configuration is applicable to only secondary workers for - * now. The cluster will fail if required_registration_fraction of instances - * are not available. This will include instance creation, agent registration, - * and service registration (if enabled). - * - * Generated from protobuf field optional double required_registration_fraction = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return float - */ - public function getRequiredRegistrationFraction() - { - return isset($this->required_registration_fraction) ? $this->required_registration_fraction : 0.0; - } - - public function hasRequiredRegistrationFraction() - { - return isset($this->required_registration_fraction); - } - - public function clearRequiredRegistrationFraction() - { - unset($this->required_registration_fraction); - } - - /** - * Optional. The config setting to enable cluster creation/ updation to be - * successful only after required_registration_fraction of instances are up - * and running. This configuration is applicable to only secondary workers for - * now. The cluster will fail if required_registration_fraction of instances - * are not available. This will include instance creation, agent registration, - * and service registration (if enabled). - * - * Generated from protobuf field optional double required_registration_fraction = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param float $var - * @return $this - */ - public function setRequiredRegistrationFraction($var) - { - GPBUtil::checkDouble($var); - $this->required_registration_fraction = $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 1d8c84aa4ef0..000000000000 --- 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 7df0693c12ce..000000000000 --- 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 bb62556d4ee6..000000000000 --- 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/TerminateSessionRequest.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/TerminateSessionRequest.php deleted file mode 100644 index dff6d72ad36a..000000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/TerminateSessionRequest.php +++ /dev/null @@ -1,143 +0,0 @@ -google.cloud.dataproc.v1.TerminateSessionRequest - */ -class TerminateSessionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the session resource to terminate. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. A unique ID used to identify the request. If the service - * receives two - * [TerminateSessionRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.TerminateSessionRequest)s - * with the same ID, the second request is ignored. - * 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 = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $name Required. The name of the session resource to terminate. Please see - * {@see SessionControllerClient::sessionName()} for help formatting this field. - * - * @return \Google\Cloud\Dataproc\V1\TerminateSessionRequest - * - * @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 session resource to terminate. - * @type string $request_id - * Optional. A unique ID used to identify the request. If the service - * receives two - * [TerminateSessionRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.TerminateSessionRequest)s - * with the same ID, the second request is ignored. - * 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\Sessions::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the session resource to terminate. - * - * 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 session resource to terminate. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. A unique ID used to identify the request. If the service - * receives two - * [TerminateSessionRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.TerminateSessionRequest)s - * with the same ID, the second request is ignored. - * 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 = 2 [(.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 - * [TerminateSessionRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.TerminateSessionRequest)s - * with the same ID, the second request is ignored. - * 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 = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/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 56fa989144aa..000000000000 --- 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 bbc2fc1ebe28..000000000000 --- 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 d0b3e15cf5bb..000000000000 --- 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 5296661fcd6a..000000000000 --- 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/UpdateSessionTemplateRequest.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/UpdateSessionTemplateRequest.php deleted file mode 100644 index 60b18bbb0d42..000000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/UpdateSessionTemplateRequest.php +++ /dev/null @@ -1,90 +0,0 @@ -google.cloud.dataproc.v1.UpdateSessionTemplateRequest - */ -class UpdateSessionTemplateRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The updated session template. - * - * Generated from protobuf field .google.cloud.dataproc.v1.SessionTemplate session_template = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $session_template = null; - - /** - * @param \Google\Cloud\Dataproc\V1\SessionTemplate $sessionTemplate Required. The updated session template. - * - * @return \Google\Cloud\Dataproc\V1\UpdateSessionTemplateRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Dataproc\V1\SessionTemplate $sessionTemplate): self - { - return (new self()) - ->setSessionTemplate($sessionTemplate); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dataproc\V1\SessionTemplate $session_template - * Required. The updated session template. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\SessionTemplates::initOnce(); - parent::__construct($data); - } - - /** - * Required. The updated session template. - * - * Generated from protobuf field .google.cloud.dataproc.v1.SessionTemplate session_template = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataproc\V1\SessionTemplate|null - */ - public function getSessionTemplate() - { - return $this->session_template; - } - - public function hasSessionTemplate() - { - return isset($this->session_template); - } - - public function clearSessionTemplate() - { - unset($this->session_template); - } - - /** - * Required. The updated session template. - * - * Generated from protobuf field .google.cloud.dataproc.v1.SessionTemplate session_template = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataproc\V1\SessionTemplate $var - * @return $this - */ - public function setSessionTemplate($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\SessionTemplate::class); - $this->session_template = $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 3f24d19d355a..000000000000 --- 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 24ed37471fcd..000000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/UsageMetrics.php +++ /dev/null @@ -1,193 +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; - /** - * Optional. Accelerator usage in (`milliAccelerator` x `seconds`) (see - * [Dataproc Serverless pricing] - * (https://cloud.google.com/dataproc-serverless/pricing)). - * - * Generated from protobuf field int64 milli_accelerator_seconds = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $milli_accelerator_seconds = 0; - /** - * Optional. Accelerator type being used, if any - * - * Generated from protobuf field string accelerator_type = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $accelerator_type = ''; - - /** - * 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)). - * @type int|string $milli_accelerator_seconds - * Optional. Accelerator usage in (`milliAccelerator` x `seconds`) (see - * [Dataproc Serverless pricing] - * (https://cloud.google.com/dataproc-serverless/pricing)). - * @type string $accelerator_type - * Optional. Accelerator type being used, if any - * } - */ - 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; - } - - /** - * Optional. Accelerator usage in (`milliAccelerator` x `seconds`) (see - * [Dataproc Serverless pricing] - * (https://cloud.google.com/dataproc-serverless/pricing)). - * - * Generated from protobuf field int64 milli_accelerator_seconds = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string - */ - public function getMilliAcceleratorSeconds() - { - return $this->milli_accelerator_seconds; - } - - /** - * Optional. Accelerator usage in (`milliAccelerator` x `seconds`) (see - * [Dataproc Serverless pricing] - * (https://cloud.google.com/dataproc-serverless/pricing)). - * - * Generated from protobuf field int64 milli_accelerator_seconds = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string $var - * @return $this - */ - public function setMilliAcceleratorSeconds($var) - { - GPBUtil::checkInt64($var); - $this->milli_accelerator_seconds = $var; - - return $this; - } - - /** - * Optional. Accelerator type being used, if any - * - * Generated from protobuf field string accelerator_type = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getAcceleratorType() - { - return $this->accelerator_type; - } - - /** - * Optional. Accelerator type being used, if any - * - * Generated from protobuf field string accelerator_type = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setAcceleratorType($var) - { - GPBUtil::checkString($var, True); - $this->accelerator_type = $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 da529591a7d0..000000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/UsageSnapshot.php +++ /dev/null @@ -1,314 +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. Milli (one-thousandth) Dataproc Compute Units (DCUs) charged at - * premium tier (see [Dataproc Serverless pricing] - * (https://cloud.google.com/dataproc-serverless/pricing)). - * - * Generated from protobuf field int64 milli_dcu_premium = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $milli_dcu_premium = 0; - /** - * Optional. Shuffle Storage in gigabytes (GB) charged at premium tier. (see - * [Dataproc Serverless pricing] - * (https://cloud.google.com/dataproc-serverless/pricing)) - * - * Generated from protobuf field int64 shuffle_storage_gb_premium = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $shuffle_storage_gb_premium = 0; - /** - * Optional. Milli (one-thousandth) accelerator. (see [Dataproc - * Serverless pricing] (https://cloud.google.com/dataproc-serverless/pricing)) - * - * Generated from protobuf field int64 milli_accelerator = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $milli_accelerator = 0; - /** - * Optional. Accelerator type being used, if any - * - * Generated from protobuf field string accelerator_type = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $accelerator_type = ''; - /** - * 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 int|string $milli_dcu_premium - * Optional. Milli (one-thousandth) Dataproc Compute Units (DCUs) charged at - * premium tier (see [Dataproc Serverless pricing] - * (https://cloud.google.com/dataproc-serverless/pricing)). - * @type int|string $shuffle_storage_gb_premium - * Optional. Shuffle Storage in gigabytes (GB) charged at premium tier. (see - * [Dataproc Serverless pricing] - * (https://cloud.google.com/dataproc-serverless/pricing)) - * @type int|string $milli_accelerator - * Optional. Milli (one-thousandth) accelerator. (see [Dataproc - * Serverless pricing] (https://cloud.google.com/dataproc-serverless/pricing)) - * @type string $accelerator_type - * Optional. Accelerator type being used, if any - * @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. Milli (one-thousandth) Dataproc Compute Units (DCUs) charged at - * premium tier (see [Dataproc Serverless pricing] - * (https://cloud.google.com/dataproc-serverless/pricing)). - * - * Generated from protobuf field int64 milli_dcu_premium = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string - */ - public function getMilliDcuPremium() - { - return $this->milli_dcu_premium; - } - - /** - * Optional. Milli (one-thousandth) Dataproc Compute Units (DCUs) charged at - * premium tier (see [Dataproc Serverless pricing] - * (https://cloud.google.com/dataproc-serverless/pricing)). - * - * Generated from protobuf field int64 milli_dcu_premium = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string $var - * @return $this - */ - public function setMilliDcuPremium($var) - { - GPBUtil::checkInt64($var); - $this->milli_dcu_premium = $var; - - return $this; - } - - /** - * Optional. Shuffle Storage in gigabytes (GB) charged at premium tier. (see - * [Dataproc Serverless pricing] - * (https://cloud.google.com/dataproc-serverless/pricing)) - * - * Generated from protobuf field int64 shuffle_storage_gb_premium = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string - */ - public function getShuffleStorageGbPremium() - { - return $this->shuffle_storage_gb_premium; - } - - /** - * Optional. Shuffle Storage in gigabytes (GB) charged at premium tier. (see - * [Dataproc Serverless pricing] - * (https://cloud.google.com/dataproc-serverless/pricing)) - * - * Generated from protobuf field int64 shuffle_storage_gb_premium = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string $var - * @return $this - */ - public function setShuffleStorageGbPremium($var) - { - GPBUtil::checkInt64($var); - $this->shuffle_storage_gb_premium = $var; - - return $this; - } - - /** - * Optional. Milli (one-thousandth) accelerator. (see [Dataproc - * Serverless pricing] (https://cloud.google.com/dataproc-serverless/pricing)) - * - * Generated from protobuf field int64 milli_accelerator = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string - */ - public function getMilliAccelerator() - { - return $this->milli_accelerator; - } - - /** - * Optional. Milli (one-thousandth) accelerator. (see [Dataproc - * Serverless pricing] (https://cloud.google.com/dataproc-serverless/pricing)) - * - * Generated from protobuf field int64 milli_accelerator = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string $var - * @return $this - */ - public function setMilliAccelerator($var) - { - GPBUtil::checkInt64($var); - $this->milli_accelerator = $var; - - return $this; - } - - /** - * Optional. Accelerator type being used, if any - * - * Generated from protobuf field string accelerator_type = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getAcceleratorType() - { - return $this->accelerator_type; - } - - /** - * Optional. Accelerator type being used, if any - * - * Generated from protobuf field string accelerator_type = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setAcceleratorType($var) - { - GPBUtil::checkString($var, True); - $this->accelerator_type = $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 e351b56f72e9..000000000000 --- 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 90c82f790992..000000000000 --- 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 f8a4362873db..000000000000 --- 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 cf6f521f1247..000000000000 --- 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 d85de5685800..000000000000 --- 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 f37caf64a7c6..000000000000 --- 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 8cab1c16ca7b..000000000000 --- 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 d69494715ba0..000000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/WorkflowTemplate.php +++ /dev/null @@ -1,586 +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; - /** - * Optional. Encryption settings for encrypting workflow template job - * arguments. - * - * Generated from protobuf field .google.cloud.dataproc.v1.WorkflowTemplate.EncryptionConfig encryption_config = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $encryption_config = 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. - * @type \Google\Cloud\Dataproc\V1\WorkflowTemplate\EncryptionConfig $encryption_config - * Optional. Encryption settings for encrypting workflow template job - * arguments. - * } - */ - 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; - } - - /** - * Optional. Encryption settings for encrypting workflow template job - * arguments. - * - * Generated from protobuf field .google.cloud.dataproc.v1.WorkflowTemplate.EncryptionConfig encryption_config = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataproc\V1\WorkflowTemplate\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 encrypting workflow template job - * arguments. - * - * Generated from protobuf field .google.cloud.dataproc.v1.WorkflowTemplate.EncryptionConfig encryption_config = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataproc\V1\WorkflowTemplate\EncryptionConfig $var - * @return $this - */ - public function setEncryptionConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1\WorkflowTemplate\EncryptionConfig::class); - $this->encryption_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/WorkflowTemplate/EncryptionConfig.php b/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/WorkflowTemplate/EncryptionConfig.php deleted file mode 100644 index 16a79742dd67..000000000000 --- a/owl-bot-staging/Dataproc/v1/proto/src/Google/Cloud/Dataproc/V1/WorkflowTemplate/EncryptionConfig.php +++ /dev/null @@ -1,170 +0,0 @@ -google.cloud.dataproc.v1.WorkflowTemplate.EncryptionConfig - */ -class EncryptionConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The Cloud KMS key name to use for encrypting - * workflow template job arguments. - * When this this key is provided, the following workflow template - * [job arguments] - * (https://cloud.google.com/dataproc/docs/concepts/workflows/use-workflows#adding_jobs_to_a_template), - * if present, are - * [CMEK - * encrypted](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/customer-managed-encryption#use_cmek_with_workflow_template_data): - * * [FlinkJob - * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/FlinkJob) - * * [HadoopJob - * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/HadoopJob) - * * [SparkJob - * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/SparkJob) - * * [SparkRJob - * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/SparkRJob) - * * [PySparkJob - * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/PySparkJob) - * * [SparkSqlJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/SparkSqlJob) - * scriptVariables and queryList.queries - * * [HiveJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/HiveJob) - * scriptVariables and queryList.queries - * * [PigJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/PigJob) - * scriptVariables and queryList.queries - * * [PrestoJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/PrestoJob) - * scriptVariables and queryList.queries - * - * Generated from protobuf field string kms_key = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $kms_key = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $kms_key - * Optional. The Cloud KMS key name to use for encrypting - * workflow template job arguments. - * When this this key is provided, the following workflow template - * [job arguments] - * (https://cloud.google.com/dataproc/docs/concepts/workflows/use-workflows#adding_jobs_to_a_template), - * if present, are - * [CMEK - * encrypted](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/customer-managed-encryption#use_cmek_with_workflow_template_data): - * * [FlinkJob - * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/FlinkJob) - * * [HadoopJob - * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/HadoopJob) - * * [SparkJob - * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/SparkJob) - * * [SparkRJob - * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/SparkRJob) - * * [PySparkJob - * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/PySparkJob) - * * [SparkSqlJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/SparkSqlJob) - * scriptVariables and queryList.queries - * * [HiveJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/HiveJob) - * scriptVariables and queryList.queries - * * [PigJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/PigJob) - * scriptVariables and queryList.queries - * * [PrestoJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/PrestoJob) - * scriptVariables and queryList.queries - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataproc\V1\WorkflowTemplates::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The Cloud KMS key name to use for encrypting - * workflow template job arguments. - * When this this key is provided, the following workflow template - * [job arguments] - * (https://cloud.google.com/dataproc/docs/concepts/workflows/use-workflows#adding_jobs_to_a_template), - * if present, are - * [CMEK - * encrypted](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/customer-managed-encryption#use_cmek_with_workflow_template_data): - * * [FlinkJob - * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/FlinkJob) - * * [HadoopJob - * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/HadoopJob) - * * [SparkJob - * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/SparkJob) - * * [SparkRJob - * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/SparkRJob) - * * [PySparkJob - * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/PySparkJob) - * * [SparkSqlJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/SparkSqlJob) - * scriptVariables and queryList.queries - * * [HiveJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/HiveJob) - * scriptVariables and queryList.queries - * * [PigJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/PigJob) - * scriptVariables and queryList.queries - * * [PrestoJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/PrestoJob) - * scriptVariables and queryList.queries - * - * Generated from protobuf field string kms_key = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getKmsKey() - { - return $this->kms_key; - } - - /** - * Optional. The Cloud KMS key name to use for encrypting - * workflow template job arguments. - * When this this key is provided, the following workflow template - * [job arguments] - * (https://cloud.google.com/dataproc/docs/concepts/workflows/use-workflows#adding_jobs_to_a_template), - * if present, are - * [CMEK - * encrypted](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/customer-managed-encryption#use_cmek_with_workflow_template_data): - * * [FlinkJob - * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/FlinkJob) - * * [HadoopJob - * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/HadoopJob) - * * [SparkJob - * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/SparkJob) - * * [SparkRJob - * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/SparkRJob) - * * [PySparkJob - * args](https://cloud.google.com/dataproc/docs/reference/rest/v1/PySparkJob) - * * [SparkSqlJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/SparkSqlJob) - * scriptVariables and queryList.queries - * * [HiveJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/HiveJob) - * scriptVariables and queryList.queries - * * [PigJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/PigJob) - * scriptVariables and queryList.queries - * * [PrestoJob](https://cloud.google.com/dataproc/docs/reference/rest/v1/PrestoJob) - * scriptVariables and queryList.queries - * - * Generated from protobuf field string kms_key = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setKmsKey($var) - { - GPBUtil::checkString($var, True); - $this->kms_key = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(EncryptionConfig::class, \Google\Cloud\Dataproc\V1\WorkflowTemplate_EncryptionConfig::class); - 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 d22db2371427..000000000000 --- 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 e0d5a57ef629..000000000000 --- 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 5ecf1fa19c5f..000000000000 --- 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 1fc9fba56898..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/AutoscalingPolicyServiceClient/create_autoscaling_policy.php +++ /dev/null @@ -1,135 +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); - $request = (new CreateAutoscalingPolicyRequest()) - ->setParent($formattedParent) - ->setPolicy($policy); - - // Call the API and handle any network failures. - try { - /** @var AutoscalingPolicy $response */ - $response = $autoscalingPolicyServiceClient->createAutoscalingPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = 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 9b9cc983b84f..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/AutoscalingPolicyServiceClient/delete_autoscaling_policy.php +++ /dev/null @@ -1,83 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $autoscalingPolicyServiceClient->deleteAutoscalingPolicy($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = 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 08eac5726a30..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/AutoscalingPolicyServiceClient/get_autoscaling_policy.php +++ /dev/null @@ -1,84 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var AutoscalingPolicy $response */ - $response = $autoscalingPolicyServiceClient->getAutoscalingPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = 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 a34da99d7bda..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/AutoscalingPolicyServiceClient/get_iam_policy.php +++ /dev/null @@ -1,72 +0,0 @@ -setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $autoscalingPolicyServiceClient->getIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - get_iam_policy_sample($resource); -} -// [END 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 b455d23482f9..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/AutoscalingPolicyServiceClient/list_autoscaling_policies.php +++ /dev/null @@ -1,85 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $autoscalingPolicyServiceClient->listAutoscalingPolicies($request); - - /** @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 dd7690ea5d02..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/AutoscalingPolicyServiceClient/set_iam_policy.php +++ /dev/null @@ -1,77 +0,0 @@ -setResource($resource) - ->setPolicy($policy); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $autoscalingPolicyServiceClient->setIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - set_iam_policy_sample($resource); -} -// [END 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 cb579028d6c5..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/AutoscalingPolicyServiceClient/test_iam_permissions.php +++ /dev/null @@ -1,84 +0,0 @@ -setResource($resource) - ->setPermissions($permissions); - - // Call the API and handle any network failures. - try { - /** @var TestIamPermissionsResponse $response */ - $response = $autoscalingPolicyServiceClient->testIamPermissions($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - $permissionsElement = '[PERMISSIONS]'; - - test_iam_permissions_sample($resource, $permissionsElement); -} -// [END 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 9452c13069f7..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/AutoscalingPolicyServiceClient/update_autoscaling_policy.php +++ /dev/null @@ -1,123 +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); - $request = (new UpdateAutoscalingPolicyRequest()) - ->setPolicy($policy); - - // Call the API and handle any network failures. - try { - /** @var AutoscalingPolicy $response */ - $response = $autoscalingPolicyServiceClient->updateAutoscalingPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $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 d0fb0b421ea7..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/BatchControllerClient/create_batch.php +++ /dev/null @@ -1,85 +0,0 @@ -setParent($formattedParent) - ->setBatch($batch); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $batchControllerClient->createBatch($request); - $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 8c5d5d90f13d..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/BatchControllerClient/delete_batch.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $batchControllerClient->deleteBatch($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = 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 a2e4cae61900..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/BatchControllerClient/get_batch.php +++ /dev/null @@ -1,73 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Batch $response */ - $response = $batchControllerClient->getBatch($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = 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 6db264c757b7..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/BatchControllerClient/get_iam_policy.php +++ /dev/null @@ -1,72 +0,0 @@ -setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $batchControllerClient->getIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - get_iam_policy_sample($resource); -} -// [END 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 bae348289f02..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/BatchControllerClient/list_batches.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $batchControllerClient->listBatches($request); - - /** @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 ed5ae5bc1390..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/BatchControllerClient/set_iam_policy.php +++ /dev/null @@ -1,77 +0,0 @@ -setResource($resource) - ->setPolicy($policy); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $batchControllerClient->setIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - set_iam_policy_sample($resource); -} -// [END 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 0ced80161653..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/BatchControllerClient/test_iam_permissions.php +++ /dev/null @@ -1,84 +0,0 @@ -setResource($resource) - ->setPermissions($permissions); - - // Call the API and handle any network failures. - try { - /** @var TestIamPermissionsResponse $response */ - $response = $batchControllerClient->testIamPermissions($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - $permissionsElement = '[PERMISSIONS]'; - - test_iam_permissions_sample($resource, $permissionsElement); -} -// [END 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 2ad67d9aac6c..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/create_cluster.php +++ /dev/null @@ -1,103 +0,0 @@ -setProjectId($clusterProjectId) - ->setClusterName($clusterClusterName); - $request = (new CreateClusterRequest()) - ->setProjectId($projectId) - ->setRegion($region) - ->setCluster($cluster); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $clusterControllerClient->createCluster($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Cluster $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $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 e578c053a010..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/delete_cluster.php +++ /dev/null @@ -1,88 +0,0 @@ -setProjectId($projectId) - ->setRegion($region) - ->setClusterName($clusterName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $clusterControllerClient->deleteCluster($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $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 79bcf48a7e74..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/diagnose_cluster.php +++ /dev/null @@ -1,95 +0,0 @@ -setProjectId($projectId) - ->setRegion($region) - ->setClusterName($clusterName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $clusterControllerClient->diagnoseCluster($request); - $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 cde6f1a636ae..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/get_cluster.php +++ /dev/null @@ -1,77 +0,0 @@ -setProjectId($projectId) - ->setRegion($region) - ->setClusterName($clusterName); - - // Call the API and handle any network failures. - try { - /** @var Cluster $response */ - $response = $clusterControllerClient->getCluster($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $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 dba0402deb8c..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/get_iam_policy.php +++ /dev/null @@ -1,72 +0,0 @@ -setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $clusterControllerClient->getIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - get_iam_policy_sample($resource); -} -// [END 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 18f6c2314b5c..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/list_clusters.php +++ /dev/null @@ -1,79 +0,0 @@ -setProjectId($projectId) - ->setRegion($region); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $clusterControllerClient->listClusters($request); - - /** @var Cluster $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $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 0653336cc4b9..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/set_iam_policy.php +++ /dev/null @@ -1,77 +0,0 @@ -setResource($resource) - ->setPolicy($policy); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $clusterControllerClient->setIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - set_iam_policy_sample($resource); -} -// [END 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 afba3ef14997..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/start_cluster.php +++ /dev/null @@ -1,89 +0,0 @@ -setProjectId($projectId) - ->setRegion($region) - ->setClusterName($clusterName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $clusterControllerClient->startCluster($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Cluster $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $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 73b6ac9eded7..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/stop_cluster.php +++ /dev/null @@ -1,89 +0,0 @@ -setProjectId($projectId) - ->setRegion($region) - ->setClusterName($clusterName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $clusterControllerClient->stopCluster($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Cluster $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $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 60271b82943d..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/test_iam_permissions.php +++ /dev/null @@ -1,84 +0,0 @@ -setResource($resource) - ->setPermissions($permissions); - - // Call the API and handle any network failures. - try { - /** @var TestIamPermissionsResponse $response */ - $response = $clusterControllerClient->testIamPermissions($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - $permissionsElement = '[PERMISSIONS]'; - - test_iam_permissions_sample($resource, $permissionsElement); -} -// [END 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 78d0c667a899..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/ClusterControllerClient/update_cluster.php +++ /dev/null @@ -1,113 +0,0 @@ -setProjectId($clusterProjectId) - ->setClusterName($clusterClusterName); - $updateMask = new FieldMask(); - $request = (new UpdateClusterRequest()) - ->setProjectId($projectId) - ->setRegion($region) - ->setClusterName($clusterName) - ->setCluster($cluster) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $clusterControllerClient->updateCluster($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Cluster $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - 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 09e8c0de1236..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/cancel_job.php +++ /dev/null @@ -1,81 +0,0 @@ -setProjectId($projectId) - ->setRegion($region) - ->setJobId($jobId); - - // Call the API and handle any network failures. - try { - /** @var Job $response */ - $response = $jobControllerClient->cancelJob($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $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 79f3b2bffe4e..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/delete_job.php +++ /dev/null @@ -1,76 +0,0 @@ -setProjectId($projectId) - ->setRegion($region) - ->setJobId($jobId); - - // Call the API and handle any network failures. - try { - $jobControllerClient->deleteJob($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $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 8ced38c26a8b..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/get_iam_policy.php +++ /dev/null @@ -1,72 +0,0 @@ -setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $jobControllerClient->getIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - get_iam_policy_sample($resource); -} -// [END 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 5c67464a8fab..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/get_job.php +++ /dev/null @@ -1,77 +0,0 @@ -setProjectId($projectId) - ->setRegion($region) - ->setJobId($jobId); - - // Call the API and handle any network failures. - try { - /** @var Job $response */ - $response = $jobControllerClient->getJob($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $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 22611bf8419b..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/list_jobs.php +++ /dev/null @@ -1,79 +0,0 @@ -setProjectId($projectId) - ->setRegion($region); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $jobControllerClient->listJobs($request); - - /** @var Job $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $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 cb1fd36f22b7..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/set_iam_policy.php +++ /dev/null @@ -1,77 +0,0 @@ -setResource($resource) - ->setPolicy($policy); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $jobControllerClient->setIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - set_iam_policy_sample($resource); -} -// [END 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 4cda02aeb8e5..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/submit_job.php +++ /dev/null @@ -1,85 +0,0 @@ -setClusterName($jobPlacementClusterName); - $job = (new Job()) - ->setPlacement($jobPlacement); - $request = (new SubmitJobRequest()) - ->setProjectId($projectId) - ->setRegion($region) - ->setJob($job); - - // Call the API and handle any network failures. - try { - /** @var Job $response */ - $response = $jobControllerClient->submitJob($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $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 5eafc42ec493..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/submit_job_as_operation.php +++ /dev/null @@ -1,97 +0,0 @@ -setClusterName($jobPlacementClusterName); - $job = (new Job()) - ->setPlacement($jobPlacement); - $request = (new SubmitJobRequest()) - ->setProjectId($projectId) - ->setRegion($region) - ->setJob($job); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $jobControllerClient->submitJobAsOperation($request); - $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 d59f3168e462..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/test_iam_permissions.php +++ /dev/null @@ -1,84 +0,0 @@ -setResource($resource) - ->setPermissions($permissions); - - // Call the API and handle any network failures. - try { - /** @var TestIamPermissionsResponse $response */ - $response = $jobControllerClient->testIamPermissions($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - $permissionsElement = '[PERMISSIONS]'; - - test_iam_permissions_sample($resource, $permissionsElement); -} -// [END 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 6c2c9c3144f1..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/JobControllerClient/update_job.php +++ /dev/null @@ -1,92 +0,0 @@ -setClusterName($jobPlacementClusterName); - $job = (new Job()) - ->setPlacement($jobPlacement); - $updateMask = new FieldMask(); - $request = (new UpdateJobRequest()) - ->setProjectId($projectId) - ->setRegion($region) - ->setJobId($jobId) - ->setJob($job) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var Job $response */ - $response = $jobControllerClient->updateJob($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $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 c05b189503c9..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/NodeGroupControllerClient/create_node_group.php +++ /dev/null @@ -1,97 +0,0 @@ -setRoles($nodeGroupRoles); - $request = (new CreateNodeGroupRequest()) - ->setParent($formattedParent) - ->setNodeGroup($nodeGroup); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $nodeGroupControllerClient->createNodeGroup($request); - $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 6f431ccd8836..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/NodeGroupControllerClient/get_iam_policy.php +++ /dev/null @@ -1,72 +0,0 @@ -setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $nodeGroupControllerClient->getIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - get_iam_policy_sample($resource); -} -// [END 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 793c10edaf5e..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/NodeGroupControllerClient/get_node_group.php +++ /dev/null @@ -1,79 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var NodeGroup $response */ - $response = $nodeGroupControllerClient->getNodeGroup($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = 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 09a7b9b7c277..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/NodeGroupControllerClient/resize_node_group.php +++ /dev/null @@ -1,91 +0,0 @@ -setName($name) - ->setSize($size); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $nodeGroupControllerClient->resizeNodeGroup($request); - $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 7d0f0f3d55d7..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/NodeGroupControllerClient/set_iam_policy.php +++ /dev/null @@ -1,77 +0,0 @@ -setResource($resource) - ->setPolicy($policy); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $nodeGroupControllerClient->setIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - set_iam_policy_sample($resource); -} -// [END 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 67d22b4d434d..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/NodeGroupControllerClient/test_iam_permissions.php +++ /dev/null @@ -1,84 +0,0 @@ -setResource($resource) - ->setPermissions($permissions); - - // Call the API and handle any network failures. - try { - /** @var TestIamPermissionsResponse $response */ - $response = $nodeGroupControllerClient->testIamPermissions($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - $permissionsElement = '[PERMISSIONS]'; - - test_iam_permissions_sample($resource, $permissionsElement); -} -// [END dataproc_v1_generated_NodeGroupController_TestIamPermissions_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/create_session.php b/owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/create_session.php deleted file mode 100644 index af43f2d4cf55..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/create_session.php +++ /dev/null @@ -1,98 +0,0 @@ -setName($sessionName); - $request = (new CreateSessionRequest()) - ->setParent($formattedParent) - ->setSession($session) - ->setSessionId($sessionId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $sessionControllerClient->createSession($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Session $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 = SessionControllerClient::locationName('[PROJECT]', '[LOCATION]'); - $sessionName = '[NAME]'; - $sessionId = '[SESSION_ID]'; - - create_session_sample($formattedParent, $sessionName, $sessionId); -} -// [END dataproc_v1_generated_SessionController_CreateSession_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/delete_session.php b/owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/delete_session.php deleted file mode 100644 index 45d0545e4cd0..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/delete_session.php +++ /dev/null @@ -1,84 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $sessionControllerClient->deleteSession($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Session $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = SessionControllerClient::sessionName('[PROJECT]', '[LOCATION]', '[SESSION]'); - - delete_session_sample($formattedName); -} -// [END dataproc_v1_generated_SessionController_DeleteSession_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/get_iam_policy.php b/owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/get_iam_policy.php deleted file mode 100644 index a32c7b3f01be..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/get_iam_policy.php +++ /dev/null @@ -1,72 +0,0 @@ -setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $sessionControllerClient->getIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - get_iam_policy_sample($resource); -} -// [END dataproc_v1_generated_SessionController_GetIamPolicy_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/get_session.php b/owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/get_session.php deleted file mode 100644 index 3eef31275fe0..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/get_session.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Session $response */ - $response = $sessionControllerClient->getSession($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = SessionControllerClient::sessionName('[PROJECT]', '[LOCATION]', '[SESSION]'); - - get_session_sample($formattedName); -} -// [END dataproc_v1_generated_SessionController_GetSession_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/list_sessions.php b/owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/list_sessions.php deleted file mode 100644 index 84432d65342b..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/list_sessions.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $sessionControllerClient->listSessions($request); - - /** @var Session $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 = SessionControllerClient::locationName('[PROJECT]', '[LOCATION]'); - - list_sessions_sample($formattedParent); -} -// [END dataproc_v1_generated_SessionController_ListSessions_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/set_iam_policy.php b/owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/set_iam_policy.php deleted file mode 100644 index b8723828af92..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/set_iam_policy.php +++ /dev/null @@ -1,77 +0,0 @@ -setResource($resource) - ->setPolicy($policy); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $sessionControllerClient->setIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - set_iam_policy_sample($resource); -} -// [END dataproc_v1_generated_SessionController_SetIamPolicy_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/terminate_session.php b/owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/terminate_session.php deleted file mode 100644 index 1e6634a79be8..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/terminate_session.php +++ /dev/null @@ -1,83 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $sessionControllerClient->terminateSession($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Session $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = SessionControllerClient::sessionName('[PROJECT]', '[LOCATION]', '[SESSION]'); - - terminate_session_sample($formattedName); -} -// [END dataproc_v1_generated_SessionController_TerminateSession_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/test_iam_permissions.php b/owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/test_iam_permissions.php deleted file mode 100644 index 9dbcd2ea1584..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/SessionControllerClient/test_iam_permissions.php +++ /dev/null @@ -1,84 +0,0 @@ -setResource($resource) - ->setPermissions($permissions); - - // Call the API and handle any network failures. - try { - /** @var TestIamPermissionsResponse $response */ - $response = $sessionControllerClient->testIamPermissions($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - $permissionsElement = '[PERMISSIONS]'; - - test_iam_permissions_sample($resource, $permissionsElement); -} -// [END dataproc_v1_generated_SessionController_TestIamPermissions_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/create_session_template.php b/owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/create_session_template.php deleted file mode 100644 index 86b276bc9c97..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/create_session_template.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($sessionTemplateName); - $request = (new CreateSessionTemplateRequest()) - ->setParent($formattedParent) - ->setSessionTemplate($sessionTemplate); - - // Call the API and handle any network failures. - try { - /** @var SessionTemplate $response */ - $response = $sessionTemplateControllerClient->createSessionTemplate($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = SessionTemplateControllerClient::locationName('[PROJECT]', '[LOCATION]'); - $sessionTemplateName = '[NAME]'; - - create_session_template_sample($formattedParent, $sessionTemplateName); -} -// [END dataproc_v1_generated_SessionTemplateController_CreateSessionTemplate_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/delete_session_template.php b/owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/delete_session_template.php deleted file mode 100644 index 988e45b9b763..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/delete_session_template.php +++ /dev/null @@ -1,73 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $sessionTemplateControllerClient->deleteSessionTemplate($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = SessionTemplateControllerClient::sessionTemplateName( - '[PROJECT]', - '[LOCATION]', - '[TEMPLATE]' - ); - - delete_session_template_sample($formattedName); -} -// [END dataproc_v1_generated_SessionTemplateController_DeleteSessionTemplate_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/get_iam_policy.php b/owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/get_iam_policy.php deleted file mode 100644 index e1fcd0f42f68..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/get_iam_policy.php +++ /dev/null @@ -1,72 +0,0 @@ -setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $sessionTemplateControllerClient->getIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - get_iam_policy_sample($resource); -} -// [END dataproc_v1_generated_SessionTemplateController_GetIamPolicy_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/get_session_template.php b/owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/get_session_template.php deleted file mode 100644 index 391ae074b525..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/get_session_template.php +++ /dev/null @@ -1,75 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var SessionTemplate $response */ - $response = $sessionTemplateControllerClient->getSessionTemplate($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = SessionTemplateControllerClient::sessionTemplateName( - '[PROJECT]', - '[LOCATION]', - '[TEMPLATE]' - ); - - get_session_template_sample($formattedName); -} -// [END dataproc_v1_generated_SessionTemplateController_GetSessionTemplate_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/list_session_templates.php b/owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/list_session_templates.php deleted file mode 100644 index 2e81c34c2dec..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/list_session_templates.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $sessionTemplateControllerClient->listSessionTemplates($request); - - /** @var SessionTemplate $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 = SessionTemplateControllerClient::locationName('[PROJECT]', '[LOCATION]'); - - list_session_templates_sample($formattedParent); -} -// [END dataproc_v1_generated_SessionTemplateController_ListSessionTemplates_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/set_iam_policy.php b/owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/set_iam_policy.php deleted file mode 100644 index c4f9b4a6820f..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/set_iam_policy.php +++ /dev/null @@ -1,77 +0,0 @@ -setResource($resource) - ->setPolicy($policy); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $sessionTemplateControllerClient->setIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - set_iam_policy_sample($resource); -} -// [END dataproc_v1_generated_SessionTemplateController_SetIamPolicy_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/test_iam_permissions.php b/owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/test_iam_permissions.php deleted file mode 100644 index 8820d402c367..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/test_iam_permissions.php +++ /dev/null @@ -1,84 +0,0 @@ -setResource($resource) - ->setPermissions($permissions); - - // Call the API and handle any network failures. - try { - /** @var TestIamPermissionsResponse $response */ - $response = $sessionTemplateControllerClient->testIamPermissions($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - $permissionsElement = '[PERMISSIONS]'; - - test_iam_permissions_sample($resource, $permissionsElement); -} -// [END dataproc_v1_generated_SessionTemplateController_TestIamPermissions_sync] diff --git a/owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/update_session_template.php b/owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/update_session_template.php deleted file mode 100644 index 541516e5afc5..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/SessionTemplateControllerClient/update_session_template.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($sessionTemplateName); - $request = (new UpdateSessionTemplateRequest()) - ->setSessionTemplate($sessionTemplate); - - // Call the API and handle any network failures. - try { - /** @var SessionTemplate $response */ - $response = $sessionTemplateControllerClient->updateSessionTemplate($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $sessionTemplateName = '[NAME]'; - - update_session_template_sample($sessionTemplateName); -} -// [END dataproc_v1_generated_SessionTemplateController_UpdateSessionTemplate_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 b40b1b274bd5..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/create_workflow_template.php +++ /dev/null @@ -1,108 +0,0 @@ -setStepId($templateJobsStepId); - $templateJobs = [$orderedJob,]; - $template = (new WorkflowTemplate()) - ->setId($templateId) - ->setPlacement($templatePlacement) - ->setJobs($templateJobs); - $request = (new CreateWorkflowTemplateRequest()) - ->setParent($formattedParent) - ->setTemplate($template); - - // Call the API and handle any network failures. - try { - /** @var WorkflowTemplate $response */ - $response = $workflowTemplateServiceClient->createWorkflowTemplate($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = 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 61eab2a44f21..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/delete_workflow_template.php +++ /dev/null @@ -1,82 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $workflowTemplateServiceClient->deleteWorkflowTemplate($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = 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 b4e128134da0..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/get_iam_policy.php +++ /dev/null @@ -1,72 +0,0 @@ -setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $workflowTemplateServiceClient->getIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - get_iam_policy_sample($resource); -} -// [END 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 1ccd6517208d..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/get_workflow_template.php +++ /dev/null @@ -1,87 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var WorkflowTemplate $response */ - $response = $workflowTemplateServiceClient->getWorkflowTemplate($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = 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 0d204bfeaaac..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/instantiate_inline_workflow_template.php +++ /dev/null @@ -1,142 +0,0 @@ -setStepId($templateJobsStepId); - $templateJobs = [$orderedJob,]; - $template = (new WorkflowTemplate()) - ->setId($templateId) - ->setPlacement($templatePlacement) - ->setJobs($templateJobs); - $request = (new InstantiateInlineWorkflowTemplateRequest()) - ->setParent($formattedParent) - ->setTemplate($template); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $workflowTemplateServiceClient->instantiateInlineWorkflowTemplate($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $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 bb7e605ae819..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/instantiate_workflow_template.php +++ /dev/null @@ -1,112 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $workflowTemplateServiceClient->instantiateWorkflowTemplate($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = 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 f1dde8cde371..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/list_workflow_templates.php +++ /dev/null @@ -1,85 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $workflowTemplateServiceClient->listWorkflowTemplates($request); - - /** @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 2045b4cbdd01..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/set_iam_policy.php +++ /dev/null @@ -1,77 +0,0 @@ -setResource($resource) - ->setPolicy($policy); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $workflowTemplateServiceClient->setIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - set_iam_policy_sample($resource); -} -// [END 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 29b230724740..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/test_iam_permissions.php +++ /dev/null @@ -1,84 +0,0 @@ -setResource($resource) - ->setPermissions($permissions); - - // Call the API and handle any network failures. - try { - /** @var TestIamPermissionsResponse $response */ - $response = $workflowTemplateServiceClient->testIamPermissions($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - $permissionsElement = '[PERMISSIONS]'; - - test_iam_permissions_sample($resource, $permissionsElement); -} -// [END 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 b87f16471f2c..000000000000 --- a/owl-bot-staging/Dataproc/v1/samples/V1/WorkflowTemplateServiceClient/update_workflow_template.php +++ /dev/null @@ -1,93 +0,0 @@ -setStepId($templateJobsStepId); - $templateJobs = [$orderedJob,]; - $template = (new WorkflowTemplate()) - ->setId($templateId) - ->setPlacement($templatePlacement) - ->setJobs($templateJobs); - $request = (new UpdateWorkflowTemplateRequest()) - ->setTemplate($template); - - // Call the API and handle any network failures. - try { - /** @var WorkflowTemplate $response */ - $response = $workflowTemplateServiceClient->updateWorkflowTemplate($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $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/Client/AutoscalingPolicyServiceClient.php b/owl-bot-staging/Dataproc/v1/src/V1/Client/AutoscalingPolicyServiceClient.php deleted file mode 100644 index 0be99fe06615..000000000000 --- a/owl-bot-staging/Dataproc/v1/src/V1/Client/AutoscalingPolicyServiceClient.php +++ /dev/null @@ -1,536 +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 AutoscalingPolicyServiceClient::createAutoscalingPolicyAsync()} . - * - * @example samples/V1/AutoscalingPolicyServiceClient/create_autoscaling_policy.php - * - * @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 AutoscalingPolicyServiceClient::deleteAutoscalingPolicyAsync()} . - * - * @example samples/V1/AutoscalingPolicyServiceClient/delete_autoscaling_policy.php - * - * @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 AutoscalingPolicyServiceClient::getAutoscalingPolicyAsync()} . - * - * @example samples/V1/AutoscalingPolicyServiceClient/get_autoscaling_policy.php - * - * @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 AutoscalingPolicyServiceClient::listAutoscalingPoliciesAsync()} . - * - * @example samples/V1/AutoscalingPolicyServiceClient/list_autoscaling_policies.php - * - * @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 AutoscalingPolicyServiceClient::updateAutoscalingPolicyAsync()} . - * - * @example samples/V1/AutoscalingPolicyServiceClient/update_autoscaling_policy.php - * - * @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 AutoscalingPolicyServiceClient::getIamPolicyAsync()} - * . - * - * @example samples/V1/AutoscalingPolicyServiceClient/get_iam_policy.php - * - * @param GetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * 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 AutoscalingPolicyServiceClient::setIamPolicyAsync()} - * . - * - * @example samples/V1/AutoscalingPolicyServiceClient/set_iam_policy.php - * - * @param SetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * 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 AutoscalingPolicyServiceClient::testIamPermissionsAsync()} . - * - * @example samples/V1/AutoscalingPolicyServiceClient/test_iam_permissions.php - * - * @param TestIamPermissionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TestIamPermissionsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse - { - return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); - } -} 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 81ae98447824..000000000000 --- a/owl-bot-staging/Dataproc/v1/src/V1/Client/BatchControllerClient.php +++ /dev/null @@ -1,512 +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; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a 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 BatchControllerClient::createBatchAsync()} . - * - * @example samples/V1/BatchControllerClient/create_batch.php - * - * @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 BatchControllerClient::deleteBatchAsync()} . - * - * @example samples/V1/BatchControllerClient/delete_batch.php - * - * @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 BatchControllerClient::getBatchAsync()} . - * - * @example samples/V1/BatchControllerClient/get_batch.php - * - * @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 BatchControllerClient::listBatchesAsync()} . - * - * @example samples/V1/BatchControllerClient/list_batches.php - * - * @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 BatchControllerClient::getIamPolicyAsync()} . - * - * @example samples/V1/BatchControllerClient/get_iam_policy.php - * - * @param GetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * 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 BatchControllerClient::setIamPolicyAsync()} . - * - * @example samples/V1/BatchControllerClient/set_iam_policy.php - * - * @param SetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * 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 BatchControllerClient::testIamPermissionsAsync()} . - * - * @example samples/V1/BatchControllerClient/test_iam_permissions.php - * - * @param TestIamPermissionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TestIamPermissionsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse - { - return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Dataproc/v1/src/V1/Client/ClusterControllerClient.php b/owl-bot-staging/Dataproc/v1/src/V1/Client/ClusterControllerClient.php deleted file mode 100644 index 71cf72d2bc68..000000000000 --- a/owl-bot-staging/Dataproc/v1/src/V1/Client/ClusterControllerClient.php +++ /dev/null @@ -1,689 +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; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a 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 crypto_key - * resource. - * - * @param string $project - * @param string $location - * @param string $keyRing - * @param string $cryptoKey - * - * @return string The formatted crypto_key resource. - */ - public static function cryptoKeyName(string $project, string $location, string $keyRing, string $cryptoKey): string - { - return self::getPathTemplate('cryptoKey')->render([ - 'project' => $project, - 'location' => $location, - 'key_ring' => $keyRing, - 'crypto_key' => $cryptoKey, - ]); - } - - /** - * 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} - * - cryptoKey: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key} - * - 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 ClusterControllerClient::createClusterAsync()} . - * - * @example samples/V1/ClusterControllerClient/create_cluster.php - * - * @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 ClusterControllerClient::deleteClusterAsync()} . - * - * @example samples/V1/ClusterControllerClient/delete_cluster.php - * - * @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 ClusterControllerClient::diagnoseClusterAsync()} . - * - * @example samples/V1/ClusterControllerClient/diagnose_cluster.php - * - * @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 ClusterControllerClient::getClusterAsync()} . - * - * @example samples/V1/ClusterControllerClient/get_cluster.php - * - * @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 ClusterControllerClient::listClustersAsync()} . - * - * @example samples/V1/ClusterControllerClient/list_clusters.php - * - * @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 ClusterControllerClient::startClusterAsync()} . - * - * @example samples/V1/ClusterControllerClient/start_cluster.php - * - * @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 ClusterControllerClient::stopClusterAsync()} . - * - * @example samples/V1/ClusterControllerClient/stop_cluster.php - * - * @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 ClusterControllerClient::updateClusterAsync()} . - * - * @example samples/V1/ClusterControllerClient/update_cluster.php - * - * @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 ClusterControllerClient::getIamPolicyAsync()} . - * - * @example samples/V1/ClusterControllerClient/get_iam_policy.php - * - * @param GetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * 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 ClusterControllerClient::setIamPolicyAsync()} . - * - * @example samples/V1/ClusterControllerClient/set_iam_policy.php - * - * @param SetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * 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 ClusterControllerClient::testIamPermissionsAsync()} . - * - * @example samples/V1/ClusterControllerClient/test_iam_permissions.php - * - * @param TestIamPermissionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TestIamPermissionsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse - { - return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Dataproc/v1/src/V1/Client/JobControllerClient.php b/owl-bot-staging/Dataproc/v1/src/V1/Client/JobControllerClient.php deleted file mode 100644 index b2fba9940053..000000000000 --- a/owl-bot-staging/Dataproc/v1/src/V1/Client/JobControllerClient.php +++ /dev/null @@ -1,511 +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; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * 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 JobControllerClient::cancelJobAsync()} . - * - * @example samples/V1/JobControllerClient/cancel_job.php - * - * @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 JobControllerClient::deleteJobAsync()} . - * - * @example samples/V1/JobControllerClient/delete_job.php - * - * @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 JobControllerClient::getJobAsync()} . - * - * @example samples/V1/JobControllerClient/get_job.php - * - * @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 JobControllerClient::listJobsAsync()} . - * - * @example samples/V1/JobControllerClient/list_jobs.php - * - * @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 JobControllerClient::submitJobAsync()} . - * - * @example samples/V1/JobControllerClient/submit_job.php - * - * @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 JobControllerClient::submitJobAsOperationAsync()} . - * - * @example samples/V1/JobControllerClient/submit_job_as_operation.php - * - * @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 JobControllerClient::updateJobAsync()} . - * - * @example samples/V1/JobControllerClient/update_job.php - * - * @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 JobControllerClient::getIamPolicyAsync()} . - * - * @example samples/V1/JobControllerClient/get_iam_policy.php - * - * @param GetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * 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 JobControllerClient::setIamPolicyAsync()} . - * - * @example samples/V1/JobControllerClient/set_iam_policy.php - * - * @param SetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * 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 JobControllerClient::testIamPermissionsAsync()} . - * - * @example samples/V1/JobControllerClient/test_iam_permissions.php - * - * @param TestIamPermissionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TestIamPermissionsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse - { - return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Dataproc/v1/src/V1/Client/NodeGroupControllerClient.php b/owl-bot-staging/Dataproc/v1/src/V1/Client/NodeGroupControllerClient.php deleted file mode 100644 index ed255210b0af..000000000000 --- a/owl-bot-staging/Dataproc/v1/src/V1/Client/NodeGroupControllerClient.php +++ /dev/null @@ -1,476 +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; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * 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 NodeGroupControllerClient::createNodeGroupAsync()} . - * - * @example samples/V1/NodeGroupControllerClient/create_node_group.php - * - * @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 NodeGroupControllerClient::getNodeGroupAsync()} . - * - * @example samples/V1/NodeGroupControllerClient/get_node_group.php - * - * @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 NodeGroupControllerClient::resizeNodeGroupAsync()} . - * - * @example samples/V1/NodeGroupControllerClient/resize_node_group.php - * - * @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 NodeGroupControllerClient::getIamPolicyAsync()} . - * - * @example samples/V1/NodeGroupControllerClient/get_iam_policy.php - * - * @param GetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * 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 NodeGroupControllerClient::setIamPolicyAsync()} . - * - * @example samples/V1/NodeGroupControllerClient/set_iam_policy.php - * - * @param SetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * 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 NodeGroupControllerClient::testIamPermissionsAsync()} - * . - * - * @example samples/V1/NodeGroupControllerClient/test_iam_permissions.php - * - * @param TestIamPermissionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TestIamPermissionsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse - { - return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Dataproc/v1/src/V1/Client/SessionControllerClient.php b/owl-bot-staging/Dataproc/v1/src/V1/Client/SessionControllerClient.php deleted file mode 100644 index 55a70070419c..000000000000 --- a/owl-bot-staging/Dataproc/v1/src/V1/Client/SessionControllerClient.php +++ /dev/null @@ -1,562 +0,0 @@ - self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/session_controller_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/session_controller_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/session_controller_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/session_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; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a 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, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a session - * resource. - * - * @param string $project - * @param string $location - * @param string $session - * - * @return string The formatted session resource. - */ - public static function sessionName(string $project, string $location, string $session): string - { - return self::getPathTemplate('session')->render([ - 'project' => $project, - 'location' => $location, - 'session' => $session, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * session_template resource. - * - * @param string $project - * @param string $location - * @param string $template - * - * @return string The formatted session_template resource. - */ - public static function sessionTemplateName(string $project, string $location, string $template): string - { - return self::getPathTemplate('sessionTemplate')->render([ - 'project' => $project, - 'location' => $location, - 'template' => $template, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - location: projects/{project}/locations/{location} - * - service: projects/{project}/locations/{location}/services/{service} - * - session: projects/{project}/locations/{location}/sessions/{session} - * - sessionTemplate: projects/{project}/locations/{location}/sessionTemplates/{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); - } - - /** - * Create an interactive session asynchronously. - * - * The async variant is {@see SessionControllerClient::createSessionAsync()} . - * - * @example samples/V1/SessionControllerClient/create_session.php - * - * @param CreateSessionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 createSession(CreateSessionRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateSession', $request, $callOptions)->wait(); - } - - /** - * Deletes the interactive session resource. If the session is not in terminal - * state, it is terminated, and then deleted. - * - * The async variant is {@see SessionControllerClient::deleteSessionAsync()} . - * - * @example samples/V1/SessionControllerClient/delete_session.php - * - * @param DeleteSessionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 deleteSession(DeleteSessionRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteSession', $request, $callOptions)->wait(); - } - - /** - * Gets the resource representation for an interactive session. - * - * The async variant is {@see SessionControllerClient::getSessionAsync()} . - * - * @example samples/V1/SessionControllerClient/get_session.php - * - * @param GetSessionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Session - * - * @throws ApiException Thrown if the API call fails. - */ - public function getSession(GetSessionRequest $request, array $callOptions = []): Session - { - return $this->startApiCall('GetSession', $request, $callOptions)->wait(); - } - - /** - * Lists interactive sessions. - * - * The async variant is {@see SessionControllerClient::listSessionsAsync()} . - * - * @example samples/V1/SessionControllerClient/list_sessions.php - * - * @param ListSessionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listSessions(ListSessionsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListSessions', $request, $callOptions); - } - - /** - * Terminates the interactive session. - * - * The async variant is {@see SessionControllerClient::terminateSessionAsync()} . - * - * @example samples/V1/SessionControllerClient/terminate_session.php - * - * @param TerminateSessionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 terminateSession(TerminateSessionRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('TerminateSession', $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 SessionControllerClient::getIamPolicyAsync()} . - * - * @example samples/V1/SessionControllerClient/get_iam_policy.php - * - * @param GetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * 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 SessionControllerClient::setIamPolicyAsync()} . - * - * @example samples/V1/SessionControllerClient/set_iam_policy.php - * - * @param SetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * 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 SessionControllerClient::testIamPermissionsAsync()} . - * - * @example samples/V1/SessionControllerClient/test_iam_permissions.php - * - * @param TestIamPermissionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TestIamPermissionsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse - { - return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Dataproc/v1/src/V1/Client/SessionTemplateControllerClient.php b/owl-bot-staging/Dataproc/v1/src/V1/Client/SessionTemplateControllerClient.php deleted file mode 100644 index e4ee66f3a22d..000000000000 --- a/owl-bot-staging/Dataproc/v1/src/V1/Client/SessionTemplateControllerClient.php +++ /dev/null @@ -1,493 +0,0 @@ - self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/session_template_controller_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/session_template_controller_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/session_template_controller_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/session_template_controller_rest_client_config.php', - ], - ], - ]; - } - - /** - * 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, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * session_template resource. - * - * @param string $project - * @param string $location - * @param string $template - * - * @return string The formatted session_template resource. - */ - public static function sessionTemplateName(string $project, string $location, string $template): string - { - return self::getPathTemplate('sessionTemplate')->render([ - 'project' => $project, - 'location' => $location, - 'template' => $template, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - location: projects/{project}/locations/{location} - * - service: projects/{project}/locations/{location}/services/{service} - * - sessionTemplate: projects/{project}/locations/{location}/sessionTemplates/{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); - } - - /** 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); - } - - /** - * Create a session template synchronously. - * - * The async variant is - * {@see SessionTemplateControllerClient::createSessionTemplateAsync()} . - * - * @example samples/V1/SessionTemplateControllerClient/create_session_template.php - * - * @param CreateSessionTemplateRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return SessionTemplate - * - * @throws ApiException Thrown if the API call fails. - */ - public function createSessionTemplate(CreateSessionTemplateRequest $request, array $callOptions = []): SessionTemplate - { - return $this->startApiCall('CreateSessionTemplate', $request, $callOptions)->wait(); - } - - /** - * Deletes a session template. - * - * The async variant is - * {@see SessionTemplateControllerClient::deleteSessionTemplateAsync()} . - * - * @example samples/V1/SessionTemplateControllerClient/delete_session_template.php - * - * @param DeleteSessionTemplateRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 deleteSessionTemplate(DeleteSessionTemplateRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteSessionTemplate', $request, $callOptions)->wait(); - } - - /** - * Gets the resource representation for a session template. - * - * The async variant is - * {@see SessionTemplateControllerClient::getSessionTemplateAsync()} . - * - * @example samples/V1/SessionTemplateControllerClient/get_session_template.php - * - * @param GetSessionTemplateRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return SessionTemplate - * - * @throws ApiException Thrown if the API call fails. - */ - public function getSessionTemplate(GetSessionTemplateRequest $request, array $callOptions = []): SessionTemplate - { - return $this->startApiCall('GetSessionTemplate', $request, $callOptions)->wait(); - } - - /** - * Lists session templates. - * - * The async variant is - * {@see SessionTemplateControllerClient::listSessionTemplatesAsync()} . - * - * @example samples/V1/SessionTemplateControllerClient/list_session_templates.php - * - * @param ListSessionTemplatesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listSessionTemplates(ListSessionTemplatesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListSessionTemplates', $request, $callOptions); - } - - /** - * Updates the session template synchronously. - * - * The async variant is - * {@see SessionTemplateControllerClient::updateSessionTemplateAsync()} . - * - * @example samples/V1/SessionTemplateControllerClient/update_session_template.php - * - * @param UpdateSessionTemplateRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return SessionTemplate - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateSessionTemplate(UpdateSessionTemplateRequest $request, array $callOptions = []): SessionTemplate - { - return $this->startApiCall('UpdateSessionTemplate', $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 SessionTemplateControllerClient::getIamPolicyAsync()} - * . - * - * @example samples/V1/SessionTemplateControllerClient/get_iam_policy.php - * - * @param GetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * 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 SessionTemplateControllerClient::setIamPolicyAsync()} - * . - * - * @example samples/V1/SessionTemplateControllerClient/set_iam_policy.php - * - * @param SetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * 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 SessionTemplateControllerClient::testIamPermissionsAsync()} . - * - * @example samples/V1/SessionTemplateControllerClient/test_iam_permissions.php - * - * @param TestIamPermissionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TestIamPermissionsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse - { - return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Dataproc/v1/src/V1/Client/WorkflowTemplateServiceClient.php b/owl-bot-staging/Dataproc/v1/src/V1/Client/WorkflowTemplateServiceClient.php deleted file mode 100644 index 05964f36f77d..000000000000 --- a/owl-bot-staging/Dataproc/v1/src/V1/Client/WorkflowTemplateServiceClient.php +++ /dev/null @@ -1,774 +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; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * 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 crypto_key - * resource. - * - * @param string $project - * @param string $location - * @param string $keyRing - * @param string $cryptoKey - * - * @return string The formatted crypto_key resource. - */ - public static function cryptoKeyName(string $project, string $location, string $keyRing, string $cryptoKey): string - { - return self::getPathTemplate('cryptoKey')->render([ - 'project' => $project, - 'location' => $location, - 'key_ring' => $keyRing, - 'crypto_key' => $cryptoKey, - ]); - } - - /** - * 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} - * - cryptoKey: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key} - * - 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 WorkflowTemplateServiceClient::createWorkflowTemplateAsync()} . - * - * @example samples/V1/WorkflowTemplateServiceClient/create_workflow_template.php - * - * @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 WorkflowTemplateServiceClient::deleteWorkflowTemplateAsync()} . - * - * @example samples/V1/WorkflowTemplateServiceClient/delete_workflow_template.php - * - * @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 WorkflowTemplateServiceClient::getWorkflowTemplateAsync()} . - * - * @example samples/V1/WorkflowTemplateServiceClient/get_workflow_template.php - * - * @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 WorkflowTemplateServiceClient::instantiateInlineWorkflowTemplateAsync()} . - * - * @example samples/V1/WorkflowTemplateServiceClient/instantiate_inline_workflow_template.php - * - * @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 WorkflowTemplateServiceClient::instantiateWorkflowTemplateAsync()} . - * - * @example samples/V1/WorkflowTemplateServiceClient/instantiate_workflow_template.php - * - * @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 WorkflowTemplateServiceClient::listWorkflowTemplatesAsync()} . - * - * @example samples/V1/WorkflowTemplateServiceClient/list_workflow_templates.php - * - * @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 WorkflowTemplateServiceClient::updateWorkflowTemplateAsync()} . - * - * @example samples/V1/WorkflowTemplateServiceClient/update_workflow_template.php - * - * @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 WorkflowTemplateServiceClient::getIamPolicyAsync()} . - * - * @example samples/V1/WorkflowTemplateServiceClient/get_iam_policy.php - * - * @param GetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * 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 WorkflowTemplateServiceClient::setIamPolicyAsync()} . - * - * @example samples/V1/WorkflowTemplateServiceClient/set_iam_policy.php - * - * @param SetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * 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 WorkflowTemplateServiceClient::testIamPermissionsAsync()} . - * - * @example samples/V1/WorkflowTemplateServiceClient/test_iam_permissions.php - * - * @param TestIamPermissionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TestIamPermissionsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse - { - return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Dataproc/v1/src/V1/gapic_metadata.json b/owl-bot-staging/Dataproc/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 31b7826cb3c0..000000000000 --- a/owl-bot-staging/Dataproc/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,421 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.dataproc.v1", - "libraryPackage": "Google\\Cloud\\Dataproc\\V1", - "services": { - "AutoscalingPolicyService": { - "clients": { - "grpc": { - "libraryClient": "AutoscalingPolicyServiceGapicClient", - "rpcs": { - "CreateAutoscalingPolicy": { - "methods": [ - "createAutoscalingPolicy" - ] - }, - "DeleteAutoscalingPolicy": { - "methods": [ - "deleteAutoscalingPolicy" - ] - }, - "GetAutoscalingPolicy": { - "methods": [ - "getAutoscalingPolicy" - ] - }, - "ListAutoscalingPolicies": { - "methods": [ - "listAutoscalingPolicies" - ] - }, - "UpdateAutoscalingPolicy": { - "methods": [ - "updateAutoscalingPolicy" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - } - } - } - } - }, - "BatchController": { - "clients": { - "grpc": { - "libraryClient": "BatchControllerGapicClient", - "rpcs": { - "CreateBatch": { - "methods": [ - "createBatch" - ] - }, - "DeleteBatch": { - "methods": [ - "deleteBatch" - ] - }, - "GetBatch": { - "methods": [ - "getBatch" - ] - }, - "ListBatches": { - "methods": [ - "listBatches" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - } - } - } - } - }, - "ClusterController": { - "clients": { - "grpc": { - "libraryClient": "ClusterControllerGapicClient", - "rpcs": { - "CreateCluster": { - "methods": [ - "createCluster" - ] - }, - "DeleteCluster": { - "methods": [ - "deleteCluster" - ] - }, - "DiagnoseCluster": { - "methods": [ - "diagnoseCluster" - ] - }, - "GetCluster": { - "methods": [ - "getCluster" - ] - }, - "ListClusters": { - "methods": [ - "listClusters" - ] - }, - "StartCluster": { - "methods": [ - "startCluster" - ] - }, - "StopCluster": { - "methods": [ - "stopCluster" - ] - }, - "UpdateCluster": { - "methods": [ - "updateCluster" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - } - } - } - } - }, - "JobController": { - "clients": { - "grpc": { - "libraryClient": "JobControllerGapicClient", - "rpcs": { - "CancelJob": { - "methods": [ - "cancelJob" - ] - }, - "DeleteJob": { - "methods": [ - "deleteJob" - ] - }, - "GetJob": { - "methods": [ - "getJob" - ] - }, - "ListJobs": { - "methods": [ - "listJobs" - ] - }, - "SubmitJob": { - "methods": [ - "submitJob" - ] - }, - "SubmitJobAsOperation": { - "methods": [ - "submitJobAsOperation" - ] - }, - "UpdateJob": { - "methods": [ - "updateJob" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - } - } - } - } - }, - "NodeGroupController": { - "clients": { - "grpc": { - "libraryClient": "NodeGroupControllerGapicClient", - "rpcs": { - "CreateNodeGroup": { - "methods": [ - "createNodeGroup" - ] - }, - "GetNodeGroup": { - "methods": [ - "getNodeGroup" - ] - }, - "ResizeNodeGroup": { - "methods": [ - "resizeNodeGroup" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - } - } - } - } - }, - "SessionController": { - "clients": { - "grpc": { - "libraryClient": "SessionControllerGapicClient", - "rpcs": { - "CreateSession": { - "methods": [ - "createSession" - ] - }, - "DeleteSession": { - "methods": [ - "deleteSession" - ] - }, - "GetSession": { - "methods": [ - "getSession" - ] - }, - "ListSessions": { - "methods": [ - "listSessions" - ] - }, - "TerminateSession": { - "methods": [ - "terminateSession" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - } - } - } - } - }, - "SessionTemplateController": { - "clients": { - "grpc": { - "libraryClient": "SessionTemplateControllerGapicClient", - "rpcs": { - "CreateSessionTemplate": { - "methods": [ - "createSessionTemplate" - ] - }, - "DeleteSessionTemplate": { - "methods": [ - "deleteSessionTemplate" - ] - }, - "GetSessionTemplate": { - "methods": [ - "getSessionTemplate" - ] - }, - "ListSessionTemplates": { - "methods": [ - "listSessionTemplates" - ] - }, - "UpdateSessionTemplate": { - "methods": [ - "updateSessionTemplate" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - } - } - } - } - }, - "WorkflowTemplateService": { - "clients": { - "grpc": { - "libraryClient": "WorkflowTemplateServiceGapicClient", - "rpcs": { - "CreateWorkflowTemplate": { - "methods": [ - "createWorkflowTemplate" - ] - }, - "DeleteWorkflowTemplate": { - "methods": [ - "deleteWorkflowTemplate" - ] - }, - "GetWorkflowTemplate": { - "methods": [ - "getWorkflowTemplate" - ] - }, - "InstantiateInlineWorkflowTemplate": { - "methods": [ - "instantiateInlineWorkflowTemplate" - ] - }, - "InstantiateWorkflowTemplate": { - "methods": [ - "instantiateWorkflowTemplate" - ] - }, - "ListWorkflowTemplates": { - "methods": [ - "listWorkflowTemplates" - ] - }, - "UpdateWorkflowTemplate": { - "methods": [ - "updateWorkflowTemplate" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/Dataproc/v1/src/V1/resources/autoscaling_policy_service_client_config.json b/owl-bot-staging/Dataproc/v1/src/V1/resources/autoscaling_policy_service_client_config.json deleted file mode 100644 index c00d68d4355d..000000000000 --- a/owl-bot-staging/Dataproc/v1/src/V1/resources/autoscaling_policy_service_client_config.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "interfaces": { - "google.cloud.dataproc.v1.AutoscalingPolicyService": { - "retry_codes": { - "no_retry_codes": [], - "no_retry_1_codes": [], - "retry_policy_1_codes": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 600000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 600000, - "total_timeout_millis": 600000 - }, - "retry_policy_1_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": { - "CreateAutoscalingPolicy": { - "timeout_millis": 600000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteAutoscalingPolicy": { - "timeout_millis": 600000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetAutoscalingPolicy": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListAutoscalingPolicies": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateAutoscalingPolicy": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_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/autoscaling_policy_service_descriptor_config.php b/owl-bot-staging/Dataproc/v1/src/V1/resources/autoscaling_policy_service_descriptor_config.php deleted file mode 100644 index bcd0647b0a39..000000000000 --- a/owl-bot-staging/Dataproc/v1/src/V1/resources/autoscaling_policy_service_descriptor_config.php +++ /dev/null @@ -1,143 +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 44063647d781..000000000000 --- a/owl-bot-staging/Dataproc/v1/src/V1/resources/autoscaling_policy_service_rest_client_config.php +++ /dev/null @@ -1,323 +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 595eb6d972d2..000000000000 --- 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 19bfb52172a6..000000000000 --- a/owl-bot-staging/Dataproc/v1/src/V1/resources/batch_controller_descriptor_config.php +++ /dev/null @@ -1,135 +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 659966269563..000000000000 --- a/owl-bot-staging/Dataproc/v1/src/V1/resources/batch_controller_rest_client_config.php +++ /dev/null @@ -1,278 +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 ffb0cf898459..000000000000 --- 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 0f22e5235cd4..000000000000 --- a/owl-bot-staging/Dataproc/v1/src/V1/resources/cluster_controller_descriptor_config.php +++ /dev/null @@ -1,304 +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}', - 'cryptoKey' => 'projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}', - '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 8b8101084039..000000000000 --- a/owl-bot-staging/Dataproc/v1/src/V1/resources/cluster_controller_rest_client_config.php +++ /dev/null @@ -1,399 +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 9e57cda3b3ec..000000000000 --- 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 453069a0a0ea..000000000000 --- a/owl-bot-staging/Dataproc/v1/src/V1/resources/job_controller_descriptor_config.php +++ /dev/null @@ -1,232 +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 53e1947a7087..000000000000 --- a/owl-bot-staging/Dataproc/v1/src/V1/resources/job_controller_rest_client_config.php +++ /dev/null @@ -1,372 +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 273c3e016458..000000000000 --- 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 bd02f3ee961a..000000000000 --- a/owl-bot-staging/Dataproc/v1/src/V1/resources/node_group_controller_descriptor_config.php +++ /dev/null @@ -1,121 +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 944ebcf8c317..000000000000 --- a/owl-bot-staging/Dataproc/v1/src/V1/resources/node_group_controller_rest_client_config.php +++ /dev/null @@ -1,268 +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/session_controller_client_config.json b/owl-bot-staging/Dataproc/v1/src/V1/resources/session_controller_client_config.json deleted file mode 100644 index ebb0dc3a4d62..000000000000 --- a/owl-bot-staging/Dataproc/v1/src/V1/resources/session_controller_client_config.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "interfaces": { - "google.cloud.dataproc.v1.SessionController": { - "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": { - "CreateSession": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteSession": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetSession": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListSessions": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "TerminateSession": { - "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/session_controller_descriptor_config.php b/owl-bot-staging/Dataproc/v1/src/V1/resources/session_controller_descriptor_config.php deleted file mode 100644 index 8be59bd1856c..000000000000 --- a/owl-bot-staging/Dataproc/v1/src/V1/resources/session_controller_descriptor_config.php +++ /dev/null @@ -1,162 +0,0 @@ - [ - 'google.cloud.dataproc.v1.SessionController' => [ - 'CreateSession' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dataproc\V1\Session', - 'metadataReturnType' => '\Google\Cloud\Dataproc\V1\SessionOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteSession' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dataproc\V1\Session', - 'metadataReturnType' => '\Google\Cloud\Dataproc\V1\SessionOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'TerminateSession' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dataproc\V1\Session', - 'metadataReturnType' => '\Google\Cloud\Dataproc\V1\SessionOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetSession' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataproc\V1\Session', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListSessions' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getSessions', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dataproc\V1\ListSessionsResponse', - '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' => [ - 'location' => 'projects/{project}/locations/{location}', - 'service' => 'projects/{project}/locations/{location}/services/{service}', - 'session' => 'projects/{project}/locations/{location}/sessions/{session}', - 'sessionTemplate' => 'projects/{project}/locations/{location}/sessionTemplates/{template}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Dataproc/v1/src/V1/resources/session_controller_rest_client_config.php b/owl-bot-staging/Dataproc/v1/src/V1/resources/session_controller_rest_client_config.php deleted file mode 100644 index 8eba90b341fc..000000000000 --- a/owl-bot-staging/Dataproc/v1/src/V1/resources/session_controller_rest_client_config.php +++ /dev/null @@ -1,293 +0,0 @@ - [ - 'google.cloud.dataproc.v1.SessionController' => [ - 'CreateSession' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/sessions', - 'body' => 'session', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'session_id', - ], - ], - 'DeleteSession' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/sessions/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetSession' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/sessions/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListSessions' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/sessions', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'TerminateSession' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/sessions/*}:terminate', - '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/session_template_controller_client_config.json b/owl-bot-staging/Dataproc/v1/src/V1/resources/session_template_controller_client_config.json deleted file mode 100644 index a8312e05c9a3..000000000000 --- a/owl-bot-staging/Dataproc/v1/src/V1/resources/session_template_controller_client_config.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "interfaces": { - "google.cloud.dataproc.v1.SessionTemplateController": { - "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": { - "CreateSessionTemplate": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteSessionTemplate": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetSessionTemplate": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListSessionTemplates": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateSessionTemplate": { - "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/session_template_controller_descriptor_config.php b/owl-bot-staging/Dataproc/v1/src/V1/resources/session_template_controller_descriptor_config.php deleted file mode 100644 index 7f0e4054e33f..000000000000 --- a/owl-bot-staging/Dataproc/v1/src/V1/resources/session_template_controller_descriptor_config.php +++ /dev/null @@ -1,141 +0,0 @@ - [ - 'google.cloud.dataproc.v1.SessionTemplateController' => [ - 'CreateSessionTemplate' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataproc\V1\SessionTemplate', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteSessionTemplate' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetSessionTemplate' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataproc\V1\SessionTemplate', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListSessionTemplates' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getSessionTemplates', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dataproc\V1\ListSessionTemplatesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateSessionTemplate' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataproc\V1\SessionTemplate', - 'headerParams' => [ - [ - 'keyName' => 'session_template.name', - 'fieldAccessors' => [ - 'getSessionTemplate', - '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' => [ - 'location' => 'projects/{project}/locations/{location}', - 'service' => 'projects/{project}/locations/{location}/services/{service}', - 'sessionTemplate' => 'projects/{project}/locations/{location}/sessionTemplates/{template}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Dataproc/v1/src/V1/resources/session_template_controller_rest_client_config.php b/owl-bot-staging/Dataproc/v1/src/V1/resources/session_template_controller_rest_client_config.php deleted file mode 100644 index 76c40e9cd267..000000000000 --- a/owl-bot-staging/Dataproc/v1/src/V1/resources/session_template_controller_rest_client_config.php +++ /dev/null @@ -1,291 +0,0 @@ - [ - 'google.cloud.dataproc.v1.SessionTemplateController' => [ - 'CreateSessionTemplate' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/sessionTemplates', - 'body' => 'session_template', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteSessionTemplate' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/sessionTemplates/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetSessionTemplate' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/sessionTemplates/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListSessionTemplates' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/sessionTemplates', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateSessionTemplate' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{session_template.name=projects/*/locations/*/sessionTemplates/*}', - 'body' => 'session_template', - 'placeholders' => [ - 'session_template.name' => [ - 'getters' => [ - 'getSessionTemplate', - '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 c54531343ad1..000000000000 --- 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 af73a590df7a..000000000000 --- a/owl-bot-staging/Dataproc/v1/src/V1/resources/workflow_template_service_descriptor_config.php +++ /dev/null @@ -1,185 +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}', - 'cryptoKey' => 'projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}', - '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 67af15034a23..000000000000 --- a/owl-bot-staging/Dataproc/v1/src/V1/resources/workflow_template_service_rest_client_config.php +++ /dev/null @@ -1,361 +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/Client/AutoscalingPolicyServiceClientTest.php b/owl-bot-staging/Dataproc/v1/tests/Unit/V1/Client/AutoscalingPolicyServiceClientTest.php deleted file mode 100644 index ce4a337062c2..000000000000 --- 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 e12d6379dda5..000000000000 --- 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 147d9dfea2fb..000000000000 --- 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 570e88d87f9a..000000000000 --- 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 b153e5f9d1a1..000000000000 --- 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/SessionControllerClientTest.php b/owl-bot-staging/Dataproc/v1/tests/Unit/V1/Client/SessionControllerClientTest.php deleted file mode 100644 index 11ae84d199c1..000000000000 --- a/owl-bot-staging/Dataproc/v1/tests/Unit/V1/Client/SessionControllerClientTest.php +++ /dev/null @@ -1,929 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return SessionControllerClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new SessionControllerClient($options); - } - - /** @test */ - public function createSessionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createSessionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uuid = 'uuid3601339'; - $stateMessage = 'stateMessage29641305'; - $creator = 'creator1028554796'; - $user = 'user3599307'; - $sessionTemplate = 'sessionTemplate-926284797'; - $expectedResponse = new Session(); - $expectedResponse->setName($name); - $expectedResponse->setUuid($uuid); - $expectedResponse->setStateMessage($stateMessage); - $expectedResponse->setCreator($creator); - $expectedResponse->setUser($user); - $expectedResponse->setSessionTemplate($sessionTemplate); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createSessionTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $session = new Session(); - $sessionName = 'sessionName-22661567'; - $session->setName($sessionName); - $sessionId = 'sessionId1661853540'; - $request = (new CreateSessionRequest()) - ->setParent($formattedParent) - ->setSession($session) - ->setSessionId($sessionId); - $response = $gapicClient->createSession($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.SessionController/CreateSession', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getSession(); - $this->assertProtobufEquals($session, $actualValue); - $actualValue = $actualApiRequestObject->getSessionId(); - $this->assertProtobufEquals($sessionId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createSessionTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createSessionExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createSessionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $session = new Session(); - $sessionName = 'sessionName-22661567'; - $session->setName($sessionName); - $sessionId = 'sessionId1661853540'; - $request = (new CreateSessionRequest()) - ->setParent($formattedParent) - ->setSession($session) - ->setSessionId($sessionId); - $response = $gapicClient->createSession($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createSessionTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteSessionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteSessionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $uuid = 'uuid3601339'; - $stateMessage = 'stateMessage29641305'; - $creator = 'creator1028554796'; - $user = 'user3599307'; - $sessionTemplate = 'sessionTemplate-926284797'; - $expectedResponse = new Session(); - $expectedResponse->setName($name2); - $expectedResponse->setUuid($uuid); - $expectedResponse->setStateMessage($stateMessage); - $expectedResponse->setCreator($creator); - $expectedResponse->setUser($user); - $expectedResponse->setSessionTemplate($sessionTemplate); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteSessionTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->sessionName('[PROJECT]', '[LOCATION]', '[SESSION]'); - $request = (new DeleteSessionRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteSession($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.SessionController/DeleteSession', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteSessionTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteSessionExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteSessionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->sessionName('[PROJECT]', '[LOCATION]', '[SESSION]'); - $request = (new DeleteSessionRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteSession($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteSessionTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getSessionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uuid = 'uuid3601339'; - $stateMessage = 'stateMessage29641305'; - $creator = 'creator1028554796'; - $user = 'user3599307'; - $sessionTemplate = 'sessionTemplate-926284797'; - $expectedResponse = new Session(); - $expectedResponse->setName($name2); - $expectedResponse->setUuid($uuid); - $expectedResponse->setStateMessage($stateMessage); - $expectedResponse->setCreator($creator); - $expectedResponse->setUser($user); - $expectedResponse->setSessionTemplate($sessionTemplate); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->sessionName('[PROJECT]', '[LOCATION]', '[SESSION]'); - $request = (new GetSessionRequest()) - ->setName($formattedName); - $response = $gapicClient->getSession($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.SessionController/GetSession', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSessionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->sessionName('[PROJECT]', '[LOCATION]', '[SESSION]'); - $request = (new GetSessionRequest()) - ->setName($formattedName); - try { - $gapicClient->getSession($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSessionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $sessionsElement = new Session(); - $sessions = [ - $sessionsElement, - ]; - $expectedResponse = new ListSessionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setSessions($sessions); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListSessionsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listSessions($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getSessions()[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.SessionController/ListSessions', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSessionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListSessionsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listSessions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function terminateSessionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/terminateSessionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $uuid = 'uuid3601339'; - $stateMessage = 'stateMessage29641305'; - $creator = 'creator1028554796'; - $user = 'user3599307'; - $sessionTemplate = 'sessionTemplate-926284797'; - $expectedResponse = new Session(); - $expectedResponse->setName($name2); - $expectedResponse->setUuid($uuid); - $expectedResponse->setStateMessage($stateMessage); - $expectedResponse->setCreator($creator); - $expectedResponse->setUser($user); - $expectedResponse->setSessionTemplate($sessionTemplate); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/terminateSessionTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->sessionName('[PROJECT]', '[LOCATION]', '[SESSION]'); - $request = (new TerminateSessionRequest()) - ->setName($formattedName); - $response = $gapicClient->terminateSession($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.SessionController/TerminateSession', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/terminateSessionTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function terminateSessionExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/terminateSessionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->sessionName('[PROJECT]', '[LOCATION]', '[SESSION]'); - $request = (new TerminateSessionRequest()) - ->setName($formattedName); - $response = $gapicClient->terminateSession($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/terminateSessionTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->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 createSessionAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createSessionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uuid = 'uuid3601339'; - $stateMessage = 'stateMessage29641305'; - $creator = 'creator1028554796'; - $user = 'user3599307'; - $sessionTemplate = 'sessionTemplate-926284797'; - $expectedResponse = new Session(); - $expectedResponse->setName($name); - $expectedResponse->setUuid($uuid); - $expectedResponse->setStateMessage($stateMessage); - $expectedResponse->setCreator($creator); - $expectedResponse->setUser($user); - $expectedResponse->setSessionTemplate($sessionTemplate); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createSessionTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $session = new Session(); - $sessionName = 'sessionName-22661567'; - $session->setName($sessionName); - $sessionId = 'sessionId1661853540'; - $request = (new CreateSessionRequest()) - ->setParent($formattedParent) - ->setSession($session) - ->setSessionId($sessionId); - $response = $gapicClient->createSessionAsync($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.SessionController/CreateSession', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getSession(); - $this->assertProtobufEquals($session, $actualValue); - $actualValue = $actualApiRequestObject->getSessionId(); - $this->assertProtobufEquals($sessionId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createSessionTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->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/SessionTemplateControllerClientTest.php b/owl-bot-staging/Dataproc/v1/tests/Unit/V1/Client/SessionTemplateControllerClientTest.php deleted file mode 100644 index 42eb98386508..000000000000 --- a/owl-bot-staging/Dataproc/v1/tests/Unit/V1/Client/SessionTemplateControllerClientTest.php +++ /dev/null @@ -1,677 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return SessionTemplateControllerClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new SessionTemplateControllerClient($options); - } - - /** @test */ - public function createSessionTemplateTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $description = 'description-1724546052'; - $creator = 'creator1028554796'; - $uuid = 'uuid3601339'; - $expectedResponse = new SessionTemplate(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setCreator($creator); - $expectedResponse->setUuid($uuid); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $sessionTemplate = new SessionTemplate(); - $sessionTemplateName = 'sessionTemplateName-1744858149'; - $sessionTemplate->setName($sessionTemplateName); - $request = (new CreateSessionTemplateRequest()) - ->setParent($formattedParent) - ->setSessionTemplate($sessionTemplate); - $response = $gapicClient->createSessionTemplate($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.SessionTemplateController/CreateSessionTemplate', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getSessionTemplate(); - $this->assertProtobufEquals($sessionTemplate, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createSessionTemplateExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $sessionTemplate = new SessionTemplate(); - $sessionTemplateName = 'sessionTemplateName-1744858149'; - $sessionTemplate->setName($sessionTemplateName); - $request = (new CreateSessionTemplateRequest()) - ->setParent($formattedParent) - ->setSessionTemplate($sessionTemplate); - try { - $gapicClient->createSessionTemplate($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteSessionTemplateTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->sessionTemplateName('[PROJECT]', '[LOCATION]', '[TEMPLATE]'); - $request = (new DeleteSessionTemplateRequest()) - ->setName($formattedName); - $gapicClient->deleteSessionTemplate($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataproc.v1.SessionTemplateController/DeleteSessionTemplate', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteSessionTemplateExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->sessionTemplateName('[PROJECT]', '[LOCATION]', '[TEMPLATE]'); - $request = (new DeleteSessionTemplateRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteSessionTemplate($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSessionTemplateTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $creator = 'creator1028554796'; - $uuid = 'uuid3601339'; - $expectedResponse = new SessionTemplate(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setCreator($creator); - $expectedResponse->setUuid($uuid); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->sessionTemplateName('[PROJECT]', '[LOCATION]', '[TEMPLATE]'); - $request = (new GetSessionTemplateRequest()) - ->setName($formattedName); - $response = $gapicClient->getSessionTemplate($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.SessionTemplateController/GetSessionTemplate', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSessionTemplateExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->sessionTemplateName('[PROJECT]', '[LOCATION]', '[TEMPLATE]'); - $request = (new GetSessionTemplateRequest()) - ->setName($formattedName); - try { - $gapicClient->getSessionTemplate($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSessionTemplatesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $sessionTemplatesElement = new SessionTemplate(); - $sessionTemplates = [ - $sessionTemplatesElement, - ]; - $expectedResponse = new ListSessionTemplatesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setSessionTemplates($sessionTemplates); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListSessionTemplatesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listSessionTemplates($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getSessionTemplates()[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.SessionTemplateController/ListSessionTemplates', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSessionTemplatesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListSessionTemplatesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listSessionTemplates($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateSessionTemplateTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $description = 'description-1724546052'; - $creator = 'creator1028554796'; - $uuid = 'uuid3601339'; - $expectedResponse = new SessionTemplate(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setCreator($creator); - $expectedResponse->setUuid($uuid); - $transport->addResponse($expectedResponse); - // Mock request - $sessionTemplate = new SessionTemplate(); - $sessionTemplateName = 'sessionTemplateName-1744858149'; - $sessionTemplate->setName($sessionTemplateName); - $request = (new UpdateSessionTemplateRequest()) - ->setSessionTemplate($sessionTemplate); - $response = $gapicClient->updateSessionTemplate($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.SessionTemplateController/UpdateSessionTemplate', $actualFuncCall); - $actualValue = $actualRequestObject->getSessionTemplate(); - $this->assertProtobufEquals($sessionTemplate, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateSessionTemplateExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $sessionTemplate = new SessionTemplate(); - $sessionTemplateName = 'sessionTemplateName-1744858149'; - $sessionTemplate->setName($sessionTemplateName); - $request = (new UpdateSessionTemplateRequest()) - ->setSessionTemplate($sessionTemplate); - try { - $gapicClient->updateSessionTemplate($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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 createSessionTemplateAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $description = 'description-1724546052'; - $creator = 'creator1028554796'; - $uuid = 'uuid3601339'; - $expectedResponse = new SessionTemplate(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setCreator($creator); - $expectedResponse->setUuid($uuid); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $sessionTemplate = new SessionTemplate(); - $sessionTemplateName = 'sessionTemplateName-1744858149'; - $sessionTemplate->setName($sessionTemplateName); - $request = (new CreateSessionTemplateRequest()) - ->setParent($formattedParent) - ->setSessionTemplate($sessionTemplate); - $response = $gapicClient->createSessionTemplateAsync($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.SessionTemplateController/CreateSessionTemplate', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getSessionTemplate(); - $this->assertProtobufEquals($sessionTemplate, $actualValue); - $this->assertTrue($transport->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 2998d5f41ceb..000000000000 --- 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()); - } -}