mirror of
https://github.com/rancher/types.git
synced 2025-09-24 19:39:13 +00:00
Generated changes
This commit is contained in:
@@ -5,41 +5,39 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
NamespaceType = "namespace"
|
||||
NamespaceFieldAnnotations = "annotations"
|
||||
NamespaceFieldCreated = "created"
|
||||
NamespaceFieldCreatorID = "creatorId"
|
||||
NamespaceFieldDescription = "description"
|
||||
NamespaceFieldLabels = "labels"
|
||||
NamespaceFieldName = "name"
|
||||
NamespaceFieldOwnerReferences = "ownerReferences"
|
||||
NamespaceFieldProjectID = "projectId"
|
||||
NamespaceFieldRemoved = "removed"
|
||||
NamespaceFieldResourceQuotaAppliedTemplateID = "resourceQuotaAppliedTemplateId"
|
||||
NamespaceFieldResourceQuotaTemplateID = "resourceQuotaTemplateId"
|
||||
NamespaceFieldState = "state"
|
||||
NamespaceFieldTransitioning = "transitioning"
|
||||
NamespaceFieldTransitioningMessage = "transitioningMessage"
|
||||
NamespaceFieldUUID = "uuid"
|
||||
NamespaceType = "namespace"
|
||||
NamespaceFieldAnnotations = "annotations"
|
||||
NamespaceFieldCreated = "created"
|
||||
NamespaceFieldCreatorID = "creatorId"
|
||||
NamespaceFieldDescription = "description"
|
||||
NamespaceFieldLabels = "labels"
|
||||
NamespaceFieldName = "name"
|
||||
NamespaceFieldOwnerReferences = "ownerReferences"
|
||||
NamespaceFieldProjectID = "projectId"
|
||||
NamespaceFieldRemoved = "removed"
|
||||
NamespaceFieldResourceQuota = "resourceQuota"
|
||||
NamespaceFieldState = "state"
|
||||
NamespaceFieldTransitioning = "transitioning"
|
||||
NamespaceFieldTransitioningMessage = "transitioningMessage"
|
||||
NamespaceFieldUUID = "uuid"
|
||||
)
|
||||
|
||||
type Namespace struct {
|
||||
types.Resource
|
||||
Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"`
|
||||
Created string `json:"created,omitempty" yaml:"created,omitempty"`
|
||||
CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"`
|
||||
Description string `json:"description,omitempty" yaml:"description,omitempty"`
|
||||
Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"`
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"`
|
||||
ProjectID string `json:"projectId,omitempty" yaml:"projectId,omitempty"`
|
||||
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
|
||||
ResourceQuotaAppliedTemplateID string `json:"resourceQuotaAppliedTemplateId,omitempty" yaml:"resourceQuotaAppliedTemplateId,omitempty"`
|
||||
ResourceQuotaTemplateID string `json:"resourceQuotaTemplateId,omitempty" yaml:"resourceQuotaTemplateId,omitempty"`
|
||||
State string `json:"state,omitempty" yaml:"state,omitempty"`
|
||||
Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
|
||||
TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioningMessage,omitempty"`
|
||||
UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
|
||||
Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"`
|
||||
Created string `json:"created,omitempty" yaml:"created,omitempty"`
|
||||
CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"`
|
||||
Description string `json:"description,omitempty" yaml:"description,omitempty"`
|
||||
Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"`
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"`
|
||||
ProjectID string `json:"projectId,omitempty" yaml:"projectId,omitempty"`
|
||||
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
|
||||
ResourceQuota *NamespaceResourceQuota `json:"resourceQuota,omitempty" yaml:"resourceQuota,omitempty"`
|
||||
State string `json:"state,omitempty" yaml:"state,omitempty"`
|
||||
Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
|
||||
TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioningMessage,omitempty"`
|
||||
UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
|
||||
}
|
||||
|
||||
type NamespaceCollection struct {
|
||||
|
10
client/cluster/v3/zz_generated_namespace_resource_quota.go
Normal file
10
client/cluster/v3/zz_generated_namespace_resource_quota.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
NamespaceResourceQuotaType = "namespaceResourceQuota"
|
||||
NamespaceResourceQuotaFieldLimit = "limit"
|
||||
)
|
||||
|
||||
type NamespaceResourceQuota struct {
|
||||
Limit *ResourceQuotaLimit `json:"limit,omitempty" yaml:"limit,omitempty"`
|
||||
}
|
@@ -1,23 +1,23 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
ProjectResourceLimitType = "projectResourceLimit"
|
||||
ProjectResourceLimitFieldConfigMaps = "configMaps"
|
||||
ProjectResourceLimitFieldLimitsCPU = "limitsCpu"
|
||||
ProjectResourceLimitFieldLimitsMemory = "limitsMemory"
|
||||
ProjectResourceLimitFieldPersistentVolumeClaims = "persistentVolumeClaims"
|
||||
ProjectResourceLimitFieldPods = "pods"
|
||||
ProjectResourceLimitFieldReplicationControllers = "replicationControllers"
|
||||
ProjectResourceLimitFieldRequestsCPU = "requestsCpu"
|
||||
ProjectResourceLimitFieldRequestsMemory = "requestsMemory"
|
||||
ProjectResourceLimitFieldRequestsStorage = "requestsStorage"
|
||||
ProjectResourceLimitFieldSecrets = "secrets"
|
||||
ProjectResourceLimitFieldServices = "services"
|
||||
ProjectResourceLimitFieldServicesLoadBalancers = "servicesLoadBalancers"
|
||||
ProjectResourceLimitFieldServicesNodePorts = "servicesNodePorts"
|
||||
ResourceQuotaLimitType = "resourceQuotaLimit"
|
||||
ResourceQuotaLimitFieldConfigMaps = "configMaps"
|
||||
ResourceQuotaLimitFieldLimitsCPU = "limitsCpu"
|
||||
ResourceQuotaLimitFieldLimitsMemory = "limitsMemory"
|
||||
ResourceQuotaLimitFieldPersistentVolumeClaims = "persistentVolumeClaims"
|
||||
ResourceQuotaLimitFieldPods = "pods"
|
||||
ResourceQuotaLimitFieldReplicationControllers = "replicationControllers"
|
||||
ResourceQuotaLimitFieldRequestsCPU = "requestsCpu"
|
||||
ResourceQuotaLimitFieldRequestsMemory = "requestsMemory"
|
||||
ResourceQuotaLimitFieldRequestsStorage = "requestsStorage"
|
||||
ResourceQuotaLimitFieldSecrets = "secrets"
|
||||
ResourceQuotaLimitFieldServices = "services"
|
||||
ResourceQuotaLimitFieldServicesLoadBalancers = "servicesLoadBalancers"
|
||||
ResourceQuotaLimitFieldServicesNodePorts = "servicesNodePorts"
|
||||
)
|
||||
|
||||
type ProjectResourceLimit struct {
|
||||
type ResourceQuotaLimit struct {
|
||||
ConfigMaps string `json:"configMaps,omitempty" yaml:"configMaps,omitempty"`
|
||||
LimitsCPU string `json:"limitsCpu,omitempty" yaml:"limitsCpu,omitempty"`
|
||||
LimitsMemory string `json:"limitsMemory,omitempty" yaml:"limitsMemory,omitempty"`
|
@@ -44,7 +44,6 @@ type Client struct {
|
||||
ClusterAlert ClusterAlertOperations
|
||||
ProjectAlert ProjectAlertOperations
|
||||
ComposeConfig ComposeConfigOperations
|
||||
ResourceQuotaTemplate ResourceQuotaTemplateOperations
|
||||
}
|
||||
|
||||
func NewClient(opts *clientbase.ClientOpts) (*Client, error) {
|
||||
@@ -94,7 +93,6 @@ func NewClient(opts *clientbase.ClientOpts) (*Client, error) {
|
||||
client.ClusterAlert = newClusterAlertClient(client)
|
||||
client.ProjectAlert = newProjectAlertClient(client)
|
||||
client.ComposeConfig = newComposeConfigClient(client)
|
||||
client.ResourceQuotaTemplate = newResourceQuotaTemplateClient(client)
|
||||
|
||||
return client, nil
|
||||
}
|
||||
|
@@ -0,0 +1,10 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
NamespaceResourceQuotaType = "namespaceResourceQuota"
|
||||
NamespaceResourceQuotaFieldLimit = "limit"
|
||||
)
|
||||
|
||||
type NamespaceResourceQuota struct {
|
||||
Limit *ResourceQuotaLimit `json:"limit,omitempty" yaml:"limit,omitempty"`
|
||||
}
|
@@ -14,6 +14,7 @@ const (
|
||||
ProjectFieldDescription = "description"
|
||||
ProjectFieldLabels = "labels"
|
||||
ProjectFieldName = "name"
|
||||
ProjectFieldNamespaceDefaultResourceQuota = "namespaceDefaultResourceQuota"
|
||||
ProjectFieldNamespaceId = "namespaceId"
|
||||
ProjectFieldOwnerReferences = "ownerReferences"
|
||||
ProjectFieldPodSecurityPolicyTemplateName = "podSecurityPolicyTemplateId"
|
||||
@@ -27,23 +28,24 @@ const (
|
||||
|
||||
type Project struct {
|
||||
types.Resource
|
||||
Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"`
|
||||
ClusterID string `json:"clusterId,omitempty" yaml:"clusterId,omitempty"`
|
||||
Conditions []ProjectCondition `json:"conditions,omitempty" yaml:"conditions,omitempty"`
|
||||
Created string `json:"created,omitempty" yaml:"created,omitempty"`
|
||||
CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"`
|
||||
Description string `json:"description,omitempty" yaml:"description,omitempty"`
|
||||
Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"`
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
NamespaceId string `json:"namespaceId,omitempty" yaml:"namespaceId,omitempty"`
|
||||
OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"`
|
||||
PodSecurityPolicyTemplateName string `json:"podSecurityPolicyTemplateId,omitempty" yaml:"podSecurityPolicyTemplateId,omitempty"`
|
||||
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
|
||||
ResourceQuota *ProjectResourceQuota `json:"resourceQuota,omitempty" yaml:"resourceQuota,omitempty"`
|
||||
State string `json:"state,omitempty" yaml:"state,omitempty"`
|
||||
Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
|
||||
TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioningMessage,omitempty"`
|
||||
UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
|
||||
Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"`
|
||||
ClusterID string `json:"clusterId,omitempty" yaml:"clusterId,omitempty"`
|
||||
Conditions []ProjectCondition `json:"conditions,omitempty" yaml:"conditions,omitempty"`
|
||||
Created string `json:"created,omitempty" yaml:"created,omitempty"`
|
||||
CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"`
|
||||
Description string `json:"description,omitempty" yaml:"description,omitempty"`
|
||||
Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"`
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
NamespaceDefaultResourceQuota *NamespaceResourceQuota `json:"namespaceDefaultResourceQuota,omitempty" yaml:"namespaceDefaultResourceQuota,omitempty"`
|
||||
NamespaceId string `json:"namespaceId,omitempty" yaml:"namespaceId,omitempty"`
|
||||
OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"`
|
||||
PodSecurityPolicyTemplateName string `json:"podSecurityPolicyTemplateId,omitempty" yaml:"podSecurityPolicyTemplateId,omitempty"`
|
||||
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
|
||||
ResourceQuota *ProjectResourceQuota `json:"resourceQuota,omitempty" yaml:"resourceQuota,omitempty"`
|
||||
State string `json:"state,omitempty" yaml:"state,omitempty"`
|
||||
Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
|
||||
TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioningMessage,omitempty"`
|
||||
UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
|
||||
}
|
||||
|
||||
type ProjectCollection struct {
|
||||
|
@@ -7,6 +7,6 @@ const (
|
||||
)
|
||||
|
||||
type ProjectResourceQuota struct {
|
||||
Limit *ProjectResourceLimit `json:"limit,omitempty" yaml:"limit,omitempty"`
|
||||
UsedLimit *ProjectResourceLimit `json:"usedLimit,omitempty" yaml:"usedLimit,omitempty"`
|
||||
Limit *ResourceQuotaLimit `json:"limit,omitempty" yaml:"limit,omitempty"`
|
||||
UsedLimit *ResourceQuotaLimit `json:"usedLimit,omitempty" yaml:"usedLimit,omitempty"`
|
||||
}
|
||||
|
@@ -1,16 +1,18 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
ProjectSpecType = "projectSpec"
|
||||
ProjectSpecFieldClusterID = "clusterId"
|
||||
ProjectSpecFieldDescription = "description"
|
||||
ProjectSpecFieldDisplayName = "displayName"
|
||||
ProjectSpecFieldResourceQuota = "resourceQuota"
|
||||
ProjectSpecType = "projectSpec"
|
||||
ProjectSpecFieldClusterID = "clusterId"
|
||||
ProjectSpecFieldDescription = "description"
|
||||
ProjectSpecFieldDisplayName = "displayName"
|
||||
ProjectSpecFieldNamespaceDefaultResourceQuota = "namespaceDefaultResourceQuota"
|
||||
ProjectSpecFieldResourceQuota = "resourceQuota"
|
||||
)
|
||||
|
||||
type ProjectSpec struct {
|
||||
ClusterID string `json:"clusterId,omitempty" yaml:"clusterId,omitempty"`
|
||||
Description string `json:"description,omitempty" yaml:"description,omitempty"`
|
||||
DisplayName string `json:"displayName,omitempty" yaml:"displayName,omitempty"`
|
||||
ResourceQuota *ProjectResourceQuota `json:"resourceQuota,omitempty" yaml:"resourceQuota,omitempty"`
|
||||
ClusterID string `json:"clusterId,omitempty" yaml:"clusterId,omitempty"`
|
||||
Description string `json:"description,omitempty" yaml:"description,omitempty"`
|
||||
DisplayName string `json:"displayName,omitempty" yaml:"displayName,omitempty"`
|
||||
NamespaceDefaultResourceQuota *NamespaceResourceQuota `json:"namespaceDefaultResourceQuota,omitempty" yaml:"namespaceDefaultResourceQuota,omitempty"`
|
||||
ResourceQuota *ProjectResourceQuota `json:"resourceQuota,omitempty" yaml:"resourceQuota,omitempty"`
|
||||
}
|
||||
|
34
client/management/v3/zz_generated_resource_quota_limit.go
Normal file
34
client/management/v3/zz_generated_resource_quota_limit.go
Normal file
@@ -0,0 +1,34 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
ResourceQuotaLimitType = "resourceQuotaLimit"
|
||||
ResourceQuotaLimitFieldConfigMaps = "configMaps"
|
||||
ResourceQuotaLimitFieldLimitsCPU = "limitsCpu"
|
||||
ResourceQuotaLimitFieldLimitsMemory = "limitsMemory"
|
||||
ResourceQuotaLimitFieldPersistentVolumeClaims = "persistentVolumeClaims"
|
||||
ResourceQuotaLimitFieldPods = "pods"
|
||||
ResourceQuotaLimitFieldReplicationControllers = "replicationControllers"
|
||||
ResourceQuotaLimitFieldRequestsCPU = "requestsCpu"
|
||||
ResourceQuotaLimitFieldRequestsMemory = "requestsMemory"
|
||||
ResourceQuotaLimitFieldRequestsStorage = "requestsStorage"
|
||||
ResourceQuotaLimitFieldSecrets = "secrets"
|
||||
ResourceQuotaLimitFieldServices = "services"
|
||||
ResourceQuotaLimitFieldServicesLoadBalancers = "servicesLoadBalancers"
|
||||
ResourceQuotaLimitFieldServicesNodePorts = "servicesNodePorts"
|
||||
)
|
||||
|
||||
type ResourceQuotaLimit struct {
|
||||
ConfigMaps string `json:"configMaps,omitempty" yaml:"configMaps,omitempty"`
|
||||
LimitsCPU string `json:"limitsCpu,omitempty" yaml:"limitsCpu,omitempty"`
|
||||
LimitsMemory string `json:"limitsMemory,omitempty" yaml:"limitsMemory,omitempty"`
|
||||
PersistentVolumeClaims string `json:"persistentVolumeClaims,omitempty" yaml:"persistentVolumeClaims,omitempty"`
|
||||
Pods string `json:"pods,omitempty" yaml:"pods,omitempty"`
|
||||
ReplicationControllers string `json:"replicationControllers,omitempty" yaml:"replicationControllers,omitempty"`
|
||||
RequestsCPU string `json:"requestsCpu,omitempty" yaml:"requestsCpu,omitempty"`
|
||||
RequestsMemory string `json:"requestsMemory,omitempty" yaml:"requestsMemory,omitempty"`
|
||||
RequestsStorage string `json:"requestsStorage,omitempty" yaml:"requestsStorage,omitempty"`
|
||||
Secrets string `json:"secrets,omitempty" yaml:"secrets,omitempty"`
|
||||
Services string `json:"services,omitempty" yaml:"services,omitempty"`
|
||||
ServicesLoadBalancers string `json:"servicesLoadBalancers,omitempty" yaml:"servicesLoadBalancers,omitempty"`
|
||||
ServicesNodePorts string `json:"servicesNodePorts,omitempty" yaml:"servicesNodePorts,omitempty"`
|
||||
}
|
@@ -1,111 +0,0 @@
|
||||
package client
|
||||
|
||||
import (
|
||||
"github.com/rancher/norman/types"
|
||||
)
|
||||
|
||||
const (
|
||||
ResourceQuotaTemplateType = "resourceQuotaTemplate"
|
||||
ResourceQuotaTemplateFieldAnnotations = "annotations"
|
||||
ResourceQuotaTemplateFieldClusterID = "clusterId"
|
||||
ResourceQuotaTemplateFieldCreated = "created"
|
||||
ResourceQuotaTemplateFieldCreatorID = "creatorId"
|
||||
ResourceQuotaTemplateFieldDescription = "description"
|
||||
ResourceQuotaTemplateFieldIsDefault = "isDefault"
|
||||
ResourceQuotaTemplateFieldLabels = "labels"
|
||||
ResourceQuotaTemplateFieldLimit = "limit"
|
||||
ResourceQuotaTemplateFieldName = "name"
|
||||
ResourceQuotaTemplateFieldNamespaceId = "namespaceId"
|
||||
ResourceQuotaTemplateFieldOwnerReferences = "ownerReferences"
|
||||
ResourceQuotaTemplateFieldRemoved = "removed"
|
||||
ResourceQuotaTemplateFieldUUID = "uuid"
|
||||
ResourceQuotaTemplateFieldUsedLimit = "usedLimit"
|
||||
)
|
||||
|
||||
type ResourceQuotaTemplate struct {
|
||||
types.Resource
|
||||
Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"`
|
||||
ClusterID string `json:"clusterId,omitempty" yaml:"clusterId,omitempty"`
|
||||
Created string `json:"created,omitempty" yaml:"created,omitempty"`
|
||||
CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"`
|
||||
Description string `json:"description,omitempty" yaml:"description,omitempty"`
|
||||
IsDefault bool `json:"isDefault,omitempty" yaml:"isDefault,omitempty"`
|
||||
Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"`
|
||||
Limit *ProjectResourceLimit `json:"limit,omitempty" yaml:"limit,omitempty"`
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
NamespaceId string `json:"namespaceId,omitempty" yaml:"namespaceId,omitempty"`
|
||||
OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"`
|
||||
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
|
||||
UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
|
||||
UsedLimit *ProjectResourceLimit `json:"usedLimit,omitempty" yaml:"usedLimit,omitempty"`
|
||||
}
|
||||
|
||||
type ResourceQuotaTemplateCollection struct {
|
||||
types.Collection
|
||||
Data []ResourceQuotaTemplate `json:"data,omitempty"`
|
||||
client *ResourceQuotaTemplateClient
|
||||
}
|
||||
|
||||
type ResourceQuotaTemplateClient struct {
|
||||
apiClient *Client
|
||||
}
|
||||
|
||||
type ResourceQuotaTemplateOperations interface {
|
||||
List(opts *types.ListOpts) (*ResourceQuotaTemplateCollection, error)
|
||||
Create(opts *ResourceQuotaTemplate) (*ResourceQuotaTemplate, error)
|
||||
Update(existing *ResourceQuotaTemplate, updates interface{}) (*ResourceQuotaTemplate, error)
|
||||
Replace(existing *ResourceQuotaTemplate) (*ResourceQuotaTemplate, error)
|
||||
ByID(id string) (*ResourceQuotaTemplate, error)
|
||||
Delete(container *ResourceQuotaTemplate) error
|
||||
}
|
||||
|
||||
func newResourceQuotaTemplateClient(apiClient *Client) *ResourceQuotaTemplateClient {
|
||||
return &ResourceQuotaTemplateClient{
|
||||
apiClient: apiClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *ResourceQuotaTemplateClient) Create(container *ResourceQuotaTemplate) (*ResourceQuotaTemplate, error) {
|
||||
resp := &ResourceQuotaTemplate{}
|
||||
err := c.apiClient.Ops.DoCreate(ResourceQuotaTemplateType, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ResourceQuotaTemplateClient) Update(existing *ResourceQuotaTemplate, updates interface{}) (*ResourceQuotaTemplate, error) {
|
||||
resp := &ResourceQuotaTemplate{}
|
||||
err := c.apiClient.Ops.DoUpdate(ResourceQuotaTemplateType, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ResourceQuotaTemplateClient) Replace(obj *ResourceQuotaTemplate) (*ResourceQuotaTemplate, error) {
|
||||
resp := &ResourceQuotaTemplate{}
|
||||
err := c.apiClient.Ops.DoReplace(ResourceQuotaTemplateType, &obj.Resource, obj, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ResourceQuotaTemplateClient) List(opts *types.ListOpts) (*ResourceQuotaTemplateCollection, error) {
|
||||
resp := &ResourceQuotaTemplateCollection{}
|
||||
err := c.apiClient.Ops.DoList(ResourceQuotaTemplateType, opts, resp)
|
||||
resp.client = c
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (cc *ResourceQuotaTemplateCollection) Next() (*ResourceQuotaTemplateCollection, error) {
|
||||
if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
|
||||
resp := &ResourceQuotaTemplateCollection{}
|
||||
err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp)
|
||||
resp.client = cc.client
|
||||
return resp, err
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (c *ResourceQuotaTemplateClient) ByID(id string) (*ResourceQuotaTemplate, error) {
|
||||
resp := &ResourceQuotaTemplate{}
|
||||
err := c.apiClient.Ops.DoByID(ResourceQuotaTemplateType, id, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *ResourceQuotaTemplateClient) Delete(container *ResourceQuotaTemplate) error {
|
||||
return c.apiClient.Ops.DoResourceDelete(ResourceQuotaTemplateType, &container.Resource)
|
||||
}
|
Reference in New Issue
Block a user