v1alpha1

package
v0.0.0-...-c58078c Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package v1alpha1 contains the v1alpha1 group ratecard resource of the Metronome provider. +kubebuilder:object:generate=true +groupName=metronome.crossplane.io +versionName=v1alpha1

Index

Constants

View Source
const (
	Group   = "metronome.crossplane.io"
	Version = "v1alpha1"
)

Package type metadata.

Variables

View Source
var (
	// SchemeGroupVersion is group version used to register these objects
	SchemeGroupVersion = schema.GroupVersion{Group: Group, Version: Version}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}
)
View Source
var (
	RateKind             = reflect.TypeOf(Rate{}).Name()
	RateGroupKind        = schema.GroupKind{Group: Group, Kind: RateKind}.String()
	RateKindAPIVersion   = RateKind + "." + SchemeGroupVersion.String()
	RateGroupVersionKind = SchemeGroupVersion.WithKind(RateKind)
)

Rate type metadata.

Functions

func ProductID

func ProductID() reference.ExtractValueFn

ProductID extracts info from a kubernetes referenced object

func RateCardID

func RateCardID() reference.ExtractValueFn

RateCardID extracts info from a kubernetes referenced object

Types

type CommitRate

type CommitRate struct {
	RateType string  `json:"rateType"`
	Price    float64 `json:"price,omitempty"`
	Tiers    []Tier  `json:"tiers,omitempty"`
}

func (*CommitRate) DeepCopy

func (in *CommitRate) DeepCopy() *CommitRate

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CommitRate.

func (*CommitRate) DeepCopyInto

func (in *CommitRate) DeepCopyInto(out *CommitRate)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CreditType

type CreditType struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

func (*CreditType) DeepCopy

func (in *CreditType) DeepCopy() *CreditType

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CreditType.

func (*CreditType) DeepCopyInto

func (in *CreditType) DeepCopyInto(out *CreditType)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ObservedRate

type ObservedRate struct {
	Entitled           bool              `json:"entitled"`
	ProductCustomField map[string]string `json:"productCustomFields"`
	ProductID          string            `json:"productId"`
	ProductName        string            `json:"productName"`
	ProductTags        []string          `json:"productTags"`
	Details            RateDetails       `json:"rate"`
	StartingAt         string            `json:"startingAt"`
	CommitRate         CommitRate        `json:"commitRate,omitempty"`
	EndingBefore       string            `json:"endingBefore,omitempty"`
	PricingGroupValues map[string]string `json:"pricingGroupValues,omitempty"`
}

ObservedRate represents the data structure of a rate card.

func (*ObservedRate) DeepCopy

func (in *ObservedRate) DeepCopy() *ObservedRate

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObservedRate.

func (*ObservedRate) DeepCopyInto

func (in *ObservedRate) DeepCopyInto(out *ObservedRate)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Rate

type Rate struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   RateSpec   `json:"spec"`
	Status RateStatus `json:"status,omitempty"`
}

Rate represents a Metronome Rate resource +kubebuilder:subresource:status +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,metronome}

func (*Rate) DeepCopy

func (in *Rate) DeepCopy() *Rate

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Rate.

func (*Rate) DeepCopyInto

func (in *Rate) DeepCopyInto(out *Rate)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Rate) DeepCopyObject

func (in *Rate) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Rate) GetCondition

func (mg *Rate) GetCondition(ct xpv1.ConditionType) xpv1.Condition

GetCondition of this Rate.

func (*Rate) GetDeletionPolicy

func (mg *Rate) GetDeletionPolicy() xpv1.DeletionPolicy

GetDeletionPolicy of this Rate.

func (*Rate) GetManagementPolicies

func (mg *Rate) GetManagementPolicies() xpv1.ManagementPolicies

GetManagementPolicies of this Rate.

func (*Rate) GetProviderConfigReference

func (mg *Rate) GetProviderConfigReference() *xpv1.Reference

GetProviderConfigReference of this Rate.

func (*Rate) GetPublishConnectionDetailsTo

func (mg *Rate) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo

GetPublishConnectionDetailsTo of this Rate.

func (*Rate) GetWriteConnectionSecretToReference

func (mg *Rate) GetWriteConnectionSecretToReference() *xpv1.SecretReference

GetWriteConnectionSecretToReference of this Rate.

func (*Rate) ResolveReferences

func (ra *Rate) ResolveReferences(ctx context.Context, c client.Reader) error

ResolveReferences of this Rate

func (*Rate) SetConditions

func (mg *Rate) SetConditions(c ...xpv1.Condition)

SetConditions of this Rate.

func (*Rate) SetDeletionPolicy

func (mg *Rate) SetDeletionPolicy(r xpv1.DeletionPolicy)

SetDeletionPolicy of this Rate.

func (*Rate) SetManagementPolicies

func (mg *Rate) SetManagementPolicies(r xpv1.ManagementPolicies)

