diff --git a/java-batch/google-cloud-batch/src/main/resources/META-INF/native-image/com.google.cloud.batch.v1/reflect-config.json b/java-batch/google-cloud-batch/src/main/resources/META-INF/native-image/com.google.cloud.batch.v1/reflect-config.json index de7d0d0b34c3..0baac9dba7d0 100644 --- a/java-batch/google-cloud-batch/src/main/resources/META-INF/native-image/com.google.cloud.batch.v1/reflect-config.json +++ b/java-batch/google-cloud-batch/src/main/resources/META-INF/native-image/com.google.cloud.batch.v1/reflect-config.json @@ -971,6 +971,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.batch.v1.LogsPolicy$CloudLoggingOption", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.batch.v1.LogsPolicy$CloudLoggingOption$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.batch.v1.LogsPolicy$Destination", "queryAllDeclaredConstructors": true, diff --git a/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/AllocationPolicy.java b/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/AllocationPolicy.java index dfa16b1f4425..d2638b9ac0cb 100644 --- a/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/AllocationPolicy.java +++ b/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/AllocationPolicy.java @@ -4466,7 +4466,7 @@ public interface AcceleratorOrBuilder * bool install_gpu_drivers = 3 [deprecated = true]; * * @deprecated google.cloud.batch.v1.AllocationPolicy.Accelerator.install_gpu_drivers is - * deprecated. See google/cloud/batch/v1/job.proto;l=340 + * deprecated. See google/cloud/batch/v1/job.proto;l=349 * @return The installGpuDrivers. */ @java.lang.Deprecated @@ -4637,7 +4637,7 @@ public long getCount() { * bool install_gpu_drivers = 3 [deprecated = true]; * * @deprecated google.cloud.batch.v1.AllocationPolicy.Accelerator.install_gpu_drivers is - * deprecated. See google/cloud/batch/v1/job.proto;l=340 + * deprecated. See google/cloud/batch/v1/job.proto;l=349 * @return The installGpuDrivers. */ @java.lang.Override @@ -5299,7 +5299,7 @@ public Builder clearCount() { * bool install_gpu_drivers = 3 [deprecated = true]; * * @deprecated google.cloud.batch.v1.AllocationPolicy.Accelerator.install_gpu_drivers is - * deprecated. See google/cloud/batch/v1/job.proto;l=340 + * deprecated. See google/cloud/batch/v1/job.proto;l=349 * @return The installGpuDrivers. */ @java.lang.Override @@ -5317,7 +5317,7 @@ public boolean getInstallGpuDrivers() { * bool install_gpu_drivers = 3 [deprecated = true]; * * @deprecated google.cloud.batch.v1.AllocationPolicy.Accelerator.install_gpu_drivers is - * deprecated. See google/cloud/batch/v1/job.proto;l=340 + * deprecated. See google/cloud/batch/v1/job.proto;l=349 * @param value The installGpuDrivers to set. * @return This builder for chaining. */ @@ -5339,7 +5339,7 @@ public Builder setInstallGpuDrivers(boolean value) { * bool install_gpu_drivers = 3 [deprecated = true]; * * @deprecated google.cloud.batch.v1.AllocationPolicy.Accelerator.install_gpu_drivers is - * deprecated. See google/cloud/batch/v1/job.proto;l=340 + * deprecated. See google/cloud/batch/v1/job.proto;l=349 * @return This builder for chaining. */ @java.lang.Deprecated @@ -13018,6 +13018,10 @@ public java.lang.String getLabelsOrThrow(java.lang.String key) { * *
    * The network policy.
+   *
+   * If you define an instance template in the InstancePolicyOrTemplate field,
+   * Batch will use the network settings in the instance template instead of
+   * this field.
    * 
* * .google.cloud.batch.v1.AllocationPolicy.NetworkPolicy network = 7; @@ -13033,6 +13037,10 @@ public boolean hasNetwork() { * *
    * The network policy.
+   *
+   * If you define an instance template in the InstancePolicyOrTemplate field,
+   * Batch will use the network settings in the instance template instead of
+   * this field.
    * 
* * .google.cloud.batch.v1.AllocationPolicy.NetworkPolicy network = 7; @@ -13050,6 +13058,10 @@ public com.google.cloud.batch.v1.AllocationPolicy.NetworkPolicy getNetwork() { * *
    * The network policy.
+   *
+   * If you define an instance template in the InstancePolicyOrTemplate field,
+   * Batch will use the network settings in the instance template instead of
+   * this field.
    * 
* * .google.cloud.batch.v1.AllocationPolicy.NetworkPolicy network = 7; @@ -14699,6 +14711,10 @@ public Builder putAllLabels(java.util.Map va * *
      * The network policy.
+     *
+     * If you define an instance template in the InstancePolicyOrTemplate field,
+     * Batch will use the network settings in the instance template instead of
+     * this field.
      * 
* * .google.cloud.batch.v1.AllocationPolicy.NetworkPolicy network = 7; @@ -14713,6 +14729,10 @@ public boolean hasNetwork() { * *
      * The network policy.
+     *
+     * If you define an instance template in the InstancePolicyOrTemplate field,
+     * Batch will use the network settings in the instance template instead of
+     * this field.
      * 
* * .google.cloud.batch.v1.AllocationPolicy.NetworkPolicy network = 7; @@ -14733,6 +14753,10 @@ public com.google.cloud.batch.v1.AllocationPolicy.NetworkPolicy getNetwork() { * *
      * The network policy.
+     *
+     * If you define an instance template in the InstancePolicyOrTemplate field,
+     * Batch will use the network settings in the instance template instead of
+     * this field.
      * 
* * .google.cloud.batch.v1.AllocationPolicy.NetworkPolicy network = 7; @@ -14755,6 +14779,10 @@ public Builder setNetwork(com.google.cloud.batch.v1.AllocationPolicy.NetworkPoli * *
      * The network policy.
+     *
+     * If you define an instance template in the InstancePolicyOrTemplate field,
+     * Batch will use the network settings in the instance template instead of
+     * this field.
      * 
* * .google.cloud.batch.v1.AllocationPolicy.NetworkPolicy network = 7; @@ -14775,6 +14803,10 @@ public Builder setNetwork( * *
      * The network policy.
+     *
+     * If you define an instance template in the InstancePolicyOrTemplate field,
+     * Batch will use the network settings in the instance template instead of
+     * this field.
      * 
* * .google.cloud.batch.v1.AllocationPolicy.NetworkPolicy network = 7; @@ -14801,6 +14833,10 @@ public Builder mergeNetwork(com.google.cloud.batch.v1.AllocationPolicy.NetworkPo * *
      * The network policy.
+     *
+     * If you define an instance template in the InstancePolicyOrTemplate field,
+     * Batch will use the network settings in the instance template instead of
+     * this field.
      * 
* * .google.cloud.batch.v1.AllocationPolicy.NetworkPolicy network = 7; @@ -14820,6 +14856,10 @@ public Builder clearNetwork() { * *
      * The network policy.
+     *
+     * If you define an instance template in the InstancePolicyOrTemplate field,
+     * Batch will use the network settings in the instance template instead of
+     * this field.
      * 
* * .google.cloud.batch.v1.AllocationPolicy.NetworkPolicy network = 7; @@ -14834,6 +14874,10 @@ public com.google.cloud.batch.v1.AllocationPolicy.NetworkPolicy.Builder getNetwo * *
      * The network policy.
+     *
+     * If you define an instance template in the InstancePolicyOrTemplate field,
+     * Batch will use the network settings in the instance template instead of
+     * this field.
      * 
* * .google.cloud.batch.v1.AllocationPolicy.NetworkPolicy network = 7; @@ -14852,6 +14896,10 @@ public com.google.cloud.batch.v1.AllocationPolicy.NetworkPolicyOrBuilder getNetw * *
      * The network policy.
+     *
+     * If you define an instance template in the InstancePolicyOrTemplate field,
+     * Batch will use the network settings in the instance template instead of
+     * this field.
      * 
* * .google.cloud.batch.v1.AllocationPolicy.NetworkPolicy network = 7; diff --git a/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/AllocationPolicyOrBuilder.java b/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/AllocationPolicyOrBuilder.java index 09af0e2fbdcd..3c1c56e06983 100644 --- a/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/AllocationPolicyOrBuilder.java +++ b/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/AllocationPolicyOrBuilder.java @@ -251,6 +251,10 @@ java.lang.String getLabelsOrDefault( * *
    * The network policy.
+   *
+   * If you define an instance template in the InstancePolicyOrTemplate field,
+   * Batch will use the network settings in the instance template instead of
+   * this field.
    * 
* * .google.cloud.batch.v1.AllocationPolicy.NetworkPolicy network = 7; @@ -263,6 +267,10 @@ java.lang.String getLabelsOrDefault( * *
    * The network policy.
+   *
+   * If you define an instance template in the InstancePolicyOrTemplate field,
+   * Batch will use the network settings in the instance template instead of
+   * this field.
    * 
* * .google.cloud.batch.v1.AllocationPolicy.NetworkPolicy network = 7; @@ -275,6 +283,10 @@ java.lang.String getLabelsOrDefault( * *
    * The network policy.
+   *
+   * If you define an instance template in the InstancePolicyOrTemplate field,
+   * Batch will use the network settings in the instance template instead of
+   * this field.
    * 
* * .google.cloud.batch.v1.AllocationPolicy.NetworkPolicy network = 7; diff --git a/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/JobProto.java b/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/JobProto.java index 70fe19a54b30..8e4494b8e635 100644 --- a/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/JobProto.java +++ b/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/JobProto.java @@ -39,6 +39,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_batch_v1_LogsPolicy_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_batch_v1_LogsPolicy_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_batch_v1_LogsPolicy_CloudLoggingOption_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_batch_v1_LogsPolicy_CloudLoggingOption_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_batch_v1_JobStatus_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -150,109 +154,111 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "Entry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:Q\352" + "AN\n\030batch.googleapis.com/Job\0222projects/{" + "project}/locations/{location}/jobs/{job}" - + "\"\254\001\n\nLogsPolicy\022B\n\013destination\030\001 \001(\0162-.g" + + "\"\234\002\n\nLogsPolicy\022B\n\013destination\030\001 \001(\0162-.g" + "oogle.cloud.batch.v1.LogsPolicy.Destinat" - + "ion\022\021\n\tlogs_path\030\002 \001(\t\"G\n\013Destination\022\033\n" - + "\027DESTINATION_UNSPECIFIED\020\000\022\021\n\rCLOUD_LOGG" - + "ING\020\001\022\010\n\004PATH\020\002\"\200\007\n\tJobStatus\0225\n\005state\030\001" - + " \001(\0162&.google.cloud.batch.v1.JobStatus.S" - + "tate\0229\n\rstatus_events\030\002 \003(\0132\".google.clo" - + "ud.batch.v1.StatusEvent\022E\n\013task_groups\030\004" - + " \003(\01320.google.cloud.batch.v1.JobStatus.T" - + "askGroupsEntry\022/\n\014run_duration\030\005 \001(\0132\031.g" - + "oogle.protobuf.Duration\032\321\001\n\016InstanceStat" - + "us\022\024\n\014machine_type\030\001 \001(\t\022U\n\022provisioning" - + "_model\030\002 \001(\01629.google.cloud.batch.v1.All" - + "ocationPolicy.ProvisioningModel\022\021\n\ttask_" - + "pack\030\003 \001(\003\022?\n\tboot_disk\030\004 \001(\0132,.google.c" - + "loud.batch.v1.AllocationPolicy.Disk\032\322\001\n\017" - + "TaskGroupStatus\022L\n\006counts\030\001 \003(\0132<.google" - + ".cloud.batch.v1.JobStatus.TaskGroupStatu" - + "s.CountsEntry\022B\n\tinstances\030\002 \003(\0132/.googl" - + "e.cloud.batch.v1.JobStatus.InstanceStatu" - + "s\032-\n\013CountsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002" - + " \001(\003:\0028\001\032c\n\017TaskGroupsEntry\022\013\n\003key\030\001 \001(\t" - + "\022?\n\005value\030\002 \001(\01320.google.cloud.batch.v1." - + "JobStatus.TaskGroupStatus:\0028\001\"{\n\005State\022\025" - + "\n\021STATE_UNSPECIFIED\020\000\022\n\n\006QUEUED\020\001\022\r\n\tSCH" - + "EDULED\020\002\022\013\n\007RUNNING\020\003\022\r\n\tSUCCEEDED\020\004\022\n\n\006" - + "FAILED\020\005\022\030\n\024DELETION_IN_PROGRESS\020\006\"\374\002\n\017J" - + "obNotification\022\024\n\014pubsub_topic\030\001 \001(\t\022?\n\007" - + "message\030\002 \001(\0132..google.cloud.batch.v1.Jo" - + "bNotification.Message\032\304\001\n\007Message\0229\n\004typ" - + "e\030\001 \001(\0162+.google.cloud.batch.v1.JobNotif" - + "ication.Type\022=\n\rnew_job_state\030\002 \001(\0162&.go" - + "ogle.cloud.batch.v1.JobStatus.State\022?\n\016n" - + "ew_task_state\030\003 \001(\0162\'.google.cloud.batch" - + ".v1.TaskStatus.State\"K\n\004Type\022\024\n\020TYPE_UNS" - + "PECIFIED\020\000\022\025\n\021JOB_STATE_CHANGED\020\001\022\026\n\022TAS" - + "K_STATE_CHANGED\020\002\"\253\016\n\020AllocationPolicy\022H" - + "\n\010location\030\001 \001(\01326.google.cloud.batch.v1" - + ".AllocationPolicy.LocationPolicy\022S\n\tinst" - + "ances\030\010 \003(\0132@.google.cloud.batch.v1.Allo" - + "cationPolicy.InstancePolicyOrTemplate\022>\n" - + "\017service_account\030\t \001(\0132%.google.cloud.ba" - + "tch.v1.ServiceAccount\022C\n\006labels\030\006 \003(\01323." - + "google.cloud.batch.v1.AllocationPolicy.L" - + "abelsEntry\022F\n\007network\030\007 \001(\01325.google.clo" - + "ud.batch.v1.AllocationPolicy.NetworkPoli" - + "cy\022J\n\tplacement\030\n \001(\01327.google.cloud.bat" - + "ch.v1.AllocationPolicy.PlacementPolicy\032+" - + "\n\016LocationPolicy\022\031\n\021allowed_locations\030\001 " - + "\003(\t\032q\n\004Disk\022\017\n\005image\030\004 \001(\tH\000\022\022\n\010snapshot" - + "\030\005 \001(\tH\000\022\014\n\004type\030\001 \001(\t\022\017\n\007size_gb\030\002 \001(\003\022" - + "\026\n\016disk_interface\030\006 \001(\tB\r\n\013data_source\032\212" - + "\001\n\014AttachedDisk\022@\n\010new_disk\030\001 \001(\0132,.goog" - + "le.cloud.batch.v1.AllocationPolicy.DiskH" - + "\000\022\027\n\rexisting_disk\030\002 \001(\tH\000\022\023\n\013device_nam" - + "e\030\003 \001(\tB\n\n\010attached\032i\n\013Accelerator\022\014\n\004ty" - + "pe\030\001 \001(\t\022\r\n\005count\030\002 \001(\003\022\037\n\023install_gpu_d" - + "rivers\030\003 \001(\010B\002\030\001\022\034\n\016driver_version\030\004 \001(\t" - + "B\004\342A\001\001\032\203\003\n\016InstancePolicy\022\024\n\014machine_typ" - + "e\030\002 \001(\t\022\030\n\020min_cpu_platform\030\003 \001(\t\022U\n\022pro" - + "visioning_model\030\004 \001(\01629.google.cloud.bat" - + "ch.v1.AllocationPolicy.ProvisioningModel" - + "\022I\n\014accelerators\030\005 \003(\01323.google.cloud.ba" - + "tch.v1.AllocationPolicy.Accelerator\022?\n\tb" - + "oot_disk\030\010 \001(\0132,.google.cloud.batch.v1.A" - + "llocationPolicy.Disk\022C\n\005disks\030\006 \003(\01324.go" - + "ogle.cloud.batch.v1.AllocationPolicy.Att" - + "achedDisk\022\031\n\013reservation\030\007 \001(\tB\004\342A\001\001\032\261\001\n" - + "\030InstancePolicyOrTemplate\022H\n\006policy\030\001 \001(" - + "\01326.google.cloud.batch.v1.AllocationPoli" - + "cy.InstancePolicyH\000\022\033\n\021instance_template" - + "\030\002 \001(\tH\000\022\033\n\023install_gpu_drivers\030\003 \001(\010B\021\n" - + "\017policy_template\032W\n\020NetworkInterface\022\017\n\007" - + "network\030\001 \001(\t\022\022\n\nsubnetwork\030\002 \001(\t\022\036\n\026no_" - + "external_ip_address\030\003 \001(\010\032e\n\rNetworkPoli" - + "cy\022T\n\022network_interfaces\030\001 \003(\01328.google." - + "cloud.batch.v1.AllocationPolicy.NetworkI" - + "nterface\032<\n\017PlacementPolicy\022\023\n\013collocati" - + "on\030\001 \001(\t\022\024\n\014max_distance\030\002 \001(\003\032-\n\013Labels" - + "Entry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"`\n" - + "\021ProvisioningModel\022\"\n\036PROVISIONING_MODEL" - + "_UNSPECIFIED\020\000\022\014\n\010STANDARD\020\001\022\010\n\004SPOT\020\002\022\017" - + "\n\013PREEMPTIBLE\020\003\"\257\004\n\tTaskGroup\022\022\n\004name\030\001 " - + "\001(\tB\004\342A\001\003\0228\n\ttask_spec\030\003 \001(\0132\037.google.cl" - + "oud.batch.v1.TaskSpecB\004\342A\001\002\022\022\n\ntask_coun" - + "t\030\004 \001(\003\022\023\n\013parallelism\030\005 \001(\003\022L\n\021scheduli" - + "ng_policy\030\006 \001(\01621.google.cloud.batch.v1." - + "TaskGroup.SchedulingPolicy\022=\n\021task_envir" - + "onments\030\t \003(\0132\".google.cloud.batch.v1.En" - + "vironment\022\033\n\023task_count_per_node\030\n \001(\003\022\032" - + "\n\022require_hosts_file\030\013 \001(\010\022\026\n\016permissive" - + "_ssh\030\014 \001(\010\"\\\n\020SchedulingPolicy\022!\n\035SCHEDU" - + "LING_POLICY_UNSPECIFIED\020\000\022\027\n\023AS_SOON_AS_" - + "POSSIBLE\020\001\022\014\n\010IN_ORDER\020\002:o\352Al\n\036batch.goo" - + "gleapis.com/TaskGroup\022Jprojects/{project" - + "}/locations/{location}/jobs/{job}/taskGr" - + "oups/{task_group}\"/\n\016ServiceAccount\022\r\n\005e" - + "mail\030\001 \001(\t\022\016\n\006scopes\030\002 \003(\tB\251\001\n\031com.googl" - + "e.cloud.batch.v1B\010JobProtoP\001Z/cloud.goog" - + "le.com/go/batch/apiv1/batchpb;batchpb\242\002\003" - + "GCB\252\002\025Google.Cloud.Batch.V1\312\002\025Google\\Clo" - + "ud\\Batch\\V1\352\002\030Google::Cloud::Batch::V1b\006" - + "proto3" + + "ion\022\021\n\tlogs_path\030\002 \001(\t\022X\n\024cloud_logging_" + + "option\030\003 \001(\01324.google.cloud.batch.v1.Log" + + "sPolicy.CloudLoggingOptionB\004\342A\001\001\032\024\n\022Clou" + + "dLoggingOption\"G\n\013Destination\022\033\n\027DESTINA" + + "TION_UNSPECIFIED\020\000\022\021\n\rCLOUD_LOGGING\020\001\022\010\n" + + "\004PATH\020\002\"\200\007\n\tJobStatus\0225\n\005state\030\001 \001(\0162&.g" + + "oogle.cloud.batch.v1.JobStatus.State\0229\n\r" + + "status_events\030\002 \003(\0132\".google.cloud.batch" + + ".v1.StatusEvent\022E\n\013task_groups\030\004 \003(\01320.g" + + "oogle.cloud.batch.v1.JobStatus.TaskGroup" + + "sEntry\022/\n\014run_duration\030\005 \001(\0132\031.google.pr" + + "otobuf.Duration\032\321\001\n\016InstanceStatus\022\024\n\014ma" + + "chine_type\030\001 \001(\t\022U\n\022provisioning_model\030\002" + + " \001(\01629.google.cloud.batch.v1.AllocationP" + + "olicy.ProvisioningModel\022\021\n\ttask_pack\030\003 \001" + + "(\003\022?\n\tboot_disk\030\004 \001(\0132,.google.cloud.bat" + + "ch.v1.AllocationPolicy.Disk\032\322\001\n\017TaskGrou" + + "pStatus\022L\n\006counts\030\001 \003(\0132<.google.cloud.b" + + "atch.v1.JobStatus.TaskGroupStatus.Counts" + + "Entry\022B\n\tinstances\030\002 \003(\0132/.google.cloud." + + "batch.v1.JobStatus.InstanceStatus\032-\n\013Cou" + + "ntsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\003:\0028\001" + + "\032c\n\017TaskGroupsEntry\022\013\n\003key\030\001 \001(\t\022?\n\005valu" + + "e\030\002 \001(\01320.google.cloud.batch.v1.JobStatu" + + "s.TaskGroupStatus:\0028\001\"{\n\005State\022\025\n\021STATE_" + + "UNSPECIFIED\020\000\022\n\n\006QUEUED\020\001\022\r\n\tSCHEDULED\020\002" + + "\022\013\n\007RUNNING\020\003\022\r\n\tSUCCEEDED\020\004\022\n\n\006FAILED\020\005" + + "\022\030\n\024DELETION_IN_PROGRESS\020\006\"\374\002\n\017JobNotifi" + + "cation\022\024\n\014pubsub_topic\030\001 \001(\t\022?\n\007message\030" + + "\002 \001(\0132..google.cloud.batch.v1.JobNotific" + + "ation.Message\032\304\001\n\007Message\0229\n\004type\030\001 \001(\0162" + + "+.google.cloud.batch.v1.JobNotification." + + "Type\022=\n\rnew_job_state\030\002 \001(\0162&.google.clo" + + "ud.batch.v1.JobStatus.State\022?\n\016new_task_" + + "state\030\003 \001(\0162\'.google.cloud.batch.v1.Task" + + "Status.State\"K\n\004Type\022\024\n\020TYPE_UNSPECIFIED" + + "\020\000\022\025\n\021JOB_STATE_CHANGED\020\001\022\026\n\022TASK_STATE_" + + "CHANGED\020\002\"\253\016\n\020AllocationPolicy\022H\n\010locati" + + "on\030\001 \001(\01326.google.cloud.batch.v1.Allocat" + + "ionPolicy.LocationPolicy\022S\n\tinstances\030\010 " + + "\003(\0132@.google.cloud.batch.v1.AllocationPo" + + "licy.InstancePolicyOrTemplate\022>\n\017service" + + "_account\030\t \001(\0132%.google.cloud.batch.v1.S" + + "erviceAccount\022C\n\006labels\030\006 \003(\01323.google.c" + + "loud.batch.v1.AllocationPolicy.LabelsEnt" + + "ry\022F\n\007network\030\007 \001(\01325.google.cloud.batch" + + ".v1.AllocationPolicy.NetworkPolicy\022J\n\tpl" + + "acement\030\n \001(\01327.google.cloud.batch.v1.Al" + + "locationPolicy.PlacementPolicy\032+\n\016Locati" + + "onPolicy\022\031\n\021allowed_locations\030\001 \003(\t\032q\n\004D" + + "isk\022\017\n\005image\030\004 \001(\tH\000\022\022\n\010snapshot\030\005 \001(\tH\000" + + "\022\014\n\004type\030\001 \001(\t\022\017\n\007size_gb\030\002 \001(\003\022\026\n\016disk_" + + "interface\030\006 \001(\tB\r\n\013data_source\032\212\001\n\014Attac" + + "hedDisk\022@\n\010new_disk\030\001 \001(\0132,.google.cloud" + + ".batch.v1.AllocationPolicy.DiskH\000\022\027\n\rexi" + + "sting_disk\030\002 \001(\tH\000\022\023\n\013device_name\030\003 \001(\tB" + + "\n\n\010attached\032i\n\013Accelerator\022\014\n\004type\030\001 \001(\t" + + "\022\r\n\005count\030\002 \001(\003\022\037\n\023install_gpu_drivers\030\003" + + " \001(\010B\002\030\001\022\034\n\016driver_version\030\004 \001(\tB\004\342A\001\001\032\203" + + "\003\n\016InstancePolicy\022\024\n\014machine_type\030\002 \001(\t\022" + + "\030\n\020min_cpu_platform\030\003 \001(\t\022U\n\022provisionin" + + "g_model\030\004 \001(\01629.google.cloud.batch.v1.Al" + + "locationPolicy.ProvisioningModel\022I\n\014acce" + + "lerators\030\005 \003(\01323.google.cloud.batch.v1.A" + + "llocationPolicy.Accelerator\022?\n\tboot_disk" + + "\030\010 \001(\0132,.google.cloud.batch.v1.Allocatio" + + "nPolicy.Disk\022C\n\005disks\030\006 \003(\01324.google.clo" + + "ud.batch.v1.AllocationPolicy.AttachedDis" + + "k\022\031\n\013reservation\030\007 \001(\tB\004\342A\001\001\032\261\001\n\030Instanc" + + "ePolicyOrTemplate\022H\n\006policy\030\001 \001(\01326.goog" + + "le.cloud.batch.v1.AllocationPolicy.Insta" + + "ncePolicyH\000\022\033\n\021instance_template\030\002 \001(\tH\000" + + "\022\033\n\023install_gpu_drivers\030\003 \001(\010B\021\n\017policy_" + + "template\032W\n\020NetworkInterface\022\017\n\007network\030" + + "\001 \001(\t\022\022\n\nsubnetwork\030\002 \001(\t\022\036\n\026no_external" + + "_ip_address\030\003 \001(\010\032e\n\rNetworkPolicy\022T\n\022ne" + + "twork_interfaces\030\001 \003(\01328.google.cloud.ba" + + "tch.v1.AllocationPolicy.NetworkInterface" + + "\032<\n\017PlacementPolicy\022\023\n\013collocation\030\001 \001(\t" + + "\022\024\n\014max_distance\030\002 \001(\003\032-\n\013LabelsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"`\n\021Provisi" + + "oningModel\022\"\n\036PROVISIONING_MODEL_UNSPECI" + + "FIED\020\000\022\014\n\010STANDARD\020\001\022\010\n\004SPOT\020\002\022\017\n\013PREEMP" + + "TIBLE\020\003\"\257\004\n\tTaskGroup\022\022\n\004name\030\001 \001(\tB\004\342A\001" + + "\003\0228\n\ttask_spec\030\003 \001(\0132\037.google.cloud.batc" + + "h.v1.TaskSpecB\004\342A\001\002\022\022\n\ntask_count\030\004 \001(\003\022" + + "\023\n\013parallelism\030\005 \001(\003\022L\n\021scheduling_polic" + + "y\030\006 \001(\01621.google.cloud.batch.v1.TaskGrou" + + "p.SchedulingPolicy\022=\n\021task_environments\030" + + "\t \003(\0132\".google.cloud.batch.v1.Environmen" + + "t\022\033\n\023task_count_per_node\030\n \001(\003\022\032\n\022requir" + + "e_hosts_file\030\013 \001(\010\022\026\n\016permissive_ssh\030\014 \001" + + "(\010\"\\\n\020SchedulingPolicy\022!\n\035SCHEDULING_POL" + + "ICY_UNSPECIFIED\020\000\022\027\n\023AS_SOON_AS_POSSIBLE" + + "\020\001\022\014\n\010IN_ORDER\020\002:o\352Al\n\036batch.googleapis." + + "com/TaskGroup\022Jprojects/{project}/locati" + + "ons/{location}/jobs/{job}/taskGroups/{ta" + + "sk_group}\"/\n\016ServiceAccount\022\r\n\005email\030\001 \001" + + "(\t\022\016\n\006scopes\030\002 \003(\tB\251\001\n\031com.google.cloud." + + "batch.v1B\010JobProtoP\001Z/cloud.google.com/g" + + "o/batch/apiv1/batchpb;batchpb\242\002\003GCB\252\002\025Go" + + "ogle.Cloud.Batch.V1\312\002\025Google\\Cloud\\Batch" + + "\\V1\352\002\030Google::Cloud::Batch::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -295,8 +301,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_batch_v1_LogsPolicy_descriptor, new java.lang.String[] { - "Destination", "LogsPath", + "Destination", "LogsPath", "CloudLoggingOption", }); + internal_static_google_cloud_batch_v1_LogsPolicy_CloudLoggingOption_descriptor = + internal_static_google_cloud_batch_v1_LogsPolicy_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_batch_v1_LogsPolicy_CloudLoggingOption_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_batch_v1_LogsPolicy_CloudLoggingOption_descriptor, + new java.lang.String[] {}); internal_static_google_cloud_batch_v1_JobStatus_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_google_cloud_batch_v1_JobStatus_fieldAccessorTable = diff --git a/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/LogsPolicy.java b/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/LogsPolicy.java index c1342df66223..8ef0cbc71b0a 100644 --- a/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/LogsPolicy.java +++ b/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/LogsPolicy.java @@ -221,6 +221,431 @@ private Destination(int value) { // @@protoc_insertion_point(enum_scope:google.cloud.batch.v1.LogsPolicy.Destination) } + public interface CloudLoggingOptionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.batch.v1.LogsPolicy.CloudLoggingOption) + com.google.protobuf.MessageOrBuilder {} + /** + * + * + *
+   * CloudLoggingOption contains additional settings for cloud logging generated
+   * by Batch job.
+   * 
+ * + * Protobuf type {@code google.cloud.batch.v1.LogsPolicy.CloudLoggingOption} + */ + public static final class CloudLoggingOption extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.batch.v1.LogsPolicy.CloudLoggingOption) + CloudLoggingOptionOrBuilder { + private static final long serialVersionUID = 0L; + // Use CloudLoggingOption.newBuilder() to construct. + private CloudLoggingOption(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CloudLoggingOption() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CloudLoggingOption(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.batch.v1.JobProto + .internal_static_google_cloud_batch_v1_LogsPolicy_CloudLoggingOption_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.batch.v1.JobProto + .internal_static_google_cloud_batch_v1_LogsPolicy_CloudLoggingOption_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOption.class, + com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOption.Builder.class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOption)) { + return super.equals(obj); + } + com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOption other = + (com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOption) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOption parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOption parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOption parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOption parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOption parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOption parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOption parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOption parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOption parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOption parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOption parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOption parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOption prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * CloudLoggingOption contains additional settings for cloud logging generated
+     * by Batch job.
+     * 
+ * + * Protobuf type {@code google.cloud.batch.v1.LogsPolicy.CloudLoggingOption} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.batch.v1.LogsPolicy.CloudLoggingOption) + com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOptionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.batch.v1.JobProto + .internal_static_google_cloud_batch_v1_LogsPolicy_CloudLoggingOption_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.batch.v1.JobProto + .internal_static_google_cloud_batch_v1_LogsPolicy_CloudLoggingOption_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOption.class, + com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOption.Builder.class); + } + + // Construct using com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOption.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.batch.v1.JobProto + .internal_static_google_cloud_batch_v1_LogsPolicy_CloudLoggingOption_descriptor; + } + + @java.lang.Override + public com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOption getDefaultInstanceForType() { + return com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOption.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOption build() { + com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOption result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOption buildPartial() { + com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOption result = + new com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOption(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOption) { + return mergeFrom((com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOption) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOption other) { + if (other == com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOption.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.batch.v1.LogsPolicy.CloudLoggingOption) + } + + // @@protoc_insertion_point(class_scope:google.cloud.batch.v1.LogsPolicy.CloudLoggingOption) + private static final com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOption DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOption(); + } + + public static com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOption getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CloudLoggingOption parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOption getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + public static final int DESTINATION_FIELD_NUMBER = 1; private int destination_ = 0; /** @@ -311,6 +736,66 @@ public com.google.protobuf.ByteString getLogsPathBytes() { } } + public static final int CLOUD_LOGGING_OPTION_FIELD_NUMBER = 3; + private com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOption cloudLoggingOption_; + /** + * + * + *
+   * Optional. Additional settings for Cloud Logging. It will only take effect
+   * when the destination of LogsPolicy is set to CLOUD_LOGGING.
+   * 
+ * + * + * .google.cloud.batch.v1.LogsPolicy.CloudLoggingOption cloud_logging_option = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the cloudLoggingOption field is set. + */ + @java.lang.Override + public boolean hasCloudLoggingOption() { + return cloudLoggingOption_ != null; + } + /** + * + * + *
+   * Optional. Additional settings for Cloud Logging. It will only take effect
+   * when the destination of LogsPolicy is set to CLOUD_LOGGING.
+   * 
+ * + * + * .google.cloud.batch.v1.LogsPolicy.CloudLoggingOption cloud_logging_option = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The cloudLoggingOption. + */ + @java.lang.Override + public com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOption getCloudLoggingOption() { + return cloudLoggingOption_ == null + ? com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOption.getDefaultInstance() + : cloudLoggingOption_; + } + /** + * + * + *
+   * Optional. Additional settings for Cloud Logging. It will only take effect
+   * when the destination of LogsPolicy is set to CLOUD_LOGGING.
+   * 
+ * + * + * .google.cloud.batch.v1.LogsPolicy.CloudLoggingOption cloud_logging_option = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOptionOrBuilder + getCloudLoggingOptionOrBuilder() { + return cloudLoggingOption_ == null + ? com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOption.getDefaultInstance() + : cloudLoggingOption_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -332,6 +817,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(logsPath_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, logsPath_); } + if (cloudLoggingOption_ != null) { + output.writeMessage(3, getCloudLoggingOption()); + } getUnknownFields().writeTo(output); } @@ -348,6 +836,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(logsPath_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, logsPath_); } + if (cloudLoggingOption_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCloudLoggingOption()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -365,6 +856,10 @@ public boolean equals(final java.lang.Object obj) { if (destination_ != other.destination_) return false; if (!getLogsPath().equals(other.getLogsPath())) return false; + if (hasCloudLoggingOption() != other.hasCloudLoggingOption()) return false; + if (hasCloudLoggingOption()) { + if (!getCloudLoggingOption().equals(other.getCloudLoggingOption())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -380,6 +875,10 @@ public int hashCode() { hash = (53 * hash) + destination_; hash = (37 * hash) + LOGS_PATH_FIELD_NUMBER; hash = (53 * hash) + getLogsPath().hashCode(); + if (hasCloudLoggingOption()) { + hash = (37 * hash) + CLOUD_LOGGING_OPTION_FIELD_NUMBER; + hash = (53 * hash) + getCloudLoggingOption().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -521,6 +1020,11 @@ public Builder clear() { bitField0_ = 0; destination_ = 0; logsPath_ = ""; + cloudLoggingOption_ = null; + if (cloudLoggingOptionBuilder_ != null) { + cloudLoggingOptionBuilder_.dispose(); + cloudLoggingOptionBuilder_ = null; + } return this; } @@ -562,6 +1066,12 @@ private void buildPartial0(com.google.cloud.batch.v1.LogsPolicy result) { if (((from_bitField0_ & 0x00000002) != 0)) { result.logsPath_ = logsPath_; } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.cloudLoggingOption_ = + cloudLoggingOptionBuilder_ == null + ? cloudLoggingOption_ + : cloudLoggingOptionBuilder_.build(); + } } @java.lang.Override @@ -617,6 +1127,9 @@ public Builder mergeFrom(com.google.cloud.batch.v1.LogsPolicy other) { bitField0_ |= 0x00000002; onChanged(); } + if (other.hasCloudLoggingOption()) { + mergeCloudLoggingOption(other.getCloudLoggingOption()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -655,6 +1168,13 @@ public Builder mergeFrom( bitField0_ |= 0x00000002; break; } // case 18 + case 26: + { + input.readMessage( + getCloudLoggingOptionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -882,6 +1402,222 @@ public Builder setLogsPathBytes(com.google.protobuf.ByteString value) { return this; } + private com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOption cloudLoggingOption_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOption, + com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOption.Builder, + com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOptionOrBuilder> + cloudLoggingOptionBuilder_; + /** + * + * + *
+     * Optional. Additional settings for Cloud Logging. It will only take effect
+     * when the destination of LogsPolicy is set to CLOUD_LOGGING.
+     * 
+ * + * + * .google.cloud.batch.v1.LogsPolicy.CloudLoggingOption cloud_logging_option = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the cloudLoggingOption field is set. + */ + public boolean hasCloudLoggingOption() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Optional. Additional settings for Cloud Logging. It will only take effect
+     * when the destination of LogsPolicy is set to CLOUD_LOGGING.
+     * 
+ * + * + * .google.cloud.batch.v1.LogsPolicy.CloudLoggingOption cloud_logging_option = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The cloudLoggingOption. + */ + public com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOption getCloudLoggingOption() { + if (cloudLoggingOptionBuilder_ == null) { + return cloudLoggingOption_ == null + ? com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOption.getDefaultInstance() + : cloudLoggingOption_; + } else { + return cloudLoggingOptionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Additional settings for Cloud Logging. It will only take effect
+     * when the destination of LogsPolicy is set to CLOUD_LOGGING.
+     * 
+ * + * + * .google.cloud.batch.v1.LogsPolicy.CloudLoggingOption cloud_logging_option = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setCloudLoggingOption( + com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOption value) { + if (cloudLoggingOptionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cloudLoggingOption_ = value; + } else { + cloudLoggingOptionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Additional settings for Cloud Logging. It will only take effect
+     * when the destination of LogsPolicy is set to CLOUD_LOGGING.
+     * 
+ * + * + * .google.cloud.batch.v1.LogsPolicy.CloudLoggingOption cloud_logging_option = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setCloudLoggingOption( + com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOption.Builder builderForValue) { + if (cloudLoggingOptionBuilder_ == null) { + cloudLoggingOption_ = builderForValue.build(); + } else { + cloudLoggingOptionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Additional settings for Cloud Logging. It will only take effect
+     * when the destination of LogsPolicy is set to CLOUD_LOGGING.
+     * 
+ * + * + * .google.cloud.batch.v1.LogsPolicy.CloudLoggingOption cloud_logging_option = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeCloudLoggingOption( + com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOption value) { + if (cloudLoggingOptionBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && cloudLoggingOption_ != null + && cloudLoggingOption_ + != com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOption.getDefaultInstance()) { + getCloudLoggingOptionBuilder().mergeFrom(value); + } else { + cloudLoggingOption_ = value; + } + } else { + cloudLoggingOptionBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Additional settings for Cloud Logging. It will only take effect
+     * when the destination of LogsPolicy is set to CLOUD_LOGGING.
+     * 
+ * + * + * .google.cloud.batch.v1.LogsPolicy.CloudLoggingOption cloud_logging_option = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearCloudLoggingOption() { + bitField0_ = (bitField0_ & ~0x00000004); + cloudLoggingOption_ = null; + if (cloudLoggingOptionBuilder_ != null) { + cloudLoggingOptionBuilder_.dispose(); + cloudLoggingOptionBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Additional settings for Cloud Logging. It will only take effect
+     * when the destination of LogsPolicy is set to CLOUD_LOGGING.
+     * 
+ * + * + * .google.cloud.batch.v1.LogsPolicy.CloudLoggingOption cloud_logging_option = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOption.Builder + getCloudLoggingOptionBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getCloudLoggingOptionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Additional settings for Cloud Logging. It will only take effect
+     * when the destination of LogsPolicy is set to CLOUD_LOGGING.
+     * 
+ * + * + * .google.cloud.batch.v1.LogsPolicy.CloudLoggingOption cloud_logging_option = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOptionOrBuilder + getCloudLoggingOptionOrBuilder() { + if (cloudLoggingOptionBuilder_ != null) { + return cloudLoggingOptionBuilder_.getMessageOrBuilder(); + } else { + return cloudLoggingOption_ == null + ? com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOption.getDefaultInstance() + : cloudLoggingOption_; + } + } + /** + * + * + *
+     * Optional. Additional settings for Cloud Logging. It will only take effect
+     * when the destination of LogsPolicy is set to CLOUD_LOGGING.
+     * 
+ * + * + * .google.cloud.batch.v1.LogsPolicy.CloudLoggingOption cloud_logging_option = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOption, + com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOption.Builder, + com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOptionOrBuilder> + getCloudLoggingOptionFieldBuilder() { + if (cloudLoggingOptionBuilder_ == null) { + cloudLoggingOptionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOption, + com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOption.Builder, + com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOptionOrBuilder>( + getCloudLoggingOption(), getParentForChildren(), isClean()); + cloudLoggingOption_ = null; + } + return cloudLoggingOptionBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/LogsPolicyOrBuilder.java b/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/LogsPolicyOrBuilder.java index ce4b698d32b6..89aa84cd501e 100644 --- a/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/LogsPolicyOrBuilder.java +++ b/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/LogsPolicyOrBuilder.java @@ -76,4 +76,48 @@ public interface LogsPolicyOrBuilder * @return The bytes for logsPath. */ com.google.protobuf.ByteString getLogsPathBytes(); + + /** + * + * + *
+   * Optional. Additional settings for Cloud Logging. It will only take effect
+   * when the destination of LogsPolicy is set to CLOUD_LOGGING.
+   * 
+ * + * + * .google.cloud.batch.v1.LogsPolicy.CloudLoggingOption cloud_logging_option = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the cloudLoggingOption field is set. + */ + boolean hasCloudLoggingOption(); + /** + * + * + *
+   * Optional. Additional settings for Cloud Logging. It will only take effect
+   * when the destination of LogsPolicy is set to CLOUD_LOGGING.
+   * 
+ * + * + * .google.cloud.batch.v1.LogsPolicy.CloudLoggingOption cloud_logging_option = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The cloudLoggingOption. + */ + com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOption getCloudLoggingOption(); + /** + * + * + *
+   * Optional. Additional settings for Cloud Logging. It will only take effect
+   * when the destination of LogsPolicy is set to CLOUD_LOGGING.
+   * 
+ * + * + * .google.cloud.batch.v1.LogsPolicy.CloudLoggingOption cloud_logging_option = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.batch.v1.LogsPolicy.CloudLoggingOptionOrBuilder getCloudLoggingOptionOrBuilder(); } diff --git a/java-batch/proto-google-cloud-batch-v1/src/main/proto/google/cloud/batch/v1/job.proto b/java-batch/proto-google-cloud-batch-v1/src/main/proto/google/cloud/batch/v1/job.proto index 8c75f5b2d21e..01d0521114c5 100644 --- a/java-batch/proto-google-cloud-batch-v1/src/main/proto/google/cloud/batch/v1/job.proto +++ b/java-batch/proto-google-cloud-batch-v1/src/main/proto/google/cloud/batch/v1/job.proto @@ -91,6 +91,10 @@ message Job { // LogsPolicy describes how outputs from a Job's Tasks (stdout/stderr) will be // preserved. message LogsPolicy { + // CloudLoggingOption contains additional settings for cloud logging generated + // by Batch job. + message CloudLoggingOption {} + // The destination (if any) for logs. enum Destination { // Logs are not preserved. @@ -110,6 +114,11 @@ message LogsPolicy { // local file path on the VM, or under the mount point of a Persistent Disk or // Filestore, or a Cloud Storage path. string logs_path = 2; + + // Optional. Additional settings for Cloud Logging. It will only take effect + // when the destination of LogsPolicy is set to CLOUD_LOGGING. + CloudLoggingOption cloud_logging_option = 3 + [(google.api.field_behavior) = OPTIONAL]; } // Job status. @@ -507,6 +516,10 @@ message AllocationPolicy { map labels = 6; // The network policy. + // + // If you define an instance template in the InstancePolicyOrTemplate field, + // Batch will use the network settings in the instance template instead of + // this field. NetworkPolicy network = 7; // The placement policy. diff --git a/java-batch/proto-google-cloud-batch-v1alpha/src/main/java/com/google/cloud/batch/v1alpha/AllocationPolicy.java b/java-batch/proto-google-cloud-batch-v1alpha/src/main/java/com/google/cloud/batch/v1alpha/AllocationPolicy.java index 53cf9f27d154..53e426424e05 100644 --- a/java-batch/proto-google-cloud-batch-v1alpha/src/main/java/com/google/cloud/batch/v1alpha/AllocationPolicy.java +++ b/java-batch/proto-google-cloud-batch-v1alpha/src/main/java/com/google/cloud/batch/v1alpha/AllocationPolicy.java @@ -14224,6 +14224,10 @@ public java.lang.String getLabelsOrThrow(java.lang.String key) { * *
    * The network policy.
+   *
+   * If you define an instance template in the InstancePolicyOrTemplate field,
+   * Batch will use the network settings in the instance template instead of
+   * this field.
    * 
* * .google.cloud.batch.v1alpha.AllocationPolicy.NetworkPolicy network = 7; @@ -14239,6 +14243,10 @@ public boolean hasNetwork() { * *
    * The network policy.
+   *
+   * If you define an instance template in the InstancePolicyOrTemplate field,
+   * Batch will use the network settings in the instance template instead of
+   * this field.
    * 
* * .google.cloud.batch.v1alpha.AllocationPolicy.NetworkPolicy network = 7; @@ -14256,6 +14264,10 @@ public com.google.cloud.batch.v1alpha.AllocationPolicy.NetworkPolicy getNetwork( * *
    * The network policy.
+   *
+   * If you define an instance template in the InstancePolicyOrTemplate field,
+   * Batch will use the network settings in the instance template instead of
+   * this field.
    * 
* * .google.cloud.batch.v1alpha.AllocationPolicy.NetworkPolicy network = 7; @@ -16900,6 +16912,10 @@ public Builder putAllLabels(java.util.Map va * *
      * The network policy.
+     *
+     * If you define an instance template in the InstancePolicyOrTemplate field,
+     * Batch will use the network settings in the instance template instead of
+     * this field.
      * 
* * .google.cloud.batch.v1alpha.AllocationPolicy.NetworkPolicy network = 7; @@ -16914,6 +16930,10 @@ public boolean hasNetwork() { * *
      * The network policy.
+     *
+     * If you define an instance template in the InstancePolicyOrTemplate field,
+     * Batch will use the network settings in the instance template instead of
+     * this field.
      * 
* * .google.cloud.batch.v1alpha.AllocationPolicy.NetworkPolicy network = 7; @@ -16934,6 +16954,10 @@ public com.google.cloud.batch.v1alpha.AllocationPolicy.NetworkPolicy getNetwork( * *
      * The network policy.
+     *
+     * If you define an instance template in the InstancePolicyOrTemplate field,
+     * Batch will use the network settings in the instance template instead of
+     * this field.
      * 
* * .google.cloud.batch.v1alpha.AllocationPolicy.NetworkPolicy network = 7; @@ -16956,6 +16980,10 @@ public Builder setNetwork(com.google.cloud.batch.v1alpha.AllocationPolicy.Networ * *
      * The network policy.
+     *
+     * If you define an instance template in the InstancePolicyOrTemplate field,
+     * Batch will use the network settings in the instance template instead of
+     * this field.
      * 
* * .google.cloud.batch.v1alpha.AllocationPolicy.NetworkPolicy network = 7; @@ -16976,6 +17004,10 @@ public Builder setNetwork( * *
      * The network policy.
+     *
+     * If you define an instance template in the InstancePolicyOrTemplate field,
+     * Batch will use the network settings in the instance template instead of
+     * this field.
      * 
* * .google.cloud.batch.v1alpha.AllocationPolicy.NetworkPolicy network = 7; @@ -17004,6 +17036,10 @@ public Builder mergeNetwork( * *
      * The network policy.
+     *
+     * If you define an instance template in the InstancePolicyOrTemplate field,
+     * Batch will use the network settings in the instance template instead of
+     * this field.
      * 
* * .google.cloud.batch.v1alpha.AllocationPolicy.NetworkPolicy network = 7; @@ -17023,6 +17059,10 @@ public Builder clearNetwork() { * *
      * The network policy.
+     *
+     * If you define an instance template in the InstancePolicyOrTemplate field,
+     * Batch will use the network settings in the instance template instead of
+     * this field.
      * 
* * .google.cloud.batch.v1alpha.AllocationPolicy.NetworkPolicy network = 7; @@ -17038,6 +17078,10 @@ public Builder clearNetwork() { * *
      * The network policy.
+     *
+     * If you define an instance template in the InstancePolicyOrTemplate field,
+     * Batch will use the network settings in the instance template instead of
+     * this field.
      * 
* * .google.cloud.batch.v1alpha.AllocationPolicy.NetworkPolicy network = 7; @@ -17057,6 +17101,10 @@ public Builder clearNetwork() { * *
      * The network policy.
+     *
+     * If you define an instance template in the InstancePolicyOrTemplate field,
+     * Batch will use the network settings in the instance template instead of
+     * this field.
      * 
* * .google.cloud.batch.v1alpha.AllocationPolicy.NetworkPolicy network = 7; diff --git a/java-batch/proto-google-cloud-batch-v1alpha/src/main/java/com/google/cloud/batch/v1alpha/AllocationPolicyOrBuilder.java b/java-batch/proto-google-cloud-batch-v1alpha/src/main/java/com/google/cloud/batch/v1alpha/AllocationPolicyOrBuilder.java index 2e2650f3f2c9..332d809a6610 100644 --- a/java-batch/proto-google-cloud-batch-v1alpha/src/main/java/com/google/cloud/batch/v1alpha/AllocationPolicyOrBuilder.java +++ b/java-batch/proto-google-cloud-batch-v1alpha/src/main/java/com/google/cloud/batch/v1alpha/AllocationPolicyOrBuilder.java @@ -489,6 +489,10 @@ java.lang.String getLabelsOrDefault( * *
    * The network policy.
+   *
+   * If you define an instance template in the InstancePolicyOrTemplate field,
+   * Batch will use the network settings in the instance template instead of
+   * this field.
    * 
* * .google.cloud.batch.v1alpha.AllocationPolicy.NetworkPolicy network = 7; @@ -501,6 +505,10 @@ java.lang.String getLabelsOrDefault( * *
    * The network policy.
+   *
+   * If you define an instance template in the InstancePolicyOrTemplate field,
+   * Batch will use the network settings in the instance template instead of
+   * this field.
    * 
* * .google.cloud.batch.v1alpha.AllocationPolicy.NetworkPolicy network = 7; @@ -513,6 +521,10 @@ java.lang.String getLabelsOrDefault( * *
    * The network policy.
+   *
+   * If you define an instance template in the InstancePolicyOrTemplate field,
+   * Batch will use the network settings in the instance template instead of
+   * this field.
    * 
* * .google.cloud.batch.v1alpha.AllocationPolicy.NetworkPolicy network = 7; diff --git a/java-batch/proto-google-cloud-batch-v1alpha/src/main/java/com/google/cloud/batch/v1alpha/JobProto.java b/java-batch/proto-google-cloud-batch-v1alpha/src/main/java/com/google/cloud/batch/v1alpha/JobProto.java index 09c1d0772ce4..1d716f482129 100644 --- a/java-batch/proto-google-cloud-batch-v1alpha/src/main/java/com/google/cloud/batch/v1alpha/JobProto.java +++ b/java-batch/proto-google-cloud-batch-v1alpha/src/main/java/com/google/cloud/batch/v1alpha/JobProto.java @@ -284,7 +284,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ance\030\002 \001(\003\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r" + "\n\005value\030\002 \001(\t:\0028\001\"`\n\021ProvisioningModel\022\"" + "\n\036PROVISIONING_MODEL_UNSPECIFIED\020\000\022\014\n\010ST" - + "ANDARD\020\001\022\010\n\004SPOT\020\002\022\017\n\013PREEMPTIBLE\020\003\"\371\005\n\t" + + "ANDARD\020\001\022\010\n\004SPOT\020\002\022\017\n\013PREEMPTIBLE\020\003\"\227\006\n\t" + "TaskGroup\022\022\n\004name\030\001 \001(\tB\004\342A\001\003\022=\n\ttask_sp" + "ec\030\003 \001(\0132$.google.cloud.batch.v1alpha.Ta" + "skSpecB\004\342A\001\002\022\022\n\ntask_count\030\004 \001(\003\022\023\n\013para" @@ -297,20 +297,21 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "task_environments\030\t \003(\0132\'.google.cloud.b" + "atch.v1alpha.Environment\022\033\n\023task_count_p" + "er_node\030\n \001(\003\022\032\n\022require_hosts_file\030\013 \001(" - + "\010\022\026\n\016permissive_ssh\030\014 \001(\010\032-\n\013LabelsEntry" - + "\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\\\n\020Sche" - + "dulingPolicy\022!\n\035SCHEDULING_POLICY_UNSPEC" - + "IFIED\020\000\022\027\n\023AS_SOON_AS_POSSIBLE\020\001\022\014\n\010IN_O" - + "RDER\020\002:o\352Al\n\036batch.googleapis.com/TaskGr" - + "oup\022Jprojects/{project}/locations/{locat" - + "ion}/jobs/{job}/taskGroups/{task_group}\"" - + "/\n\016ServiceAccount\022\r\n\005email\030\001 \001(\t\022\016\n\006scop" - + "es\030\002 \003(\tB\302\001\n\036com.google.cloud.batch.v1al" - + "phaB\010JobProtoP\001Z4cloud.google.com/go/bat" - + "ch/apiv1alpha/batchpb;batchpb\242\002\003GCB\252\002\032Go" - + "ogle.Cloud.Batch.V1Alpha\312\002\032Google\\Cloud\\" - + "Batch\\V1alpha\352\002\035Google::Cloud::Batch::V1" - + "alphab\006proto3" + + "\010\022\026\n\016permissive_ssh\030\014 \001(\010\022\034\n\016enable_oslo" + + "gin\030\r \001(\010B\004\342A\001\001\032-\n\013LabelsEntry\022\013\n\003key\030\001 " + + "\001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\\\n\020SchedulingPoli" + + "cy\022!\n\035SCHEDULING_POLICY_UNSPECIFIED\020\000\022\027\n" + + "\023AS_SOON_AS_POSSIBLE\020\001\022\014\n\010IN_ORDER\020\002:o\352A" + + "l\n\036batch.googleapis.com/TaskGroup\022Jproje" + + "cts/{project}/locations/{location}/jobs/" + + "{job}/taskGroups/{task_group}\"/\n\016Service" + + "Account\022\r\n\005email\030\001 \001(\t\022\016\n\006scopes\030\002 \003(\tB\302" + + "\001\n\036com.google.cloud.batch.v1alphaB\010JobPr" + + "otoP\001Z4cloud.google.com/go/batch/apiv1al" + + "pha/batchpb;batchpb\242\002\003GCB\252\002\032Google.Cloud" + + ".Batch.V1Alpha\312\002\032Google\\Cloud\\Batch\\V1al" + + "pha\352\002\035Google::Cloud::Batch::V1alphab\006pro" + + "to3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -592,6 +593,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "TaskCountPerNode", "RequireHostsFile", "PermissiveSsh", + "EnableOslogin", }); internal_static_google_cloud_batch_v1alpha_TaskGroup_LabelsEntry_descriptor = internal_static_google_cloud_batch_v1alpha_TaskGroup_descriptor.getNestedTypes().get(0); diff --git a/java-batch/proto-google-cloud-batch-v1alpha/src/main/java/com/google/cloud/batch/v1alpha/TaskGroup.java b/java-batch/proto-google-cloud-batch-v1alpha/src/main/java/com/google/cloud/batch/v1alpha/TaskGroup.java index fe6188d5a3b3..94d10a6ced06 100644 --- a/java-batch/proto-google-cloud-batch-v1alpha/src/main/java/com/google/cloud/batch/v1alpha/TaskGroup.java +++ b/java-batch/proto-google-cloud-batch-v1alpha/src/main/java/com/google/cloud/batch/v1alpha/TaskGroup.java @@ -778,6 +778,32 @@ public boolean getPermissiveSsh() { return permissiveSsh_; } + public static final int ENABLE_OSLOGIN_FIELD_NUMBER = 13; + private boolean enableOslogin_ = false; + /** + * + * + *
+   * Optional. When true, Batch will use the OS Login generated POSIX account to
+   * exeucute the runnables instead of the default root user.
+   *
+   * To control root or non-root privilege for runnable execution, the project \
+   * Admin user needs to configure IAM roles according to
+   * https://cloud.google.com/compute/docs/oslogin/set-up-oslogin#configure_users.
+   * Specifically, if a root execution is needed, the roles/compute.osAdminLogin
+   * should be granted to the Batch job submitter. Otherwise,
+   * roles/compute.osLogin should be granted to the Batch job submitter.
+   * 
+ * + * bool enable_oslogin = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enableOslogin. + */ + @java.lang.Override + public boolean getEnableOslogin() { + return enableOslogin_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -826,6 +852,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (permissiveSsh_ != false) { output.writeBool(12, permissiveSsh_); } + if (enableOslogin_ != false) { + output.writeBool(13, enableOslogin_); + } getUnknownFields().writeTo(output); } @@ -877,6 +906,9 @@ public int getSerializedSize() { if (permissiveSsh_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(12, permissiveSsh_); } + if (enableOslogin_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(13, enableOslogin_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -909,6 +941,7 @@ public boolean equals(final java.lang.Object obj) { if (getTaskCountPerNode() != other.getTaskCountPerNode()) return false; if (getRequireHostsFile() != other.getRequireHostsFile()) return false; if (getPermissiveSsh() != other.getPermissiveSsh()) return false; + if (getEnableOslogin() != other.getEnableOslogin()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -950,6 +983,8 @@ public int hashCode() { hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRequireHostsFile()); hash = (37 * hash) + PERMISSIVE_SSH_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getPermissiveSsh()); + hash = (37 * hash) + ENABLE_OSLOGIN_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableOslogin()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -1134,6 +1169,7 @@ public Builder clear() { taskCountPerNode_ = 0L; requireHostsFile_ = false; permissiveSsh_ = false; + enableOslogin_ = false; return this; } @@ -1215,6 +1251,9 @@ private void buildPartial0(com.google.cloud.batch.v1alpha.TaskGroup result) { if (((from_bitField0_ & 0x00000400) != 0)) { result.permissiveSsh_ = permissiveSsh_; } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.enableOslogin_ = enableOslogin_; + } } @java.lang.Override @@ -1320,6 +1359,9 @@ public Builder mergeFrom(com.google.cloud.batch.v1alpha.TaskGroup other) { if (other.getPermissiveSsh() != false) { setPermissiveSsh(other.getPermissiveSsh()); } + if (other.getEnableOslogin() != false) { + setEnableOslogin(other.getEnableOslogin()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1426,6 +1468,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000400; break; } // case 96 + case 104: + { + enableOslogin_ = input.readBool(); + bitField0_ |= 0x00000800; + break; + } // case 104 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -3052,6 +3100,83 @@ public Builder clearPermissiveSsh() { return this; } + private boolean enableOslogin_; + /** + * + * + *
+     * Optional. When true, Batch will use the OS Login generated POSIX account to
+     * exeucute the runnables instead of the default root user.
+     *
+     * To control root or non-root privilege for runnable execution, the project \
+     * Admin user needs to configure IAM roles according to
+     * https://cloud.google.com/compute/docs/oslogin/set-up-oslogin#configure_users.
+     * Specifically, if a root execution is needed, the roles/compute.osAdminLogin
+     * should be granted to the Batch job submitter. Otherwise,
+     * roles/compute.osLogin should be granted to the Batch job submitter.
+     * 
+ * + * bool enable_oslogin = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enableOslogin. + */ + @java.lang.Override + public boolean getEnableOslogin() { + return enableOslogin_; + } + /** + * + * + *
+     * Optional. When true, Batch will use the OS Login generated POSIX account to
+     * exeucute the runnables instead of the default root user.
+     *
+     * To control root or non-root privilege for runnable execution, the project \
+     * Admin user needs to configure IAM roles according to
+     * https://cloud.google.com/compute/docs/oslogin/set-up-oslogin#configure_users.
+     * Specifically, if a root execution is needed, the roles/compute.osAdminLogin
+     * should be granted to the Batch job submitter. Otherwise,
+     * roles/compute.osLogin should be granted to the Batch job submitter.
+     * 
+ * + * bool enable_oslogin = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The enableOslogin to set. + * @return This builder for chaining. + */ + public Builder setEnableOslogin(boolean value) { + + enableOslogin_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. When true, Batch will use the OS Login generated POSIX account to
+     * exeucute the runnables instead of the default root user.
+     *
+     * To control root or non-root privilege for runnable execution, the project \
+     * Admin user needs to configure IAM roles according to
+     * https://cloud.google.com/compute/docs/oslogin/set-up-oslogin#configure_users.
+     * Specifically, if a root execution is needed, the roles/compute.osAdminLogin
+     * should be granted to the Batch job submitter. Otherwise,
+     * roles/compute.osLogin should be granted to the Batch job submitter.
+     * 
+ * + * bool enable_oslogin = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEnableOslogin() { + bitField0_ = (bitField0_ & ~0x00000800); + enableOslogin_ = false; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-batch/proto-google-cloud-batch-v1alpha/src/main/java/com/google/cloud/batch/v1alpha/TaskGroupOrBuilder.java b/java-batch/proto-google-cloud-batch-v1alpha/src/main/java/com/google/cloud/batch/v1alpha/TaskGroupOrBuilder.java index 304f4073d797..579a0bc34de1 100644 --- a/java-batch/proto-google-cloud-batch-v1alpha/src/main/java/com/google/cloud/batch/v1alpha/TaskGroupOrBuilder.java +++ b/java-batch/proto-google-cloud-batch-v1alpha/src/main/java/com/google/cloud/batch/v1alpha/TaskGroupOrBuilder.java @@ -408,4 +408,25 @@ java.lang.String getLabelsOrDefault( * @return The permissiveSsh. */ boolean getPermissiveSsh(); + + /** + * + * + *
+   * Optional. When true, Batch will use the OS Login generated POSIX account to
+   * exeucute the runnables instead of the default root user.
+   *
+   * To control root or non-root privilege for runnable execution, the project \
+   * Admin user needs to configure IAM roles according to
+   * https://cloud.google.com/compute/docs/oslogin/set-up-oslogin#configure_users.
+   * Specifically, if a root execution is needed, the roles/compute.osAdminLogin
+   * should be granted to the Batch job submitter. Otherwise,
+   * roles/compute.osLogin should be granted to the Batch job submitter.
+   * 
+ * + * bool enable_oslogin = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enableOslogin. + */ + boolean getEnableOslogin(); } diff --git a/java-batch/proto-google-cloud-batch-v1alpha/src/main/proto/google/cloud/batch/v1alpha/job.proto b/java-batch/proto-google-cloud-batch-v1alpha/src/main/proto/google/cloud/batch/v1alpha/job.proto index 76ffdecaefc3..bad02721e8f0 100644 --- a/java-batch/proto-google-cloud-batch-v1alpha/src/main/proto/google/cloud/batch/v1alpha/job.proto +++ b/java-batch/proto-google-cloud-batch-v1alpha/src/main/proto/google/cloud/batch/v1alpha/job.proto @@ -600,6 +600,10 @@ message AllocationPolicy { map labels = 6; // The network policy. + // + // If you define an instance template in the InstancePolicyOrTemplate field, + // Batch will use the network settings in the instance template instead of + // this field. NetworkPolicy network = 7; // The placement policy. @@ -687,6 +691,17 @@ message TaskGroup { // When true, Batch will configure SSH to allow passwordless login between // VMs running the Batch tasks in the same TaskGroup. bool permissive_ssh = 12; + + // Optional. When true, Batch will use the OS Login generated POSIX account to + // exeucute the runnables instead of the default root user. + // + // To control root or non-root privilege for runnable execution, the project \ + // Admin user needs to configure IAM roles according to + // https://cloud.google.com/compute/docs/oslogin/set-up-oslogin#configure_users. + // Specifically, if a root execution is needed, the roles/compute.osAdminLogin + // should be granted to the Batch job submitter. Otherwise, + // roles/compute.osLogin should be granted to the Batch job submitter. + bool enable_oslogin = 13 [(google.api.field_behavior) = OPTIONAL]; } // Carries information about a Google Cloud service account.