Class TemplateParameter

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

    public final class TemplateParameter
    extends com.google.protobuf.GeneratedMessageV3
    implements TemplateParameterOrBuilder
     A configurable parameter that replaces one or more fields in the template.
     Parameterizable fields:
     - Labels
     - File uris
     - Job properties
     - Job arguments
     - Script variables
     - Main class (in HadoopJob and SparkJob)
     - Zone (in ClusterSelector)
     
    Protobuf type google.cloud.dataproc.v1.TemplateParameter
    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()
      • internalGetFieldAccessorTable

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

        public String getName()
         Required. Parameter name.
         The parameter name is used as the key, and paired with the
         parameter value, which are passed to the template when the template
         is instantiated.
         The name must contain only capital letters (A-Z), numbers (0-9), and
         underscores (_), and must not start with a number. The maximum length is
         40 characters.
         
        string name = 1 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getName in interface TemplateParameterOrBuilder
        Returns:
        The name.
      • getNameBytes

        public com.google.protobuf.ByteString getNameBytes()
         Required. Parameter name.
         The parameter name is used as the key, and paired with the
         parameter value, which are passed to the template when the template
         is instantiated.
         The name must contain only capital letters (A-Z), numbers (0-9), and
         underscores (_), and must not start with a number. The maximum length is
         40 characters.
         
        string name = 1 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getNameBytes in interface TemplateParameterOrBuilder
        Returns:
        The bytes for name.
      • getFieldsList

        public com.google.protobuf.ProtocolStringList getFieldsList()
         Required. Paths to all fields that the parameter replaces.
         A field is allowed to appear in at most one parameter's list of field
         paths.
        
         A field path is similar in syntax to a
         [google.protobuf.FieldMask][google.protobuf.FieldMask]. For example, a
         field path that references the zone field of a workflow template's cluster
         selector would be specified as `placement.clusterSelector.zone`.
        
         Also, field paths can reference fields using the following syntax:
        
         * Values in maps can be referenced by key:
             * labels['key']
             * placement.clusterSelector.clusterLabels['key']
             * placement.managedCluster.labels['key']
             * placement.clusterSelector.clusterLabels['key']
             * jobs['step-id'].labels['key']
        
         * Jobs in the jobs list can be referenced by step-id:
             * jobs['step-id'].hadoopJob.mainJarFileUri
             * jobs['step-id'].hiveJob.queryFileUri
             * jobs['step-id'].pySparkJob.mainPythonFileUri
             * jobs['step-id'].hadoopJob.jarFileUris[0]
             * jobs['step-id'].hadoopJob.archiveUris[0]
             * jobs['step-id'].hadoopJob.fileUris[0]
             * jobs['step-id'].pySparkJob.pythonFileUris[0]
        
         * Items in repeated fields can be referenced by a zero-based index:
             * jobs['step-id'].sparkJob.args[0]
        
         * Other examples:
             * jobs['step-id'].hadoopJob.properties['key']
             * jobs['step-id'].hadoopJob.args[0]
             * jobs['step-id'].hiveJob.scriptVariables['key']
             * jobs['step-id'].hadoopJob.mainJarFileUri
             * placement.clusterSelector.zone
        
         It may not be possible to parameterize maps and repeated fields in their
         entirety since only individual map values and individual items in repeated
         fields can be referenced. For example, the following field paths are
         invalid:
        
         - placement.clusterSelector.clusterLabels
         - jobs['step-id'].sparkJob.args
         
        repeated string fields = 2 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getFieldsList in interface TemplateParameterOrBuilder
        Returns:
        A list containing the fields.
      • getFieldsCount

        public int getFieldsCount()
         Required. Paths to all fields that the parameter replaces.
         A field is allowed to appear in at most one parameter's list of field
         paths.
        
         A field path is similar in syntax to a
         [google.protobuf.FieldMask][google.protobuf.FieldMask]. For example, a
         field path that references the zone field of a workflow template's cluster
         selector would be specified as `placement.clusterSelector.zone`.
        
         Also, field paths can reference fields using the following syntax:
        
         * Values in maps can be referenced by key:
             * labels['key']
             * placement.clusterSelector.clusterLabels['key']
             * placement.managedCluster.labels['key']
             * placement.clusterSelector.clusterLabels['key']
             * jobs['step-id'].labels['key']
        
         * Jobs in the jobs list can be referenced by step-id:
             * jobs['step-id'].hadoopJob.mainJarFileUri
             * jobs['step-id'].hiveJob.queryFileUri
             * jobs['step-id'].pySparkJob.mainPythonFileUri
             * jobs['step-id'].hadoopJob.jarFileUris[0]
             * jobs['step-id'].hadoopJob.archiveUris[0]
             * jobs['step-id'].hadoopJob.fileUris[0]
             * jobs['step-id'].pySparkJob.pythonFileUris[0]
        
         * Items in repeated fields can be referenced by a zero-based index:
             * jobs['step-id'].sparkJob.args[0]
        
         * Other examples:
             * jobs['step-id'].hadoopJob.properties['key']
             * jobs['step-id'].hadoopJob.args[0]
             * jobs['step-id'].hiveJob.scriptVariables['key']
             * jobs['step-id'].hadoopJob.mainJarFileUri
             * placement.clusterSelector.zone
        
         It may not be possible to parameterize maps and repeated fields in their
         entirety since only individual map values and individual items in repeated
         fields can be referenced. For example, the following field paths are
         invalid:
        
         - placement.clusterSelector.clusterLabels
         - jobs['step-id'].sparkJob.args
         
        repeated string fields = 2 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getFieldsCount in interface TemplateParameterOrBuilder
        Returns:
        The count of fields.
      • getFields

        public String getFields​(int index)
         Required. Paths to all fields that the parameter replaces.
         A field is allowed to appear in at most one parameter's list of field
         paths.
        
         A field path is similar in syntax to a
         [google.protobuf.FieldMask][google.protobuf.FieldMask]. For example, a
         field path that references the zone field of a workflow template's cluster
         selector would be specified as `placement.clusterSelector.zone`.
        
         Also, field paths can reference fields using the following syntax:
        
         * Values in maps can be referenced by key:
             * labels['key']
             * placement.clusterSelector.clusterLabels['key']
             * placement.managedCluster.labels['key']
             * placement.clusterSelector.clusterLabels['key']
             * jobs['step-id'].labels['key']
        
         * Jobs in the jobs list can be referenced by step-id:
             * jobs['step-id'].hadoopJob.mainJarFileUri
             * jobs['step-id'].hiveJob.queryFileUri
             * jobs['step-id'].pySparkJob.mainPythonFileUri
             * jobs['step-id'].hadoopJob.jarFileUris[0]
             * jobs['step-id'].hadoopJob.archiveUris[0]
             * jobs['step-id'].hadoopJob.fileUris[0]
             * jobs['step-id'].pySparkJob.pythonFileUris[0]
        
         * Items in repeated fields can be referenced by a zero-based index:
             * jobs['step-id'].sparkJob.args[0]
        
         * Other examples:
             * jobs['step-id'].hadoopJob.properties['key']
             * jobs['step-id'].hadoopJob.args[0]
             * jobs['step-id'].hiveJob.scriptVariables['key']
             * jobs['step-id'].hadoopJob.mainJarFileUri
             * placement.clusterSelector.zone
        
         It may not be possible to parameterize maps and repeated fields in their
         entirety since only individual map values and individual items in repeated
         fields can be referenced. For example, the following field paths are
         invalid:
        
         - placement.clusterSelector.clusterLabels
         - jobs['step-id'].sparkJob.args
         
        repeated string fields = 2 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getFields in interface TemplateParameterOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The fields at the given index.
      • getFieldsBytes

        public com.google.protobuf.ByteString getFieldsBytes​(int index)
         Required. Paths to all fields that the parameter replaces.
         A field is allowed to appear in at most one parameter's list of field
         paths.
        
         A field path is similar in syntax to a
         [google.protobuf.FieldMask][google.protobuf.FieldMask]. For example, a
         field path that references the zone field of a workflow template's cluster
         selector would be specified as `placement.clusterSelector.zone`.
        
         Also, field paths can reference fields using the following syntax:
        
         * Values in maps can be referenced by key:
             * labels['key']
             * placement.clusterSelector.clusterLabels['key']
             * placement.managedCluster.labels['key']
             * placement.clusterSelector.clusterLabels['key']
             * jobs['step-id'].labels['key']
        
         * Jobs in the jobs list can be referenced by step-id:
             * jobs['step-id'].hadoopJob.mainJarFileUri
             * jobs['step-id'].hiveJob.queryFileUri
             * jobs['step-id'].pySparkJob.mainPythonFileUri
             * jobs['step-id'].hadoopJob.jarFileUris[0]
             * jobs['step-id'].hadoopJob.archiveUris[0]
             * jobs['step-id'].hadoopJob.fileUris[0]
             * jobs['step-id'].pySparkJob.pythonFileUris[0]
        
         * Items in repeated fields can be referenced by a zero-based index:
             * jobs['step-id'].sparkJob.args[0]
        
         * Other examples:
             * jobs['step-id'].hadoopJob.properties['key']
             * jobs['step-id'].hadoopJob.args[0]
             * jobs['step-id'].hiveJob.scriptVariables['key']
             * jobs['step-id'].hadoopJob.mainJarFileUri
             * placement.clusterSelector.zone
        
         It may not be possible to parameterize maps and repeated fields in their
         entirety since only individual map values and individual items in repeated
         fields can be referenced. For example, the following field paths are
         invalid:
        
         - placement.clusterSelector.clusterLabels
         - jobs['step-id'].sparkJob.args
         
        repeated string fields = 2 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getFieldsBytes in interface TemplateParameterOrBuilder
        Parameters:
        index - The index of the value to return.
        Returns:
        The bytes of the fields at the given index.
      • getDescription

        public String getDescription()
         Optional. Brief description of the parameter.
         Must not exceed 1024 characters.
         
        string description = 3 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getDescription in interface TemplateParameterOrBuilder
        Returns:
        The description.
      • getDescriptionBytes

        public com.google.protobuf.ByteString getDescriptionBytes()
         Optional. Brief description of the parameter.
         Must not exceed 1024 characters.
         
        string description = 3 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getDescriptionBytes in interface TemplateParameterOrBuilder
        Returns:
        The bytes for description.
      • hasValidation

        public boolean hasValidation()
         Optional. Validation rules to be applied to this parameter's value.
         
        .google.cloud.dataproc.v1.ParameterValidation validation = 4 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        hasValidation in interface TemplateParameterOrBuilder
        Returns:
        Whether the validation field is set.
      • getValidation

        public ParameterValidation getValidation()
         Optional. Validation rules to be applied to this parameter's value.
         
        .google.cloud.dataproc.v1.ParameterValidation validation = 4 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getValidation in interface TemplateParameterOrBuilder
        Returns:
        The validation.
      • 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 TemplateParameter parseFrom​(ByteBuffer data)
                                           throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

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

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

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

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

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

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

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

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

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

        public com.google.protobuf.Parser<TemplateParameter> 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 TemplateParameter getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder