Class Container

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

    public final class Container
    extends com.google.protobuf.GeneratedMessageV3
    implements ContainerOrBuilder
     A single application container.
     This specifies both the container to run, the command to run in the container
     and the arguments to supply to it.
     Note that additional arguments may be supplied by the system to the container
     at runtime.
     
    Protobuf type google.cloud.run.v2.Container
    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()
         Name of the container specified as a DNS_LABEL (RFC 1123).
         
        string name = 1;
        Specified by:
        getName in interface ContainerOrBuilder
        Returns:
        The name.
      • getNameBytes

        public com.google.protobuf.ByteString getNameBytes()
         Name of the container specified as a DNS_LABEL (RFC 1123).
         
        string name = 1;
        Specified by:
        getNameBytes in interface ContainerOrBuilder
        Returns:
        The bytes for name.
      • getImage

        public String getImage()
         Required. Name of the container image in Dockerhub, Google Artifact
         Registry, or Google Container Registry. If the host is not provided,
         Dockerhub is assumed.
         
        string image = 2 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getImage in interface ContainerOrBuilder
        Returns:
        The image.
      • getImageBytes

        public com.google.protobuf.ByteString getImageBytes()
         Required. Name of the container image in Dockerhub, Google Artifact
         Registry, or Google Container Registry. If the host is not provided,
         Dockerhub is assumed.
         
        string image = 2 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getImageBytes in interface ContainerOrBuilder
        Returns:
        The bytes for image.
      • getCommandList

        public com.google.protobuf.ProtocolStringList getCommandList()
         Entrypoint array. Not executed within a shell.
         The docker image's ENTRYPOINT is used if this is not provided.
         
        repeated string command = 3;
        Specified by:
        getCommandList in interface ContainerOrBuilder
        Returns:
        A list containing the command.
      • getCommandCount

        public int getCommandCount()
         Entrypoint array. Not executed within a shell.
         The docker image's ENTRYPOINT is used if this is not provided.
         
        repeated string command = 3;
        Specified by:
        getCommandCount in interface ContainerOrBuilder
        Returns:
        The count of command.
      • getCommand

        public String getCommand​(int index)
         Entrypoint array. Not executed within a shell.
         The docker image's ENTRYPOINT is used if this is not provided.
         
        repeated string command = 3;
        Specified by:
        getCommand in interface ContainerOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The command at the given index.
      • getCommandBytes

        public com.google.protobuf.ByteString getCommandBytes​(int index)
         Entrypoint array. Not executed within a shell.
         The docker image's ENTRYPOINT is used if this is not provided.
         
        repeated string command = 3;
        Specified by:
        getCommandBytes in interface ContainerOrBuilder
        Parameters:
        index - The index of the value to return.
        Returns:
        The bytes of the command at the given index.
      • getArgsList

        public com.google.protobuf.ProtocolStringList getArgsList()
         Arguments to the entrypoint.
         The docker image's CMD is used if this is not provided.
         
        repeated string args = 4;
        Specified by:
        getArgsList in interface ContainerOrBuilder
        Returns:
        A list containing the args.
      • getArgsCount

        public int getArgsCount()
         Arguments to the entrypoint.
         The docker image's CMD is used if this is not provided.
         
        repeated string args = 4;
        Specified by:
        getArgsCount in interface ContainerOrBuilder
        Returns:
        The count of args.
      • getArgs

        public String getArgs​(int index)
         Arguments to the entrypoint.
         The docker image's CMD is used if this is not provided.
         
        repeated string args = 4;
        Specified by:
        getArgs in interface ContainerOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The args at the given index.
      • getArgsBytes

        public com.google.protobuf.ByteString getArgsBytes​(int index)
         Arguments to the entrypoint.
         The docker image's CMD is used if this is not provided.
         
        repeated string args = 4;
        Specified by:
        getArgsBytes in interface ContainerOrBuilder
        Parameters:
        index - The index of the value to return.
        Returns:
        The bytes of the args at the given index.
      • getEnvList

        public List<EnvVar> getEnvList()
         List of environment variables to set in the container.
         
        repeated .google.cloud.run.v2.EnvVar env = 5;
        Specified by:
        getEnvList in interface ContainerOrBuilder
      • getEnvCount

        public int getEnvCount()
         List of environment variables to set in the container.
         
        repeated .google.cloud.run.v2.EnvVar env = 5;
        Specified by:
        getEnvCount in interface ContainerOrBuilder
      • getEnv

        public EnvVar getEnv​(int index)
         List of environment variables to set in the container.
         
        repeated .google.cloud.run.v2.EnvVar env = 5;
        Specified by:
        getEnv in interface ContainerOrBuilder
      • hasResources

        public boolean hasResources()
         Compute Resource requirements by this container.
         
        .google.cloud.run.v2.ResourceRequirements resources = 6;
        Specified by:
        hasResources in interface ContainerOrBuilder
        Returns:
        Whether the resources field is set.
      • getResources

        public ResourceRequirements getResources()
         Compute Resource requirements by this container.
         
        .google.cloud.run.v2.ResourceRequirements resources = 6;
        Specified by:
        getResources in interface ContainerOrBuilder
        Returns:
        The resources.
      • getPortsList

        public List<ContainerPort> getPortsList()
         List of ports to expose from the container. Only a single port can be
         specified. The specified ports must be listening on all interfaces
         (0.0.0.0) within the container to be accessible.
        
         If omitted, a port number will be chosen and passed to the container
         through the PORT environment variable for the container to listen on.
         
        repeated .google.cloud.run.v2.ContainerPort ports = 7;
        Specified by:
        getPortsList in interface ContainerOrBuilder
      • getPortsOrBuilderList

        public List<? extends ContainerPortOrBuilder> getPortsOrBuilderList()
         List of ports to expose from the container. Only a single port can be
         specified. The specified ports must be listening on all interfaces
         (0.0.0.0) within the container to be accessible.
        
         If omitted, a port number will be chosen and passed to the container
         through the PORT environment variable for the container to listen on.
         
        repeated .google.cloud.run.v2.ContainerPort ports = 7;
        Specified by:
        getPortsOrBuilderList in interface ContainerOrBuilder
      • getPortsCount

        public int getPortsCount()
         List of ports to expose from the container. Only a single port can be
         specified. The specified ports must be listening on all interfaces
         (0.0.0.0) within the container to be accessible.
        
         If omitted, a port number will be chosen and passed to the container
         through the PORT environment variable for the container to listen on.
         
        repeated .google.cloud.run.v2.ContainerPort ports = 7;
        Specified by:
        getPortsCount in interface ContainerOrBuilder
      • getPorts

        public ContainerPort getPorts​(int index)
         List of ports to expose from the container. Only a single port can be
         specified. The specified ports must be listening on all interfaces
         (0.0.0.0) within the container to be accessible.
        
         If omitted, a port number will be chosen and passed to the container
         through the PORT environment variable for the container to listen on.
         
        repeated .google.cloud.run.v2.ContainerPort ports = 7;
        Specified by:
        getPorts in interface ContainerOrBuilder
      • getPortsOrBuilder

        public ContainerPortOrBuilder getPortsOrBuilder​(int index)
         List of ports to expose from the container. Only a single port can be
         specified. The specified ports must be listening on all interfaces
         (0.0.0.0) within the container to be accessible.
        
         If omitted, a port number will be chosen and passed to the container
         through the PORT environment variable for the container to listen on.
         
        repeated .google.cloud.run.v2.ContainerPort ports = 7;
        Specified by:
        getPortsOrBuilder in interface ContainerOrBuilder
      • getVolumeMountsCount

        public int getVolumeMountsCount()
         Volume to mount into the container's filesystem.
         
        repeated .google.cloud.run.v2.VolumeMount volume_mounts = 8;
        Specified by:
        getVolumeMountsCount in interface ContainerOrBuilder
      • getVolumeMounts

        public VolumeMount getVolumeMounts​(int index)
         Volume to mount into the container's filesystem.
         
        repeated .google.cloud.run.v2.VolumeMount volume_mounts = 8;
        Specified by:
        getVolumeMounts in interface ContainerOrBuilder
      • getWorkingDir

        public String getWorkingDir()
         Container's working directory.
         If not specified, the container runtime's default will be used, which
         might be configured in the container image.
         
        string working_dir = 9;
        Specified by:
        getWorkingDir in interface ContainerOrBuilder
        Returns:
        The workingDir.
      • getWorkingDirBytes

        public com.google.protobuf.ByteString getWorkingDirBytes()
         Container's working directory.
         If not specified, the container runtime's default will be used, which
         might be configured in the container image.
         
        string working_dir = 9;
        Specified by:
        getWorkingDirBytes in interface ContainerOrBuilder
        Returns:
        The bytes for workingDir.
      • hasLivenessProbe

        public boolean hasLivenessProbe()
         Periodic probe of container liveness.
         Container will be restarted if the probe fails.
         
        .google.cloud.run.v2.Probe liveness_probe = 10;
        Specified by:
        hasLivenessProbe in interface ContainerOrBuilder
        Returns:
        Whether the livenessProbe field is set.
      • getLivenessProbe

        public Probe getLivenessProbe()
         Periodic probe of container liveness.
         Container will be restarted if the probe fails.
         
        .google.cloud.run.v2.Probe liveness_probe = 10;
        Specified by:
        getLivenessProbe in interface ContainerOrBuilder
        Returns:
        The livenessProbe.
      • getLivenessProbeOrBuilder

        public ProbeOrBuilder getLivenessProbeOrBuilder()
         Periodic probe of container liveness.
         Container will be restarted if the probe fails.
         
        .google.cloud.run.v2.Probe liveness_probe = 10;
        Specified by:
        getLivenessProbeOrBuilder in interface ContainerOrBuilder
      • hasStartupProbe

        public boolean hasStartupProbe()
         Startup probe of application within the container.
         All other probes are disabled if a startup probe is provided, until it
         succeeds. Container will not be added to service endpoints if the probe
         fails.
         
        .google.cloud.run.v2.Probe startup_probe = 11;
        Specified by:
        hasStartupProbe in interface ContainerOrBuilder
        Returns:
        Whether the startupProbe field is set.
      • getStartupProbe

        public Probe getStartupProbe()
         Startup probe of application within the container.
         All other probes are disabled if a startup probe is provided, until it
         succeeds. Container will not be added to service endpoints if the probe
         fails.
         
        .google.cloud.run.v2.Probe startup_probe = 11;
        Specified by:
        getStartupProbe in interface ContainerOrBuilder
        Returns:
        The startupProbe.
      • getStartupProbeOrBuilder

        public ProbeOrBuilder getStartupProbeOrBuilder()
         Startup probe of application within the container.
         All other probes are disabled if a startup probe is provided, until it
         succeeds. Container will not be added to service endpoints if the probe
         fails.
         
        .google.cloud.run.v2.Probe startup_probe = 11;
        Specified by:
        getStartupProbeOrBuilder in interface ContainerOrBuilder
      • 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 Container parseFrom​(ByteBuffer data)
                                   throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

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

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

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

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

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

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

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

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

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

        public static Container getDefaultInstance()
      • parser

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

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