models

package
v0.98.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 3, 2024 License: MPL-2.0 Imports: 7 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GoogleProtobufAny

type GoogleProtobufAny struct {

	// A URL/resource name that uniquely identifies the type of the serialized
	// protocol buffer message. This string must contain at least
	// one "/" character. The last segment of the URL's path must represent
	// the fully qualified name of the type (as in
	// `path/google.protobuf.Duration`). The name should be in a canonical form
	// (e.g., leading "." is not accepted).
	//
	// In practice, teams usually precompile into the binary all types that they
	// expect it to use in the context of Any. However, for URLs which use the
	// scheme `http`, `https`, or no scheme, one can optionally set up a type
	// server that maps type URLs to message definitions as follows:
	//
	// * If no scheme is provided, `https` is assumed.
	// * An HTTP GET on the URL must yield a [google.protobuf.Type][]
	//   value in binary format, or produce an error.
	// * Applications are allowed to cache lookup results based on the
	//   URL, or have them precompiled into a binary to avoid any
	//   lookup. Therefore, binary compatibility needs to be preserved
	//   on changes to types. (Use versioned type names to manage
	//   breaking changes.)
	//
	// Note: this functionality is not currently available in the official
	// protobuf release, and it is not used for type URLs beginning with
	// type.googleapis.com.
	//
	// Schemes other than `http`, `https` (or the empty scheme) might be
	// used with implementation specific semantics.
	TypeURL string `json:"type_url,omitempty"`

	// Must be a valid serialized protocol buffer of the above specified type.
	// Format: byte
	Value strfmt.Base64 `json:"value,omitempty"`
}

