Class Job

  • All Implemented Interfaces:
    JobOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

    public final class Job
    extends com.google.protobuf.GeneratedMessageV3
    implements JobOrBuilder
     The Cloud Batch Job description.
     
    Protobuf type google.cloud.batch.v1alpha.Job
    See Also:
    Serialized Form
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetMapField

        protected com.google.protobuf.MapField internalGetMapField​(int number)
        Overrides:
        internalGetMapField in class com.google.protobuf.GeneratedMessageV3
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • getName

        public String getName()
         Output only. Job name.
         For example: "projects/123456/locations/us-central1/jobs/job01".
         
        string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getName in interface JobOrBuilder
        Returns:
        The name.
      • getNameBytes

        public com.google.protobuf.ByteString getNameBytes()
         Output only. Job name.
         For example: "projects/123456/locations/us-central1/jobs/job01".
         
        string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getNameBytes in interface JobOrBuilder
        Returns:
        The bytes for name.
      • getUid

        public String getUid()
         Output only. A system generated unique ID (in UUID4 format) for the Job.
         
        string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getUid in interface JobOrBuilder
        Returns:
        The uid.
      • getUidBytes

        public com.google.protobuf.ByteString getUidBytes()
         Output only. A system generated unique ID (in UUID4 format) for the Job.
         
        string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getUidBytes in interface JobOrBuilder
        Returns:
        The bytes for uid.
      • getPriority

        public long getPriority()
         Priority of the Job.
         The valid value range is [0, 100). Default value is 0.
         Higher value indicates higher priority.
         A job with higher priority value is more likely to run earlier if all other
         requirements are satisfied.
         
        int64 priority = 3;
        Specified by:
        getPriority in interface JobOrBuilder
        Returns:
        The priority.
      • getTaskGroupsList

        public List<TaskGroup> getTaskGroupsList()
         Required. TaskGroups in the Job. Only one TaskGroup is supported now.
         
        repeated .google.cloud.batch.v1alpha.TaskGroup task_groups = 4 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getTaskGroupsList in interface JobOrBuilder
      • getTaskGroupsOrBuilderList

        public List<? extends TaskGroupOrBuilder> getTaskGroupsOrBuilderList()
         Required. TaskGroups in the Job. Only one TaskGroup is supported now.
         
        repeated .google.cloud.batch.v1alpha.TaskGroup task_groups = 4 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getTaskGroupsOrBuilderList in interface JobOrBuilder
      • getTaskGroupsCount

        public int getTaskGroupsCount()
         Required. TaskGroups in the Job. Only one TaskGroup is supported now.
         
        repeated .google.cloud.batch.v1alpha.TaskGroup task_groups = 4 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getTaskGroupsCount in interface JobOrBuilder
      • getTaskGroups

        public TaskGroup getTaskGroups​(int index)
         Required. TaskGroups in the Job. Only one TaskGroup is supported now.
         
        repeated .google.cloud.batch.v1alpha.TaskGroup task_groups = 4 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getTaskGroups in interface JobOrBuilder
      • getTaskGroupsOrBuilder

        public TaskGroupOrBuilder getTaskGroupsOrBuilder​(int index)
         Required. TaskGroups in the Job. Only one TaskGroup is supported now.
         
        repeated .google.cloud.batch.v1alpha.TaskGroup task_groups = 4 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getTaskGroupsOrBuilder in interface JobOrBuilder
      • getSchedulingPolicyValue

        public int getSchedulingPolicyValue()
         Scheduling policy for TaskGroups in the job.
         
        .google.cloud.batch.v1alpha.Job.SchedulingPolicy scheduling_policy = 5;
        Specified by:
        getSchedulingPolicyValue in interface JobOrBuilder
        Returns:
        The enum numeric value on the wire for schedulingPolicy.
      • getSchedulingPolicy

        public Job.SchedulingPolicy getSchedulingPolicy()
         Scheduling policy for TaskGroups in the job.
         
        .google.cloud.batch.v1alpha.Job.SchedulingPolicy scheduling_policy = 5;
        Specified by:
        getSchedulingPolicy in interface JobOrBuilder
        Returns:
        The schedulingPolicy.
      • getDependenciesList

        public List<JobDependency> getDependenciesList()
         At least one of the dependencies must be satisfied before the Job is
         scheduled to run.
         Only one JobDependency is supported now.
         Not yet implemented.
         
        repeated .google.cloud.batch.v1alpha.JobDependency dependencies = 6;
        Specified by:
        getDependenciesList in interface JobOrBuilder
      • getDependenciesOrBuilderList

        public List<? extends JobDependencyOrBuilder> getDependenciesOrBuilderList()
         At least one of the dependencies must be satisfied before the Job is
         scheduled to run.
         Only one JobDependency is supported now.
         Not yet implemented.
         
        repeated .google.cloud.batch.v1alpha.JobDependency dependencies = 6;
        Specified by:
        getDependenciesOrBuilderList in interface JobOrBuilder
      • getDependenciesCount

        public int getDependenciesCount()
         At least one of the dependencies must be satisfied before the Job is
         scheduled to run.
         Only one JobDependency is supported now.
         Not yet implemented.
         
        repeated .google.cloud.batch.v1alpha.JobDependency dependencies = 6;
        Specified by:
        getDependenciesCount in interface JobOrBuilder
      • getDependencies

        public JobDependency getDependencies​(int index)
         At least one of the dependencies must be satisfied before the Job is
         scheduled to run.
         Only one JobDependency is supported now.
         Not yet implemented.
         
        repeated .google.cloud.batch.v1alpha.JobDependency dependencies = 6;
        Specified by:
        getDependencies in interface JobOrBuilder
      • getDependenciesOrBuilder

        public JobDependencyOrBuilder getDependenciesOrBuilder​(int index)
         At least one of the dependencies must be satisfied before the Job is
         scheduled to run.
         Only one JobDependency is supported now.
         Not yet implemented.
         
        repeated .google.cloud.batch.v1alpha.JobDependency dependencies = 6;
        Specified by:
        getDependenciesOrBuilder in interface JobOrBuilder
      • hasAllocationPolicy

        public boolean hasAllocationPolicy()
         Compute resource allocation for all TaskGroups in the Job.
         
        .google.cloud.batch.v1alpha.AllocationPolicy allocation_policy = 7;
        Specified by:
        hasAllocationPolicy in interface JobOrBuilder
        Returns:
        Whether the allocationPolicy field is set.
      • getAllocationPolicy

        public AllocationPolicy getAllocationPolicy()
         Compute resource allocation for all TaskGroups in the Job.
         
        .google.cloud.batch.v1alpha.AllocationPolicy allocation_policy = 7;
        Specified by:
        getAllocationPolicy in interface JobOrBuilder
        Returns:
        The allocationPolicy.
      • getLabelsCount

        public int getLabelsCount()
        Description copied from interface: JobOrBuilder
         Labels for the Job. Labels could be user provided or system generated.
         For example,
         "labels": {
            "department": "finance",
            "environment": "test"
          }
         You can assign up to 64 labels.  [Google Compute Engine label
         restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions)
         apply.
         Label names that start with "goog-" or "google-" are reserved.
         
        map<string, string> labels = 8;
        Specified by:
        getLabelsCount in interface JobOrBuilder
      • containsLabels

        public boolean containsLabels​(String key)
         Labels for the Job. Labels could be user provided or system generated.
         For example,
         "labels": {
            "department": "finance",
            "environment": "test"
          }
         You can assign up to 64 labels.  [Google Compute Engine label
         restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions)
         apply.
         Label names that start with "goog-" or "google-" are reserved.
         
        map<string, string> labels = 8;
        Specified by:
        containsLabels in interface JobOrBuilder
      • getLabelsMap

        public Map<String,​String> getLabelsMap()
         Labels for the Job. Labels could be user provided or system generated.
         For example,
         "labels": {
            "department": "finance",
            "environment": "test"
          }
         You can assign up to 64 labels.  [Google Compute Engine label
         restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions)
         apply.
         Label names that start with "goog-" or "google-" are reserved.
         
        map<string, string> labels = 8;
        Specified by:
        getLabelsMap in interface JobOrBuilder
      • getLabelsOrDefault

        public String getLabelsOrDefault​(String key,
                                         String defaultValue)
         Labels for the Job. Labels could be user provided or system generated.
         For example,
         "labels": {
            "department": "finance",
            "environment": "test"
          }
         You can assign up to 64 labels.  [Google Compute Engine label
         restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions)
         apply.
         Label names that start with "goog-" or "google-" are reserved.
         
        map<string, string> labels = 8;
        Specified by:
        getLabelsOrDefault in interface JobOrBuilder
      • getLabelsOrThrow

        public String getLabelsOrThrow​(String key)
         Labels for the Job. Labels could be user provided or system generated.
         For example,
         "labels": {
            "department": "finance",
            "environment": "test"
          }
         You can assign up to 64 labels.  [Google Compute Engine label
         restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions)
         apply.
         Label names that start with "goog-" or "google-" are reserved.
         
        map<string, string> labels = 8;
        Specified by:
        getLabelsOrThrow in interface JobOrBuilder
      • hasStatus

        public boolean hasStatus()
         Output only. Job status. It is read only for users.
         
        .google.cloud.batch.v1alpha.JobStatus status = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        hasStatus in interface JobOrBuilder
        Returns:
        Whether the status field is set.
      • getStatus

        public JobStatus getStatus()
         Output only. Job status. It is read only for users.
         
        .google.cloud.batch.v1alpha.JobStatus status = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getStatus in interface JobOrBuilder
        Returns:
        The status.
      • getStatusOrBuilder

        public JobStatusOrBuilder getStatusOrBuilder()
         Output only. Job status. It is read only for users.
         
        .google.cloud.batch.v1alpha.JobStatus status = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getStatusOrBuilder in interface JobOrBuilder
      • hasNotification

        @Deprecated
        public boolean hasNotification()
        Deprecated.
        google.cloud.batch.v1alpha.Job.notification is deprecated. See google/cloud/batch/v1alpha/job.proto;l=96
         Deprecated: please use notifications instead.
         
        .google.cloud.batch.v1alpha.JobNotification notification = 10 [deprecated = true];
        Specified by:
        hasNotification in interface JobOrBuilder
        Returns:
        Whether the notification field is set.
      • getNotification

        @Deprecated
        public JobNotification getNotification()
        Deprecated.
        google.cloud.batch.v1alpha.Job.notification is deprecated. See google/cloud/batch/v1alpha/job.proto;l=96
         Deprecated: please use notifications instead.
         
        .google.cloud.batch.v1alpha.JobNotification notification = 10 [deprecated = true];
        Specified by:
        getNotification in interface JobOrBuilder
        Returns:
        The notification.
      • hasCreateTime

        public boolean hasCreateTime()
         Output only. When the Job was created.
         
        .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        hasCreateTime in interface JobOrBuilder
        Returns:
        Whether the createTime field is set.
      • getCreateTime

        public com.google.protobuf.Timestamp getCreateTime()
         Output only. When the Job was created.
         
        .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getCreateTime in interface JobOrBuilder
        Returns:
        The createTime.
      • getCreateTimeOrBuilder

        public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder()
         Output only. When the Job was created.
         
        .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getCreateTimeOrBuilder in interface JobOrBuilder
      • hasUpdateTime

        public boolean hasUpdateTime()
         Output only. The last time the Job was updated.
         
        .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        hasUpdateTime in interface JobOrBuilder
        Returns:
        Whether the updateTime field is set.
      • getUpdateTime

        public com.google.protobuf.Timestamp getUpdateTime()
         Output only. The last time the Job was updated.
         
        .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getUpdateTime in interface JobOrBuilder
        Returns:
        The updateTime.
      • getUpdateTimeOrBuilder

        public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder()
         Output only. The last time the Job was updated.
         
        .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getUpdateTimeOrBuilder in interface JobOrBuilder
      • hasLogsPolicy

        public boolean hasLogsPolicy()
         Log preservation policy for the Job.
         
        .google.cloud.batch.v1alpha.LogsPolicy logs_policy = 13;
        Specified by:
        hasLogsPolicy in interface JobOrBuilder
        Returns:
        Whether the logsPolicy field is set.
      • getLogsPolicy

        public LogsPolicy getLogsPolicy()
         Log preservation policy for the Job.
         
        .google.cloud.batch.v1alpha.LogsPolicy logs_policy = 13;
        Specified by:
        getLogsPolicy in interface JobOrBuilder
        Returns:
        The logsPolicy.
      • getNotificationsCount

        public int getNotificationsCount()
         Notification configurations.
         
        repeated .google.cloud.batch.v1alpha.JobNotification notifications = 14;
        Specified by:
        getNotificationsCount in interface JobOrBuilder
      • getNotifications

        public JobNotification getNotifications​(int index)
         Notification configurations.
         
        repeated .google.cloud.batch.v1alpha.JobNotification notifications = 14;
        Specified by:
        getNotifications in interface JobOrBuilder
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static Job parseFrom​(ByteBuffer data)
                             throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Job parseFrom​(ByteBuffer data,
                                    com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                             throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Job parseFrom​(com.google.protobuf.ByteString data)
                             throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Job parseFrom​(com.google.protobuf.ByteString data,
                                    com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                             throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Job parseFrom​(byte[] data)
                             throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Job parseFrom​(byte[] data,
                                    com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                             throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseDelimitedFrom

        public static Job parseDelimitedFrom​(InputStream input,
                                             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                      throws IOException
        Throws:
        IOException
      • parseFrom

        public static Job parseFrom​(com.google.protobuf.CodedInputStream input)
                             throws IOException
        Throws:
        IOException
      • parseFrom

        public static Job parseFrom​(com.google.protobuf.CodedInputStream input,
                                    com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                             throws IOException
        Throws:
        IOException
      • newBuilderForType

        public Job.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • newBuilder

        public static Job.Builder newBuilder​(Job prototype)
      • toBuilder

        public Job.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected Job.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstance

        public static Job getDefaultInstance()
      • parser

        public static com.google.protobuf.Parser<Job> parser()
      • getParserForType

        public com.google.protobuf.Parser<Job> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public Job getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder