Package flyteidl.core

Class Security.OAuth2TokenRequest.Builder

  • All Implemented Interfaces:
    com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Security.OAuth2TokenRequestOrBuilder, Cloneable
    Enclosing class:
    Security.OAuth2TokenRequest

    public static final class Security.OAuth2TokenRequest.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<Security.OAuth2TokenRequest.Builder>
    implements Security.OAuth2TokenRequestOrBuilder
     OAuth2TokenRequest encapsulates information needed to request an OAuth2 token.
     FLYTE_TOKENS_ENV_PREFIX will be passed to indicate the prefix of the environment variables that will be present if
     tokens are passed through environment variables.
     FLYTE_TOKENS_PATH_PREFIX will be passed to indicate the prefix of the path where secrets will be mounted if tokens
     are passed through file mounts.
     
    Protobuf type flyteidl.core.OAuth2TokenRequest
    • Constructor Detail

      • Builder

        private Builder()
      • Builder

        private Builder​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
    • Method Detail

      • 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.Builder<Security.OAuth2TokenRequest.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<Security.OAuth2TokenRequest.Builder>
      • getDefaultInstanceForType

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

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

        public Security.OAuth2TokenRequest buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • isInitialized

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

        public Security.OAuth2TokenRequest.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<Security.OAuth2TokenRequest.Builder>
        Throws:
        IOException
      • getName

        public String getName()
         name indicates a unique id for the token request within this task token requests. It'll be used as a suffix for
         environment variables and as a filename for mounting tokens as files.
         +required
         
        string name = 1;
        Specified by:
        getName in interface Security.OAuth2TokenRequestOrBuilder
        Returns:
        The name.
      • getNameBytes

        public com.google.protobuf.ByteString getNameBytes()
         name indicates a unique id for the token request within this task token requests. It'll be used as a suffix for
         environment variables and as a filename for mounting tokens as files.
         +required
         
        string name = 1;
        Specified by:
        getNameBytes in interface Security.OAuth2TokenRequestOrBuilder
        Returns:
        The bytes for name.
      • setName

        public Security.OAuth2TokenRequest.Builder setName​(String value)
         name indicates a unique id for the token request within this task token requests. It'll be used as a suffix for
         environment variables and as a filename for mounting tokens as files.
         +required
         
        string name = 1;
        Parameters:
        value - The name to set.
        Returns:
        This builder for chaining.
      • clearName

        public Security.OAuth2TokenRequest.Builder clearName()
         name indicates a unique id for the token request within this task token requests. It'll be used as a suffix for
         environment variables and as a filename for mounting tokens as files.
         +required
         
        string name = 1;
        Returns:
        This builder for chaining.
      • setNameBytes

        public Security.OAuth2TokenRequest.Builder setNameBytes​(com.google.protobuf.ByteString value)
         name indicates a unique id for the token request within this task token requests. It'll be used as a suffix for
         environment variables and as a filename for mounting tokens as files.
         +required
         
        string name = 1;
        Parameters:
        value - The bytes for name to set.
        Returns:
        This builder for chaining.
      • getTypeValue

        public int getTypeValue()
         type indicates the type of the request to make. Defaults to CLIENT_CREDENTIALS.
         +required
         
        .flyteidl.core.OAuth2TokenRequest.Type type = 2;
        Specified by:
        getTypeValue in interface Security.OAuth2TokenRequestOrBuilder
        Returns:
        The enum numeric value on the wire for type.
      • setTypeValue

        public Security.OAuth2TokenRequest.Builder setTypeValue​(int value)
         type indicates the type of the request to make. Defaults to CLIENT_CREDENTIALS.
         +required
         
        .flyteidl.core.OAuth2TokenRequest.Type type = 2;
        Parameters:
        value - The enum numeric value on the wire for type to set.
        Returns:
        This builder for chaining.
      • clearType

        public Security.OAuth2TokenRequest.Builder clearType()
         type indicates the type of the request to make. Defaults to CLIENT_CREDENTIALS.
         +required
         
        .flyteidl.core.OAuth2TokenRequest.Type type = 2;
        Returns:
        This builder for chaining.
      • hasClient

        public boolean hasClient()
         client references the client_id/secret to use to request the OAuth2 token.
         +required
         
        .flyteidl.core.OAuth2Client client = 3;
        Specified by:
        hasClient in interface Security.OAuth2TokenRequestOrBuilder
        Returns:
        Whether the client field is set.
      • clearClient

        public Security.OAuth2TokenRequest.Builder clearClient()
         client references the client_id/secret to use to request the OAuth2 token.
         +required
         
        .flyteidl.core.OAuth2Client client = 3;
      • getClientBuilder

        public Security.OAuth2Client.Builder getClientBuilder()
         client references the client_id/secret to use to request the OAuth2 token.
         +required
         
        .flyteidl.core.OAuth2Client client = 3;
      • getIdpDiscoveryEndpoint

        public String getIdpDiscoveryEndpoint()
         idp_discovery_endpoint references the discovery endpoint used to retrieve token endpoint and other related
         information.
         +optional
         
        string idp_discovery_endpoint = 4;
        Specified by:
        getIdpDiscoveryEndpoint in interface Security.OAuth2TokenRequestOrBuilder
        Returns:
        The idpDiscoveryEndpoint.
      • getIdpDiscoveryEndpointBytes

        public com.google.protobuf.ByteString getIdpDiscoveryEndpointBytes()
         idp_discovery_endpoint references the discovery endpoint used to retrieve token endpoint and other related
         information.
         +optional
         
        string idp_discovery_endpoint = 4;
        Specified by:
        getIdpDiscoveryEndpointBytes in interface Security.OAuth2TokenRequestOrBuilder
        Returns:
        The bytes for idpDiscoveryEndpoint.
      • setIdpDiscoveryEndpoint

        public Security.OAuth2TokenRequest.Builder setIdpDiscoveryEndpoint​(String value)
         idp_discovery_endpoint references the discovery endpoint used to retrieve token endpoint and other related
         information.
         +optional
         
        string idp_discovery_endpoint = 4;
        Parameters:
        value - The idpDiscoveryEndpoint to set.
        Returns:
        This builder for chaining.
      • clearIdpDiscoveryEndpoint

        public Security.OAuth2TokenRequest.Builder clearIdpDiscoveryEndpoint()
         idp_discovery_endpoint references the discovery endpoint used to retrieve token endpoint and other related
         information.
         +optional
         
        string idp_discovery_endpoint = 4;
        Returns:
        This builder for chaining.
      • setIdpDiscoveryEndpointBytes

        public Security.OAuth2TokenRequest.Builder setIdpDiscoveryEndpointBytes​(com.google.protobuf.ByteString value)
         idp_discovery_endpoint references the discovery endpoint used to retrieve token endpoint and other related
         information.
         +optional
         
        string idp_discovery_endpoint = 4;
        Parameters:
        value - The bytes for idpDiscoveryEndpoint to set.
        Returns:
        This builder for chaining.
      • getTokenEndpoint

        public String getTokenEndpoint()
         token_endpoint references the token issuance endpoint. If idp_discovery_endpoint is not provided, this parameter is
         mandatory.
         +optional
         
        string token_endpoint = 5;
        Specified by:
        getTokenEndpoint in interface Security.OAuth2TokenRequestOrBuilder
        Returns:
        The tokenEndpoint.
      • getTokenEndpointBytes

        public com.google.protobuf.ByteString getTokenEndpointBytes()
         token_endpoint references the token issuance endpoint. If idp_discovery_endpoint is not provided, this parameter is
         mandatory.
         +optional
         
        string token_endpoint = 5;
        Specified by:
        getTokenEndpointBytes in interface Security.OAuth2TokenRequestOrBuilder
        Returns:
        The bytes for tokenEndpoint.
      • setTokenEndpoint

        public Security.OAuth2TokenRequest.Builder setTokenEndpoint​(String value)
         token_endpoint references the token issuance endpoint. If idp_discovery_endpoint is not provided, this parameter is
         mandatory.
         +optional
         
        string token_endpoint = 5;
        Parameters:
        value - The tokenEndpoint to set.
        Returns:
        This builder for chaining.
      • clearTokenEndpoint

        public Security.OAuth2TokenRequest.Builder clearTokenEndpoint()
         token_endpoint references the token issuance endpoint. If idp_discovery_endpoint is not provided, this parameter is
         mandatory.
         +optional
         
        string token_endpoint = 5;
        Returns:
        This builder for chaining.
      • setTokenEndpointBytes

        public Security.OAuth2TokenRequest.Builder setTokenEndpointBytes​(com.google.protobuf.ByteString value)
         token_endpoint references the token issuance endpoint. If idp_discovery_endpoint is not provided, this parameter is
         mandatory.
         +optional
         
        string token_endpoint = 5;
        Parameters:
        value - The bytes for tokenEndpoint to set.
        Returns:
        This builder for chaining.
      • mergeUnknownFields

        public final Security.OAuth2TokenRequest.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<Security.OAuth2TokenRequest.Builder>