Class RaySpec.Builder

  • All Implemented Interfaces:
    RaySpecOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    RaySpec

    public static final class RaySpec.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<RaySpec.Builder>
    implements RaySpecOrBuilder
     Configuration information for the Ray cluster.
     For experimental launch, Ray cluster creation and Persistent
     cluster creation are 1:1 mapping: We will provision all the nodes within the
     Persistent cluster as Ray nodes.
     
    Protobuf type google.cloud.aiplatform.v1beta1.RaySpec
    • Method Detail

      • 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.Builder<RaySpec.Builder>
      • internalGetMutableMapField

        protected com.google.protobuf.MapField internalGetMutableMapField​(int number)
        Overrides:
        internalGetMutableMapField in class com.google.protobuf.GeneratedMessageV3.Builder<RaySpec.Builder>
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<RaySpec.Builder>
      • clear

        public RaySpec.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessageV3.Builder<RaySpec.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<RaySpec.Builder>
      • getDefaultInstanceForType

        public RaySpec getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

        public RaySpec build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public RaySpec buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • clone

        public RaySpec.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<RaySpec.Builder>
      • setField

        public RaySpec.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                        Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<RaySpec.Builder>
      • clearField

        public RaySpec.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<RaySpec.Builder>
      • clearOneof

        public RaySpec.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<RaySpec.Builder>
      • setRepeatedField

        public RaySpec.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                int index,
                                                Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<RaySpec.Builder>
      • addRepeatedField

        public RaySpec.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<RaySpec.Builder>
      • mergeFrom

        public RaySpec.Builder mergeFrom​(com.google.protobuf.Message other)
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<RaySpec.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<RaySpec.Builder>
      • mergeFrom

        public RaySpec.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                  throws IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<RaySpec.Builder>
        Throws:
        IOException
      • getImageUri

        public String getImageUri()
         Optional. Default image for user to choose a preferred ML framework(e.g.
         tensorflow or Pytorch) by choosing from Vertex prebuild
         images(https://cloud.google.com/vertex-ai/docs/training/pre-built-containers).
         Either this or the resource_pool_images is required. Use this field if
         you need all the resource pools to have the same Ray image, Otherwise, use
         the {@code resource_pool_images} field.
         
        string image_uri = 1 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getImageUri in interface RaySpecOrBuilder
        Returns:
        The imageUri.
      • getImageUriBytes

        public com.google.protobuf.ByteString getImageUriBytes()
         Optional. Default image for user to choose a preferred ML framework(e.g.
         tensorflow or Pytorch) by choosing from Vertex prebuild
         images(https://cloud.google.com/vertex-ai/docs/training/pre-built-containers).
         Either this or the resource_pool_images is required. Use this field if
         you need all the resource pools to have the same Ray image, Otherwise, use
         the {@code resource_pool_images} field.
         
        string image_uri = 1 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getImageUriBytes in interface RaySpecOrBuilder
        Returns:
        The bytes for imageUri.
      • setImageUri

        public RaySpec.Builder setImageUri​(String value)
         Optional. Default image for user to choose a preferred ML framework(e.g.
         tensorflow or Pytorch) by choosing from Vertex prebuild
         images(https://cloud.google.com/vertex-ai/docs/training/pre-built-containers).
         Either this or the resource_pool_images is required. Use this field if
         you need all the resource pools to have the same Ray image, Otherwise, use
         the {@code resource_pool_images} field.
         
        string image_uri = 1 [(.google.api.field_behavior) = OPTIONAL];
        Parameters:
        value - The imageUri to set.
        Returns:
        This builder for chaining.
      • clearImageUri

        public RaySpec.Builder clearImageUri()
         Optional. Default image for user to choose a preferred ML framework(e.g.
         tensorflow or Pytorch) by choosing from Vertex prebuild
         images(https://cloud.google.com/vertex-ai/docs/training/pre-built-containers).
         Either this or the resource_pool_images is required. Use this field if
         you need all the resource pools to have the same Ray image, Otherwise, use
         the {@code resource_pool_images} field.
         
        string image_uri = 1 [(.google.api.field_behavior) = OPTIONAL];
        Returns:
        This builder for chaining.
      • setImageUriBytes

        public RaySpec.Builder setImageUriBytes​(com.google.protobuf.ByteString value)
         Optional. Default image for user to choose a preferred ML framework(e.g.
         tensorflow or Pytorch) by choosing from Vertex prebuild
         images(https://cloud.google.com/vertex-ai/docs/training/pre-built-containers).
         Either this or the resource_pool_images is required. Use this field if
         you need all the resource pools to have the same Ray image, Otherwise, use
         the {@code resource_pool_images} field.
         
        string image_uri = 1 [(.google.api.field_behavior) = OPTIONAL];
        Parameters:
        value - The bytes for imageUri to set.
        Returns:
        This builder for chaining.
      • getResourcePoolImagesCount

        public int getResourcePoolImagesCount()
        Description copied from interface: RaySpecOrBuilder
         Optional. Required if image_uri is not set. A map of resource_pool_id to
         prebuild Ray image if user need to use different images for different
         head/worker pools. This map needs to cover all the resource pool ids.
         Example:
         {
           "ray_head_node_pool": "head image"
           "ray_worker_node_pool1": "worker image"
           "ray_worker_node_pool2": "another worker image"
         }
         
        map<string, string> resource_pool_images = 6 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getResourcePoolImagesCount in interface RaySpecOrBuilder
      • containsResourcePoolImages

        public boolean containsResourcePoolImages​(String key)
         Optional. Required if image_uri is not set. A map of resource_pool_id to
         prebuild Ray image if user need to use different images for different
         head/worker pools. This map needs to cover all the resource pool ids.
         Example:
         {
           "ray_head_node_pool": "head image"
           "ray_worker_node_pool1": "worker image"
           "ray_worker_node_pool2": "another worker image"
         }
         
        map<string, string> resource_pool_images = 6 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        containsResourcePoolImages in interface RaySpecOrBuilder
      • getResourcePoolImagesMap

        public Map<String,​String> getResourcePoolImagesMap()
         Optional. Required if image_uri is not set. A map of resource_pool_id to
         prebuild Ray image if user need to use different images for different
         head/worker pools. This map needs to cover all the resource pool ids.
         Example:
         {
           "ray_head_node_pool": "head image"
           "ray_worker_node_pool1": "worker image"
           "ray_worker_node_pool2": "another worker image"
         }
         
        map<string, string> resource_pool_images = 6 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getResourcePoolImagesMap in interface RaySpecOrBuilder
      • getResourcePoolImagesOrDefault

        public String getResourcePoolImagesOrDefault​(String key,
                                                     String defaultValue)
         Optional. Required if image_uri is not set. A map of resource_pool_id to
         prebuild Ray image if user need to use different images for different
         head/worker pools. This map needs to cover all the resource pool ids.
         Example:
         {
           "ray_head_node_pool": "head image"
           "ray_worker_node_pool1": "worker image"
           "ray_worker_node_pool2": "another worker image"
         }
         
        map<string, string> resource_pool_images = 6 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getResourcePoolImagesOrDefault in interface RaySpecOrBuilder
      • getResourcePoolImagesOrThrow

        public String getResourcePoolImagesOrThrow​(String key)
         Optional. Required if image_uri is not set. A map of resource_pool_id to
         prebuild Ray image if user need to use different images for different
         head/worker pools. This map needs to cover all the resource pool ids.
         Example:
         {
           "ray_head_node_pool": "head image"
           "ray_worker_node_pool1": "worker image"
           "ray_worker_node_pool2": "another worker image"
         }
         
        map<string, string> resource_pool_images = 6 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getResourcePoolImagesOrThrow in interface RaySpecOrBuilder
      • clearResourcePoolImages

        public RaySpec.Builder clearResourcePoolImages()
      • removeResourcePoolImages

        public RaySpec.Builder removeResourcePoolImages​(String key)
         Optional. Required if image_uri is not set. A map of resource_pool_id to
         prebuild Ray image if user need to use different images for different
         head/worker pools. This map needs to cover all the resource pool ids.
         Example:
         {
           "ray_head_node_pool": "head image"
           "ray_worker_node_pool1": "worker image"
           "ray_worker_node_pool2": "another worker image"
         }
         
        map<string, string> resource_pool_images = 6 [(.google.api.field_behavior) = OPTIONAL];
      • getMutableResourcePoolImages

        @Deprecated
        public Map<String,​String> getMutableResourcePoolImages()
        Deprecated.
        Use alternate mutation accessors instead.
      • putResourcePoolImages

        public RaySpec.Builder putResourcePoolImages​(String key,
                                                     String value)
         Optional. Required if image_uri is not set. A map of resource_pool_id to
         prebuild Ray image if user need to use different images for different
         head/worker pools. This map needs to cover all the resource pool ids.
         Example:
         {
           "ray_head_node_pool": "head image"
           "ray_worker_node_pool1": "worker image"
           "ray_worker_node_pool2": "another worker image"
         }
         
        map<string, string> resource_pool_images = 6 [(.google.api.field_behavior) = OPTIONAL];
      • putAllResourcePoolImages

        public RaySpec.Builder putAllResourcePoolImages​(Map<String,​String> values)
         Optional. Required if image_uri is not set. A map of resource_pool_id to
         prebuild Ray image if user need to use different images for different
         head/worker pools. This map needs to cover all the resource pool ids.
         Example:
         {
           "ray_head_node_pool": "head image"
           "ray_worker_node_pool1": "worker image"
           "ray_worker_node_pool2": "another worker image"
         }
         
        map<string, string> resource_pool_images = 6 [(.google.api.field_behavior) = OPTIONAL];
      • getHeadNodeResourcePoolId

        public String getHeadNodeResourcePoolId()
         Optional. This will be used to indicate which resource pool will serve as
         the Ray head node(the first node within that pool). Will use the machine
         from the first workerpool as the head node by default if this field is not
         set.
         
        string head_node_resource_pool_id = 7 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getHeadNodeResourcePoolId in interface RaySpecOrBuilder
        Returns:
        The headNodeResourcePoolId.
      • getHeadNodeResourcePoolIdBytes

        public com.google.protobuf.ByteString getHeadNodeResourcePoolIdBytes()
         Optional. This will be used to indicate which resource pool will serve as
         the Ray head node(the first node within that pool). Will use the machine
         from the first workerpool as the head node by default if this field is not
         set.
         
        string head_node_resource_pool_id = 7 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getHeadNodeResourcePoolIdBytes in interface RaySpecOrBuilder
        Returns:
        The bytes for headNodeResourcePoolId.
      • setHeadNodeResourcePoolId

        public RaySpec.Builder setHeadNodeResourcePoolId​(String value)
         Optional. This will be used to indicate which resource pool will serve as
         the Ray head node(the first node within that pool). Will use the machine
         from the first workerpool as the head node by default if this field is not
         set.
         
        string head_node_resource_pool_id = 7 [(.google.api.field_behavior) = OPTIONAL];
        Parameters:
        value - The headNodeResourcePoolId to set.
        Returns:
        This builder for chaining.
      • clearHeadNodeResourcePoolId

        public RaySpec.Builder clearHeadNodeResourcePoolId()
         Optional. This will be used to indicate which resource pool will serve as
         the Ray head node(the first node within that pool). Will use the machine
         from the first workerpool as the head node by default if this field is not
         set.
         
        string head_node_resource_pool_id = 7 [(.google.api.field_behavior) = OPTIONAL];
        Returns:
        This builder for chaining.
      • setHeadNodeResourcePoolIdBytes

        public RaySpec.Builder setHeadNodeResourcePoolIdBytes​(com.google.protobuf.ByteString value)
         Optional. This will be used to indicate which resource pool will serve as
         the Ray head node(the first node within that pool). Will use the machine
         from the first workerpool as the head node by default if this field is not
         set.
         
        string head_node_resource_pool_id = 7 [(.google.api.field_behavior) = OPTIONAL];
        Parameters:
        value - The bytes for headNodeResourcePoolId to set.
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final RaySpec.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<RaySpec.Builder>
      • mergeUnknownFields

        public final RaySpec.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<RaySpec.Builder>