SetManagementPolicies of this Rate.

func (*Rate) SetProviderConfigReference

func (mg *Rate) SetProviderConfigReference(r *xpv1.Reference)

SetProviderConfigReference of this Rate.

func (*Rate) SetPublishConnectionDetailsTo

func (mg *Rate) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo)

SetPublishConnectionDetailsTo of this Rate.

func (*Rate) SetWriteConnectionSecretToReference

func (mg *Rate) SetWriteConnectionSecretToReference(r *xpv1.SecretReference)

SetWriteConnectionSecretToReference of this Rate.

type RateDetails

type RateDetails struct {
	RateType           string            `json:"rateType"`
	CreditType         CreditType        `json:"creditType,omitempty"`
	IsProrated         bool              `json:"isProrated,omitempty"`
	Price              float64           `json:"price,omitempty"`
	PricingGroupValues map[string]string `json:"pricingGroupValues,omitempty"`
	Quantity           float64           `json:"quantity,omitempty"`
	Tiers              []Tier            `json:"tiers,omitempty"`
	UseListPrices      bool              `json:"useListPrices,omitempty"`
}

func (*RateDetails) DeepCopy

func (in *RateDetails) DeepCopy() *RateDetails

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RateDetails.

func (*RateDetails) DeepCopyInto

func (in *RateDetails) DeepCopyInto(out *RateDetails)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RateList

type RateList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Rate `json:"items"`
}

RateList contains a list of Rate

func (*RateList) DeepCopy

func (in *RateList) DeepCopy() *RateList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RateList.

func (*RateList) DeepCopyInto

func (in *RateList) DeepCopyInto(out *RateList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*RateList) DeepCopyObject

func (in *RateList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*RateList) GetItems

func (l *RateList) GetItems() []resource.Managed

GetItems of this RateList.

type RateParameters

type RateParameters struct {
	// +optional
	RateCardID string `json:"rateCardId,omitempty"`

	// +optional
	RateCardRef *xpv1.Reference `json:"rateCardRef,omitempty"`

	// +optional
	RateCardSelector *xpv1.Selector `json:"rateCardSelector,omitempty"`

	// +optional
	ProductID string `json:"productId"`

	// +optional
	ProductRef *xpv1.Reference `json:"productRef,omitempty"`

	// +optional
	ProductSelector *xpv1.Selector `json:"productSelector,omitempty"`

	StartingAt string `json:"startingAt"`
	Entitled   bool   `json:"entitled"`
	RateType   string `json:"rateType"`

	// Price is the default price. For FLAT and SUBSCRIPTION rateType, this
	// must be >=0 and the unit is **CENTS**. For PERCENTAGE rateType, this is
	// a decimal fraction, e.g. use 0.1 for 10%; this must be >=0 and <=1.
	Price              float64           `json:"price,omitempty"`
	PricingGroupValues map[string]string `json:"pricingGroupValues,omitempty"`
	CommitRate         *CommitRate       `json:"commitRate,omitempty"`
	CreditTypeID       string            `json:"creditTypeId,omitempty"`
	EndingBefore       string            `json:"endingBefore,omitempty"`
	IsProrated         bool              `json:"isProrated,omitempty"`
	Quantity           float64           `json:"quantity,omitempty"`
	Tiers              []Tier            `json:"tiers,omitempty"`
	UseListPrices      bool              `json:"useListPrices,omitempty"`
}

RateParameters represents the request payload for creating a rate card.

func (*RateParameters) DeepCopy

func (in *RateParameters) DeepCopy() *RateParameters

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RateParameters.

func (*RateParameters) DeepCopyInto

func (in *RateParameters) DeepCopyInto(out *RateParameters)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RateSpec

type RateSpec struct {
	xpv1.ResourceSpec `json:",inline"`
	ForProvider       RateParameters `json:"forProvider"`
}

RateSpec defines the desired state of a Rate.

func (*RateSpec) DeepCopy

func (in *RateSpec) DeepCopy() *RateSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RateSpec.

func (*RateSpec) DeepCopyInto

func (in *RateSpec) DeepCopyInto(out *RateSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RateStatus

type RateStatus struct {
	xpv1.ResourceStatus `json:",inline"`
	AtProvider          ObservedRate `json:"atProvider,omitempty"`
}

RateStatus represents the observed state of a Rate.

func (*RateStatus) DeepCopy

func (in *RateStatus) DeepCopy() *RateStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RateStatus.

func (*RateStatus) DeepCopyInto

func (in *RateStatus) DeepCopyInto(out *RateStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Tier

type Tier struct {
	Price float64 `json:"price"`
	Size  float64 `json:"size,omitempty"`
}

func (*Tier) DeepCopy

func (in *Tier) DeepCopy() *Tier

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Tier.

func (*Tier) DeepCopyInto

func (in *Tier) DeepCopyInto(out *Tier)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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