GoogleProtobufAny `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message.

Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type.

Example 1: Pack and unpack a message in C++.

Foo foo = ...;
Any any;
any.PackFrom(foo);
...
if (any.UnpackTo(&foo)) {
  ...
}

Example 2: Pack and unpack a message in Java.

   Foo foo = ...;
   Any any = Any.pack(foo);
   ...
   if (any.is(Foo.class)) {
     foo = any.unpack(Foo.class);
   }

Example 3: Pack and unpack a message in Python.

   foo = Foo(...)
   any = Any()
   any.Pack(foo)
   ...
   if any.Is(Foo.DESCRIPTOR):
     any.Unpack(foo)
     ...

Example 4: Pack and unpack a message in Go

    foo := &pb.Foo{...}
    any, err := anypb.New(foo)
    if err != nil {
      ...
    }
    ...
    foo := &pb.Foo{}
    if err := any.UnmarshalTo(foo); err != nil {
      ...
    }

The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z".

JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example:

package google.profile;
message Person {
  string first_name = 1;
  string last_name = 2;
}

{
  "@type": "type.googleapis.com/google.profile.Person",
  "firstName": <string>,
  "lastName": <string>
}

If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]):

{
  "@type": "type.googleapis.com/google.protobuf.Duration",
  "value": "1.212s"
}

swagger:model google.protobuf.Any

func (*GoogleProtobufAny) ContextValidate added in v0.23.0

func (m *GoogleProtobufAny) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this google protobuf any based on context it is used

func (*GoogleProtobufAny) MarshalBinary

func (m *GoogleProtobufAny) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*GoogleProtobufAny) UnmarshalBinary

func (m *GoogleProtobufAny) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*GoogleProtobufAny) Validate

func (m *GoogleProtobufAny) Validate(formats strfmt.Registry) error

Validate validates this google protobuf any

type GoogleProtobufFieldMask added in v0.5.0

type GoogleProtobufFieldMask struct {

	// The set of field mask paths.
	Paths []string `json:"paths"`
}

GoogleProtobufFieldMask `FieldMask` represents a set of symbolic field paths, for example:

paths: "f.a"

paths: "f.b.d"

Here `f` represents a field in some root message, `a` and `b` fields in the message found in `f`, and `d` a field found in the message in `f.b`.

Field masks are used to specify a subset of fields that should be returned by a get operation or modified by an update operation. Field masks also have a custom JSON encoding (see below).

Field Masks in Projections

When used in the context of a projection, a response message or sub-message is filtered by the API to only contain those fields as specified in the mask. For example, if the mask in the previous example is applied to a response message as follows:

f {
  a : 22
  b {
    d : 1
    x : 2
  }
  y : 13
}
z: 8

The result will not contain specific values for fields x,y and z (their value will be set to the default, and omitted in proto text output):

f {
  a : 22
  b {
    d : 1
  }
}

A repeated field is not allowed except at the last position of a paths string.

If a FieldMask object is not present in a get operation, the operation applies to all fields (as if a FieldMask of all fields had been specified).

Note that a field mask does not necessarily apply to the top-level response message. In case of a REST get operation, the field mask applies directly to the response, but in case of a REST list operation, the mask instead applies to each individual message in the returned resource list. In case of a REST custom method, other definitions may be used. Where the mask applies will be clearly documented together with its declaration in the API. In any case, the effect on the returned resource/resources is required behavior for APIs.

Field Masks in Update Operations

A field mask in update operations specifies which fields of the targeted resource are going to be updated. The API is required to only change the values of the fields as specified in the mask and leave the others untouched. If a resource is passed in to describe the updated values, the API ignores the values of all fields not covered by the mask.

If a repeated field is specified for an update operation, new values will be appended to the existing repeated field in the target resource. Note that a repeated field is only allowed in the last position of a `paths` string.

If a sub-message is specified in the last position of the field mask for an update operation, then new value will be merged into the existing sub-message in the target resource.

For example, given the target message:

f {
  b {
    d: 1
    x: 2
  }
  c: [1]
}

And an update message:

f {
  b {
    d: 10
  }
  c: [2]
}

then if the field mask is:

paths: ["f.b", "f.c"]

then the result will be:

f {
  b {
    d: 10
    x: 2
  }
  c: [1, 2]
}

An implementation may provide options to override this default behavior for repeated and message fields.

In order to reset a field's value to the default, the field must be in the mask and set to the default value in the provided resource. Hence, in order to reset all fields of a resource, provide a default instance of the resource and set all fields in the mask, or do not provide a mask as described below.

If a field mask is not present on update, the operation applies to all fields (as if a field mask of all fields has been specified). Note that in the presence of schema evolution, this may mean that fields the client does not know and has therefore not filled into the request will be reset to their default. If this is unwanted behavior, a specific service may require a client to always specify a field mask, producing an error if not.

As with get operations, the location of the resource which describes the updated values in the request message depends on the operation kind. In any case, the effect of the field mask is required to be honored by the API.

## Considerations for HTTP REST

The HTTP kind of an update operation which uses a field mask must be set to PATCH instead of PUT in order to satisfy HTTP semantics (PUT must only be used for full updates).

JSON Encoding of Field Masks

In JSON, a field mask is encoded as a single string where paths are separated by a comma. Fields name in each path are converted to/from lower-camel naming conventions.

As an example, consider the following message declarations:

message Profile {
  User user = 1;
  Photo photo = 2;
}
message User {
  string display_name = 1;
  string address = 2;
}

In proto a field mask for `Profile` may look as such:

mask {
  paths: "user.display_name"
  paths: "photo"
}

In JSON, the same mask is represented as below:

{
  mask: "user.displayName,photo"
}

Field Masks and Oneof Fields

Field masks treat fields in oneofs just as regular fields. Consider the following message:

message SampleMessage {
  oneof test_oneof {
    string name = 4;
    SubMessage sub_message = 9;
  }
}

The field mask can be:

mask {
  paths: "name"
}

Or:

mask {
  paths: "sub_message"
}

Note that oneof type names ("test_oneof" in this case) cannot be used in paths.

## Field Mask Verification

The implementation of any API method which has a FieldMask type field in the request should verify the included field paths, and return an `INVALID_ARGUMENT` error if any path is duplicated or unmappable.

swagger:model google.protobuf.FieldMask

func (*GoogleProtobufFieldMask) ContextValidate added in v0.23.0

func (m *GoogleProtobufFieldMask) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this google protobuf field mask based on context it is used

func (*GoogleProtobufFieldMask) MarshalBinary added in v0.5.0

func (m *GoogleProtobufFieldMask) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*GoogleProtobufFieldMask) UnmarshalBinary added in v0.5.0

func (m *GoogleProtobufFieldMask) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*GoogleProtobufFieldMask) Validate added in v0.5.0

func (m *GoogleProtobufFieldMask) Validate(formats strfmt.Registry) error

Validate validates this google protobuf field mask

type GoogleProtobufNullValue added in v0.23.0

type GoogleProtobufNullValue string

GoogleProtobufNullValue `NullValue` is a singleton enumeration to represent the null value for the `Value` type union.

The JSON representation for `NullValue` is JSON `null`.

- NULL_VALUE: Null value.

swagger:model google.protobuf.NullValue

const (

	// GoogleProtobufNullValueNULLVALUE captures enum value "NULL_VALUE"
	GoogleProtobufNullValueNULLVALUE GoogleProtobufNullValue = "NULL_VALUE"
)

func NewGoogleProtobufNullValue added in v0.23.0

func NewGoogleProtobufNullValue(value GoogleProtobufNullValue) *GoogleProtobufNullValue

func (GoogleProtobufNullValue) ContextValidate added in v0.23.0

func (m GoogleProtobufNullValue) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this google protobuf null value based on context it is used

func (GoogleProtobufNullValue) Pointer added in v0.23.0

Pointer returns a pointer to a freshly-allocated GoogleProtobufNullValue.

func (GoogleProtobufNullValue) Validate added in v0.23.0

func (m GoogleProtobufNullValue) Validate(formats strfmt.Registry) error

Validate validates this google protobuf null value

type GoogleRPCStatus

type GoogleRPCStatus struct {

	// The status code, which should be an enum value of
	// [google.rpc.Code][google.rpc.Code].
	Code int32 `json:"code,omitempty"`

	// A list of messages that carry the error details.  There is a common set of
	// message types for APIs to use.
	Details []*GoogleProtobufAny `json:"details"`

	// A developer-facing error message, which should be in English. Any
	// user-facing error message should be localized and sent in the
	// [google.rpc.Status.details][google.rpc.Status.details] field, or localized
	// by the client.
	Message string `json:"message,omitempty"`
}

GoogleRPCStatus The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). The error model is designed to be:

- Simple to use and understand for most users - Flexible enough to meet unexpected needs

Overview

The `Status` message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of [google.rpc.Code][google.rpc.Code], but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers *understand* and *resolve* the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package `google.rpc` that can be used for common error conditions.

Language mapping

The `Status` message is the logical representation of the error model, but it is not necessarily the actual wire format. When the `Status` message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C.

Other uses

The error model and the `Status` message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments.

Example uses of this error model include:

  • Partial errors. If a service needs to return partial errors to the client, it may embed the `Status` in the normal response to indicate the partial errors.

  • Workflow errors. A typical workflow has multiple steps. Each step may have a `Status` message for error reporting.

  • Batch operations. If a client uses batch request and batch response, the `Status` message should be used directly inside batch response, one for each error sub-response.

  • Asynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the `Status` message.

  • Logging. If some API errors are stored in logs, the message `Status` could be used directly after any stripping needed for security/privacy reasons.

swagger:model google.rpc.Status

func (*GoogleRPCStatus) ContextValidate added in v0.23.0

func (m *GoogleRPCStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this google rpc status based on the context it is used

func (*GoogleRPCStatus) MarshalBinary

func (m *GoogleRPCStatus) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*GoogleRPCStatus) UnmarshalBinary

func (m *GoogleRPCStatus) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*GoogleRPCStatus) Validate

func (m *GoogleRPCStatus) Validate(formats strfmt.Registry) error

Validate validates this google rpc status

type GrpcGatewayRuntimeError added in v0.5.0

type GrpcGatewayRuntimeError struct {

	// code
	Code int32 `json:"code,omitempty"`

	// details
	Details []*GoogleProtobufAny `json:"details"`

	// error
	Error string `json:"error,omitempty"`

	// message
	Message string `json:"message,omitempty"`
}

GrpcGatewayRuntimeError grpc gateway runtime error

swagger:model grpc.gateway.runtime.Error

func (*GrpcGatewayRuntimeError) ContextValidate added in v0.23.0

func (m *GrpcGatewayRuntimeError) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this grpc gateway runtime error based on the context it is used

func (*GrpcGatewayRuntimeError) MarshalBinary added in v0.5.0

func (m *GrpcGatewayRuntimeError) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*GrpcGatewayRuntimeError) UnmarshalBinary added in v0.5.0

func (m *GrpcGatewayRuntimeError) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*GrpcGatewayRuntimeError) Validate added in v0.5.0

func (m *GrpcGatewayRuntimeError) Validate(formats strfmt.Registry) error

Validate validates this grpc gateway runtime error

type GrpcGatewayRuntimeStreamError added in v0.72.0

type GrpcGatewayRuntimeStreamError struct {

	// details
	Details []*GoogleProtobufAny `json:"details"`

	// grpc code
	GrpcCode int32 `json:"grpc_code,omitempty"`

	// http code
	HTTPCode int32 `json:"http_code,omitempty"`

	// http status
	HTTPStatus string `json:"http_status,omitempty"`

	// message
	Message string `json:"message,omitempty"`
}

GrpcGatewayRuntimeStreamError grpc gateway runtime stream error

swagger:model grpc.gateway.runtime.StreamError

func (*GrpcGatewayRuntimeStreamError) ContextValidate added in v0.72.0

func (m *GrpcGatewayRuntimeStreamError) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this grpc gateway runtime stream error based on the context it is used

func (*GrpcGatewayRuntimeStreamError) MarshalBinary added in v0.72.0

func (m *GrpcGatewayRuntimeStreamError) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*GrpcGatewayRuntimeStreamError) UnmarshalBinary added in v0.72.0

func (m *GrpcGatewayRuntimeStreamError) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*GrpcGatewayRuntimeStreamError) Validate added in v0.72.0

func (m *GrpcGatewayRuntimeStreamError) Validate(formats strfmt.Registry) error

Validate validates this grpc gateway runtime stream error

type HashicorpCloudCommonPaginationRequest

type HashicorpCloudCommonPaginationRequest struct {

	// Specifies a page token to use to retrieve the next page. Set this to the
	// `next_page_token` returned by previous list requests to get the next page of
	// results. If set, `previous_page_token` must not be set.
	NextPageToken string `json:"next_page_token,omitempty"`

	// The max number of results per page that should be returned. If the number
	// of available results is larger than `page_size`, a `next_page_token` is
	// returned which can be used to get the next page of results in subsequent
	// requests. A value of zero will cause `page_size` to be defaulted.
	PageSize int64 `json:"page_size,omitempty"`

	// Specifies a page token to use to retrieve the previous page. Set this to
	// the `previous_page_token` returned by previous list requests to get the
	// previous page of results. If set, `next_page_token` must not be set.
	PreviousPageToken string `json:"previous_page_token,omitempty"`
}

HashicorpCloudCommonPaginationRequest PaginationRequest are the parameters for a paginated list request.

swagger:model hashicorp.cloud.common.PaginationRequest

func (*HashicorpCloudCommonPaginationRequest) ContextValidate added in v0.23.0

func (m *HashicorpCloudCommonPaginationRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this hashicorp cloud common pagination request based on context it is used

func (*HashicorpCloudCommonPaginationRequest) MarshalBinary

func (m *HashicorpCloudCommonPaginationRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*HashicorpCloudCommonPaginationRequest) UnmarshalBinary

func (m *HashicorpCloudCommonPaginationRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*HashicorpCloudCommonPaginationRequest) Validate

Validate validates this hashicorp cloud common pagination request

type HashicorpCloudCommonPaginationResponse

type HashicorpCloudCommonPaginationResponse struct {

	// This token allows you to get the next page of results for list requests.
	// If the number of results is larger than `page_size`, use the
	// `next_page_token` as a value for the query parameter `next_page_token` in
	// the next request. The value will become empty when there are no more pages.
	NextPageToken string `json:"next_page_token,omitempty"`

	// This token allows you to get the previous page of results for list
	// requests. If the number of results is larger than `page_size`, use the
	// `previous_page_token` as a value for the query parameter
	// `previous_page_token` in the next request. The value will become empty when
	// there are no more pages.
	PreviousPageToken string `json:"previous_page_token,omitempty"`
}

HashicorpCloudCommonPaginationResponse PaginationResponse is the response holding the page tokens for a paginated list response.

swagger:model hashicorp.cloud.common.PaginationResponse

func (*HashicorpCloudCommonPaginationResponse) ContextValidate added in v0.23.0

ContextValidate validates this hashicorp cloud common pagination response based on context it is used

func (*HashicorpCloudCommonPaginationResponse) MarshalBinary

func (m *HashicorpCloudCommonPaginationResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*HashicorpCloudCommonPaginationResponse) UnmarshalBinary

func (m *HashicorpCloudCommonPaginationResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*HashicorpCloudCommonPaginationResponse) Validate

Validate validates this hashicorp cloud common pagination response

type HashicorpCloudCommonSortingRequest added in v0.12.0

type HashicorpCloudCommonSortingRequest struct {

	// Specifies the list of per field ordering that should be used for sorting.
	// The order matters as rows are sorted in order by fields and when the field
	// matches, the next field is used to tie break the ordering.
	// The per field default ordering is ascending.
	//
	// The fields should be immutabile, unique, and orderable. If the field is
	// not unique, more than one sort fields should be passed.
	//
	// Example: oder_by=name,age desc,created_at asc
	// In that case, 'name' will get the default 'ascending' order.
	OrderBy []string `json:"order_by"`
}

HashicorpCloudCommonSortingRequest SortingRequest are the parameters for a sorted list request.

swagger:model hashicorp.cloud.common.SortingRequest

func (*HashicorpCloudCommonSortingRequest) ContextValidate added in v0.23.0

func (m *HashicorpCloudCommonSortingRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this hashicorp cloud common sorting request based on context it is used

func (*HashicorpCloudCommonSortingRequest) MarshalBinary added in v0.12.0

func (m *HashicorpCloudCommonSortingRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*HashicorpCloudCommonSortingRequest) UnmarshalBinary added in v0.12.0

func (m *HashicorpCloudCommonSortingRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*HashicorpCloudCommonSortingRequest) Validate added in v0.12.0

Validate validates this hashicorp cloud common sorting request

type HashicorpCloudLocationLink struct {

	// description is a human-friendly description for this link. This is
	// used primarily for informational purposes such as error messages.
	Description string `json:"description,omitempty"`

	// id is the identifier for this resource.
	ID string `json:"id,omitempty"`

	// location is the location where this resource is.
	Location *HashicorpCloudLocationLocation `json:"location,omitempty"`

	// type is the unique type of the resource. Each service publishes a
	// unique set of types. The type value is recommended to be formatted
	// in "<org>.<type>" such as "hashicorp.hvn". This is to prevent conflicts
	// in the future, but any string value will work.
	Type string `json:"type,omitempty"`

	// uuid is the unique UUID for this resource.
	UUID string `json:"uuid,omitempty"`
}

HashicorpCloudLocationLink Link is used to uniquely reference any resource within HashiCorp Cloud. This can be conceptually considered a "foreign key".

swagger:model hashicorp.cloud.location.Link

func (*HashicorpCloudLocationLink) ContextValidate added in v0.23.0

func (m *HashicorpCloudLocationLink) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this hashicorp cloud location link based on the context it is used

func (*HashicorpCloudLocationLink) MarshalBinary

func (m *HashicorpCloudLocationLink) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*HashicorpCloudLocationLink) UnmarshalBinary

func (m *HashicorpCloudLocationLink) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*HashicorpCloudLocationLink) Validate

func (m *HashicorpCloudLocationLink) Validate(formats strfmt.Registry) error

Validate validates this hashicorp cloud location link

type HashicorpCloudLocationLocation

type HashicorpCloudLocationLocation struct {

	// organization_id is the id of the organization.
	OrganizationID string `json:"organization_id,omitempty"`

	// project_id is the projects id.
	ProjectID string `json:"project_id,omitempty"`

	// region is the region that the resource is located in. It is
	// optional if the object being referenced is a global object.
	Region *HashicorpCloudLocationRegion `json:"region,omitempty"`
}

HashicorpCloudLocationLocation Location represents a target for an operation in HCP.

swagger:model hashicorp.cloud.location.Location

func (*HashicorpCloudLocationLocation) ContextValidate added in v0.23.0

func (m *HashicorpCloudLocationLocation) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this hashicorp cloud location location based on the context it is used

func (*HashicorpCloudLocationLocation) MarshalBinary

func (m *HashicorpCloudLocationLocation) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*HashicorpCloudLocationLocation) UnmarshalBinary

func (m *HashicorpCloudLocationLocation) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*HashicorpCloudLocationLocation) Validate

func (m *HashicorpCloudLocationLocation) Validate(formats strfmt.Registry) error

Validate validates this hashicorp cloud location location

type HashicorpCloudLocationRegion

type HashicorpCloudLocationRegion struct {

	// provider is the named cloud provider ("aws", "gcp", "azure")
	Provider string `json:"provider,omitempty"`

	// region is the cloud region ("us-west1", "us-east1")
	Region string `json:"region,omitempty"`
}

HashicorpCloudLocationRegion Region identifies a Cloud data-plane region.

swagger:model hashicorp.cloud.location.Region

func (*HashicorpCloudLocationRegion) ContextValidate added in v0.23.0

func (m *HashicorpCloudLocationRegion) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this hashicorp cloud location region based on context it is used

func (*HashicorpCloudLocationRegion) MarshalBinary

func (m *HashicorpCloudLocationRegion) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*HashicorpCloudLocationRegion) UnmarshalBinary

func (m *HashicorpCloudLocationRegion) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*HashicorpCloudLocationRegion) Validate

func (m *HashicorpCloudLocationRegion) Validate(formats strfmt.Registry) error

Validate validates this hashicorp cloud location region

type HashicorpCloudOperationOperation

type HashicorpCloudOperationOperation struct {

	// CreatedAt is the timestamp of when the operation was first created.
	// Format: date-time
	CreatedAt strfmt.DateTime `json:"created_at,omitempty"`

	// error is the error that occurred in the operation.
	Error *GoogleRPCStatus `json:"error,omitempty"`

	// id is the unique ID for this operation used in other RPC calls.
	// This ID is only guaranteed to be unique within the region that
	// the operation is running in.
	ID string `json:"id,omitempty"`

	// Link is the resource link the operation is associated with.
	Link *HashicorpCloudLocationLink `json:"link,omitempty"`

	// Location is location of the resource that this operation belongs to.
	Location *HashicorpCloudLocationLocation `json:"location,omitempty"`

	// response is the result of the operation. See the documentation for the API
	// call creating the operation to understand what the value of this is.
	Response *GoogleProtobufAny `json:"response,omitempty"`

	// state is the current state of the operation. This is a simple tri-state:
	// PENDING means the operation is created but not yet started, RUNNING means
	// the operation is currently running (though it may be very long-running),
	// and DONE means the operation is complete whether successfully or not.
	State *HashicorpCloudOperationOperationState `json:"state,omitempty"`

	// UpdatedAt is the timestamp of when the operation was last updated.
	// Format: date-time
	UpdatedAt strfmt.DateTime `json:"updated_at,omitempty"`
}

HashicorpCloudOperationOperation Operation represents a single operation.

swagger:model hashicorp.cloud.operation.Operation

func (*HashicorpCloudOperationOperation) ContextValidate added in v0.23.0

func (m *HashicorpCloudOperationOperation) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this hashicorp cloud operation operation based on the context it is used

func (*HashicorpCloudOperationOperation) MarshalBinary

func (m *HashicorpCloudOperationOperation) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*HashicorpCloudOperationOperation) UnmarshalBinary

func (m *HashicorpCloudOperationOperation) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*HashicorpCloudOperationOperation) Validate

Validate validates this hashicorp cloud operation operation

type HashicorpCloudOperationOperationState

type HashicorpCloudOperationOperationState string

HashicorpCloudOperationOperationState State is one of the states that an Operation can be in.

The states are purposely coarse grained to make it easy to understand the operation state machine: pending => running => done. Or pending => queued => running => done. No other state transitions are possible. Success/failure can be determined based on the result oneof.

swagger:model hashicorp.cloud.operation.Operation.State

const (

	// HashicorpCloudOperationOperationStatePENDING captures enum value "PENDING"
	HashicorpCloudOperationOperationStatePENDING HashicorpCloudOperationOperationState = "PENDING"

	// HashicorpCloudOperationOperationStateRUNNING captures enum value "RUNNING"
	HashicorpCloudOperationOperationStateRUNNING HashicorpCloudOperationOperationState = "RUNNING"

	// HashicorpCloudOperationOperationStateDONE captures enum value "DONE"
	HashicorpCloudOperationOperationStateDONE HashicorpCloudOperationOperationState = "DONE"

	// HashicorpCloudOperationOperationStateQUEUED captures enum value "QUEUED"
	HashicorpCloudOperationOperationStateQUEUED HashicorpCloudOperationOperationState = "QUEUED"
)

func NewHashicorpCloudOperationOperationState added in v0.23.0

func NewHashicorpCloudOperationOperationState(value HashicorpCloudOperationOperationState) *HashicorpCloudOperationOperationState

func (HashicorpCloudOperationOperationState) ContextValidate added in v0.23.0

ContextValidate validates this hashicorp cloud operation operation state based on context it is used

func (HashicorpCloudOperationOperationState) Pointer added in v0.23.0

Pointer returns a pointer to a freshly-allocated HashicorpCloudOperationOperationState.

func (HashicorpCloudOperationOperationState) Validate

Validate validates this hashicorp cloud operation operation state

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL