Class Service.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Service.Builder>
dev.sigstore.proto.trustroot.v1.Service.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, ServiceOrBuilder, Cloneable
Enclosing class:
Service

public static final class Service.Builder extends com.google.protobuf.GeneratedMessage.Builder<Service.Builder> implements ServiceOrBuilder
 Service represents an instance of a service that is a part of Sigstore infrastructure.
 When selecting one or multiple services from a list of services, clients MUST:
 * Use the API version hint to determine the service with the highest API version
 that the client is compatible with.
 * Only select services within the specified validity period and that have the
 newest validity start date.
 When selecting multiple services, clients MUST:
 * Use the ServiceConfiguration to determine how many services MUST be selected.
 Clients MUST return an error if there are not enough services that meet the
 selection criteria.
 * Group services by `operator` and select at most one service from an operator.
 During verification, clients MUST treat valid verification metadata from the
 operator as valid only once towards a threshold.
 * Select services from only the highest supported API version. 
 
Protobuf type dev.sigstore.trustroot.v1.Service
  • Method Details

    • getDescriptor

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

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

      public Service.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.GeneratedMessage.Builder<Service.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.GeneratedMessage.Builder<Service.Builder>
    • getDefaultInstanceForType

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

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

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

      public Service.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<Service.Builder>
    • mergeFrom

      public Service.Builder mergeFrom(Service other)
    • isInitialized

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

      public Service.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<Service.Builder>
      Throws:
      IOException
    • getUrl

      public String getUrl()
       URL of the service. MUST include scheme and authority. MAY include path.
       
      string url = 1;
      Specified by:
      getUrl in interface ServiceOrBuilder
      Returns:
      The url.
    • getUrlBytes

      public com.google.protobuf.ByteString getUrlBytes()
       URL of the service. MUST include scheme and authority. MAY include path.
       
      string url = 1;
      Specified by:
      getUrlBytes in interface ServiceOrBuilder
      Returns:
      The bytes for url.
    • setUrl

      public Service.Builder setUrl(String value)
       URL of the service. MUST include scheme and authority. MAY include path.
       
      string url = 1;
      Parameters:
      value - The url to set.
      Returns:
      This builder for chaining.
    • clearUrl

      public Service.Builder clearUrl()
       URL of the service. MUST include scheme and authority. MAY include path.
       
      string url = 1;
      Returns:
      This builder for chaining.
    • setUrlBytes

      public Service.Builder setUrlBytes(com.google.protobuf.ByteString value)
       URL of the service. MUST include scheme and authority. MAY include path.
       
      string url = 1;
      Parameters:
      value - The bytes for url to set.
      Returns:
      This builder for chaining.
    • getMajorApiVersion

      public int getMajorApiVersion()
       Specifies the major API version. A value of 0 represents a service that
       has not yet been released.
       
      uint32 major_api_version = 2;
      Specified by:
      getMajorApiVersion in interface ServiceOrBuilder
      Returns:
      The majorApiVersion.
    • setMajorApiVersion

      public Service.Builder setMajorApiVersion(int value)
       Specifies the major API version. A value of 0 represents a service that
       has not yet been released.
       
      uint32 major_api_version = 2;
      Parameters:
      value - The majorApiVersion to set.
      Returns:
      This builder for chaining.
    • clearMajorApiVersion

      public Service.Builder clearMajorApiVersion()
       Specifies the major API version. A value of 0 represents a service that
       has not yet been released.
       
      uint32 major_api_version = 2;
      Returns:
      This builder for chaining.
    • hasValidFor

      public boolean hasValidFor()
       Validity period of a service. A service that has only a start date
       SHOULD be considered the most recent instance of that service, but
       the client MUST NOT assume there is only one valid instance.
       The TimeRange MUST be considered valid *inclusive* of the
       endpoints.
       
      .dev.sigstore.common.v1.TimeRange valid_for = 3;
      Specified by:
      hasValidFor in interface ServiceOrBuilder
      Returns:
      Whether the validFor field is set.
    • getValidFor

      public TimeRange getValidFor()
       Validity period of a service. A service that has only a start date
       SHOULD be considered the most recent instance of that service, but
       the client MUST NOT assume there is only one valid instance.
       The TimeRange MUST be considered valid *inclusive* of the
       endpoints.
       
      .dev.sigstore.common.v1.TimeRange valid_for = 3;
      Specified by:
      getValidFor in interface ServiceOrBuilder
      Returns:
      The validFor.
    • setValidFor

      public Service.Builder setValidFor(TimeRange value)
       Validity period of a service. A service that has only a start date
       SHOULD be considered the most recent instance of that service, but
       the client MUST NOT assume there is only one valid instance.
       The TimeRange MUST be considered valid *inclusive* of the
       endpoints.
       
      .dev.sigstore.common.v1.TimeRange valid_for = 3;
    • setValidFor

      public Service.Builder setValidFor(TimeRange.Builder builderForValue)
       Validity period of a service. A service that has only a start date
       SHOULD be considered the most recent instance of that service, but
       the client MUST NOT assume there is only one valid instance.
       The TimeRange MUST be considered valid *inclusive* of the
       endpoints.
       
      .dev.sigstore.common.v1.TimeRange valid_for = 3;
    • mergeValidFor

      public Service.Builder mergeValidFor(TimeRange value)
       Validity period of a service. A service that has only a start date
       SHOULD be considered the most recent instance of that service, but
       the client MUST NOT assume there is only one valid instance.
       The TimeRange MUST be considered valid *inclusive* of the
       endpoints.
       
      .dev.sigstore.common.v1.TimeRange valid_for = 3;
    • clearValidFor

      public Service.Builder clearValidFor()
       Validity period of a service. A service that has only a start date
       SHOULD be considered the most recent instance of that service, but
       the client MUST NOT assume there is only one valid instance.
       The TimeRange MUST be considered valid *inclusive* of the
       endpoints.
       
      .dev.sigstore.common.v1.TimeRange valid_for = 3;
    • getValidForBuilder

      public TimeRange.Builder getValidForBuilder()
       Validity period of a service. A service that has only a start date
       SHOULD be considered the most recent instance of that service, but
       the client MUST NOT assume there is only one valid instance.
       The TimeRange MUST be considered valid *inclusive* of the
       endpoints.
       
      .dev.sigstore.common.v1.TimeRange valid_for = 3;
    • getValidForOrBuilder

      public TimeRangeOrBuilder getValidForOrBuilder()
       Validity period of a service. A service that has only a start date
       SHOULD be considered the most recent instance of that service, but
       the client MUST NOT assume there is only one valid instance.
       The TimeRange MUST be considered valid *inclusive* of the
       endpoints.
       
      .dev.sigstore.common.v1.TimeRange valid_for = 3;
      Specified by:
      getValidForOrBuilder in interface ServiceOrBuilder
    • getOperator

      public String getOperator()
       Specifies the name of the service operator. When selecting multiple
       services, clients MUST use the operator to select services from
       distinct operators. Operator MUST be formatted as a scheme-less
       URI, e.g. sigstore.dev
       
      string operator = 4;
      Specified by:
      getOperator in interface ServiceOrBuilder
      Returns:
      The operator.
    • getOperatorBytes

      public com.google.protobuf.ByteString getOperatorBytes()
       Specifies the name of the service operator. When selecting multiple
       services, clients MUST use the operator to select services from
       distinct operators. Operator MUST be formatted as a scheme-less
       URI, e.g. sigstore.dev
       
      string operator = 4;
      Specified by:
      getOperatorBytes in interface ServiceOrBuilder
      Returns:
      The bytes for operator.
    • setOperator

      public Service.Builder setOperator(String value)
       Specifies the name of the service operator. When selecting multiple
       services, clients MUST use the operator to select services from
       distinct operators. Operator MUST be formatted as a scheme-less
       URI, e.g. sigstore.dev
       
      string operator = 4;
      Parameters:
      value - The operator to set.
      Returns:
      This builder for chaining.
    • clearOperator

      public Service.Builder clearOperator()
       Specifies the name of the service operator. When selecting multiple
       services, clients MUST use the operator to select services from
       distinct operators. Operator MUST be formatted as a scheme-less
       URI, e.g. sigstore.dev
       
      string operator = 4;
      Returns:
      This builder for chaining.
    • setOperatorBytes

      public Service.Builder setOperatorBytes(com.google.protobuf.ByteString value)
       Specifies the name of the service operator. When selecting multiple
       services, clients MUST use the operator to select services from
       distinct operators. Operator MUST be formatted as a scheme-less
       URI, e.g. sigstore.dev
       
      string operator = 4;
      Parameters:
      value - The bytes for operator to set.
      Returns:
      This builder for chaining.