Table of Contents

Class Service

Namespace
Dev.Sigstore.Trustroot.V1
Assembly
Sigstore.dll

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.
public sealed class Service : IMessage<Service>, IEquatable<Service>, IDeepCloneable<Service>, IBufferMessage, IMessage
Inheritance
Service
Implements
IMessage<Service>
IDeepCloneable<Service>
IBufferMessage
IMessage
Inherited Members

Constructors

Service()

public Service()

Service(Service)

public Service(Service other)

Parameters

other Service

Fields

MajorApiVersionFieldNumber

Field number for the "major_api_version" field.

public const int MajorApiVersionFieldNumber = 2

Field Value

int

OperatorFieldNumber

Field number for the "operator" field.

public const int OperatorFieldNumber = 4

Field Value

int

UrlFieldNumber

Field number for the "url" field.

public const int UrlFieldNumber = 1

Field Value

int

ValidForFieldNumber

Field number for the "valid_for" field.

public const int ValidForFieldNumber = 3

Field Value

int

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

uint

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

string

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

string

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

TimeRange

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

other Service

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object)

Determines whether the specified object is equal to the current object.

public override bool Equals(object other)

Parameters

other object

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

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

other Service

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

input CodedInputStream

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

output CodedOutputStream

Coded output stream to write the data to. Must not be null.