Class Service
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
operatorand 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.
public sealed class Service : IMessage<Service>, IEquatable<Service>, IDeepCloneable<Service>, IBufferMessage, IMessage
- Inheritance
-
Service
- Inherited Members
Constructors
Service()
public Service()
Service(Service)
public Service(Service other)
Parameters
otherService
Fields
MajorApiVersionFieldNumber
Field number for the "major_api_version" field.
public const int MajorApiVersionFieldNumber = 2
Field Value
OperatorFieldNumber
Field number for the "operator" field.
public const int OperatorFieldNumber = 4
Field Value
UrlFieldNumber
Field number for the "url" field.
public const int UrlFieldNumber = 1
Field Value
ValidForFieldNumber
Field number for the "valid_for" field.
public const int ValidForFieldNumber = 3
Field Value
Properties
Descriptor
public static MessageDescriptor Descriptor { get; }
Property Value
- MessageDescriptor
MajorApiVersion
Specifies the major API version. A value of 0 represents a service that has not yet been released.
public uint MajorApiVersion { get; set; }
Property Value
Operator
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
public string Operator { get; set; }
Property Value
Parser
public static MessageParser<Service> Parser { get; }
Property Value
- MessageParser<Service>
Url
URL of the service. MUST include scheme and authority. MAY include path.
public string Url { get; set; }
Property Value
ValidFor
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.
public TimeRange ValidFor { get; set; }
Property Value
Methods
CalculateSize()
Calculates the size of this message in Protocol Buffer wire format, in bytes.
public int CalculateSize()
Returns
- int
The number of bytes required to write this message to a coded output stream.
Clone()
Creates a deep clone of this object.
public Service Clone()
Returns
- Service
A deep clone of this object.
Equals(Service)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(Service other)
Parameters
otherServiceAn object to compare with this object.
Returns
Equals(object)
Determines whether the specified object is equal to the current object.
public override bool Equals(object other)
Parameters
otherobject
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
MergeFrom(Service)
Merges the given message into this one.
public void MergeFrom(Service other)
Parameters
otherService
Remarks
See the user guide for precise merge semantics.
MergeFrom(CodedInputStream)
Merges the data from the specified coded input stream with the current message.
public void MergeFrom(CodedInputStream input)
Parameters
inputCodedInputStream
Remarks
See the user guide for precise merge semantics.
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
WriteTo(CodedOutputStream)
Writes the data to the given coded output stream.
public void WriteTo(CodedOutputStream output)
Parameters
outputCodedOutputStreamCoded output stream to write the data to. Must not be null.