Add Ionos Cloud cloudprovider
This change implements autoscaling for Kubernetes on Ionos Cloud.
This commit is contained in:
		
							parent
							
								
									213c951924
								
							
						
					
					
						commit
						dad480ddd1
					
				|  | @ -19,6 +19,7 @@ You should also take a look at the notes and "gotchas" for your specific cloud p | |||
| * [CloudStack](./cloudprovider/cloudstack/README.md) | ||||
| * [HuaweiCloud](./cloudprovider/huaweicloud/README.md) | ||||
| * [Packet](./cloudprovider/packet/README.md#notes)  | ||||
| * [IonosCloud](./cloudprovider/ionoscloud/README.md) | ||||
| 
 | ||||
| # Releases | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| // +build !gce,!aws,!azure,!kubemark,!alicloud,!magnum,!digitalocean,!clusterapi,!huaweicloud
 | ||||
| // +build !gce,!aws,!azure,!kubemark,!alicloud,!magnum,!digitalocean,!clusterapi,!huaweicloud,!ionoscloud
 | ||||
| 
 | ||||
| /* | ||||
| Copyright 2018 The Kubernetes Authors. | ||||
|  | @ -30,6 +30,7 @@ import ( | |||
| 	"k8s.io/autoscaler/cluster-autoscaler/cloudprovider/exoscale" | ||||
| 	"k8s.io/autoscaler/cluster-autoscaler/cloudprovider/gce" | ||||
| 	"k8s.io/autoscaler/cluster-autoscaler/cloudprovider/huaweicloud" | ||||
| 	"k8s.io/autoscaler/cluster-autoscaler/cloudprovider/ionoscloud" | ||||
| 	"k8s.io/autoscaler/cluster-autoscaler/cloudprovider/magnum" | ||||
| 	"k8s.io/autoscaler/cluster-autoscaler/cloudprovider/packet" | ||||
| 	"k8s.io/autoscaler/cluster-autoscaler/config" | ||||
|  | @ -48,6 +49,7 @@ var AvailableCloudProviders = []string{ | |||
| 	cloudprovider.ExoscaleProviderName, | ||||
| 	cloudprovider.HuaweicloudProviderName, | ||||
| 	clusterapi.ProviderName, | ||||
| 	cloudprovider.IonoscloudProviderName, | ||||
| } | ||||
| 
 | ||||
| // DefaultCloudProvider is GCE.
 | ||||
|  | @ -79,6 +81,8 @@ func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGro | |||
| 		return packet.BuildPacket(opts, do, rl) | ||||
| 	case clusterapi.ProviderName: | ||||
| 		return clusterapi.BuildClusterAPI(opts, do, rl) | ||||
| 	case cloudprovider.IonoscloudProviderName: | ||||
| 		return ionoscloud.BuildIonosCloud(opts, do, rl) | ||||
| 	} | ||||
| 	return nil | ||||
| } | ||||
|  |  | |||
|  | @ -0,0 +1,42 @@ | |||
| // +build ionoscloud
 | ||||
| 
 | ||||
| /* | ||||
| Copyright 2020 The Kubernetes Authors. | ||||
| 
 | ||||
| Licensed under the Apache License, Version 2.0 (the "License"); | ||||
| you may not use this file except in compliance with the License. | ||||
| You may obtain a copy of the License at | ||||
| 
 | ||||
|     http://www.apache.org/licenses/LICENSE-2.0
 | ||||
| 
 | ||||
| Unless required by applicable law or agreed to in writing, software | ||||
| distributed under the License is distributed on an "AS IS" BASIS, | ||||
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||||
| See the License for the specific language governing permissions and | ||||
| limitations under the License. | ||||
| */ | ||||
| 
 | ||||
| package builder | ||||
| 
 | ||||
| import ( | ||||
| 	"k8s.io/autoscaler/cluster-autoscaler/cloudprovider" | ||||
| 	"k8s.io/autoscaler/cluster-autoscaler/cloudprovider/ionoscloud" | ||||
| 	"k8s.io/autoscaler/cluster-autoscaler/config" | ||||
| ) | ||||
| 
 | ||||
| // AvailableCloudProviders supported by the cloud provider builder.
 | ||||
| var AvailableCloudProviders = []string{ | ||||
| 	cloudprovider.IonoscloudProviderName, | ||||
| } | ||||
| 
 | ||||
| // DefaultCloudProvider for IonosCloud-only build is ionoscloud.
 | ||||
| const DefaultCloudProvider = cloudprovider.IonoscloudProviderName | ||||
| 
 | ||||
| func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter) cloudprovider.CloudProvider { | ||||
| 	switch opts.CloudProviderName { | ||||
| 	case cloudprovider.IonoscloudProviderName: | ||||
| 		return ionoscloud.BuildIonosCloud(opts, do, rl) | ||||
| 	} | ||||
| 
 | ||||
| 	return nil | ||||
| } | ||||
|  | @ -49,6 +49,8 @@ const ( | |||
| 	KubemarkProviderName = "kubemark" | ||||
| 	// HuaweicloudProviderName gets the provider name of huaweicloud
 | ||||
| 	HuaweicloudProviderName = "huaweicloud" | ||||
| 	// IonoscloudProviderName gets the provider name of ionoscloud
 | ||||
| 	IonoscloudProviderName = "ionoscloud" | ||||
| ) | ||||
| 
 | ||||
| // CloudProvider contains configuration info and functions for interacting with
 | ||||
|  |  | |||
|  | @ -0,0 +1,2 @@ | |||
| *.out | ||||
| .envrc | ||||
|  | @ -0,0 +1,3 @@ | |||
| maintainers: | ||||
| - avorima | ||||
| - schegi | ||||
|  | @ -0,0 +1,34 @@ | |||
| # Cluster Autoscaler on Ionos Cloud Managed Kubernetes | ||||
| 
 | ||||
| The cluster autoscaler for the Ionos Cloud scales worker nodes within Managed Kubernetes cluster | ||||
| node pools. It can be deployed as `Deployment` in your cluster. | ||||
| 
 | ||||
| ## Deployment | ||||
| 
 | ||||
| ### Managed | ||||
| 
 | ||||
| Managed autoscaling can be enabled or disabled via Kubernetes Manager in the [DCD](https://dcd.ionos.com/latest/) | ||||
| or [API](https://devops.ionos.com/api/cloud/v5/#update-a-nodepool). | ||||
| In this case a `Deployment` is not needed, since it will be deployed in the managed Kubernetes controlplane. | ||||
| 
 | ||||
| ### In-cluster | ||||
| 
 | ||||
| Build and push a docker image in the `cluster-autoscaler` directory: | ||||
| 
 | ||||
| ```sh | ||||
| make build-in-docker BUILD_TAGS=ionoscloud | ||||
| make make-image BUILD_TAGS=ionoscloud TAG='<tag>' REGISTRY='<registry>' | ||||
| make push-image BUILD_TAGS=ionoscloud TAG='<tag>' REGISTRY='<registry>' | ||||
| ``` | ||||
| 
 | ||||
| If you don't have a token, generate one: | ||||
| 
 | ||||
| ```sh | ||||
| curl -u '<username>' -p '<password>' https://api.ionos.com/auth/v1/tokens/generate | ||||
| ``` | ||||
| 
 | ||||
| Edit [`cluster-autoscaler-standard.yaml`](./examples/cluster-autoscaler-standard.yaml) and deploy it: | ||||
| 
 | ||||
| ```console | ||||
| kubectl apply -f examples/cluster-autoscaler-standard.yaml | ||||
| ``` | ||||
|  | @ -0,0 +1,285 @@ | |||
| /* | ||||
| Copyright 2020 The Kubernetes Authors. | ||||
| 
 | ||||
| Licensed under the Apache License, Version 2.0 (the "License"); | ||||
| you may not use this file except in compliance with the License. | ||||
| You may obtain a copy of the License at | ||||
| 
 | ||||
|     http://www.apache.org/licenses/LICENSE-2.0
 | ||||
| 
 | ||||
| Unless required by applicable law or agreed to in writing, software | ||||
| distributed under the License is distributed on an "AS IS" BASIS, | ||||
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||||
| See the License for the specific language governing permissions and | ||||
| limitations under the License. | ||||
| */ | ||||
| 
 | ||||
| package ionoscloud | ||||
| 
 | ||||
| import ( | ||||
| 	"sync" | ||||
| 	"time" | ||||
| 
 | ||||
| 	"k8s.io/autoscaler/cluster-autoscaler/cloudprovider" | ||||
| 	"k8s.io/klog/v2" | ||||
| ) | ||||
| 
 | ||||
| const nodeGroupCacheEntryTimeout = 2 * time.Minute | ||||
| 
 | ||||
| type nodeGroupCacheEntry struct { | ||||
| 	data cloudprovider.NodeGroup | ||||
| 	ts   time.Time | ||||
| } | ||||
| 
 | ||||
| var timeNow = time.Now | ||||
| 
 | ||||
| // IonosCache caches resources to reduce API calls.
 | ||||
| // Cached state includes autoscaling limits, sizes and target sizes, a mapping of instances to node
 | ||||
| // groups, and a simple lock mechanism to prevent invalid node group writes.
 | ||||
| type IonosCache struct { | ||||
| 	mutex sync.Mutex | ||||
| 
 | ||||
| 	nodeGroups           map[string]nodeGroupCacheEntry | ||||
| 	nodesToNodeGroups    map[string]string | ||||
| 	instances            map[string]cloudprovider.Instance | ||||
| 	nodeGroupSizes       map[string]int | ||||
| 	nodeGroupTargetSizes map[string]int | ||||
| 	nodeGroupLockTable   map[string]bool | ||||
| } | ||||
| 
 | ||||
| // NewIonosCache initializes a new IonosCache.
 | ||||
| func NewIonosCache() *IonosCache { | ||||
| 	return &IonosCache{ | ||||
| 		nodeGroups:           map[string]nodeGroupCacheEntry{}, | ||||
| 		nodesToNodeGroups:    map[string]string{}, | ||||
| 		instances:            map[string]cloudprovider.Instance{}, | ||||
| 		nodeGroupSizes:       map[string]int{}, | ||||
| 		nodeGroupTargetSizes: map[string]int{}, | ||||
| 		nodeGroupLockTable:   map[string]bool{}, | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| // GetInstancesForNodeGroup returns the list of cached instances a node group.
 | ||||
| func (cache *IonosCache) GetInstancesForNodeGroup(id string) []cloudprovider.Instance { | ||||
| 	cache.mutex.Lock() | ||||
| 	defer cache.mutex.Unlock() | ||||
| 
 | ||||
| 	var nodeIds []string | ||||
| 	for nodeId, nodeGroupId := range cache.nodesToNodeGroups { | ||||
| 		if nodeGroupId == id { | ||||
| 			nodeIds = append(nodeIds, nodeId) | ||||
| 		} | ||||
| 	} | ||||
| 	instances := make([]cloudprovider.Instance, len(nodeIds)) | ||||
| 	for i, id := range nodeIds { | ||||
| 		instances[i] = cache.instances[id] | ||||
| 	} | ||||
| 	return instances | ||||
| } | ||||
| 
 | ||||
| // AddNodeGroup adds a node group to the cache.
 | ||||
| func (cache *IonosCache) AddNodeGroup(newPool cloudprovider.NodeGroup) { | ||||
| 	cache.mutex.Lock() | ||||
| 	defer cache.mutex.Unlock() | ||||
| 
 | ||||
| 	cache.nodeGroups[newPool.Id()] = nodeGroupCacheEntry{data: newPool} | ||||
| } | ||||
| 
 | ||||
| func (cache *IonosCache) removeNodesForNodeGroupNoLock(id string) { | ||||
| 	for nodeId, nodeGroupId := range cache.nodesToNodeGroups { | ||||
| 		if nodeGroupId == id { | ||||
| 			delete(cache.instances, nodeId) | ||||
| 			delete(cache.nodesToNodeGroups, nodeId) | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| // RemoveInstanceFromCache deletes an instance and its respective mapping to the node group from
 | ||||
| // the cache.
 | ||||
| func (cache *IonosCache) RemoveInstanceFromCache(id string) { | ||||
| 	cache.mutex.Lock() | ||||
| 	defer cache.mutex.Unlock() | ||||
| 
 | ||||
| 	klog.V(5).Infof("Removed instance %s from cache", id) | ||||
| 	nodeGroupId := cache.nodesToNodeGroups[id] | ||||
| 	delete(cache.nodesToNodeGroups, id) | ||||
| 	delete(cache.instances, id) | ||||
| 	cache.updateNodeGroupTimestampNoLock(nodeGroupId) | ||||
| } | ||||
| 
 | ||||
| // SetInstancesCache overwrites all cached instances and node group mappings.
 | ||||
| func (cache *IonosCache) SetInstancesCache(nodeGroupInstances map[string][]cloudprovider.Instance) { | ||||
| 	cache.mutex.Lock() | ||||
| 	defer cache.mutex.Unlock() | ||||
| 
 | ||||
| 	cache.nodesToNodeGroups = map[string]string{} | ||||
| 	cache.instances = map[string]cloudprovider.Instance{} | ||||
| 
 | ||||
| 	for id, instances := range nodeGroupInstances { | ||||
| 		cache.setInstancesCacheForNodeGroupNoLock(id, instances) | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| // SetInstancesCacheForNodeGroup overwrites cached instances and mappings for a node group.
 | ||||
| func (cache *IonosCache) SetInstancesCacheForNodeGroup(id string, instances []cloudprovider.Instance) { | ||||
| 	cache.mutex.Lock() | ||||
| 	defer cache.mutex.Unlock() | ||||
| 
 | ||||
| 	cache.removeNodesForNodeGroupNoLock(id) | ||||
| 	cache.setInstancesCacheForNodeGroupNoLock(id, instances) | ||||
| } | ||||
| 
 | ||||
| func (cache *IonosCache) setInstancesCacheForNodeGroupNoLock(id string, instances []cloudprovider.Instance) { | ||||
| 	for _, instance := range instances { | ||||
| 		nodeId := convertToNodeId(instance.Id) | ||||
| 		cache.nodesToNodeGroups[nodeId] = id | ||||
| 		cache.instances[nodeId] = instance | ||||
| 	} | ||||
| 	cache.updateNodeGroupTimestampNoLock(id) | ||||
| } | ||||
| 
 | ||||
| // GetNodeGroupIds returns an unsorted list of cached node group ids.
 | ||||
| func (cache *IonosCache) GetNodeGroupIds() []string { | ||||
| 	cache.mutex.Lock() | ||||
| 	defer cache.mutex.Unlock() | ||||
| 
 | ||||
| 	return cache.getNodeGroupIds() | ||||
| } | ||||
| 
 | ||||
| func (cache *IonosCache) getNodeGroupIds() []string { | ||||
| 	ids := make([]string, 0, len(cache.nodeGroups)) | ||||
| 	for id := range cache.nodeGroups { | ||||
| 		ids = append(ids, id) | ||||
| 	} | ||||
| 	return ids | ||||
| } | ||||
| 
 | ||||
| // GetNodeGroups returns an unsorted list of cached node groups.
 | ||||
| func (cache *IonosCache) GetNodeGroups() []cloudprovider.NodeGroup { | ||||
| 	cache.mutex.Lock() | ||||
| 	defer cache.mutex.Unlock() | ||||
| 
 | ||||
| 	nodeGroups := make([]cloudprovider.NodeGroup, 0, len(cache.nodeGroups)) | ||||
| 	for id := range cache.nodeGroups { | ||||
| 		nodeGroups = append(nodeGroups, cache.nodeGroups[id].data) | ||||
| 	} | ||||
| 	return nodeGroups | ||||
| } | ||||
| 
 | ||||
| // GetInstances returns an unsorted list of all cached instances.
 | ||||
| func (cache *IonosCache) GetInstances() []cloudprovider.Instance { | ||||
| 	cache.mutex.Lock() | ||||
| 	defer cache.mutex.Unlock() | ||||
| 
 | ||||
| 	instances := make([]cloudprovider.Instance, 0, len(cache.nodesToNodeGroups)) | ||||
| 	for _, instance := range cache.instances { | ||||
| 		instances = append(instances, instance) | ||||
| 	} | ||||
| 	return instances | ||||
| } | ||||
| 
 | ||||
| // GetNodeGroupForNode returns the node group for the given node.
 | ||||
| // Returns nil if either the mapping or the node group is not cached.
 | ||||
| func (cache *IonosCache) GetNodeGroupForNode(nodeId string) cloudprovider.NodeGroup { | ||||
| 	cache.mutex.Lock() | ||||
| 	defer cache.mutex.Unlock() | ||||
| 
 | ||||
| 	id, found := cache.nodesToNodeGroups[nodeId] | ||||
| 	if !found { | ||||
| 		return nil | ||||
| 	} | ||||
| 	entry, found := cache.nodeGroups[id] | ||||
| 	if !found { | ||||
| 		return nil | ||||
| 	} | ||||
| 	return entry.data | ||||
| } | ||||
| 
 | ||||
| // TryLockNodeGroup tries to write a node group lock entry.
 | ||||
| // Returns true if the write was successful.
 | ||||
| func (cache *IonosCache) TryLockNodeGroup(nodeGroup cloudprovider.NodeGroup) bool { | ||||
| 	cache.mutex.Lock() | ||||
| 	defer cache.mutex.Unlock() | ||||
| 
 | ||||
| 	if cache.nodeGroupLockTable[nodeGroup.Id()] { | ||||
| 		return false | ||||
| 	} | ||||
| 
 | ||||
| 	klog.V(4).Infof("Acquired lock for node group %s", nodeGroup.Id()) | ||||
| 	cache.nodeGroupLockTable[nodeGroup.Id()] = true | ||||
| 	return true | ||||
| } | ||||
| 
 | ||||
| // UnlockNodeGroup deletes a node group lock entry if it exists.
 | ||||
| func (cache *IonosCache) UnlockNodeGroup(nodeGroup cloudprovider.NodeGroup) { | ||||
| 	cache.mutex.Lock() | ||||
| 	defer cache.mutex.Unlock() | ||||
| 
 | ||||
| 	if _, found := cache.nodeGroupLockTable[nodeGroup.Id()]; found { | ||||
| 		klog.V(5).Infof("Released lock for node group %s", nodeGroup.Id()) | ||||
| 		delete(cache.nodeGroupLockTable, nodeGroup.Id()) | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| // GetNodeGroupSize gets the node group's size. Return true if the size was in the cache.
 | ||||
| func (cache *IonosCache) GetNodeGroupSize(id string) (int, bool) { | ||||
| 	cache.mutex.Lock() | ||||
| 	defer cache.mutex.Unlock() | ||||
| 
 | ||||
| 	size, found := cache.nodeGroupSizes[id] | ||||
| 	return size, found | ||||
| } | ||||
| 
 | ||||
| // SetNodeGroupSize sets the node group's size.
 | ||||
| func (cache *IonosCache) SetNodeGroupSize(id string, size int) { | ||||
| 	cache.mutex.Lock() | ||||
| 	defer cache.mutex.Unlock() | ||||
| 
 | ||||
| 	previousSize := cache.nodeGroupSizes[id] | ||||
| 	klog.V(5).Infof("Updated node group size cache: nodeGroup=%s, previousSize=%d, currentSize=%d", id, previousSize, size) | ||||
| 	cache.nodeGroupSizes[id] = size | ||||
| } | ||||
| 
 | ||||
| // GetNodeGroupTargetSize gets the node group's target size. Return true if the target size was in the
 | ||||
| // cache.
 | ||||
| func (cache *IonosCache) GetNodeGroupTargetSize(id string) (int, bool) { | ||||
| 	cache.mutex.Lock() | ||||
| 	defer cache.mutex.Unlock() | ||||
| 
 | ||||
| 	size, found := cache.nodeGroupTargetSizes[id] | ||||
| 	return size, found | ||||
| } | ||||
| 
 | ||||
| // SetNodeGroupTargetSize sets the node group's target size.
 | ||||
| func (cache *IonosCache) SetNodeGroupTargetSize(id string, size int) { | ||||
| 	cache.mutex.Lock() | ||||
| 	defer cache.mutex.Unlock() | ||||
| 
 | ||||
| 	previousSize := cache.nodeGroupSizes[id] | ||||
| 	klog.V(5).Infof("Updated node group target size cache: nodeGroup=%s, previousTargetSize=%d, currentTargetSize=%d", id, previousSize, size) | ||||
| 	cache.nodeGroupTargetSizes[id] = size | ||||
| } | ||||
| 
 | ||||
| // InvalidateNodeGroupTargetSize deletes a node group's target size entry.
 | ||||
| func (cache *IonosCache) InvalidateNodeGroupTargetSize(id string) { | ||||
| 	cache.mutex.Lock() | ||||
| 	defer cache.mutex.Unlock() | ||||
| 
 | ||||
| 	delete(cache.nodeGroupTargetSizes, id) | ||||
| } | ||||
| 
 | ||||
| // NodeGroupNeedsRefresh returns true when the instances for the given node group have not been
 | ||||
| // updated for more than 2 minutes.
 | ||||
| func (cache *IonosCache) NodeGroupNeedsRefresh(id string) bool { | ||||
| 	cache.mutex.Lock() | ||||
| 	defer cache.mutex.Unlock() | ||||
| 
 | ||||
| 	return timeNow().Sub(cache.nodeGroups[id].ts) > nodeGroupCacheEntryTimeout | ||||
| } | ||||
| 
 | ||||
| func (cache *IonosCache) updateNodeGroupTimestampNoLock(id string) { | ||||
| 	if entry, ok := cache.nodeGroups[id]; ok { | ||||
| 		entry.ts = timeNow() | ||||
| 		cache.nodeGroups[id] = entry | ||||
| 	} | ||||
| } | ||||
|  | @ -0,0 +1,220 @@ | |||
| /* | ||||
| Copyright 2020 The Kubernetes Authors. | ||||
| 
 | ||||
| Licensed under the Apache License, Version 2.0 (the "License"); | ||||
| you may not use this file except in compliance with the License. | ||||
| You may obtain a copy of the License at | ||||
| 
 | ||||
|     http://www.apache.org/licenses/LICENSE-2.0
 | ||||
| 
 | ||||
| Unless required by applicable law or agreed to in writing, software | ||||
| distributed under the License is distributed on an "AS IS" BASIS, | ||||
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||||
| See the License for the specific language governing permissions and | ||||
| limitations under the License. | ||||
| */ | ||||
| 
 | ||||
| package ionoscloud | ||||
| 
 | ||||
| import ( | ||||
| 	"testing" | ||||
| 	"time" | ||||
| 
 | ||||
| 	"github.com/stretchr/testify/require" | ||||
| 	"k8s.io/autoscaler/cluster-autoscaler/cloudprovider" | ||||
| ) | ||||
| 
 | ||||
| func newCacheEntry(data cloudprovider.NodeGroup, ts time.Time) nodeGroupCacheEntry { | ||||
| 	return nodeGroupCacheEntry{data: data, ts: ts} | ||||
| } | ||||
| 
 | ||||
| func TestCache_GetInstancesForNodeGroup(t *testing.T) { | ||||
| 	cache := NewIonosCache() | ||||
| 	cache.nodesToNodeGroups = map[string]string{ | ||||
| 		"node-1": "nodepool-1", | ||||
| 		"node-2": "nodepool-2", | ||||
| 		"node-3": "nodepool-1", | ||||
| 	} | ||||
| 	cache.instances = map[string]cloudprovider.Instance{ | ||||
| 		"node-1": {Id: convertToInstanceId("node-1")}, | ||||
| 		"node-2": {Id: convertToInstanceId("node-2")}, | ||||
| 		"node-3": {Id: convertToInstanceId("node-3")}, | ||||
| 	} | ||||
| 
 | ||||
| 	expect := []cloudprovider.Instance{ | ||||
| 		{Id: convertToInstanceId("node-1")}, | ||||
| 		{Id: convertToInstanceId("node-3")}, | ||||
| 	} | ||||
| 	instances := cache.GetInstancesForNodeGroup("nodepool-1") | ||||
| 	require.ElementsMatch(t, expect, instances) | ||||
| } | ||||
| 
 | ||||
| func TestCache_AddNodeGroup(t *testing.T) { | ||||
| 	cache := NewIonosCache() | ||||
| 	require.Empty(t, cache.GetNodeGroups()) | ||||
| 	cache.AddNodeGroup(&nodePool{id: "123", min: 1, max: 3}) | ||||
| 	require.Equal(t, []cloudprovider.NodeGroup{&nodePool{id: "123", min: 1, max: 3}}, cache.GetNodeGroups()) | ||||
| } | ||||
| 
 | ||||
| func TestCache_RemoveInstanceFromCache(t *testing.T) { | ||||
| 	firstTime := timeNow().Add(-2*time.Minute - 1*time.Second) | ||||
| 	cache := NewIonosCache() | ||||
| 	cache.nodeGroups["2"] = newCacheEntry(&nodePool{id: "2"}, firstTime) | ||||
| 	cache.nodesToNodeGroups["b2"] = "2" | ||||
| 	cache.instances["b2"] = newInstance("b2") | ||||
| 
 | ||||
| 	require.NotNil(t, cache.GetNodeGroupForNode("b2")) | ||||
| 	require.NotEmpty(t, cache.GetInstances()) | ||||
| 	require.True(t, cache.NodeGroupNeedsRefresh("2")) | ||||
| 
 | ||||
| 	cache.RemoveInstanceFromCache("b2") | ||||
| 	require.Nil(t, cache.GetNodeGroupForNode("b2")) | ||||
| 	require.Empty(t, cache.GetInstances()) | ||||
| 	require.False(t, cache.NodeGroupNeedsRefresh("2")) | ||||
| } | ||||
| 
 | ||||
| func TestCache_SetInstancesCache(t *testing.T) { | ||||
| 	cache := NewIonosCache() | ||||
| 	cache.nodeGroups["2"] = newCacheEntry(&nodePool{id: "2"}, timeNow()) | ||||
| 	cache.nodesToNodeGroups["b2"] = "2" | ||||
| 	cache.instances["a3"] = newInstance("b2") | ||||
| 	nodePoolInstances := map[string][]cloudprovider.Instance{ | ||||
| 		"1": {newInstance("a1"), newInstance("a2")}, | ||||
| 		"2": {newInstance("b1")}, | ||||
| 	} | ||||
| 
 | ||||
| 	require.NotNil(t, cache.GetNodeGroupForNode("b2")) | ||||
| 	cache.SetInstancesCache(nodePoolInstances) | ||||
| 
 | ||||
| 	require.Nil(t, cache.GetNodeGroupForNode("b2")) | ||||
| 	require.ElementsMatch(t, []cloudprovider.Instance{ | ||||
| 		newInstance("a1"), newInstance("a2"), newInstance("b1"), | ||||
| 	}, cache.GetInstances()) | ||||
| } | ||||
| 
 | ||||
| func TestCache_SetInstancesCacheForNodeGroup(t *testing.T) { | ||||
| 	cache := NewIonosCache() | ||||
| 	cache.AddNodeGroup(&nodePool{id: "1"}) | ||||
| 	cache.AddNodeGroup(&nodePool{id: "2"}) | ||||
| 	cache.nodesToNodeGroups["a3"] = "1" | ||||
| 	cache.nodesToNodeGroups["b1"] = "2" | ||||
| 	cache.instances["a3"] = newInstance("b2") | ||||
| 	cache.instances["b1"] = newInstance("b1") | ||||
| 	instances := []cloudprovider.Instance{newInstance("a1"), newInstance("a2")} | ||||
| 
 | ||||
| 	require.NotNil(t, cache.GetNodeGroupForNode("a3")) | ||||
| 	cache.SetInstancesCacheForNodeGroup("1", instances) | ||||
| 
 | ||||
| 	require.Nil(t, cache.GetNodeGroupForNode("a3")) | ||||
| 	require.ElementsMatch(t, []cloudprovider.Instance{ | ||||
| 		newInstance("a1"), newInstance("a2"), newInstance("b1"), | ||||
| 	}, cache.GetInstances()) | ||||
| } | ||||
| 
 | ||||
| func TestCache_GetNodeGroupIDs(t *testing.T) { | ||||
| 	cache := NewIonosCache() | ||||
| 	require.Empty(t, cache.GetNodeGroupIds()) | ||||
| 	cache.AddNodeGroup(&nodePool{id: "1"}) | ||||
| 	require.Equal(t, []string{"1"}, cache.GetNodeGroupIds()) | ||||
| 	cache.AddNodeGroup(&nodePool{id: "2"}) | ||||
| 	require.ElementsMatch(t, []string{"1", "2"}, cache.GetNodeGroupIds()) | ||||
| } | ||||
| 
 | ||||
| func TestCache_GetNodeGroups(t *testing.T) { | ||||
| 	cache := NewIonosCache() | ||||
| 	require.Empty(t, cache.GetNodeGroups()) | ||||
| 	cache.AddNodeGroup(&nodePool{id: "1"}) | ||||
| 	require.Equal(t, []cloudprovider.NodeGroup{&nodePool{id: "1"}}, cache.GetNodeGroups()) | ||||
| 	cache.AddNodeGroup(&nodePool{id: "2"}) | ||||
| 	require.ElementsMatch(t, []*nodePool{{id: "1"}, {id: "2"}}, cache.GetNodeGroups()) | ||||
| } | ||||
| 
 | ||||
| func TestCache_GetInstances(t *testing.T) { | ||||
| 	cache := NewIonosCache() | ||||
| 	require.Empty(t, cache.GetInstances()) | ||||
| 	cache.nodesToNodeGroups["a1"] = "1" | ||||
| 	cache.nodesToNodeGroups["a2"] = "1" | ||||
| 	cache.instances["a1"] = newInstance("a1") | ||||
| 	cache.instances["a2"] = newInstance("a2") | ||||
| 	require.ElementsMatch(t, []cloudprovider.Instance{ | ||||
| 		newInstance("a1"), newInstance("a2"), | ||||
| 	}, cache.GetInstances()) | ||||
| } | ||||
| 
 | ||||
| func TestCache_GetNodeGroupForNode(t *testing.T) { | ||||
| 	cache := NewIonosCache() | ||||
| 	require.Nil(t, cache.GetNodeGroupForNode("a1")) | ||||
| 	cache.AddNodeGroup(&nodePool{id: "1"}) | ||||
| 	require.Nil(t, cache.GetNodeGroupForNode("a1")) | ||||
| 	cache.nodesToNodeGroups["a1"] = "1" | ||||
| 	require.EqualValues(t, &nodePool{id: "1"}, cache.GetNodeGroupForNode("a1")) | ||||
| } | ||||
| 
 | ||||
| func TestCache_LockUnlockNodeGroup(t *testing.T) { | ||||
| 	cache := NewIonosCache() | ||||
| 	nodePool := &nodePool{id: "1"} | ||||
| 	require.True(t, cache.TryLockNodeGroup(nodePool)) | ||||
| 	require.False(t, cache.TryLockNodeGroup(nodePool)) | ||||
| 	cache.UnlockNodeGroup(nodePool) | ||||
| 	require.True(t, cache.TryLockNodeGroup(nodePool)) | ||||
| } | ||||
| 
 | ||||
| func TestCache_GetSetNodeGroupSize(t *testing.T) { | ||||
| 	cache := NewIonosCache() | ||||
| 
 | ||||
| 	size, found := cache.GetNodeGroupSize("1") | ||||
| 	require.False(t, found) | ||||
| 	require.Zero(t, size) | ||||
| 
 | ||||
| 	cache.SetNodeGroupSize("2", 1) | ||||
| 	size, found = cache.GetNodeGroupSize("1") | ||||
| 	require.False(t, found) | ||||
| 	require.Zero(t, size) | ||||
| 
 | ||||
| 	cache.SetNodeGroupSize("1", 2) | ||||
| 	size, found = cache.GetNodeGroupSize("1") | ||||
| 	require.True(t, found) | ||||
| 	require.Equal(t, 2, size) | ||||
| } | ||||
| 
 | ||||
| func TestCache_GetSetNodeGroupTargetSize(t *testing.T) { | ||||
| 	cache := NewIonosCache() | ||||
| 
 | ||||
| 	size, found := cache.GetNodeGroupTargetSize("1") | ||||
| 	require.False(t, found) | ||||
| 	require.Zero(t, size) | ||||
| 
 | ||||
| 	cache.SetNodeGroupTargetSize("2", 1) | ||||
| 	size, found = cache.GetNodeGroupTargetSize("1") | ||||
| 	require.False(t, found) | ||||
| 	require.Zero(t, size) | ||||
| 
 | ||||
| 	cache.SetNodeGroupTargetSize("1", 2) | ||||
| 	size, found = cache.GetNodeGroupTargetSize("1") | ||||
| 	require.True(t, found) | ||||
| 	require.Equal(t, 2, size) | ||||
| 
 | ||||
| 	cache.InvalidateNodeGroupTargetSize("1") | ||||
| 	size, found = cache.GetNodeGroupTargetSize("1") | ||||
| 	require.False(t, found) | ||||
| 	require.Zero(t, size) | ||||
| } | ||||
| 
 | ||||
| func TestCache_NodeGroupNeedsRefresh(t *testing.T) { | ||||
| 	fixedTime := time.Now().Round(time.Second) | ||||
| 	timeNow = func() time.Time { return fixedTime } | ||||
| 	defer func() { timeNow = time.Now }() | ||||
| 
 | ||||
| 	cache := NewIonosCache() | ||||
| 	require.True(t, cache.NodeGroupNeedsRefresh("test")) | ||||
| 
 | ||||
| 	cache.AddNodeGroup(&nodePool{id: "test"}) | ||||
| 	require.True(t, cache.NodeGroupNeedsRefresh("test")) | ||||
| 	cache.SetInstancesCacheForNodeGroup("test", nil) | ||||
| 	require.False(t, cache.NodeGroupNeedsRefresh("test")) | ||||
| 
 | ||||
| 	timeNow = func() time.Time { return fixedTime.Add(nodeGroupCacheEntryTimeout) } | ||||
| 	require.False(t, cache.NodeGroupNeedsRefresh("test")) | ||||
| 	timeNow = func() time.Time { return fixedTime.Add(nodeGroupCacheEntryTimeout + 1*time.Second) } | ||||
| 	require.True(t, cache.NodeGroupNeedsRefresh("test")) | ||||
| } | ||||
|  | @ -0,0 +1,225 @@ | |||
| /* | ||||
| Copyright 2020 The Kubernetes Authors. | ||||
| 
 | ||||
| Licensed under the Apache License, Version 2.0 (the "License"); | ||||
| you may not use this file except in compliance with the License. | ||||
| You may obtain a copy of the License at | ||||
| 
 | ||||
|     http://www.apache.org/licenses/LICENSE-2.0
 | ||||
| 
 | ||||
| Unless required by applicable law or agreed to in writing, software | ||||
| distributed under the License is distributed on an "AS IS" BASIS, | ||||
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||||
| See the License for the specific language governing permissions and | ||||
| limitations under the License. | ||||
| */ | ||||
| 
 | ||||
| package ionoscloud | ||||
| 
 | ||||
| import ( | ||||
| 	"context" | ||||
| 	"crypto/tls" | ||||
| 	"fmt" | ||||
| 	"io/ioutil" | ||||
| 	"net/http" | ||||
| 	"path/filepath" | ||||
| 	"time" | ||||
| 
 | ||||
| 	uuid "github.com/satori/go.uuid" | ||||
| 	"k8s.io/apimachinery/pkg/util/wait" | ||||
| 	ionos "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/ionoscloud/ionos-cloud-sdk-go" | ||||
| 	"k8s.io/klog/v2" | ||||
| 	"k8s.io/utils/pointer" | ||||
| ) | ||||
| 
 | ||||
| const ( | ||||
| 	// K8sStateActive indicates that the cluster/nodepool resource is active.
 | ||||
| 	K8sStateActive = "ACTIVE" | ||||
| 	// K8sStateUpdating indicates that the cluster/nodepool resource is being updated.
 | ||||
| 	K8sStateUpdating = "UPDATING" | ||||
| ) | ||||
| 
 | ||||
| const ( | ||||
| 	// K8sNodeStateReady indicates that the Kubernetes Node was provisioned and joined the cluster.
 | ||||
| 	K8sNodeStateReady = "READY" | ||||
| 	// K8sNodeStateProvisioning indicates that the instance backing the Kubernetes Node is being provisioned.
 | ||||
| 	K8sNodeStateProvisioning = "PROVISIONING" | ||||
| 	// K8sNodeStateProvisioned indicates that the instance backing the Kubernetes Node is ready
 | ||||
| 	K8sNodeStateProvisioned = "PROVISIONED" | ||||
| 	// K8sNodeStateTerminating indicates that the Kubernetes Node is being deleted.
 | ||||
| 	K8sNodeStateTerminating = "TERMINATING" | ||||
| 	// K8sNodeStateRebuilding indicates that the Kubernetes Node is being rebuilt.
 | ||||
| 	K8sNodeStateRebuilding = "REBUILDING" | ||||
| ) | ||||
| 
 | ||||
| // APIClient provides a subset of API calls necessary to perform autoscaling.
 | ||||
| type APIClient interface { | ||||
| 	K8sNodepoolsFindById(ctx context.Context, k8sClusterId string, nodepoolId string) ionos.ApiK8sNodepoolsFindByIdRequest | ||||
| 	K8sNodepoolsFindByIdExecute(r ionos.ApiK8sNodepoolsFindByIdRequest) (ionos.KubernetesNodePool, *ionos.APIResponse, error) | ||||
| 	K8sNodepoolsNodesGet(ctx context.Context, k8sClusterId string, nodepoolId string) ionos.ApiK8sNodepoolsNodesGetRequest | ||||
| 	K8sNodepoolsNodesGetExecute(r ionos.ApiK8sNodepoolsNodesGetRequest) (ionos.KubernetesNodes, *ionos.APIResponse, error) | ||||
| 	K8sNodepoolsNodesDelete(ctx context.Context, k8sClusterId string, nodepoolId string, nodeId string) ionos.ApiK8sNodepoolsNodesDeleteRequest | ||||
| 	K8sNodepoolsNodesDeleteExecute(r ionos.ApiK8sNodepoolsNodesDeleteRequest) (map[string]interface{}, *ionos.APIResponse, error) | ||||
| 	K8sNodepoolsPut(ctx context.Context, k8sClusterId string, nodepoolId string) ionos.ApiK8sNodepoolsPutRequest | ||||
| 	K8sNodepoolsPutExecute(r ionos.ApiK8sNodepoolsPutRequest) (ionos.KubernetesNodePoolForPut, *ionos.APIResponse, error) | ||||
| } | ||||
| 
 | ||||
| var apiClientFactory = NewAPIClient | ||||
| 
 | ||||
| // NewAPIClient creates a new IonosCloud API client.
 | ||||
| func NewAPIClient(token, endpoint string, insecure bool) APIClient { | ||||
| 	config := ionos.NewConfiguration("", "", token) | ||||
| 	if endpoint != "" { | ||||
| 		config.Servers[0].URL = endpoint | ||||
| 	} | ||||
| 	if insecure { | ||||
| 		config.HTTPClient = &http.Client{ | ||||
| 			Transport: &http.Transport{ | ||||
| 				TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, //nolint: gosec
 | ||||
| 			}, | ||||
| 		} | ||||
| 	} | ||||
| 	config.Debug = klog.V(6).Enabled() | ||||
| 	client := ionos.NewAPIClient(config) | ||||
| 	return client.KubernetesApi | ||||
| } | ||||
| 
 | ||||
| // AutoscalingClient is a client abstraction used for autoscaling.
 | ||||
| type AutoscalingClient struct { | ||||
| 	client       APIClient | ||||
| 	clusterId    string | ||||
| 	endpoint     string | ||||
| 	insecure     bool | ||||
| 	pollTimeout  time.Duration | ||||
| 	pollInterval time.Duration | ||||
| 	tokens       map[string]string | ||||
| } | ||||
| 
 | ||||
| // NewAutoscalingClient contructs a new autoscaling client.
 | ||||
| func NewAutoscalingClient(config *Config) (*AutoscalingClient, error) { | ||||
| 	c := &AutoscalingClient{ | ||||
| 		clusterId:    config.ClusterId, | ||||
| 		endpoint:     config.Endpoint, | ||||
| 		insecure:     config.Insecure, | ||||
| 		pollTimeout:  config.PollTimeout, | ||||
| 		pollInterval: config.PollInterval, | ||||
| 	} | ||||
| 	if config.Token != "" { | ||||
| 		c.client = apiClientFactory(config.Token, config.Endpoint, config.Insecure) | ||||
| 	} else if config.TokensPath != "" { | ||||
| 		tokens, err := loadTokensFromFilesystem(config.TokensPath) | ||||
| 		if err != nil { | ||||
| 			return nil, err | ||||
| 		} | ||||
| 		c.tokens = tokens | ||||
| 	} | ||||
| 	return c, nil | ||||
| } | ||||
| 
 | ||||
| // loadTokensFromFilesystem loads a mapping of node pool UUIDs to JWT tokens from the given path.
 | ||||
| func loadTokensFromFilesystem(path string) (map[string]string, error) { | ||||
| 	klog.V(3).Infof("Loading tokens from: %s", path) | ||||
| 	filenames, _ := filepath.Glob(filepath.Join(path, "*")) | ||||
| 	tokens := make(map[string]string) | ||||
| 	for _, filename := range filenames { | ||||
| 		name := filepath.Base(filename) | ||||
| 		if _, err := uuid.FromString(name); err != nil { | ||||
| 			continue | ||||
| 		} | ||||
| 		data, err := ioutil.ReadFile(filename) | ||||
| 		if err != nil { | ||||
| 			return nil, err | ||||
| 		} | ||||
| 		tokens[name] = string(data) | ||||
| 	} | ||||
| 	if len(tokens) == 0 { | ||||
| 		return nil, fmt.Errorf("%s did not contain any valid entries", path) | ||||
| 	} | ||||
| 	return tokens, nil | ||||
| } | ||||
| 
 | ||||
| // apiClientFor returns an IonosCloud API client for the given node pool.
 | ||||
| // If the cache was not initialized with a client a new one will be created using a cached token.
 | ||||
| func (c *AutoscalingClient) apiClientFor(id string) (APIClient, error) { | ||||
| 	if c.client != nil { | ||||
| 		return c.client, nil | ||||
| 	} | ||||
| 	token, exists := c.tokens[id] | ||||
| 	if !exists { | ||||
| 		return nil, fmt.Errorf("missing token for node pool %s", id) | ||||
| 	} | ||||
| 	return apiClientFactory(token, c.endpoint, c.insecure), nil | ||||
| } | ||||
| 
 | ||||
| // GetNodePool gets a node pool.
 | ||||
| func (c *AutoscalingClient) GetNodePool(id string) (*ionos.KubernetesNodePool, error) { | ||||
| 	client, err := c.apiClientFor(id) | ||||
| 	if err != nil { | ||||
| 		return nil, err | ||||
| 	} | ||||
| 	req := client.K8sNodepoolsFindById(context.Background(), c.clusterId, id) | ||||
| 	nodepool, _, err := client.K8sNodepoolsFindByIdExecute(req) | ||||
| 	if err != nil { | ||||
| 		return nil, err | ||||
| 	} | ||||
| 	return &nodepool, nil | ||||
| } | ||||
| 
 | ||||
| func resizeRequestBody(targetSize int) ionos.KubernetesNodePoolPropertiesForPut { | ||||
| 	return ionos.KubernetesNodePoolPropertiesForPut{ | ||||
| 		NodeCount: pointer.Int32Ptr(int32(targetSize)), | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| // ResizeNodePool sets the target size of a node pool and starts the resize process.
 | ||||
| // The node pool target size cannot be changed until this operation finishes.
 | ||||
| func (c *AutoscalingClient) ResizeNodePool(id string, targetSize int) error { | ||||
| 	client, err := c.apiClientFor(id) | ||||
| 	if err != nil { | ||||
| 		return err | ||||
| 	} | ||||
| 	req := client.K8sNodepoolsPut(context.Background(), c.clusterId, id) | ||||
| 	req = req.KubernetesNodePoolProperties(resizeRequestBody(targetSize)) | ||||
| 	_, _, err = client.K8sNodepoolsPutExecute(req) | ||||
| 	return err | ||||
| } | ||||
| 
 | ||||
| // WaitForNodePoolResize polls the node pool until it is in state ACTIVE.
 | ||||
| func (c *AutoscalingClient) WaitForNodePoolResize(id string, size int) error { | ||||
| 	klog.V(1).Infof("Waiting for node pool %s to reach target size %d", id, size) | ||||
| 	return wait.PollImmediate(c.pollInterval, c.pollTimeout, func() (bool, error) { | ||||
| 		nodePool, err := c.GetNodePool(id) | ||||
| 		if err != nil { | ||||
| 			return false, fmt.Errorf("failed to fetch node pool %s: %w", id, err) | ||||
| 		} | ||||
| 		state := *nodePool.Metadata.State | ||||
| 		klog.V(5).Infof("Polled node pool %s: state=%s", id, state) | ||||
| 		return state == K8sStateActive, nil | ||||
| 	}) | ||||
| } | ||||
| 
 | ||||
| // ListNodes lists nodes.
 | ||||
| func (c *AutoscalingClient) ListNodes(id string) ([]ionos.KubernetesNode, error) { | ||||
| 	client, err := c.apiClientFor(id) | ||||
| 	if err != nil { | ||||
| 		return nil, err | ||||
| 	} | ||||
| 	req := client.K8sNodepoolsNodesGet(context.Background(), c.clusterId, id) | ||||
| 	req = req.Depth(1) | ||||
| 	nodes, _, err := client.K8sNodepoolsNodesGetExecute(req) | ||||
| 	if err != nil { | ||||
| 		return nil, err | ||||
| 	} | ||||
| 	return *nodes.Items, nil | ||||
| } | ||||
| 
 | ||||
| // DeleteNode starts node deletion.
 | ||||
| func (c *AutoscalingClient) DeleteNode(id, nodeId string) error { | ||||
| 	client, err := c.apiClientFor(id) | ||||
| 	if err != nil { | ||||
| 		return err | ||||
| 	} | ||||
| 	req := client.K8sNodepoolsNodesDelete(context.Background(), c.clusterId, id, nodeId) | ||||
| 	_, _, err = client.K8sNodepoolsNodesDeleteExecute(req) | ||||
| 	return err | ||||
| } | ||||
|  | @ -0,0 +1,129 @@ | |||
| /* | ||||
| Copyright 2020 The Kubernetes Authors. | ||||
| 
 | ||||
| Licensed under the Apache License, Version 2.0 (the "License"); | ||||
| you may not use this file except in compliance with the License. | ||||
| You may obtain a copy of the License at | ||||
| 
 | ||||
|     http://www.apache.org/licenses/LICENSE-2.0
 | ||||
| 
 | ||||
| Unless required by applicable law or agreed to in writing, software | ||||
| distributed under the License is distributed on an "AS IS" BASIS, | ||||
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||||
| See the License for the specific language governing permissions and | ||||
| limitations under the License. | ||||
| */ | ||||
| 
 | ||||
| package ionoscloud | ||||
| 
 | ||||
| import ( | ||||
| 	"fmt" | ||||
| 	"io/ioutil" | ||||
| 	"os" | ||||
| 	"path/filepath" | ||||
| 	"testing" | ||||
| 
 | ||||
| 	uuid "github.com/satori/go.uuid" | ||||
| 	"github.com/stretchr/testify/require" | ||||
| ) | ||||
| 
 | ||||
| func TestAPIClientFor(t *testing.T) { | ||||
| 	apiClientFactory = func(_, _ string, _ bool) APIClient { return &MockAPIClient{} } | ||||
| 	defer func() { apiClientFactory = NewAPIClient }() | ||||
| 
 | ||||
| 	cases := []struct { | ||||
| 		name         string | ||||
| 		token        string | ||||
| 		cachedTokens map[string]string | ||||
| 		expectClient APIClient | ||||
| 		expectError  bool | ||||
| 	}{ | ||||
| 		{ | ||||
| 			name:         "from cached client", | ||||
| 			token:        "token", | ||||
| 			expectClient: &MockAPIClient{}, | ||||
| 		}, | ||||
| 		{ | ||||
| 			name:         "from token cache", | ||||
| 			cachedTokens: map[string]string{"test": "token"}, | ||||
| 			expectClient: &MockAPIClient{}, | ||||
| 		}, | ||||
| 		{ | ||||
| 			name:         "not in token cache", | ||||
| 			cachedTokens: map[string]string{"notfound": "token"}, | ||||
| 			expectError:  true, | ||||
| 		}, | ||||
| 	} | ||||
| 
 | ||||
| 	for _, c := range cases { | ||||
| 		t.Run(c.name, func(t *testing.T) { | ||||
| 			apiClientFactory = func(_, _ string, _ bool) APIClient { return &MockAPIClient{} } | ||||
| 			defer func() { apiClientFactory = NewAPIClient }() | ||||
| 
 | ||||
| 			client, _ := NewAutoscalingClient(&Config{ | ||||
| 				Token:    c.token, | ||||
| 				Endpoint: "https://api.cloud.ionos.com/v6", | ||||
| 				Insecure: true, | ||||
| 			}) | ||||
| 			client.tokens = c.cachedTokens | ||||
| 			apiClient, err := client.apiClientFor("test") | ||||
| 			require.Equalf(t, c.expectError, err != nil, "expected error: %t, got: %v", c.expectError, err) | ||||
| 			require.EqualValues(t, c.expectClient, apiClient) | ||||
| 		}) | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| func TestLoadTokensFromFilesystem_OK(t *testing.T) { | ||||
| 	tempDir, err := ioutil.TempDir("", t.Name()) | ||||
| 	require.NoError(t, err) | ||||
| 	defer func() { _ = os.RemoveAll(tempDir) }() | ||||
| 
 | ||||
| 	uuid1, uuid2, uuid3 := uuid.NewV4().String(), uuid.NewV4().String(), uuid.NewV4().String() | ||||
| 
 | ||||
| 	input := map[string]string{ | ||||
| 		uuid1: "token1", | ||||
| 		uuid2: "token2", | ||||
| 		uuid3: "token3", | ||||
| 	} | ||||
| 	expect := map[string]string{ | ||||
| 		uuid1: "token1", | ||||
| 		uuid2: "token2", | ||||
| 		uuid3: "token3", | ||||
| 	} | ||||
| 
 | ||||
| 	for name, token := range input { | ||||
| 		require.NoError(t, ioutil.WriteFile(filepath.Join(tempDir, name), []byte(token), 0600)) | ||||
| 	} | ||||
| 	require.NoError(t, ioutil.WriteFile(filepath.Join(tempDir, "..somfile"), []byte("foobar"), 0600)) | ||||
| 
 | ||||
| 	client, err := NewAutoscalingClient(&Config{TokensPath: tempDir}) | ||||
| 	require.NoError(t, err) | ||||
| 	require.Equal(t, expect, client.tokens) | ||||
| } | ||||
| 
 | ||||
| func TestLoadTokensFromFilesystem_ReadError(t *testing.T) { | ||||
| 	tempDir, err := ioutil.TempDir("", t.Name()) | ||||
| 	require.NoError(t, err) | ||||
| 	defer func() { _ = os.RemoveAll(tempDir) }() | ||||
| 
 | ||||
| 	require.NoError(t, os.Mkdir(filepath.Join(tempDir, uuid.NewV4().String()), 0755)) | ||||
| 	client, err := NewAutoscalingClient(&Config{TokensPath: tempDir}) | ||||
| 	require.Error(t, err) | ||||
| 	require.Nil(t, client) | ||||
| } | ||||
| 
 | ||||
| func TestLoadTokensFromFilesystem_NoValidToken(t *testing.T) { | ||||
| 	tempDir, err := ioutil.TempDir("", t.Name()) | ||||
| 	require.NoError(t, err) | ||||
| 	defer func() { _ = os.RemoveAll(tempDir) }() | ||||
| 
 | ||||
| 	for i := 0; i < 10; i++ { | ||||
| 		path := filepath.Join(tempDir, fmt.Sprintf("notauuid%d", i)) | ||||
| 		require.NoError(t, ioutil.WriteFile(path, []byte("token"), 0600)) | ||||
| 		path = filepath.Join(tempDir, fmt.Sprintf("foo.bar.notauuid%d", i)) | ||||
| 		require.NoError(t, ioutil.WriteFile(path, []byte("token"), 0600)) | ||||
| 	} | ||||
| 	client, err := NewAutoscalingClient(&Config{TokensPath: tempDir}) | ||||
| 	require.Error(t, err) | ||||
| 	require.Nil(t, client) | ||||
| } | ||||
|  | @ -0,0 +1,170 @@ | |||
| --- | ||||
| apiVersion: v1 | ||||
| kind: ServiceAccount | ||||
| metadata: | ||||
|   labels: | ||||
|     k8s-addon: cluster-autoscaler.addons.k8s.io | ||||
|     k8s-app: cluster-autoscaler | ||||
|   name: cluster-autoscaler | ||||
|   namespace: kube-system | ||||
| --- | ||||
| apiVersion: rbac.authorization.k8s.io/v1 | ||||
| kind: ClusterRole | ||||
| metadata: | ||||
|   name: cluster-autoscaler | ||||
|   labels: | ||||
|     k8s-addon: cluster-autoscaler.addons.k8s.io | ||||
|     k8s-app: cluster-autoscaler | ||||
| rules: | ||||
|   - apiGroups: [""] | ||||
|     resources: ["events", "endpoints"] | ||||
|     verbs: ["create", "patch"] | ||||
|   - apiGroups: [""] | ||||
|     resources: ["pods/eviction"] | ||||
|     verbs: ["create"] | ||||
|   - apiGroups: [""] | ||||
|     resources: ["pods/status"] | ||||
|     verbs: ["update"] | ||||
|   - apiGroups: [""] | ||||
|     resources: ["endpoints"] | ||||
|     resourceNames: ["cluster-autoscaler"] | ||||
|     verbs: ["get", "update"] | ||||
|   - apiGroups: [""] | ||||
|     resources: ["nodes"] | ||||
|     verbs: ["watch", "list", "get", "update"] | ||||
|   - apiGroups: [""] | ||||
|     resources: | ||||
|       - "pods" | ||||
|       - "services" | ||||
|       - "replicationcontrollers" | ||||
|       - "persistentvolumeclaims" | ||||
|       - "persistentvolumes" | ||||
|     verbs: ["watch", "list", "get"] | ||||
|   - apiGroups: ["extensions"] | ||||
|     resources: ["replicasets", "daemonsets"] | ||||
|     verbs: ["watch", "list", "get"] | ||||
|   - apiGroups: ["policy"] | ||||
|     resources: ["poddisruptionbudgets"] | ||||
|     verbs: ["watch", "list"] | ||||
|   - apiGroups: ["apps"] | ||||
|     resources: ["statefulsets", "replicasets", "daemonsets"] | ||||
|     verbs: ["watch", "list", "get"] | ||||
|   - apiGroups: ["storage.k8s.io"] | ||||
|     resources: ["storageclasses", "csinodes"] | ||||
|     verbs: ["watch", "list", "get"] | ||||
|   - apiGroups: ["batch", "extensions"] | ||||
|     resources: ["jobs"] | ||||
|     verbs: ["get", "list", "watch", "patch"] | ||||
|   - apiGroups: ["coordination.k8s.io"] | ||||
|     resources: ["leases"] | ||||
|     verbs: ["create"] | ||||
|   - apiGroups: ["coordination.k8s.io"] | ||||
|     resourceNames: ["cluster-autoscaler"] | ||||
|     resources: ["leases"] | ||||
|     verbs: ["get", "update"] | ||||
| --- | ||||
| apiVersion: rbac.authorization.k8s.io/v1 | ||||
| kind: Role | ||||
| metadata: | ||||
|   name: cluster-autoscaler | ||||
|   namespace: kube-system | ||||
|   labels: | ||||
|     k8s-addon: cluster-autoscaler.addons.k8s.io | ||||
|     k8s-app: cluster-autoscaler | ||||
| rules: | ||||
|   - apiGroups: [""] | ||||
|     resources: ["configmaps"] | ||||
|     verbs: ["create", "list", "watch"] | ||||
|   - apiGroups: [""] | ||||
|     resources: ["configmaps"] | ||||
|     resourceNames: ["cluster-autoscaler-status", "cluster-autoscaler-priority-expander"] | ||||
|     verbs: ["delete", "get", "update", "watch"] | ||||
| 
 | ||||
| --- | ||||
| apiVersion: rbac.authorization.k8s.io/v1 | ||||
| kind: ClusterRoleBinding | ||||
| metadata: | ||||
|   name: cluster-autoscaler | ||||
|   labels: | ||||
|     k8s-addon: cluster-autoscaler.addons.k8s.io | ||||
|     k8s-app: cluster-autoscaler | ||||
| roleRef: | ||||
|   apiGroup: rbac.authorization.k8s.io | ||||
|   kind: ClusterRole | ||||
|   name: cluster-autoscaler | ||||
| subjects: | ||||
|   - kind: ServiceAccount | ||||
|     name: cluster-autoscaler | ||||
|     namespace: kube-system | ||||
| 
 | ||||
| --- | ||||
| apiVersion: rbac.authorization.k8s.io/v1 | ||||
| kind: RoleBinding | ||||
| metadata: | ||||
|   name: cluster-autoscaler | ||||
|   namespace: kube-system | ||||
|   labels: | ||||
|     k8s-addon: cluster-autoscaler.addons.k8s.io | ||||
|     k8s-app: cluster-autoscaler | ||||
| roleRef: | ||||
|   apiGroup: rbac.authorization.k8s.io | ||||
|   kind: Role | ||||
|   name: cluster-autoscaler | ||||
| subjects: | ||||
|   - kind: ServiceAccount | ||||
|     name: cluster-autoscaler | ||||
|     namespace: kube-system | ||||
| --- | ||||
| apiVersion: v1 | ||||
| kind: Secret | ||||
| metadata: | ||||
|   name: cluster-autoscaler | ||||
|   namespace: kube-system | ||||
| type: Opaque | ||||
| stringData: | ||||
|   IONOS_CLUSTER_ID: <some-cluster-id> | ||||
|   IONOS_TOKEN: <some-token> | ||||
| --- | ||||
| apiVersion: apps/v1 | ||||
| kind: Deployment | ||||
| metadata: | ||||
|   name: cluster-autoscaler | ||||
|   namespace: kube-system | ||||
|   labels: | ||||
|     app: cluster-autoscaler | ||||
| spec: | ||||
|   replicas: 1 | ||||
|   selector: | ||||
|     matchLabels: | ||||
|       app: cluster-autoscaler | ||||
|   template: | ||||
|     metadata: | ||||
|       labels: | ||||
|         app: cluster-autoscaler | ||||
|       annotations: | ||||
|         prometheus.io/scrape: 'true' | ||||
|         prometheus.io/port: '8085' | ||||
|     spec: | ||||
|       serviceAccountName: cluster-autoscaler | ||||
|       containers: | ||||
|         - image: k8s.gcr.io/autoscaling/cluster-autoscaler:latest  # or your custom image | ||||
|           name: cluster-autoscaler | ||||
|           imagePullPolicy: Always | ||||
|           resources: | ||||
|             limits: | ||||
|               cpu: 100m | ||||
|               memory: 300Mi | ||||
|             requests: | ||||
|               cpu: 100m | ||||
|               memory: 300Mi | ||||
|           command: | ||||
|             - ./cluster-autoscaler | ||||
|             - --v=4 | ||||
|             - --logtostderr=true | ||||
|             - --stderrthreshold=info | ||||
|             - --cloud-provider=ionoscloud | ||||
|             - --skip-nodes-with-local-storage=false | ||||
|             - --nodes=<min>:<max>:<nodepool-id>  # repeatable | ||||
|           envFrom: | ||||
|             - secretRef: | ||||
|                 name: cluster-autoscaler | ||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							|  | @ -0,0 +1,181 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	_context "context" | ||||
| 	_ioutil "io/ioutil" | ||||
| 	_nethttp "net/http" | ||||
| 	_neturl "net/url" | ||||
| ) | ||||
| 
 | ||||
| // Linger please
 | ||||
| var ( | ||||
| 	_ _context.Context | ||||
| ) | ||||
| 
 | ||||
| // ContractApiService ContractApi service
 | ||||
| type ContractApiService service | ||||
| 
 | ||||
| type ApiContractsGetRequest struct { | ||||
| 	ctx _context.Context | ||||
| 	ApiService *ContractApiService | ||||
| 	pretty *bool | ||||
| 	depth *int32 | ||||
| 	xContractNumber *int32 | ||||
| } | ||||
| 
 | ||||
| func (r ApiContractsGetRequest) Pretty(pretty bool) ApiContractsGetRequest { | ||||
| 	r.pretty = &pretty | ||||
| 	return r | ||||
| } | ||||
| func (r ApiContractsGetRequest) Depth(depth int32) ApiContractsGetRequest { | ||||
| 	r.depth = &depth | ||||
| 	return r | ||||
| } | ||||
| func (r ApiContractsGetRequest) XContractNumber(xContractNumber int32) ApiContractsGetRequest { | ||||
| 	r.xContractNumber = &xContractNumber | ||||
| 	return r | ||||
| } | ||||
| 
 | ||||
| func (r ApiContractsGetRequest) Execute() (Contract, *APIResponse, error) { | ||||
| 	return r.ApiService.ContractsGetExecute(r) | ||||
| } | ||||
| 
 | ||||
| /* | ||||
|  * ContractsGet Retrieve a Contract | ||||
|  * Retrieves the attributes of user's contract. | ||||
|  * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). | ||||
|  * @return ApiContractsGetRequest | ||||
|  */ | ||||
| func (a *ContractApiService) ContractsGet(ctx _context.Context) ApiContractsGetRequest { | ||||
| 	return ApiContractsGetRequest{ | ||||
| 		ApiService: a, | ||||
| 		ctx: ctx, | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| /* | ||||
|  * Execute executes the request | ||||
|  * @return Contract | ||||
|  */ | ||||
| func (a *ContractApiService) ContractsGetExecute(r ApiContractsGetRequest) (Contract, *APIResponse, error) { | ||||
| 	var ( | ||||
| 		localVarHTTPMethod   = _nethttp.MethodGet | ||||
| 		localVarPostBody     interface{} | ||||
| 		localVarFormFileName string | ||||
| 		localVarFileName     string | ||||
| 		localVarFileBytes    []byte | ||||
| 		localVarReturnValue  Contract | ||||
| 	) | ||||
| 
 | ||||
| 	localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContractApiService.ContractsGet") | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} | ||||
| 	} | ||||
| 
 | ||||
| 	localVarPath := localBasePath + "/contracts" | ||||
| 
 | ||||
| 	localVarHeaderParams := make(map[string]string) | ||||
| 	localVarQueryParams := _neturl.Values{} | ||||
| 	localVarFormParams := _neturl.Values{} | ||||
| 
 | ||||
| 	if r.pretty != nil { | ||||
| 		localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) | ||||
| 	} | ||||
| 	if r.depth != nil { | ||||
| 		localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) | ||||
| 	} | ||||
| 	// to determine the Content-Type header
 | ||||
| 	localVarHTTPContentTypes := []string{} | ||||
| 
 | ||||
| 	// set Content-Type header
 | ||||
| 	localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) | ||||
| 	if localVarHTTPContentType != "" { | ||||
| 		localVarHeaderParams["Content-Type"] = localVarHTTPContentType | ||||
| 	} | ||||
| 
 | ||||
| 	// to determine the Accept header
 | ||||
| 	localVarHTTPHeaderAccepts := []string{"application/json"} | ||||
| 
 | ||||
| 	// set Accept header
 | ||||
| 	localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) | ||||
| 	if localVarHTTPHeaderAccept != "" { | ||||
| 		localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept | ||||
| 	} | ||||
| 	if r.xContractNumber != nil { | ||||
| 		localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") | ||||
| 	} | ||||
| 	if r.ctx != nil { | ||||
| 		// API Key Authentication
 | ||||
| 		if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { | ||||
| 			if apiKey, ok := auth["Token Authentication"]; ok { | ||||
| 				var key string | ||||
| 				if apiKey.Prefix != "" { | ||||
| 					key = apiKey.Prefix + " " + apiKey.Key | ||||
| 				} else { | ||||
| 					key = apiKey.Key | ||||
| 				} | ||||
| 				localVarHeaderParams["Authorization"] = key | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| 	req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, nil, err | ||||
| 	} | ||||
| 
 | ||||
| 	localVarHTTPResponse, err := a.client.callAPI(req) | ||||
| 
 | ||||
| 	localVarAPIResponse := &APIResponse { | ||||
| 		Response: localVarHTTPResponse, | ||||
| 		Method: localVarHTTPMethod, | ||||
| 		RequestURL: localVarPath, | ||||
| 		Operation: "ContractsGet", | ||||
| 	} | ||||
| 
 | ||||
| 	if err != nil || localVarHTTPResponse == nil { | ||||
| 		return localVarReturnValue, localVarAPIResponse, err | ||||
| 	} | ||||
| 
 | ||||
| 	localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) | ||||
| 	localVarHTTPResponse.Body.Close() | ||||
| 	localVarAPIResponse.Payload = localVarBody | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, localVarAPIResponse, err | ||||
| 	} | ||||
| 
 | ||||
| 	if localVarHTTPResponse.StatusCode >= 300 { | ||||
| 		newErr := GenericOpenAPIError{ | ||||
| 			body:  localVarBody, | ||||
| 			error: localVarHTTPResponse.Status, | ||||
| 		} | ||||
| 			var v Error | ||||
| 			err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) | ||||
| 			if err != nil { | ||||
| 				newErr.error = err.Error() | ||||
| 				return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 			} | ||||
| 			newErr.model = v | ||||
| 		return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 	} | ||||
| 
 | ||||
| 	err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) | ||||
| 	if err != nil { | ||||
| 		newErr := GenericOpenAPIError{ | ||||
| 			body:  localVarBody, | ||||
| 			error: err.Error(), | ||||
| 		} | ||||
| 		return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 	} | ||||
| 
 | ||||
| 	return localVarReturnValue, localVarAPIResponse, nil | ||||
| } | ||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							|  | @ -0,0 +1,838 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	_context "context" | ||||
| 	_ioutil "io/ioutil" | ||||
| 	_nethttp "net/http" | ||||
| 	_neturl "net/url" | ||||
| 	"strings" | ||||
| ) | ||||
| 
 | ||||
| // Linger please
 | ||||
| var ( | ||||
| 	_ _context.Context | ||||
| ) | ||||
| 
 | ||||
| // ImageApiService ImageApi service
 | ||||
| type ImageApiService service | ||||
| 
 | ||||
| type ApiImagesDeleteRequest struct { | ||||
| 	ctx _context.Context | ||||
| 	ApiService *ImageApiService | ||||
| 	imageId string | ||||
| 	pretty *bool | ||||
| 	depth *int32 | ||||
| 	xContractNumber *int32 | ||||
| } | ||||
| 
 | ||||
| func (r ApiImagesDeleteRequest) Pretty(pretty bool) ApiImagesDeleteRequest { | ||||
| 	r.pretty = &pretty | ||||
| 	return r | ||||
| } | ||||
| func (r ApiImagesDeleteRequest) Depth(depth int32) ApiImagesDeleteRequest { | ||||
| 	r.depth = &depth | ||||
| 	return r | ||||
| } | ||||
| func (r ApiImagesDeleteRequest) XContractNumber(xContractNumber int32) ApiImagesDeleteRequest { | ||||
| 	r.xContractNumber = &xContractNumber | ||||
| 	return r | ||||
| } | ||||
| 
 | ||||
| func (r ApiImagesDeleteRequest) Execute() (map[string]interface{}, *APIResponse, error) { | ||||
| 	return r.ApiService.ImagesDeleteExecute(r) | ||||
| } | ||||
| 
 | ||||
| /* | ||||
|  * ImagesDelete Delete an Image | ||||
|  * Deletes the specified image. This operation is permitted on private image only. | ||||
|  * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). | ||||
|  * @param imageId | ||||
|  * @return ApiImagesDeleteRequest | ||||
|  */ | ||||
| func (a *ImageApiService) ImagesDelete(ctx _context.Context, imageId string) ApiImagesDeleteRequest { | ||||
| 	return ApiImagesDeleteRequest{ | ||||
| 		ApiService: a, | ||||
| 		ctx: ctx, | ||||
| 		imageId: imageId, | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| /* | ||||
|  * Execute executes the request | ||||
|  * @return map[string]interface{} | ||||
|  */ | ||||
| func (a *ImageApiService) ImagesDeleteExecute(r ApiImagesDeleteRequest) (map[string]interface{}, *APIResponse, error) { | ||||
| 	var ( | ||||
| 		localVarHTTPMethod   = _nethttp.MethodDelete | ||||
| 		localVarPostBody     interface{} | ||||
| 		localVarFormFileName string | ||||
| 		localVarFileName     string | ||||
| 		localVarFileBytes    []byte | ||||
| 		localVarReturnValue  map[string]interface{} | ||||
| 	) | ||||
| 
 | ||||
| 	localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ImageApiService.ImagesDelete") | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} | ||||
| 	} | ||||
| 
 | ||||
| 	localVarPath := localBasePath + "/images/{imageId}" | ||||
| 	localVarPath = strings.Replace(localVarPath, "{"+"imageId"+"}", _neturl.PathEscape(parameterToString(r.imageId, "")), -1) | ||||
| 
 | ||||
| 	localVarHeaderParams := make(map[string]string) | ||||
| 	localVarQueryParams := _neturl.Values{} | ||||
| 	localVarFormParams := _neturl.Values{} | ||||
| 
 | ||||
| 	if r.pretty != nil { | ||||
| 		localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) | ||||
| 	} | ||||
| 	if r.depth != nil { | ||||
| 		localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) | ||||
| 	} | ||||
| 	// to determine the Content-Type header
 | ||||
| 	localVarHTTPContentTypes := []string{} | ||||
| 
 | ||||
| 	// set Content-Type header
 | ||||
| 	localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) | ||||
| 	if localVarHTTPContentType != "" { | ||||
| 		localVarHeaderParams["Content-Type"] = localVarHTTPContentType | ||||
| 	} | ||||
| 
 | ||||
| 	// to determine the Accept header
 | ||||
| 	localVarHTTPHeaderAccepts := []string{"application/json"} | ||||
| 
 | ||||
| 	// set Accept header
 | ||||
| 	localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) | ||||
| 	if localVarHTTPHeaderAccept != "" { | ||||
| 		localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept | ||||
| 	} | ||||
| 	if r.xContractNumber != nil { | ||||
| 		localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") | ||||
| 	} | ||||
| 	if r.ctx != nil { | ||||
| 		// API Key Authentication
 | ||||
| 		if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { | ||||
| 			if apiKey, ok := auth["Token Authentication"]; ok { | ||||
| 				var key string | ||||
| 				if apiKey.Prefix != "" { | ||||
| 					key = apiKey.Prefix + " " + apiKey.Key | ||||
| 				} else { | ||||
| 					key = apiKey.Key | ||||
| 				} | ||||
| 				localVarHeaderParams["Authorization"] = key | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| 	req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, nil, err | ||||
| 	} | ||||
| 
 | ||||
| 	localVarHTTPResponse, err := a.client.callAPI(req) | ||||
| 
 | ||||
| 	localVarAPIResponse := &APIResponse { | ||||
| 		Response: localVarHTTPResponse, | ||||
| 		Method: localVarHTTPMethod, | ||||
| 		RequestURL: localVarPath, | ||||
| 		Operation: "ImagesDelete", | ||||
| 	} | ||||
| 
 | ||||
| 	if err != nil || localVarHTTPResponse == nil { | ||||
| 		return localVarReturnValue, localVarAPIResponse, err | ||||
| 	} | ||||
| 
 | ||||
| 	localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) | ||||
| 	localVarHTTPResponse.Body.Close() | ||||
| 	localVarAPIResponse.Payload = localVarBody | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, localVarAPIResponse, err | ||||
| 	} | ||||
| 
 | ||||
| 	if localVarHTTPResponse.StatusCode >= 300 { | ||||
| 		newErr := GenericOpenAPIError{ | ||||
| 			body:  localVarBody, | ||||
| 			error: localVarHTTPResponse.Status, | ||||
| 		} | ||||
| 			var v Error | ||||
| 			err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) | ||||
| 			if err != nil { | ||||
| 				newErr.error = err.Error() | ||||
| 				return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 			} | ||||
| 			newErr.model = v | ||||
| 		return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 	} | ||||
| 
 | ||||
| 	err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) | ||||
| 	if err != nil { | ||||
| 		newErr := GenericOpenAPIError{ | ||||
| 			body:  localVarBody, | ||||
| 			error: err.Error(), | ||||
| 		} | ||||
| 		return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 	} | ||||
| 
 | ||||
| 	return localVarReturnValue, localVarAPIResponse, nil | ||||
| } | ||||
| 
 | ||||
| type ApiImagesFindByIdRequest struct { | ||||
| 	ctx _context.Context | ||||
| 	ApiService *ImageApiService | ||||
| 	imageId string | ||||
| 	pretty *bool | ||||
| 	depth *int32 | ||||
| 	xContractNumber *int32 | ||||
| } | ||||
| 
 | ||||
| func (r ApiImagesFindByIdRequest) Pretty(pretty bool) ApiImagesFindByIdRequest { | ||||
| 	r.pretty = &pretty | ||||
| 	return r | ||||
| } | ||||
| func (r ApiImagesFindByIdRequest) Depth(depth int32) ApiImagesFindByIdRequest { | ||||
| 	r.depth = &depth | ||||
| 	return r | ||||
| } | ||||
| func (r ApiImagesFindByIdRequest) XContractNumber(xContractNumber int32) ApiImagesFindByIdRequest { | ||||
| 	r.xContractNumber = &xContractNumber | ||||
| 	return r | ||||
| } | ||||
| 
 | ||||
| func (r ApiImagesFindByIdRequest) Execute() (Image, *APIResponse, error) { | ||||
| 	return r.ApiService.ImagesFindByIdExecute(r) | ||||
| } | ||||
| 
 | ||||
| /* | ||||
|  * ImagesFindById Retrieve an Image | ||||
|  * Retrieves the attributes of a given image. | ||||
|  * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). | ||||
|  * @param imageId | ||||
|  * @return ApiImagesFindByIdRequest | ||||
|  */ | ||||
| func (a *ImageApiService) ImagesFindById(ctx _context.Context, imageId string) ApiImagesFindByIdRequest { | ||||
| 	return ApiImagesFindByIdRequest{ | ||||
| 		ApiService: a, | ||||
| 		ctx: ctx, | ||||
| 		imageId: imageId, | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| /* | ||||
|  * Execute executes the request | ||||
|  * @return Image | ||||
|  */ | ||||
| func (a *ImageApiService) ImagesFindByIdExecute(r ApiImagesFindByIdRequest) (Image, *APIResponse, error) { | ||||
| 	var ( | ||||
| 		localVarHTTPMethod   = _nethttp.MethodGet | ||||
| 		localVarPostBody     interface{} | ||||
| 		localVarFormFileName string | ||||
| 		localVarFileName     string | ||||
| 		localVarFileBytes    []byte | ||||
| 		localVarReturnValue  Image | ||||
| 	) | ||||
| 
 | ||||
| 	localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ImageApiService.ImagesFindById") | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} | ||||
| 	} | ||||
| 
 | ||||
| 	localVarPath := localBasePath + "/images/{imageId}" | ||||
| 	localVarPath = strings.Replace(localVarPath, "{"+"imageId"+"}", _neturl.PathEscape(parameterToString(r.imageId, "")), -1) | ||||
| 
 | ||||
| 	localVarHeaderParams := make(map[string]string) | ||||
| 	localVarQueryParams := _neturl.Values{} | ||||
| 	localVarFormParams := _neturl.Values{} | ||||
| 
 | ||||
| 	if r.pretty != nil { | ||||
| 		localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) | ||||
| 	} | ||||
| 	if r.depth != nil { | ||||
| 		localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) | ||||
| 	} | ||||
| 	// to determine the Content-Type header
 | ||||
| 	localVarHTTPContentTypes := []string{} | ||||
| 
 | ||||
| 	// set Content-Type header
 | ||||
| 	localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) | ||||
| 	if localVarHTTPContentType != "" { | ||||
| 		localVarHeaderParams["Content-Type"] = localVarHTTPContentType | ||||
| 	} | ||||
| 
 | ||||
| 	// to determine the Accept header
 | ||||
| 	localVarHTTPHeaderAccepts := []string{"application/json"} | ||||
| 
 | ||||
| 	// set Accept header
 | ||||
| 	localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) | ||||
| 	if localVarHTTPHeaderAccept != "" { | ||||
| 		localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept | ||||
| 	} | ||||
| 	if r.xContractNumber != nil { | ||||
| 		localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") | ||||
| 	} | ||||
| 	if r.ctx != nil { | ||||
| 		// API Key Authentication
 | ||||
| 		if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { | ||||
| 			if apiKey, ok := auth["Token Authentication"]; ok { | ||||
| 				var key string | ||||
| 				if apiKey.Prefix != "" { | ||||
| 					key = apiKey.Prefix + " " + apiKey.Key | ||||
| 				} else { | ||||
| 					key = apiKey.Key | ||||
| 				} | ||||
| 				localVarHeaderParams["Authorization"] = key | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| 	req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, nil, err | ||||
| 	} | ||||
| 
 | ||||
| 	localVarHTTPResponse, err := a.client.callAPI(req) | ||||
| 
 | ||||
| 	localVarAPIResponse := &APIResponse { | ||||
| 		Response: localVarHTTPResponse, | ||||
| 		Method: localVarHTTPMethod, | ||||
| 		RequestURL: localVarPath, | ||||
| 		Operation: "ImagesFindById", | ||||
| 	} | ||||
| 
 | ||||
| 	if err != nil || localVarHTTPResponse == nil { | ||||
| 		return localVarReturnValue, localVarAPIResponse, err | ||||
| 	} | ||||
| 
 | ||||
| 	localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) | ||||
| 	localVarHTTPResponse.Body.Close() | ||||
| 	localVarAPIResponse.Payload = localVarBody | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, localVarAPIResponse, err | ||||
| 	} | ||||
| 
 | ||||
| 	if localVarHTTPResponse.StatusCode >= 300 { | ||||
| 		newErr := GenericOpenAPIError{ | ||||
| 			body:  localVarBody, | ||||
| 			error: localVarHTTPResponse.Status, | ||||
| 		} | ||||
| 			var v Error | ||||
| 			err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) | ||||
| 			if err != nil { | ||||
| 				newErr.error = err.Error() | ||||
| 				return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 			} | ||||
| 			newErr.model = v | ||||
| 		return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 	} | ||||
| 
 | ||||
| 	err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) | ||||
| 	if err != nil { | ||||
| 		newErr := GenericOpenAPIError{ | ||||
| 			body:  localVarBody, | ||||
| 			error: err.Error(), | ||||
| 		} | ||||
| 		return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 	} | ||||
| 
 | ||||
| 	return localVarReturnValue, localVarAPIResponse, nil | ||||
| } | ||||
| 
 | ||||
| type ApiImagesGetRequest struct { | ||||
| 	ctx _context.Context | ||||
| 	ApiService *ImageApiService | ||||
| 	pretty *bool | ||||
| 	depth *int32 | ||||
| 	xContractNumber *int32 | ||||
| } | ||||
| 
 | ||||
| func (r ApiImagesGetRequest) Pretty(pretty bool) ApiImagesGetRequest { | ||||
| 	r.pretty = &pretty | ||||
| 	return r | ||||
| } | ||||
| func (r ApiImagesGetRequest) Depth(depth int32) ApiImagesGetRequest { | ||||
| 	r.depth = &depth | ||||
| 	return r | ||||
| } | ||||
| func (r ApiImagesGetRequest) XContractNumber(xContractNumber int32) ApiImagesGetRequest { | ||||
| 	r.xContractNumber = &xContractNumber | ||||
| 	return r | ||||
| } | ||||
| 
 | ||||
| func (r ApiImagesGetRequest) Execute() (Images, *APIResponse, error) { | ||||
| 	return r.ApiService.ImagesGetExecute(r) | ||||
| } | ||||
| 
 | ||||
| /* | ||||
|  * ImagesGet List Images  | ||||
|  * Retrieve a list of images within the datacenter | ||||
|  * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). | ||||
|  * @return ApiImagesGetRequest | ||||
|  */ | ||||
| func (a *ImageApiService) ImagesGet(ctx _context.Context) ApiImagesGetRequest { | ||||
| 	return ApiImagesGetRequest{ | ||||
| 		ApiService: a, | ||||
| 		ctx: ctx, | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| /* | ||||
|  * Execute executes the request | ||||
|  * @return Images | ||||
|  */ | ||||
| func (a *ImageApiService) ImagesGetExecute(r ApiImagesGetRequest) (Images, *APIResponse, error) { | ||||
| 	var ( | ||||
| 		localVarHTTPMethod   = _nethttp.MethodGet | ||||
| 		localVarPostBody     interface{} | ||||
| 		localVarFormFileName string | ||||
| 		localVarFileName     string | ||||
| 		localVarFileBytes    []byte | ||||
| 		localVarReturnValue  Images | ||||
| 	) | ||||
| 
 | ||||
| 	localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ImageApiService.ImagesGet") | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} | ||||
| 	} | ||||
| 
 | ||||
| 	localVarPath := localBasePath + "/images" | ||||
| 
 | ||||
| 	localVarHeaderParams := make(map[string]string) | ||||
| 	localVarQueryParams := _neturl.Values{} | ||||
| 	localVarFormParams := _neturl.Values{} | ||||
| 
 | ||||
| 	if r.pretty != nil { | ||||
| 		localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) | ||||
| 	} | ||||
| 	if r.depth != nil { | ||||
| 		localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) | ||||
| 	} | ||||
| 	// to determine the Content-Type header
 | ||||
| 	localVarHTTPContentTypes := []string{} | ||||
| 
 | ||||
| 	// set Content-Type header
 | ||||
| 	localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) | ||||
| 	if localVarHTTPContentType != "" { | ||||
| 		localVarHeaderParams["Content-Type"] = localVarHTTPContentType | ||||
| 	} | ||||
| 
 | ||||
| 	// to determine the Accept header
 | ||||
| 	localVarHTTPHeaderAccepts := []string{"application/json"} | ||||
| 
 | ||||
| 	// set Accept header
 | ||||
| 	localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) | ||||
| 	if localVarHTTPHeaderAccept != "" { | ||||
| 		localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept | ||||
| 	} | ||||
| 	if r.xContractNumber != nil { | ||||
| 		localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") | ||||
| 	} | ||||
| 	if r.ctx != nil { | ||||
| 		// API Key Authentication
 | ||||
| 		if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { | ||||
| 			if apiKey, ok := auth["Token Authentication"]; ok { | ||||
| 				var key string | ||||
| 				if apiKey.Prefix != "" { | ||||
| 					key = apiKey.Prefix + " " + apiKey.Key | ||||
| 				} else { | ||||
| 					key = apiKey.Key | ||||
| 				} | ||||
| 				localVarHeaderParams["Authorization"] = key | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| 	req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, nil, err | ||||
| 	} | ||||
| 
 | ||||
| 	localVarHTTPResponse, err := a.client.callAPI(req) | ||||
| 
 | ||||
| 	localVarAPIResponse := &APIResponse { | ||||
| 		Response: localVarHTTPResponse, | ||||
| 		Method: localVarHTTPMethod, | ||||
| 		RequestURL: localVarPath, | ||||
| 		Operation: "ImagesGet", | ||||
| 	} | ||||
| 
 | ||||
| 	if err != nil || localVarHTTPResponse == nil { | ||||
| 		return localVarReturnValue, localVarAPIResponse, err | ||||
| 	} | ||||
| 
 | ||||
| 	localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) | ||||
| 	localVarHTTPResponse.Body.Close() | ||||
| 	localVarAPIResponse.Payload = localVarBody | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, localVarAPIResponse, err | ||||
| 	} | ||||
| 
 | ||||
| 	if localVarHTTPResponse.StatusCode >= 300 { | ||||
| 		newErr := GenericOpenAPIError{ | ||||
| 			body:  localVarBody, | ||||
| 			error: localVarHTTPResponse.Status, | ||||
| 		} | ||||
| 			var v Error | ||||
| 			err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) | ||||
| 			if err != nil { | ||||
| 				newErr.error = err.Error() | ||||
| 				return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 			} | ||||
| 			newErr.model = v | ||||
| 		return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 	} | ||||
| 
 | ||||
| 	err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) | ||||
| 	if err != nil { | ||||
| 		newErr := GenericOpenAPIError{ | ||||
| 			body:  localVarBody, | ||||
| 			error: err.Error(), | ||||
| 		} | ||||
| 		return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 	} | ||||
| 
 | ||||
| 	return localVarReturnValue, localVarAPIResponse, nil | ||||
| } | ||||
| 
 | ||||
| type ApiImagesPatchRequest struct { | ||||
| 	ctx _context.Context | ||||
| 	ApiService *ImageApiService | ||||
| 	imageId string | ||||
| 	image *ImageProperties | ||||
| 	pretty *bool | ||||
| 	depth *int32 | ||||
| 	xContractNumber *int32 | ||||
| } | ||||
| 
 | ||||
| func (r ApiImagesPatchRequest) Image(image ImageProperties) ApiImagesPatchRequest { | ||||
| 	r.image = &image | ||||
| 	return r | ||||
| } | ||||
| func (r ApiImagesPatchRequest) Pretty(pretty bool) ApiImagesPatchRequest { | ||||
| 	r.pretty = &pretty | ||||
| 	return r | ||||
| } | ||||
| func (r ApiImagesPatchRequest) Depth(depth int32) ApiImagesPatchRequest { | ||||
| 	r.depth = &depth | ||||
| 	return r | ||||
| } | ||||
| func (r ApiImagesPatchRequest) XContractNumber(xContractNumber int32) ApiImagesPatchRequest { | ||||
| 	r.xContractNumber = &xContractNumber | ||||
| 	return r | ||||
| } | ||||
| 
 | ||||
| func (r ApiImagesPatchRequest) Execute() (Image, *APIResponse, error) { | ||||
| 	return r.ApiService.ImagesPatchExecute(r) | ||||
| } | ||||
| 
 | ||||
| /* | ||||
|  * ImagesPatch Partially modify an Image | ||||
|  * You can use update attributes of a resource | ||||
|  * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). | ||||
|  * @param imageId | ||||
|  * @return ApiImagesPatchRequest | ||||
|  */ | ||||
| func (a *ImageApiService) ImagesPatch(ctx _context.Context, imageId string) ApiImagesPatchRequest { | ||||
| 	return ApiImagesPatchRequest{ | ||||
| 		ApiService: a, | ||||
| 		ctx: ctx, | ||||
| 		imageId: imageId, | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| /* | ||||
|  * Execute executes the request | ||||
|  * @return Image | ||||
|  */ | ||||
| func (a *ImageApiService) ImagesPatchExecute(r ApiImagesPatchRequest) (Image, *APIResponse, error) { | ||||
| 	var ( | ||||
| 		localVarHTTPMethod   = _nethttp.MethodPatch | ||||
| 		localVarPostBody     interface{} | ||||
| 		localVarFormFileName string | ||||
| 		localVarFileName     string | ||||
| 		localVarFileBytes    []byte | ||||
| 		localVarReturnValue  Image | ||||
| 	) | ||||
| 
 | ||||
| 	localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ImageApiService.ImagesPatch") | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} | ||||
| 	} | ||||
| 
 | ||||
| 	localVarPath := localBasePath + "/images/{imageId}" | ||||
| 	localVarPath = strings.Replace(localVarPath, "{"+"imageId"+"}", _neturl.PathEscape(parameterToString(r.imageId, "")), -1) | ||||
| 
 | ||||
| 	localVarHeaderParams := make(map[string]string) | ||||
| 	localVarQueryParams := _neturl.Values{} | ||||
| 	localVarFormParams := _neturl.Values{} | ||||
| 	if r.image == nil { | ||||
| 		return localVarReturnValue, nil, reportError("image is required and must be specified") | ||||
| 	} | ||||
| 
 | ||||
| 	if r.pretty != nil { | ||||
| 		localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) | ||||
| 	} | ||||
| 	if r.depth != nil { | ||||
| 		localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) | ||||
| 	} | ||||
| 	// to determine the Content-Type header
 | ||||
| 	localVarHTTPContentTypes := []string{"application/json"} | ||||
| 
 | ||||
| 	// set Content-Type header
 | ||||
| 	localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) | ||||
| 	if localVarHTTPContentType != "" { | ||||
| 		localVarHeaderParams["Content-Type"] = localVarHTTPContentType | ||||
| 	} | ||||
| 
 | ||||
| 	// to determine the Accept header
 | ||||
| 	localVarHTTPHeaderAccepts := []string{"application/json"} | ||||
| 
 | ||||
| 	// set Accept header
 | ||||
| 	localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) | ||||
| 	if localVarHTTPHeaderAccept != "" { | ||||
| 		localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept | ||||
| 	} | ||||
| 	if r.xContractNumber != nil { | ||||
| 		localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") | ||||
| 	} | ||||
| 	// body params
 | ||||
| 	localVarPostBody = r.image | ||||
| 	if r.ctx != nil { | ||||
| 		// API Key Authentication
 | ||||
| 		if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { | ||||
| 			if apiKey, ok := auth["Token Authentication"]; ok { | ||||
| 				var key string | ||||
| 				if apiKey.Prefix != "" { | ||||
| 					key = apiKey.Prefix + " " + apiKey.Key | ||||
| 				} else { | ||||
| 					key = apiKey.Key | ||||
| 				} | ||||
| 				localVarHeaderParams["Authorization"] = key | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| 	req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, nil, err | ||||
| 	} | ||||
| 
 | ||||
| 	localVarHTTPResponse, err := a.client.callAPI(req) | ||||
| 
 | ||||
| 	localVarAPIResponse := &APIResponse { | ||||
| 		Response: localVarHTTPResponse, | ||||
| 		Method: localVarHTTPMethod, | ||||
| 		RequestURL: localVarPath, | ||||
| 		Operation: "ImagesPatch", | ||||
| 	} | ||||
| 
 | ||||
| 	if err != nil || localVarHTTPResponse == nil { | ||||
| 		return localVarReturnValue, localVarAPIResponse, err | ||||
| 	} | ||||
| 
 | ||||
| 	localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) | ||||
| 	localVarHTTPResponse.Body.Close() | ||||
| 	localVarAPIResponse.Payload = localVarBody | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, localVarAPIResponse, err | ||||
| 	} | ||||
| 
 | ||||
| 	if localVarHTTPResponse.StatusCode >= 300 { | ||||
| 		newErr := GenericOpenAPIError{ | ||||
| 			body:  localVarBody, | ||||
| 			error: localVarHTTPResponse.Status, | ||||
| 		} | ||||
| 			var v Error | ||||
| 			err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) | ||||
| 			if err != nil { | ||||
| 				newErr.error = err.Error() | ||||
| 				return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 			} | ||||
| 			newErr.model = v | ||||
| 		return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 	} | ||||
| 
 | ||||
| 	err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) | ||||
| 	if err != nil { | ||||
| 		newErr := GenericOpenAPIError{ | ||||
| 			body:  localVarBody, | ||||
| 			error: err.Error(), | ||||
| 		} | ||||
| 		return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 	} | ||||
| 
 | ||||
| 	return localVarReturnValue, localVarAPIResponse, nil | ||||
| } | ||||
| 
 | ||||
| type ApiImagesPutRequest struct { | ||||
| 	ctx _context.Context | ||||
| 	ApiService *ImageApiService | ||||
| 	imageId string | ||||
| 	image *Image | ||||
| 	pretty *bool | ||||
| 	depth *int32 | ||||
| 	xContractNumber *int32 | ||||
| } | ||||
| 
 | ||||
| func (r ApiImagesPutRequest) Image(image Image) ApiImagesPutRequest { | ||||
| 	r.image = &image | ||||
| 	return r | ||||
| } | ||||
| func (r ApiImagesPutRequest) Pretty(pretty bool) ApiImagesPutRequest { | ||||
| 	r.pretty = &pretty | ||||
| 	return r | ||||
| } | ||||
| func (r ApiImagesPutRequest) Depth(depth int32) ApiImagesPutRequest { | ||||
| 	r.depth = &depth | ||||
| 	return r | ||||
| } | ||||
| func (r ApiImagesPutRequest) XContractNumber(xContractNumber int32) ApiImagesPutRequest { | ||||
| 	r.xContractNumber = &xContractNumber | ||||
| 	return r | ||||
| } | ||||
| 
 | ||||
| func (r ApiImagesPutRequest) Execute() (Image, *APIResponse, error) { | ||||
| 	return r.ApiService.ImagesPutExecute(r) | ||||
| } | ||||
| 
 | ||||
| /* | ||||
|  * ImagesPut Modify an Image | ||||
|  * You can use update attributes of a resource | ||||
|  * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). | ||||
|  * @param imageId | ||||
|  * @return ApiImagesPutRequest | ||||
|  */ | ||||
| func (a *ImageApiService) ImagesPut(ctx _context.Context, imageId string) ApiImagesPutRequest { | ||||
| 	return ApiImagesPutRequest{ | ||||
| 		ApiService: a, | ||||
| 		ctx: ctx, | ||||
| 		imageId: imageId, | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| /* | ||||
|  * Execute executes the request | ||||
|  * @return Image | ||||
|  */ | ||||
| func (a *ImageApiService) ImagesPutExecute(r ApiImagesPutRequest) (Image, *APIResponse, error) { | ||||
| 	var ( | ||||
| 		localVarHTTPMethod   = _nethttp.MethodPut | ||||
| 		localVarPostBody     interface{} | ||||
| 		localVarFormFileName string | ||||
| 		localVarFileName     string | ||||
| 		localVarFileBytes    []byte | ||||
| 		localVarReturnValue  Image | ||||
| 	) | ||||
| 
 | ||||
| 	localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ImageApiService.ImagesPut") | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} | ||||
| 	} | ||||
| 
 | ||||
| 	localVarPath := localBasePath + "/images/{imageId}" | ||||
| 	localVarPath = strings.Replace(localVarPath, "{"+"imageId"+"}", _neturl.PathEscape(parameterToString(r.imageId, "")), -1) | ||||
| 
 | ||||
| 	localVarHeaderParams := make(map[string]string) | ||||
| 	localVarQueryParams := _neturl.Values{} | ||||
| 	localVarFormParams := _neturl.Values{} | ||||
| 	if r.image == nil { | ||||
| 		return localVarReturnValue, nil, reportError("image is required and must be specified") | ||||
| 	} | ||||
| 
 | ||||
| 	if r.pretty != nil { | ||||
| 		localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) | ||||
| 	} | ||||
| 	if r.depth != nil { | ||||
| 		localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) | ||||
| 	} | ||||
| 	// to determine the Content-Type header
 | ||||
| 	localVarHTTPContentTypes := []string{"application/json"} | ||||
| 
 | ||||
| 	// set Content-Type header
 | ||||
| 	localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) | ||||
| 	if localVarHTTPContentType != "" { | ||||
| 		localVarHeaderParams["Content-Type"] = localVarHTTPContentType | ||||
| 	} | ||||
| 
 | ||||
| 	// to determine the Accept header
 | ||||
| 	localVarHTTPHeaderAccepts := []string{"application/json"} | ||||
| 
 | ||||
| 	// set Accept header
 | ||||
| 	localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) | ||||
| 	if localVarHTTPHeaderAccept != "" { | ||||
| 		localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept | ||||
| 	} | ||||
| 	if r.xContractNumber != nil { | ||||
| 		localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") | ||||
| 	} | ||||
| 	// body params
 | ||||
| 	localVarPostBody = r.image | ||||
| 	if r.ctx != nil { | ||||
| 		// API Key Authentication
 | ||||
| 		if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { | ||||
| 			if apiKey, ok := auth["Token Authentication"]; ok { | ||||
| 				var key string | ||||
| 				if apiKey.Prefix != "" { | ||||
| 					key = apiKey.Prefix + " " + apiKey.Key | ||||
| 				} else { | ||||
| 					key = apiKey.Key | ||||
| 				} | ||||
| 				localVarHeaderParams["Authorization"] = key | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| 	req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, nil, err | ||||
| 	} | ||||
| 
 | ||||
| 	localVarHTTPResponse, err := a.client.callAPI(req) | ||||
| 
 | ||||
| 	localVarAPIResponse := &APIResponse { | ||||
| 		Response: localVarHTTPResponse, | ||||
| 		Method: localVarHTTPMethod, | ||||
| 		RequestURL: localVarPath, | ||||
| 		Operation: "ImagesPut", | ||||
| 	} | ||||
| 
 | ||||
| 	if err != nil || localVarHTTPResponse == nil { | ||||
| 		return localVarReturnValue, localVarAPIResponse, err | ||||
| 	} | ||||
| 
 | ||||
| 	localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) | ||||
| 	localVarHTTPResponse.Body.Close() | ||||
| 	localVarAPIResponse.Payload = localVarBody | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, localVarAPIResponse, err | ||||
| 	} | ||||
| 
 | ||||
| 	if localVarHTTPResponse.StatusCode >= 300 { | ||||
| 		newErr := GenericOpenAPIError{ | ||||
| 			body:  localVarBody, | ||||
| 			error: localVarHTTPResponse.Status, | ||||
| 		} | ||||
| 			var v Error | ||||
| 			err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) | ||||
| 			if err != nil { | ||||
| 				newErr.error = err.Error() | ||||
| 				return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 			} | ||||
| 			newErr.model = v | ||||
| 		return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 	} | ||||
| 
 | ||||
| 	err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) | ||||
| 	if err != nil { | ||||
| 		newErr := GenericOpenAPIError{ | ||||
| 			body:  localVarBody, | ||||
| 			error: err.Error(), | ||||
| 		} | ||||
| 		return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 	} | ||||
| 
 | ||||
| 	return localVarReturnValue, localVarAPIResponse, nil | ||||
| } | ||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							|  | @ -0,0 +1,504 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	_context "context" | ||||
| 	_ioutil "io/ioutil" | ||||
| 	_nethttp "net/http" | ||||
| 	_neturl "net/url" | ||||
| 	"strings" | ||||
| ) | ||||
| 
 | ||||
| // Linger please
 | ||||
| var ( | ||||
| 	_ _context.Context | ||||
| ) | ||||
| 
 | ||||
| // LocationApiService LocationApi service
 | ||||
| type LocationApiService service | ||||
| 
 | ||||
| type ApiLocationsFindByRegionRequest struct { | ||||
| 	ctx _context.Context | ||||
| 	ApiService *LocationApiService | ||||
| 	regionId string | ||||
| 	pretty *bool | ||||
| 	depth *int32 | ||||
| 	xContractNumber *int32 | ||||
| } | ||||
| 
 | ||||
| func (r ApiLocationsFindByRegionRequest) Pretty(pretty bool) ApiLocationsFindByRegionRequest { | ||||
| 	r.pretty = &pretty | ||||
| 	return r | ||||
| } | ||||
| func (r ApiLocationsFindByRegionRequest) Depth(depth int32) ApiLocationsFindByRegionRequest { | ||||
| 	r.depth = &depth | ||||
| 	return r | ||||
| } | ||||
| func (r ApiLocationsFindByRegionRequest) XContractNumber(xContractNumber int32) ApiLocationsFindByRegionRequest { | ||||
| 	r.xContractNumber = &xContractNumber | ||||
| 	return r | ||||
| } | ||||
| 
 | ||||
| func (r ApiLocationsFindByRegionRequest) Execute() (Locations, *APIResponse, error) { | ||||
| 	return r.ApiService.LocationsFindByRegionExecute(r) | ||||
| } | ||||
| 
 | ||||
| /* | ||||
|  * LocationsFindByRegion List Locations within a region | ||||
|  * Retrieve a list of Locations within a world's region | ||||
|  * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). | ||||
|  * @param regionId | ||||
|  * @return ApiLocationsFindByRegionRequest | ||||
|  */ | ||||
| func (a *LocationApiService) LocationsFindByRegion(ctx _context.Context, regionId string) ApiLocationsFindByRegionRequest { | ||||
| 	return ApiLocationsFindByRegionRequest{ | ||||
| 		ApiService: a, | ||||
| 		ctx: ctx, | ||||
| 		regionId: regionId, | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| /* | ||||
|  * Execute executes the request | ||||
|  * @return Locations | ||||
|  */ | ||||
| func (a *LocationApiService) LocationsFindByRegionExecute(r ApiLocationsFindByRegionRequest) (Locations, *APIResponse, error) { | ||||
| 	var ( | ||||
| 		localVarHTTPMethod   = _nethttp.MethodGet | ||||
| 		localVarPostBody     interface{} | ||||
| 		localVarFormFileName string | ||||
| 		localVarFileName     string | ||||
| 		localVarFileBytes    []byte | ||||
| 		localVarReturnValue  Locations | ||||
| 	) | ||||
| 
 | ||||
| 	localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LocationApiService.LocationsFindByRegion") | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} | ||||
| 	} | ||||
| 
 | ||||
| 	localVarPath := localBasePath + "/locations/{regionId}" | ||||
| 	localVarPath = strings.Replace(localVarPath, "{"+"regionId"+"}", _neturl.PathEscape(parameterToString(r.regionId, "")), -1) | ||||
| 
 | ||||
| 	localVarHeaderParams := make(map[string]string) | ||||
| 	localVarQueryParams := _neturl.Values{} | ||||
| 	localVarFormParams := _neturl.Values{} | ||||
| 
 | ||||
| 	if r.pretty != nil { | ||||
| 		localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) | ||||
| 	} | ||||
| 	if r.depth != nil { | ||||
| 		localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) | ||||
| 	} | ||||
| 	// to determine the Content-Type header
 | ||||
| 	localVarHTTPContentTypes := []string{} | ||||
| 
 | ||||
| 	// set Content-Type header
 | ||||
| 	localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) | ||||
| 	if localVarHTTPContentType != "" { | ||||
| 		localVarHeaderParams["Content-Type"] = localVarHTTPContentType | ||||
| 	} | ||||
| 
 | ||||
| 	// to determine the Accept header
 | ||||
| 	localVarHTTPHeaderAccepts := []string{"application/json"} | ||||
| 
 | ||||
| 	// set Accept header
 | ||||
| 	localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) | ||||
| 	if localVarHTTPHeaderAccept != "" { | ||||
| 		localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept | ||||
| 	} | ||||
| 	if r.xContractNumber != nil { | ||||
| 		localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") | ||||
| 	} | ||||
| 	if r.ctx != nil { | ||||
| 		// API Key Authentication
 | ||||
| 		if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { | ||||
| 			if apiKey, ok := auth["Token Authentication"]; ok { | ||||
| 				var key string | ||||
| 				if apiKey.Prefix != "" { | ||||
| 					key = apiKey.Prefix + " " + apiKey.Key | ||||
| 				} else { | ||||
| 					key = apiKey.Key | ||||
| 				} | ||||
| 				localVarHeaderParams["Authorization"] = key | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| 	req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, nil, err | ||||
| 	} | ||||
| 
 | ||||
| 	localVarHTTPResponse, err := a.client.callAPI(req) | ||||
| 
 | ||||
| 	localVarAPIResponse := &APIResponse { | ||||
| 		Response: localVarHTTPResponse, | ||||
| 		Method: localVarHTTPMethod, | ||||
| 		RequestURL: localVarPath, | ||||
| 		Operation: "LocationsFindByRegion", | ||||
| 	} | ||||
| 
 | ||||
| 	if err != nil || localVarHTTPResponse == nil { | ||||
| 		return localVarReturnValue, localVarAPIResponse, err | ||||
| 	} | ||||
| 
 | ||||
| 	localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) | ||||
| 	localVarHTTPResponse.Body.Close() | ||||
| 	localVarAPIResponse.Payload = localVarBody | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, localVarAPIResponse, err | ||||
| 	} | ||||
| 
 | ||||
| 	if localVarHTTPResponse.StatusCode >= 300 { | ||||
| 		newErr := GenericOpenAPIError{ | ||||
| 			body:  localVarBody, | ||||
| 			error: localVarHTTPResponse.Status, | ||||
| 		} | ||||
| 			var v Error | ||||
| 			err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) | ||||
| 			if err != nil { | ||||
| 				newErr.error = err.Error() | ||||
| 				return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 			} | ||||
| 			newErr.model = v | ||||
| 		return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 	} | ||||
| 
 | ||||
| 	err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) | ||||
| 	if err != nil { | ||||
| 		newErr := GenericOpenAPIError{ | ||||
| 			body:  localVarBody, | ||||
| 			error: err.Error(), | ||||
| 		} | ||||
| 		return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 	} | ||||
| 
 | ||||
| 	return localVarReturnValue, localVarAPIResponse, nil | ||||
| } | ||||
| 
 | ||||
| type ApiLocationsFindByRegionAndIdRequest struct { | ||||
| 	ctx _context.Context | ||||
| 	ApiService *LocationApiService | ||||
| 	regionId string | ||||
| 	locationId string | ||||
| 	pretty *bool | ||||
| 	depth *int32 | ||||
| 	xContractNumber *int32 | ||||
| } | ||||
| 
 | ||||
| func (r ApiLocationsFindByRegionAndIdRequest) Pretty(pretty bool) ApiLocationsFindByRegionAndIdRequest { | ||||
| 	r.pretty = &pretty | ||||
| 	return r | ||||
| } | ||||
| func (r ApiLocationsFindByRegionAndIdRequest) Depth(depth int32) ApiLocationsFindByRegionAndIdRequest { | ||||
| 	r.depth = &depth | ||||
| 	return r | ||||
| } | ||||
| func (r ApiLocationsFindByRegionAndIdRequest) XContractNumber(xContractNumber int32) ApiLocationsFindByRegionAndIdRequest { | ||||
| 	r.xContractNumber = &xContractNumber | ||||
| 	return r | ||||
| } | ||||
| 
 | ||||
| func (r ApiLocationsFindByRegionAndIdRequest) Execute() (Location, *APIResponse, error) { | ||||
| 	return r.ApiService.LocationsFindByRegionAndIdExecute(r) | ||||
| } | ||||
| 
 | ||||
| /* | ||||
|  * LocationsFindByRegionAndId Retrieve a Location | ||||
|  * Retrieves the attributes of a given location | ||||
|  * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). | ||||
|  * @param regionId | ||||
|  * @param locationId | ||||
|  * @return ApiLocationsFindByRegionAndIdRequest | ||||
|  */ | ||||
| func (a *LocationApiService) LocationsFindByRegionAndId(ctx _context.Context, regionId string, locationId string) ApiLocationsFindByRegionAndIdRequest { | ||||
| 	return ApiLocationsFindByRegionAndIdRequest{ | ||||
| 		ApiService: a, | ||||
| 		ctx: ctx, | ||||
| 		regionId: regionId, | ||||
| 		locationId: locationId, | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| /* | ||||
|  * Execute executes the request | ||||
|  * @return Location | ||||
|  */ | ||||
| func (a *LocationApiService) LocationsFindByRegionAndIdExecute(r ApiLocationsFindByRegionAndIdRequest) (Location, *APIResponse, error) { | ||||
| 	var ( | ||||
| 		localVarHTTPMethod   = _nethttp.MethodGet | ||||
| 		localVarPostBody     interface{} | ||||
| 		localVarFormFileName string | ||||
| 		localVarFileName     string | ||||
| 		localVarFileBytes    []byte | ||||
| 		localVarReturnValue  Location | ||||
| 	) | ||||
| 
 | ||||
| 	localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LocationApiService.LocationsFindByRegionAndId") | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} | ||||
| 	} | ||||
| 
 | ||||
| 	localVarPath := localBasePath + "/locations/{regionId}/{locationId}" | ||||
| 	localVarPath = strings.Replace(localVarPath, "{"+"regionId"+"}", _neturl.PathEscape(parameterToString(r.regionId, "")), -1) | ||||
| 	localVarPath = strings.Replace(localVarPath, "{"+"locationId"+"}", _neturl.PathEscape(parameterToString(r.locationId, "")), -1) | ||||
| 
 | ||||
| 	localVarHeaderParams := make(map[string]string) | ||||
| 	localVarQueryParams := _neturl.Values{} | ||||
| 	localVarFormParams := _neturl.Values{} | ||||
| 
 | ||||
| 	if r.pretty != nil { | ||||
| 		localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) | ||||
| 	} | ||||
| 	if r.depth != nil { | ||||
| 		localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) | ||||
| 	} | ||||
| 	// to determine the Content-Type header
 | ||||
| 	localVarHTTPContentTypes := []string{} | ||||
| 
 | ||||
| 	// set Content-Type header
 | ||||
| 	localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) | ||||
| 	if localVarHTTPContentType != "" { | ||||
| 		localVarHeaderParams["Content-Type"] = localVarHTTPContentType | ||||
| 	} | ||||
| 
 | ||||
| 	// to determine the Accept header
 | ||||
| 	localVarHTTPHeaderAccepts := []string{"application/json"} | ||||
| 
 | ||||
| 	// set Accept header
 | ||||
| 	localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) | ||||
| 	if localVarHTTPHeaderAccept != "" { | ||||
| 		localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept | ||||
| 	} | ||||
| 	if r.xContractNumber != nil { | ||||
| 		localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") | ||||
| 	} | ||||
| 	if r.ctx != nil { | ||||
| 		// API Key Authentication
 | ||||
| 		if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { | ||||
| 			if apiKey, ok := auth["Token Authentication"]; ok { | ||||
| 				var key string | ||||
| 				if apiKey.Prefix != "" { | ||||
| 					key = apiKey.Prefix + " " + apiKey.Key | ||||
| 				} else { | ||||
| 					key = apiKey.Key | ||||
| 				} | ||||
| 				localVarHeaderParams["Authorization"] = key | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| 	req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, nil, err | ||||
| 	} | ||||
| 
 | ||||
| 	localVarHTTPResponse, err := a.client.callAPI(req) | ||||
| 
 | ||||
| 	localVarAPIResponse := &APIResponse { | ||||
| 		Response: localVarHTTPResponse, | ||||
| 		Method: localVarHTTPMethod, | ||||
| 		RequestURL: localVarPath, | ||||
| 		Operation: "LocationsFindByRegionAndId", | ||||
| 	} | ||||
| 
 | ||||
| 	if err != nil || localVarHTTPResponse == nil { | ||||
| 		return localVarReturnValue, localVarAPIResponse, err | ||||
| 	} | ||||
| 
 | ||||
| 	localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) | ||||
| 	localVarHTTPResponse.Body.Close() | ||||
| 	localVarAPIResponse.Payload = localVarBody | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, localVarAPIResponse, err | ||||
| 	} | ||||
| 
 | ||||
| 	if localVarHTTPResponse.StatusCode >= 300 { | ||||
| 		newErr := GenericOpenAPIError{ | ||||
| 			body:  localVarBody, | ||||
| 			error: localVarHTTPResponse.Status, | ||||
| 		} | ||||
| 			var v Error | ||||
| 			err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) | ||||
| 			if err != nil { | ||||
| 				newErr.error = err.Error() | ||||
| 				return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 			} | ||||
| 			newErr.model = v | ||||
| 		return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 	} | ||||
| 
 | ||||
| 	err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) | ||||
| 	if err != nil { | ||||
| 		newErr := GenericOpenAPIError{ | ||||
| 			body:  localVarBody, | ||||
| 			error: err.Error(), | ||||
| 		} | ||||
| 		return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 	} | ||||
| 
 | ||||
| 	return localVarReturnValue, localVarAPIResponse, nil | ||||
| } | ||||
| 
 | ||||
| type ApiLocationsGetRequest struct { | ||||
| 	ctx _context.Context | ||||
| 	ApiService *LocationApiService | ||||
| 	pretty *bool | ||||
| 	depth *int32 | ||||
| 	xContractNumber *int32 | ||||
| } | ||||
| 
 | ||||
| func (r ApiLocationsGetRequest) Pretty(pretty bool) ApiLocationsGetRequest { | ||||
| 	r.pretty = &pretty | ||||
| 	return r | ||||
| } | ||||
| func (r ApiLocationsGetRequest) Depth(depth int32) ApiLocationsGetRequest { | ||||
| 	r.depth = &depth | ||||
| 	return r | ||||
| } | ||||
| func (r ApiLocationsGetRequest) XContractNumber(xContractNumber int32) ApiLocationsGetRequest { | ||||
| 	r.xContractNumber = &xContractNumber | ||||
| 	return r | ||||
| } | ||||
| 
 | ||||
| func (r ApiLocationsGetRequest) Execute() (Locations, *APIResponse, error) { | ||||
| 	return r.ApiService.LocationsGetExecute(r) | ||||
| } | ||||
| 
 | ||||
| /* | ||||
|  * LocationsGet List Locations | ||||
|  * Retrieve a list of Locations. This list represents where you can provision your virtual data centers | ||||
|  * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). | ||||
|  * @return ApiLocationsGetRequest | ||||
|  */ | ||||
| func (a *LocationApiService) LocationsGet(ctx _context.Context) ApiLocationsGetRequest { | ||||
| 	return ApiLocationsGetRequest{ | ||||
| 		ApiService: a, | ||||
| 		ctx: ctx, | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| /* | ||||
|  * Execute executes the request | ||||
|  * @return Locations | ||||
|  */ | ||||
| func (a *LocationApiService) LocationsGetExecute(r ApiLocationsGetRequest) (Locations, *APIResponse, error) { | ||||
| 	var ( | ||||
| 		localVarHTTPMethod   = _nethttp.MethodGet | ||||
| 		localVarPostBody     interface{} | ||||
| 		localVarFormFileName string | ||||
| 		localVarFileName     string | ||||
| 		localVarFileBytes    []byte | ||||
| 		localVarReturnValue  Locations | ||||
| 	) | ||||
| 
 | ||||
| 	localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LocationApiService.LocationsGet") | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} | ||||
| 	} | ||||
| 
 | ||||
| 	localVarPath := localBasePath + "/locations" | ||||
| 
 | ||||
| 	localVarHeaderParams := make(map[string]string) | ||||
| 	localVarQueryParams := _neturl.Values{} | ||||
| 	localVarFormParams := _neturl.Values{} | ||||
| 
 | ||||
| 	if r.pretty != nil { | ||||
| 		localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) | ||||
| 	} | ||||
| 	if r.depth != nil { | ||||
| 		localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) | ||||
| 	} | ||||
| 	// to determine the Content-Type header
 | ||||
| 	localVarHTTPContentTypes := []string{} | ||||
| 
 | ||||
| 	// set Content-Type header
 | ||||
| 	localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) | ||||
| 	if localVarHTTPContentType != "" { | ||||
| 		localVarHeaderParams["Content-Type"] = localVarHTTPContentType | ||||
| 	} | ||||
| 
 | ||||
| 	// to determine the Accept header
 | ||||
| 	localVarHTTPHeaderAccepts := []string{"application/json"} | ||||
| 
 | ||||
| 	// set Accept header
 | ||||
| 	localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) | ||||
| 	if localVarHTTPHeaderAccept != "" { | ||||
| 		localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept | ||||
| 	} | ||||
| 	if r.xContractNumber != nil { | ||||
| 		localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") | ||||
| 	} | ||||
| 	if r.ctx != nil { | ||||
| 		// API Key Authentication
 | ||||
| 		if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { | ||||
| 			if apiKey, ok := auth["Token Authentication"]; ok { | ||||
| 				var key string | ||||
| 				if apiKey.Prefix != "" { | ||||
| 					key = apiKey.Prefix + " " + apiKey.Key | ||||
| 				} else { | ||||
| 					key = apiKey.Key | ||||
| 				} | ||||
| 				localVarHeaderParams["Authorization"] = key | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| 	req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, nil, err | ||||
| 	} | ||||
| 
 | ||||
| 	localVarHTTPResponse, err := a.client.callAPI(req) | ||||
| 
 | ||||
| 	localVarAPIResponse := &APIResponse { | ||||
| 		Response: localVarHTTPResponse, | ||||
| 		Method: localVarHTTPMethod, | ||||
| 		RequestURL: localVarPath, | ||||
| 		Operation: "LocationsGet", | ||||
| 	} | ||||
| 
 | ||||
| 	if err != nil || localVarHTTPResponse == nil { | ||||
| 		return localVarReturnValue, localVarAPIResponse, err | ||||
| 	} | ||||
| 
 | ||||
| 	localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) | ||||
| 	localVarHTTPResponse.Body.Close() | ||||
| 	localVarAPIResponse.Payload = localVarBody | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, localVarAPIResponse, err | ||||
| 	} | ||||
| 
 | ||||
| 	if localVarHTTPResponse.StatusCode >= 300 { | ||||
| 		newErr := GenericOpenAPIError{ | ||||
| 			body:  localVarBody, | ||||
| 			error: localVarHTTPResponse.Status, | ||||
| 		} | ||||
| 			var v Error | ||||
| 			err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) | ||||
| 			if err != nil { | ||||
| 				newErr.error = err.Error() | ||||
| 				return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 			} | ||||
| 			newErr.model = v | ||||
| 		return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 	} | ||||
| 
 | ||||
| 	err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) | ||||
| 	if err != nil { | ||||
| 		newErr := GenericOpenAPIError{ | ||||
| 			body:  localVarBody, | ||||
| 			error: err.Error(), | ||||
| 		} | ||||
| 		return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 	} | ||||
| 
 | ||||
| 	return localVarReturnValue, localVarAPIResponse, nil | ||||
| } | ||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							|  | @ -0,0 +1,834 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	_context "context" | ||||
| 	_ioutil "io/ioutil" | ||||
| 	_nethttp "net/http" | ||||
| 	_neturl "net/url" | ||||
| 	"strings" | ||||
| ) | ||||
| 
 | ||||
| // Linger please
 | ||||
| var ( | ||||
| 	_ _context.Context | ||||
| ) | ||||
| 
 | ||||
| // PrivateCrossConnectApiService PrivateCrossConnectApi service
 | ||||
| type PrivateCrossConnectApiService service | ||||
| 
 | ||||
| type ApiPccsDeleteRequest struct { | ||||
| 	ctx _context.Context | ||||
| 	ApiService *PrivateCrossConnectApiService | ||||
| 	pccId string | ||||
| 	pretty *bool | ||||
| 	depth *int32 | ||||
| 	xContractNumber *int32 | ||||
| } | ||||
| 
 | ||||
| func (r ApiPccsDeleteRequest) Pretty(pretty bool) ApiPccsDeleteRequest { | ||||
| 	r.pretty = &pretty | ||||
| 	return r | ||||
| } | ||||
| func (r ApiPccsDeleteRequest) Depth(depth int32) ApiPccsDeleteRequest { | ||||
| 	r.depth = &depth | ||||
| 	return r | ||||
| } | ||||
| func (r ApiPccsDeleteRequest) XContractNumber(xContractNumber int32) ApiPccsDeleteRequest { | ||||
| 	r.xContractNumber = &xContractNumber | ||||
| 	return r | ||||
| } | ||||
| 
 | ||||
| func (r ApiPccsDeleteRequest) Execute() (map[string]interface{}, *APIResponse, error) { | ||||
| 	return r.ApiService.PccsDeleteExecute(r) | ||||
| } | ||||
| 
 | ||||
| /* | ||||
|  * PccsDelete Delete a Private Cross-Connect | ||||
|  * Delete a private cross-connect if no datacenters are joined to the given PCC | ||||
|  * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). | ||||
|  * @param pccId The unique ID of the private cross-connect | ||||
|  * @return ApiPccsDeleteRequest | ||||
|  */ | ||||
| func (a *PrivateCrossConnectApiService) PccsDelete(ctx _context.Context, pccId string) ApiPccsDeleteRequest { | ||||
| 	return ApiPccsDeleteRequest{ | ||||
| 		ApiService: a, | ||||
| 		ctx: ctx, | ||||
| 		pccId: pccId, | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| /* | ||||
|  * Execute executes the request | ||||
|  * @return map[string]interface{} | ||||
|  */ | ||||
| func (a *PrivateCrossConnectApiService) PccsDeleteExecute(r ApiPccsDeleteRequest) (map[string]interface{}, *APIResponse, error) { | ||||
| 	var ( | ||||
| 		localVarHTTPMethod   = _nethttp.MethodDelete | ||||
| 		localVarPostBody     interface{} | ||||
| 		localVarFormFileName string | ||||
| 		localVarFileName     string | ||||
| 		localVarFileBytes    []byte | ||||
| 		localVarReturnValue  map[string]interface{} | ||||
| 	) | ||||
| 
 | ||||
| 	localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PrivateCrossConnectApiService.PccsDelete") | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} | ||||
| 	} | ||||
| 
 | ||||
| 	localVarPath := localBasePath + "/pccs/{pccId}" | ||||
| 	localVarPath = strings.Replace(localVarPath, "{"+"pccId"+"}", _neturl.PathEscape(parameterToString(r.pccId, "")), -1) | ||||
| 
 | ||||
| 	localVarHeaderParams := make(map[string]string) | ||||
| 	localVarQueryParams := _neturl.Values{} | ||||
| 	localVarFormParams := _neturl.Values{} | ||||
| 
 | ||||
| 	if r.pretty != nil { | ||||
| 		localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) | ||||
| 	} | ||||
| 	if r.depth != nil { | ||||
| 		localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) | ||||
| 	} | ||||
| 	// to determine the Content-Type header
 | ||||
| 	localVarHTTPContentTypes := []string{} | ||||
| 
 | ||||
| 	// set Content-Type header
 | ||||
| 	localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) | ||||
| 	if localVarHTTPContentType != "" { | ||||
| 		localVarHeaderParams["Content-Type"] = localVarHTTPContentType | ||||
| 	} | ||||
| 
 | ||||
| 	// to determine the Accept header
 | ||||
| 	localVarHTTPHeaderAccepts := []string{"application/json"} | ||||
| 
 | ||||
| 	// set Accept header
 | ||||
| 	localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) | ||||
| 	if localVarHTTPHeaderAccept != "" { | ||||
| 		localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept | ||||
| 	} | ||||
| 	if r.xContractNumber != nil { | ||||
| 		localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") | ||||
| 	} | ||||
| 	if r.ctx != nil { | ||||
| 		// API Key Authentication
 | ||||
| 		if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { | ||||
| 			if apiKey, ok := auth["Token Authentication"]; ok { | ||||
| 				var key string | ||||
| 				if apiKey.Prefix != "" { | ||||
| 					key = apiKey.Prefix + " " + apiKey.Key | ||||
| 				} else { | ||||
| 					key = apiKey.Key | ||||
| 				} | ||||
| 				localVarHeaderParams["Authorization"] = key | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| 	req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, nil, err | ||||
| 	} | ||||
| 
 | ||||
| 	localVarHTTPResponse, err := a.client.callAPI(req) | ||||
| 
 | ||||
| 	localVarAPIResponse := &APIResponse { | ||||
| 		Response: localVarHTTPResponse, | ||||
| 		Method: localVarHTTPMethod, | ||||
| 		RequestURL: localVarPath, | ||||
| 		Operation: "PccsDelete", | ||||
| 	} | ||||
| 
 | ||||
| 	if err != nil || localVarHTTPResponse == nil { | ||||
| 		return localVarReturnValue, localVarAPIResponse, err | ||||
| 	} | ||||
| 
 | ||||
| 	localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) | ||||
| 	localVarHTTPResponse.Body.Close() | ||||
| 	localVarAPIResponse.Payload = localVarBody | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, localVarAPIResponse, err | ||||
| 	} | ||||
| 
 | ||||
| 	if localVarHTTPResponse.StatusCode >= 300 { | ||||
| 		newErr := GenericOpenAPIError{ | ||||
| 			body:  localVarBody, | ||||
| 			error: localVarHTTPResponse.Status, | ||||
| 		} | ||||
| 			var v Error | ||||
| 			err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) | ||||
| 			if err != nil { | ||||
| 				newErr.error = err.Error() | ||||
| 				return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 			} | ||||
| 			newErr.model = v | ||||
| 		return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 	} | ||||
| 
 | ||||
| 	err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) | ||||
| 	if err != nil { | ||||
| 		newErr := GenericOpenAPIError{ | ||||
| 			body:  localVarBody, | ||||
| 			error: err.Error(), | ||||
| 		} | ||||
| 		return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 	} | ||||
| 
 | ||||
| 	return localVarReturnValue, localVarAPIResponse, nil | ||||
| } | ||||
| 
 | ||||
| type ApiPccsFindByIdRequest struct { | ||||
| 	ctx _context.Context | ||||
| 	ApiService *PrivateCrossConnectApiService | ||||
| 	pccId string | ||||
| 	pretty *bool | ||||
| 	depth *int32 | ||||
| 	xContractNumber *int32 | ||||
| } | ||||
| 
 | ||||
| func (r ApiPccsFindByIdRequest) Pretty(pretty bool) ApiPccsFindByIdRequest { | ||||
| 	r.pretty = &pretty | ||||
| 	return r | ||||
| } | ||||
| func (r ApiPccsFindByIdRequest) Depth(depth int32) ApiPccsFindByIdRequest { | ||||
| 	r.depth = &depth | ||||
| 	return r | ||||
| } | ||||
| func (r ApiPccsFindByIdRequest) XContractNumber(xContractNumber int32) ApiPccsFindByIdRequest { | ||||
| 	r.xContractNumber = &xContractNumber | ||||
| 	return r | ||||
| } | ||||
| 
 | ||||
| func (r ApiPccsFindByIdRequest) Execute() (PrivateCrossConnect, *APIResponse, error) { | ||||
| 	return r.ApiService.PccsFindByIdExecute(r) | ||||
| } | ||||
| 
 | ||||
| /* | ||||
|  * PccsFindById Retrieve a Private Cross-Connect | ||||
|  * You can retrieve a private cross-connect by using the resource's ID. This value can be found in the response body when a private cross-connect is created or when you GET a list of private cross-connects. | ||||
|  * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). | ||||
|  * @param pccId The unique ID of the private cross-connect | ||||
|  * @return ApiPccsFindByIdRequest | ||||
|  */ | ||||
| func (a *PrivateCrossConnectApiService) PccsFindById(ctx _context.Context, pccId string) ApiPccsFindByIdRequest { | ||||
| 	return ApiPccsFindByIdRequest{ | ||||
| 		ApiService: a, | ||||
| 		ctx: ctx, | ||||
| 		pccId: pccId, | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| /* | ||||
|  * Execute executes the request | ||||
|  * @return PrivateCrossConnect | ||||
|  */ | ||||
| func (a *PrivateCrossConnectApiService) PccsFindByIdExecute(r ApiPccsFindByIdRequest) (PrivateCrossConnect, *APIResponse, error) { | ||||
| 	var ( | ||||
| 		localVarHTTPMethod   = _nethttp.MethodGet | ||||
| 		localVarPostBody     interface{} | ||||
| 		localVarFormFileName string | ||||
| 		localVarFileName     string | ||||
| 		localVarFileBytes    []byte | ||||
| 		localVarReturnValue  PrivateCrossConnect | ||||
| 	) | ||||
| 
 | ||||
| 	localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PrivateCrossConnectApiService.PccsFindById") | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} | ||||
| 	} | ||||
| 
 | ||||
| 	localVarPath := localBasePath + "/pccs/{pccId}" | ||||
| 	localVarPath = strings.Replace(localVarPath, "{"+"pccId"+"}", _neturl.PathEscape(parameterToString(r.pccId, "")), -1) | ||||
| 
 | ||||
| 	localVarHeaderParams := make(map[string]string) | ||||
| 	localVarQueryParams := _neturl.Values{} | ||||
| 	localVarFormParams := _neturl.Values{} | ||||
| 
 | ||||
| 	if r.pretty != nil { | ||||
| 		localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) | ||||
| 	} | ||||
| 	if r.depth != nil { | ||||
| 		localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) | ||||
| 	} | ||||
| 	// to determine the Content-Type header
 | ||||
| 	localVarHTTPContentTypes := []string{} | ||||
| 
 | ||||
| 	// set Content-Type header
 | ||||
| 	localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) | ||||
| 	if localVarHTTPContentType != "" { | ||||
| 		localVarHeaderParams["Content-Type"] = localVarHTTPContentType | ||||
| 	} | ||||
| 
 | ||||
| 	// to determine the Accept header
 | ||||
| 	localVarHTTPHeaderAccepts := []string{"application/json"} | ||||
| 
 | ||||
| 	// set Accept header
 | ||||
| 	localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) | ||||
| 	if localVarHTTPHeaderAccept != "" { | ||||
| 		localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept | ||||
| 	} | ||||
| 	if r.xContractNumber != nil { | ||||
| 		localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") | ||||
| 	} | ||||
| 	if r.ctx != nil { | ||||
| 		// API Key Authentication
 | ||||
| 		if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { | ||||
| 			if apiKey, ok := auth["Token Authentication"]; ok { | ||||
| 				var key string | ||||
| 				if apiKey.Prefix != "" { | ||||
| 					key = apiKey.Prefix + " " + apiKey.Key | ||||
| 				} else { | ||||
| 					key = apiKey.Key | ||||
| 				} | ||||
| 				localVarHeaderParams["Authorization"] = key | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| 	req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, nil, err | ||||
| 	} | ||||
| 
 | ||||
| 	localVarHTTPResponse, err := a.client.callAPI(req) | ||||
| 
 | ||||
| 	localVarAPIResponse := &APIResponse { | ||||
| 		Response: localVarHTTPResponse, | ||||
| 		Method: localVarHTTPMethod, | ||||
| 		RequestURL: localVarPath, | ||||
| 		Operation: "PccsFindById", | ||||
| 	} | ||||
| 
 | ||||
| 	if err != nil || localVarHTTPResponse == nil { | ||||
| 		return localVarReturnValue, localVarAPIResponse, err | ||||
| 	} | ||||
| 
 | ||||
| 	localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) | ||||
| 	localVarHTTPResponse.Body.Close() | ||||
| 	localVarAPIResponse.Payload = localVarBody | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, localVarAPIResponse, err | ||||
| 	} | ||||
| 
 | ||||
| 	if localVarHTTPResponse.StatusCode >= 300 { | ||||
| 		newErr := GenericOpenAPIError{ | ||||
| 			body:  localVarBody, | ||||
| 			error: localVarHTTPResponse.Status, | ||||
| 		} | ||||
| 			var v Error | ||||
| 			err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) | ||||
| 			if err != nil { | ||||
| 				newErr.error = err.Error() | ||||
| 				return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 			} | ||||
| 			newErr.model = v | ||||
| 		return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 	} | ||||
| 
 | ||||
| 	err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) | ||||
| 	if err != nil { | ||||
| 		newErr := GenericOpenAPIError{ | ||||
| 			body:  localVarBody, | ||||
| 			error: err.Error(), | ||||
| 		} | ||||
| 		return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 	} | ||||
| 
 | ||||
| 	return localVarReturnValue, localVarAPIResponse, nil | ||||
| } | ||||
| 
 | ||||
| type ApiPccsGetRequest struct { | ||||
| 	ctx _context.Context | ||||
| 	ApiService *PrivateCrossConnectApiService | ||||
| 	pretty *bool | ||||
| 	depth *int32 | ||||
| 	xContractNumber *int32 | ||||
| } | ||||
| 
 | ||||
| func (r ApiPccsGetRequest) Pretty(pretty bool) ApiPccsGetRequest { | ||||
| 	r.pretty = &pretty | ||||
| 	return r | ||||
| } | ||||
| func (r ApiPccsGetRequest) Depth(depth int32) ApiPccsGetRequest { | ||||
| 	r.depth = &depth | ||||
| 	return r | ||||
| } | ||||
| func (r ApiPccsGetRequest) XContractNumber(xContractNumber int32) ApiPccsGetRequest { | ||||
| 	r.xContractNumber = &xContractNumber | ||||
| 	return r | ||||
| } | ||||
| 
 | ||||
| func (r ApiPccsGetRequest) Execute() (PrivateCrossConnects, *APIResponse, error) { | ||||
| 	return r.ApiService.PccsGetExecute(r) | ||||
| } | ||||
| 
 | ||||
| /* | ||||
|  * PccsGet List Private Cross-Connects  | ||||
|  * You can retrieve a complete list of private cross-connects provisioned under your account | ||||
|  * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). | ||||
|  * @return ApiPccsGetRequest | ||||
|  */ | ||||
| func (a *PrivateCrossConnectApiService) PccsGet(ctx _context.Context) ApiPccsGetRequest { | ||||
| 	return ApiPccsGetRequest{ | ||||
| 		ApiService: a, | ||||
| 		ctx: ctx, | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| /* | ||||
|  * Execute executes the request | ||||
|  * @return PrivateCrossConnects | ||||
|  */ | ||||
| func (a *PrivateCrossConnectApiService) PccsGetExecute(r ApiPccsGetRequest) (PrivateCrossConnects, *APIResponse, error) { | ||||
| 	var ( | ||||
| 		localVarHTTPMethod   = _nethttp.MethodGet | ||||
| 		localVarPostBody     interface{} | ||||
| 		localVarFormFileName string | ||||
| 		localVarFileName     string | ||||
| 		localVarFileBytes    []byte | ||||
| 		localVarReturnValue  PrivateCrossConnects | ||||
| 	) | ||||
| 
 | ||||
| 	localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PrivateCrossConnectApiService.PccsGet") | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} | ||||
| 	} | ||||
| 
 | ||||
| 	localVarPath := localBasePath + "/pccs" | ||||
| 
 | ||||
| 	localVarHeaderParams := make(map[string]string) | ||||
| 	localVarQueryParams := _neturl.Values{} | ||||
| 	localVarFormParams := _neturl.Values{} | ||||
| 
 | ||||
| 	if r.pretty != nil { | ||||
| 		localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) | ||||
| 	} | ||||
| 	if r.depth != nil { | ||||
| 		localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) | ||||
| 	} | ||||
| 	// to determine the Content-Type header
 | ||||
| 	localVarHTTPContentTypes := []string{} | ||||
| 
 | ||||
| 	// set Content-Type header
 | ||||
| 	localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) | ||||
| 	if localVarHTTPContentType != "" { | ||||
| 		localVarHeaderParams["Content-Type"] = localVarHTTPContentType | ||||
| 	} | ||||
| 
 | ||||
| 	// to determine the Accept header
 | ||||
| 	localVarHTTPHeaderAccepts := []string{"application/json"} | ||||
| 
 | ||||
| 	// set Accept header
 | ||||
| 	localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) | ||||
| 	if localVarHTTPHeaderAccept != "" { | ||||
| 		localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept | ||||
| 	} | ||||
| 	if r.xContractNumber != nil { | ||||
| 		localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") | ||||
| 	} | ||||
| 	if r.ctx != nil { | ||||
| 		// API Key Authentication
 | ||||
| 		if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { | ||||
| 			if apiKey, ok := auth["Token Authentication"]; ok { | ||||
| 				var key string | ||||
| 				if apiKey.Prefix != "" { | ||||
| 					key = apiKey.Prefix + " " + apiKey.Key | ||||
| 				} else { | ||||
| 					key = apiKey.Key | ||||
| 				} | ||||
| 				localVarHeaderParams["Authorization"] = key | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| 	req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, nil, err | ||||
| 	} | ||||
| 
 | ||||
| 	localVarHTTPResponse, err := a.client.callAPI(req) | ||||
| 
 | ||||
| 	localVarAPIResponse := &APIResponse { | ||||
| 		Response: localVarHTTPResponse, | ||||
| 		Method: localVarHTTPMethod, | ||||
| 		RequestURL: localVarPath, | ||||
| 		Operation: "PccsGet", | ||||
| 	} | ||||
| 
 | ||||
| 	if err != nil || localVarHTTPResponse == nil { | ||||
| 		return localVarReturnValue, localVarAPIResponse, err | ||||
| 	} | ||||
| 
 | ||||
| 	localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) | ||||
| 	localVarHTTPResponse.Body.Close() | ||||
| 	localVarAPIResponse.Payload = localVarBody | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, localVarAPIResponse, err | ||||
| 	} | ||||
| 
 | ||||
| 	if localVarHTTPResponse.StatusCode >= 300 { | ||||
| 		newErr := GenericOpenAPIError{ | ||||
| 			body:  localVarBody, | ||||
| 			error: localVarHTTPResponse.Status, | ||||
| 		} | ||||
| 			var v Error | ||||
| 			err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) | ||||
| 			if err != nil { | ||||
| 				newErr.error = err.Error() | ||||
| 				return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 			} | ||||
| 			newErr.model = v | ||||
| 		return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 	} | ||||
| 
 | ||||
| 	err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) | ||||
| 	if err != nil { | ||||
| 		newErr := GenericOpenAPIError{ | ||||
| 			body:  localVarBody, | ||||
| 			error: err.Error(), | ||||
| 		} | ||||
| 		return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 	} | ||||
| 
 | ||||
| 	return localVarReturnValue, localVarAPIResponse, nil | ||||
| } | ||||
| 
 | ||||
| type ApiPccsPatchRequest struct { | ||||
| 	ctx _context.Context | ||||
| 	ApiService *PrivateCrossConnectApiService | ||||
| 	pccId string | ||||
| 	pcc *PrivateCrossConnectProperties | ||||
| 	pretty *bool | ||||
| 	depth *int32 | ||||
| 	xContractNumber *int32 | ||||
| } | ||||
| 
 | ||||
| func (r ApiPccsPatchRequest) Pcc(pcc PrivateCrossConnectProperties) ApiPccsPatchRequest { | ||||
| 	r.pcc = &pcc | ||||
| 	return r | ||||
| } | ||||
| func (r ApiPccsPatchRequest) Pretty(pretty bool) ApiPccsPatchRequest { | ||||
| 	r.pretty = &pretty | ||||
| 	return r | ||||
| } | ||||
| func (r ApiPccsPatchRequest) Depth(depth int32) ApiPccsPatchRequest { | ||||
| 	r.depth = &depth | ||||
| 	return r | ||||
| } | ||||
| func (r ApiPccsPatchRequest) XContractNumber(xContractNumber int32) ApiPccsPatchRequest { | ||||
| 	r.xContractNumber = &xContractNumber | ||||
| 	return r | ||||
| } | ||||
| 
 | ||||
| func (r ApiPccsPatchRequest) Execute() (PrivateCrossConnect, *APIResponse, error) { | ||||
| 	return r.ApiService.PccsPatchExecute(r) | ||||
| } | ||||
| 
 | ||||
| /* | ||||
|  * PccsPatch Partially modify a private cross-connect | ||||
|  * You can use update private cross-connect to re-name or update its description | ||||
|  * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). | ||||
|  * @param pccId The unique ID of the private cross-connect | ||||
|  * @return ApiPccsPatchRequest | ||||
|  */ | ||||
| func (a *PrivateCrossConnectApiService) PccsPatch(ctx _context.Context, pccId string) ApiPccsPatchRequest { | ||||
| 	return ApiPccsPatchRequest{ | ||||
| 		ApiService: a, | ||||
| 		ctx: ctx, | ||||
| 		pccId: pccId, | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| /* | ||||
|  * Execute executes the request | ||||
|  * @return PrivateCrossConnect | ||||
|  */ | ||||
| func (a *PrivateCrossConnectApiService) PccsPatchExecute(r ApiPccsPatchRequest) (PrivateCrossConnect, *APIResponse, error) { | ||||
| 	var ( | ||||
| 		localVarHTTPMethod   = _nethttp.MethodPatch | ||||
| 		localVarPostBody     interface{} | ||||
| 		localVarFormFileName string | ||||
| 		localVarFileName     string | ||||
| 		localVarFileBytes    []byte | ||||
| 		localVarReturnValue  PrivateCrossConnect | ||||
| 	) | ||||
| 
 | ||||
| 	localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PrivateCrossConnectApiService.PccsPatch") | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} | ||||
| 	} | ||||
| 
 | ||||
| 	localVarPath := localBasePath + "/pccs/{pccId}" | ||||
| 	localVarPath = strings.Replace(localVarPath, "{"+"pccId"+"}", _neturl.PathEscape(parameterToString(r.pccId, "")), -1) | ||||
| 
 | ||||
| 	localVarHeaderParams := make(map[string]string) | ||||
| 	localVarQueryParams := _neturl.Values{} | ||||
| 	localVarFormParams := _neturl.Values{} | ||||
| 	if r.pcc == nil { | ||||
| 		return localVarReturnValue, nil, reportError("pcc is required and must be specified") | ||||
| 	} | ||||
| 
 | ||||
| 	if r.pretty != nil { | ||||
| 		localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) | ||||
| 	} | ||||
| 	if r.depth != nil { | ||||
| 		localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) | ||||
| 	} | ||||
| 	// to determine the Content-Type header
 | ||||
| 	localVarHTTPContentTypes := []string{"application/json"} | ||||
| 
 | ||||
| 	// set Content-Type header
 | ||||
| 	localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) | ||||
| 	if localVarHTTPContentType != "" { | ||||
| 		localVarHeaderParams["Content-Type"] = localVarHTTPContentType | ||||
| 	} | ||||
| 
 | ||||
| 	// to determine the Accept header
 | ||||
| 	localVarHTTPHeaderAccepts := []string{"application/json"} | ||||
| 
 | ||||
| 	// set Accept header
 | ||||
| 	localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) | ||||
| 	if localVarHTTPHeaderAccept != "" { | ||||
| 		localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept | ||||
| 	} | ||||
| 	if r.xContractNumber != nil { | ||||
| 		localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") | ||||
| 	} | ||||
| 	// body params
 | ||||
| 	localVarPostBody = r.pcc | ||||
| 	if r.ctx != nil { | ||||
| 		// API Key Authentication
 | ||||
| 		if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { | ||||
| 			if apiKey, ok := auth["Token Authentication"]; ok { | ||||
| 				var key string | ||||
| 				if apiKey.Prefix != "" { | ||||
| 					key = apiKey.Prefix + " " + apiKey.Key | ||||
| 				} else { | ||||
| 					key = apiKey.Key | ||||
| 				} | ||||
| 				localVarHeaderParams["Authorization"] = key | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| 	req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, nil, err | ||||
| 	} | ||||
| 
 | ||||
| 	localVarHTTPResponse, err := a.client.callAPI(req) | ||||
| 
 | ||||
| 	localVarAPIResponse := &APIResponse { | ||||
| 		Response: localVarHTTPResponse, | ||||
| 		Method: localVarHTTPMethod, | ||||
| 		RequestURL: localVarPath, | ||||
| 		Operation: "PccsPatch", | ||||
| 	} | ||||
| 
 | ||||
| 	if err != nil || localVarHTTPResponse == nil { | ||||
| 		return localVarReturnValue, localVarAPIResponse, err | ||||
| 	} | ||||
| 
 | ||||
| 	localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) | ||||
| 	localVarHTTPResponse.Body.Close() | ||||
| 	localVarAPIResponse.Payload = localVarBody | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, localVarAPIResponse, err | ||||
| 	} | ||||
| 
 | ||||
| 	if localVarHTTPResponse.StatusCode >= 300 { | ||||
| 		newErr := GenericOpenAPIError{ | ||||
| 			body:  localVarBody, | ||||
| 			error: localVarHTTPResponse.Status, | ||||
| 		} | ||||
| 			var v Error | ||||
| 			err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) | ||||
| 			if err != nil { | ||||
| 				newErr.error = err.Error() | ||||
| 				return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 			} | ||||
| 			newErr.model = v | ||||
| 		return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 	} | ||||
| 
 | ||||
| 	err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) | ||||
| 	if err != nil { | ||||
| 		newErr := GenericOpenAPIError{ | ||||
| 			body:  localVarBody, | ||||
| 			error: err.Error(), | ||||
| 		} | ||||
| 		return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 	} | ||||
| 
 | ||||
| 	return localVarReturnValue, localVarAPIResponse, nil | ||||
| } | ||||
| 
 | ||||
| type ApiPccsPostRequest struct { | ||||
| 	ctx _context.Context | ||||
| 	ApiService *PrivateCrossConnectApiService | ||||
| 	pcc *PrivateCrossConnect | ||||
| 	pretty *bool | ||||
| 	depth *int32 | ||||
| 	xContractNumber *int32 | ||||
| } | ||||
| 
 | ||||
| func (r ApiPccsPostRequest) Pcc(pcc PrivateCrossConnect) ApiPccsPostRequest { | ||||
| 	r.pcc = &pcc | ||||
| 	return r | ||||
| } | ||||
| func (r ApiPccsPostRequest) Pretty(pretty bool) ApiPccsPostRequest { | ||||
| 	r.pretty = &pretty | ||||
| 	return r | ||||
| } | ||||
| func (r ApiPccsPostRequest) Depth(depth int32) ApiPccsPostRequest { | ||||
| 	r.depth = &depth | ||||
| 	return r | ||||
| } | ||||
| func (r ApiPccsPostRequest) XContractNumber(xContractNumber int32) ApiPccsPostRequest { | ||||
| 	r.xContractNumber = &xContractNumber | ||||
| 	return r | ||||
| } | ||||
| 
 | ||||
| func (r ApiPccsPostRequest) Execute() (PrivateCrossConnect, *APIResponse, error) { | ||||
| 	return r.ApiService.PccsPostExecute(r) | ||||
| } | ||||
| 
 | ||||
| /* | ||||
|  * PccsPost Create a Private Cross-Connect | ||||
|  * You can use this POST method to create a private cross-connect | ||||
|  * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). | ||||
|  * @return ApiPccsPostRequest | ||||
|  */ | ||||
| func (a *PrivateCrossConnectApiService) PccsPost(ctx _context.Context) ApiPccsPostRequest { | ||||
| 	return ApiPccsPostRequest{ | ||||
| 		ApiService: a, | ||||
| 		ctx: ctx, | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| /* | ||||
|  * Execute executes the request | ||||
|  * @return PrivateCrossConnect | ||||
|  */ | ||||
| func (a *PrivateCrossConnectApiService) PccsPostExecute(r ApiPccsPostRequest) (PrivateCrossConnect, *APIResponse, error) { | ||||
| 	var ( | ||||
| 		localVarHTTPMethod   = _nethttp.MethodPost | ||||
| 		localVarPostBody     interface{} | ||||
| 		localVarFormFileName string | ||||
| 		localVarFileName     string | ||||
| 		localVarFileBytes    []byte | ||||
| 		localVarReturnValue  PrivateCrossConnect | ||||
| 	) | ||||
| 
 | ||||
| 	localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PrivateCrossConnectApiService.PccsPost") | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} | ||||
| 	} | ||||
| 
 | ||||
| 	localVarPath := localBasePath + "/pccs" | ||||
| 
 | ||||
| 	localVarHeaderParams := make(map[string]string) | ||||
| 	localVarQueryParams := _neturl.Values{} | ||||
| 	localVarFormParams := _neturl.Values{} | ||||
| 	if r.pcc == nil { | ||||
| 		return localVarReturnValue, nil, reportError("pcc is required and must be specified") | ||||
| 	} | ||||
| 
 | ||||
| 	if r.pretty != nil { | ||||
| 		localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) | ||||
| 	} | ||||
| 	if r.depth != nil { | ||||
| 		localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) | ||||
| 	} | ||||
| 	// to determine the Content-Type header
 | ||||
| 	localVarHTTPContentTypes := []string{"application/json"} | ||||
| 
 | ||||
| 	// set Content-Type header
 | ||||
| 	localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) | ||||
| 	if localVarHTTPContentType != "" { | ||||
| 		localVarHeaderParams["Content-Type"] = localVarHTTPContentType | ||||
| 	} | ||||
| 
 | ||||
| 	// to determine the Accept header
 | ||||
| 	localVarHTTPHeaderAccepts := []string{"application/json"} | ||||
| 
 | ||||
| 	// set Accept header
 | ||||
| 	localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) | ||||
| 	if localVarHTTPHeaderAccept != "" { | ||||
| 		localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept | ||||
| 	} | ||||
| 	if r.xContractNumber != nil { | ||||
| 		localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") | ||||
| 	} | ||||
| 	// body params
 | ||||
| 	localVarPostBody = r.pcc | ||||
| 	if r.ctx != nil { | ||||
| 		// API Key Authentication
 | ||||
| 		if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { | ||||
| 			if apiKey, ok := auth["Token Authentication"]; ok { | ||||
| 				var key string | ||||
| 				if apiKey.Prefix != "" { | ||||
| 					key = apiKey.Prefix + " " + apiKey.Key | ||||
| 				} else { | ||||
| 					key = apiKey.Key | ||||
| 				} | ||||
| 				localVarHeaderParams["Authorization"] = key | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| 	req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, nil, err | ||||
| 	} | ||||
| 
 | ||||
| 	localVarHTTPResponse, err := a.client.callAPI(req) | ||||
| 
 | ||||
| 	localVarAPIResponse := &APIResponse { | ||||
| 		Response: localVarHTTPResponse, | ||||
| 		Method: localVarHTTPMethod, | ||||
| 		RequestURL: localVarPath, | ||||
| 		Operation: "PccsPost", | ||||
| 	} | ||||
| 
 | ||||
| 	if err != nil || localVarHTTPResponse == nil { | ||||
| 		return localVarReturnValue, localVarAPIResponse, err | ||||
| 	} | ||||
| 
 | ||||
| 	localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) | ||||
| 	localVarHTTPResponse.Body.Close() | ||||
| 	localVarAPIResponse.Payload = localVarBody | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, localVarAPIResponse, err | ||||
| 	} | ||||
| 
 | ||||
| 	if localVarHTTPResponse.StatusCode >= 300 { | ||||
| 		newErr := GenericOpenAPIError{ | ||||
| 			body:  localVarBody, | ||||
| 			error: localVarHTTPResponse.Status, | ||||
| 		} | ||||
| 			var v Error | ||||
| 			err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) | ||||
| 			if err != nil { | ||||
| 				newErr.error = err.Error() | ||||
| 				return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 			} | ||||
| 			newErr.model = v | ||||
| 		return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 	} | ||||
| 
 | ||||
| 	err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) | ||||
| 	if err != nil { | ||||
| 		newErr := GenericOpenAPIError{ | ||||
| 			body:  localVarBody, | ||||
| 			error: err.Error(), | ||||
| 		} | ||||
| 		return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 	} | ||||
| 
 | ||||
| 	return localVarReturnValue, localVarAPIResponse, nil | ||||
| } | ||||
|  | @ -0,0 +1,556 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	_context "context" | ||||
| 	_ioutil "io/ioutil" | ||||
| 	_nethttp "net/http" | ||||
| 	_neturl "net/url" | ||||
| 	"strings" | ||||
| ) | ||||
| 
 | ||||
| // Linger please
 | ||||
| var ( | ||||
| 	_ _context.Context | ||||
| ) | ||||
| 
 | ||||
| // RequestApiService RequestApi service
 | ||||
| type RequestApiService service | ||||
| 
 | ||||
| type ApiRequestsFindByIdRequest struct { | ||||
| 	ctx _context.Context | ||||
| 	ApiService *RequestApiService | ||||
| 	requestId string | ||||
| 	pretty *bool | ||||
| 	depth *int32 | ||||
| 	xContractNumber *int32 | ||||
| } | ||||
| 
 | ||||
| func (r ApiRequestsFindByIdRequest) Pretty(pretty bool) ApiRequestsFindByIdRequest { | ||||
| 	r.pretty = &pretty | ||||
| 	return r | ||||
| } | ||||
| func (r ApiRequestsFindByIdRequest) Depth(depth int32) ApiRequestsFindByIdRequest { | ||||
| 	r.depth = &depth | ||||
| 	return r | ||||
| } | ||||
| func (r ApiRequestsFindByIdRequest) XContractNumber(xContractNumber int32) ApiRequestsFindByIdRequest { | ||||
| 	r.xContractNumber = &xContractNumber | ||||
| 	return r | ||||
| } | ||||
| 
 | ||||
| func (r ApiRequestsFindByIdRequest) Execute() (Request, *APIResponse, error) { | ||||
| 	return r.ApiService.RequestsFindByIdExecute(r) | ||||
| } | ||||
| 
 | ||||
| /* | ||||
|  * RequestsFindById Retrieve a Request | ||||
|  * Retrieves the attributes of a given request. | ||||
|  * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). | ||||
|  * @param requestId | ||||
|  * @return ApiRequestsFindByIdRequest | ||||
|  */ | ||||
| func (a *RequestApiService) RequestsFindById(ctx _context.Context, requestId string) ApiRequestsFindByIdRequest { | ||||
| 	return ApiRequestsFindByIdRequest{ | ||||
| 		ApiService: a, | ||||
| 		ctx: ctx, | ||||
| 		requestId: requestId, | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| /* | ||||
|  * Execute executes the request | ||||
|  * @return Request | ||||
|  */ | ||||
| func (a *RequestApiService) RequestsFindByIdExecute(r ApiRequestsFindByIdRequest) (Request, *APIResponse, error) { | ||||
| 	var ( | ||||
| 		localVarHTTPMethod   = _nethttp.MethodGet | ||||
| 		localVarPostBody     interface{} | ||||
| 		localVarFormFileName string | ||||
| 		localVarFileName     string | ||||
| 		localVarFileBytes    []byte | ||||
| 		localVarReturnValue  Request | ||||
| 	) | ||||
| 
 | ||||
| 	localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RequestApiService.RequestsFindById") | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} | ||||
| 	} | ||||
| 
 | ||||
| 	localVarPath := localBasePath + "/requests/{requestId}" | ||||
| 	localVarPath = strings.Replace(localVarPath, "{"+"requestId"+"}", _neturl.PathEscape(parameterToString(r.requestId, "")), -1) | ||||
| 
 | ||||
| 	localVarHeaderParams := make(map[string]string) | ||||
| 	localVarQueryParams := _neturl.Values{} | ||||
| 	localVarFormParams := _neturl.Values{} | ||||
| 
 | ||||
| 	if r.pretty != nil { | ||||
| 		localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) | ||||
| 	} | ||||
| 	if r.depth != nil { | ||||
| 		localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) | ||||
| 	} | ||||
| 	// to determine the Content-Type header
 | ||||
| 	localVarHTTPContentTypes := []string{} | ||||
| 
 | ||||
| 	// set Content-Type header
 | ||||
| 	localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) | ||||
| 	if localVarHTTPContentType != "" { | ||||
| 		localVarHeaderParams["Content-Type"] = localVarHTTPContentType | ||||
| 	} | ||||
| 
 | ||||
| 	// to determine the Accept header
 | ||||
| 	localVarHTTPHeaderAccepts := []string{"application/json"} | ||||
| 
 | ||||
| 	// set Accept header
 | ||||
| 	localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) | ||||
| 	if localVarHTTPHeaderAccept != "" { | ||||
| 		localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept | ||||
| 	} | ||||
| 	if r.xContractNumber != nil { | ||||
| 		localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") | ||||
| 	} | ||||
| 	if r.ctx != nil { | ||||
| 		// API Key Authentication
 | ||||
| 		if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { | ||||
| 			if apiKey, ok := auth["Token Authentication"]; ok { | ||||
| 				var key string | ||||
| 				if apiKey.Prefix != "" { | ||||
| 					key = apiKey.Prefix + " " + apiKey.Key | ||||
| 				} else { | ||||
| 					key = apiKey.Key | ||||
| 				} | ||||
| 				localVarHeaderParams["Authorization"] = key | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| 	req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, nil, err | ||||
| 	} | ||||
| 
 | ||||
| 	localVarHTTPResponse, err := a.client.callAPI(req) | ||||
| 
 | ||||
| 	localVarAPIResponse := &APIResponse { | ||||
| 		Response: localVarHTTPResponse, | ||||
| 		Method: localVarHTTPMethod, | ||||
| 		RequestURL: localVarPath, | ||||
| 		Operation: "RequestsFindById", | ||||
| 	} | ||||
| 
 | ||||
| 	if err != nil || localVarHTTPResponse == nil { | ||||
| 		return localVarReturnValue, localVarAPIResponse, err | ||||
| 	} | ||||
| 
 | ||||
| 	localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) | ||||
| 	localVarHTTPResponse.Body.Close() | ||||
| 	localVarAPIResponse.Payload = localVarBody | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, localVarAPIResponse, err | ||||
| 	} | ||||
| 
 | ||||
| 	if localVarHTTPResponse.StatusCode >= 300 { | ||||
| 		newErr := GenericOpenAPIError{ | ||||
| 			body:  localVarBody, | ||||
| 			error: localVarHTTPResponse.Status, | ||||
| 		} | ||||
| 			var v Error | ||||
| 			err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) | ||||
| 			if err != nil { | ||||
| 				newErr.error = err.Error() | ||||
| 				return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 			} | ||||
| 			newErr.model = v | ||||
| 		return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 	} | ||||
| 
 | ||||
| 	err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) | ||||
| 	if err != nil { | ||||
| 		newErr := GenericOpenAPIError{ | ||||
| 			body:  localVarBody, | ||||
| 			error: err.Error(), | ||||
| 		} | ||||
| 		return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 	} | ||||
| 
 | ||||
| 	return localVarReturnValue, localVarAPIResponse, nil | ||||
| } | ||||
| 
 | ||||
| type ApiRequestsGetRequest struct { | ||||
| 	ctx _context.Context | ||||
| 	ApiService *RequestApiService | ||||
| 	pretty *bool | ||||
| 	depth *int32 | ||||
| 	xContractNumber *int32 | ||||
| 	filterStatus *string | ||||
| 	filterCreatedAfter *string | ||||
| 	filterCreatedBefore *string | ||||
| 	filterUrl *string | ||||
| 	filterCreatedDate *string | ||||
| 	filterMethod *string | ||||
| 	filterBody *string | ||||
| } | ||||
| 
 | ||||
| func (r ApiRequestsGetRequest) Pretty(pretty bool) ApiRequestsGetRequest { | ||||
| 	r.pretty = &pretty | ||||
| 	return r | ||||
| } | ||||
| func (r ApiRequestsGetRequest) Depth(depth int32) ApiRequestsGetRequest { | ||||
| 	r.depth = &depth | ||||
| 	return r | ||||
| } | ||||
| func (r ApiRequestsGetRequest) XContractNumber(xContractNumber int32) ApiRequestsGetRequest { | ||||
| 	r.xContractNumber = &xContractNumber | ||||
| 	return r | ||||
| } | ||||
| func (r ApiRequestsGetRequest) FilterStatus(filterStatus string) ApiRequestsGetRequest { | ||||
| 	r.filterStatus = &filterStatus | ||||
| 	return r | ||||
| } | ||||
| func (r ApiRequestsGetRequest) FilterCreatedAfter(filterCreatedAfter string) ApiRequestsGetRequest { | ||||
| 	r.filterCreatedAfter = &filterCreatedAfter | ||||
| 	return r | ||||
| } | ||||
| func (r ApiRequestsGetRequest) FilterCreatedBefore(filterCreatedBefore string) ApiRequestsGetRequest { | ||||
| 	r.filterCreatedBefore = &filterCreatedBefore | ||||
| 	return r | ||||
| } | ||||
| func (r ApiRequestsGetRequest) FilterUrl(filterUrl string) ApiRequestsGetRequest { | ||||
| 	r.filterUrl = &filterUrl | ||||
| 	return r | ||||
| } | ||||
| func (r ApiRequestsGetRequest) FilterCreatedDate(filterCreatedDate string) ApiRequestsGetRequest { | ||||
| 	r.filterCreatedDate = &filterCreatedDate | ||||
| 	return r | ||||
| } | ||||
| func (r ApiRequestsGetRequest) FilterMethod(filterMethod string) ApiRequestsGetRequest { | ||||
| 	r.filterMethod = &filterMethod | ||||
| 	return r | ||||
| } | ||||
| func (r ApiRequestsGetRequest) FilterBody(filterBody string) ApiRequestsGetRequest { | ||||
| 	r.filterBody = &filterBody | ||||
| 	return r | ||||
| } | ||||
| 
 | ||||
| func (r ApiRequestsGetRequest) Execute() (Requests, *APIResponse, error) { | ||||
| 	return r.ApiService.RequestsGetExecute(r) | ||||
| } | ||||
| 
 | ||||
| /* | ||||
|  * RequestsGet List Requests | ||||
|  * Retrieve a list of API requests. | ||||
|  * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). | ||||
|  * @return ApiRequestsGetRequest | ||||
|  */ | ||||
| func (a *RequestApiService) RequestsGet(ctx _context.Context) ApiRequestsGetRequest { | ||||
| 	return ApiRequestsGetRequest{ | ||||
| 		ApiService: a, | ||||
| 		ctx: ctx, | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| /* | ||||
|  * Execute executes the request | ||||
|  * @return Requests | ||||
|  */ | ||||
| func (a *RequestApiService) RequestsGetExecute(r ApiRequestsGetRequest) (Requests, *APIResponse, error) { | ||||
| 	var ( | ||||
| 		localVarHTTPMethod   = _nethttp.MethodGet | ||||
| 		localVarPostBody     interface{} | ||||
| 		localVarFormFileName string | ||||
| 		localVarFileName     string | ||||
| 		localVarFileBytes    []byte | ||||
| 		localVarReturnValue  Requests | ||||
| 	) | ||||
| 
 | ||||
| 	localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RequestApiService.RequestsGet") | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} | ||||
| 	} | ||||
| 
 | ||||
| 	localVarPath := localBasePath + "/requests" | ||||
| 
 | ||||
| 	localVarHeaderParams := make(map[string]string) | ||||
| 	localVarQueryParams := _neturl.Values{} | ||||
| 	localVarFormParams := _neturl.Values{} | ||||
| 
 | ||||
| 	if r.pretty != nil { | ||||
| 		localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) | ||||
| 	} | ||||
| 	if r.depth != nil { | ||||
| 		localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) | ||||
| 	} | ||||
| 	if r.filterStatus != nil { | ||||
| 		localVarQueryParams.Add("filter.status", parameterToString(*r.filterStatus, "")) | ||||
| 	} | ||||
| 	if r.filterCreatedAfter != nil { | ||||
| 		localVarQueryParams.Add("filter.createdAfter", parameterToString(*r.filterCreatedAfter, "")) | ||||
| 	} | ||||
| 	if r.filterCreatedBefore != nil { | ||||
| 		localVarQueryParams.Add("filter.createdBefore", parameterToString(*r.filterCreatedBefore, "")) | ||||
| 	} | ||||
| 	if r.filterUrl != nil { | ||||
| 		localVarQueryParams.Add("filter.url", parameterToString(*r.filterUrl, "")) | ||||
| 	} | ||||
| 	if r.filterCreatedDate != nil { | ||||
| 		localVarQueryParams.Add("filter.createdDate", parameterToString(*r.filterCreatedDate, "")) | ||||
| 	} | ||||
| 	if r.filterMethod != nil { | ||||
| 		localVarQueryParams.Add("filter.method", parameterToString(*r.filterMethod, "")) | ||||
| 	} | ||||
| 	if r.filterBody != nil { | ||||
| 		localVarQueryParams.Add("filter.body", parameterToString(*r.filterBody, "")) | ||||
| 	} | ||||
| 	// to determine the Content-Type header
 | ||||
| 	localVarHTTPContentTypes := []string{} | ||||
| 
 | ||||
| 	// set Content-Type header
 | ||||
| 	localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) | ||||
| 	if localVarHTTPContentType != "" { | ||||
| 		localVarHeaderParams["Content-Type"] = localVarHTTPContentType | ||||
| 	} | ||||
| 
 | ||||
| 	// to determine the Accept header
 | ||||
| 	localVarHTTPHeaderAccepts := []string{"application/json"} | ||||
| 
 | ||||
| 	// set Accept header
 | ||||
| 	localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) | ||||
| 	if localVarHTTPHeaderAccept != "" { | ||||
| 		localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept | ||||
| 	} | ||||
| 	if r.xContractNumber != nil { | ||||
| 		localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") | ||||
| 	} | ||||
| 	if r.ctx != nil { | ||||
| 		// API Key Authentication
 | ||||
| 		if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { | ||||
| 			if apiKey, ok := auth["Token Authentication"]; ok { | ||||
| 				var key string | ||||
| 				if apiKey.Prefix != "" { | ||||
| 					key = apiKey.Prefix + " " + apiKey.Key | ||||
| 				} else { | ||||
| 					key = apiKey.Key | ||||
| 				} | ||||
| 				localVarHeaderParams["Authorization"] = key | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| 	req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, nil, err | ||||
| 	} | ||||
| 
 | ||||
| 	localVarHTTPResponse, err := a.client.callAPI(req) | ||||
| 
 | ||||
| 	localVarAPIResponse := &APIResponse { | ||||
| 		Response: localVarHTTPResponse, | ||||
| 		Method: localVarHTTPMethod, | ||||
| 		RequestURL: localVarPath, | ||||
| 		Operation: "RequestsGet", | ||||
| 	} | ||||
| 
 | ||||
| 	if err != nil || localVarHTTPResponse == nil { | ||||
| 		return localVarReturnValue, localVarAPIResponse, err | ||||
| 	} | ||||
| 
 | ||||
| 	localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) | ||||
| 	localVarHTTPResponse.Body.Close() | ||||
| 	localVarAPIResponse.Payload = localVarBody | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, localVarAPIResponse, err | ||||
| 	} | ||||
| 
 | ||||
| 	if localVarHTTPResponse.StatusCode >= 300 { | ||||
| 		newErr := GenericOpenAPIError{ | ||||
| 			body:  localVarBody, | ||||
| 			error: localVarHTTPResponse.Status, | ||||
| 		} | ||||
| 			var v Error | ||||
| 			err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) | ||||
| 			if err != nil { | ||||
| 				newErr.error = err.Error() | ||||
| 				return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 			} | ||||
| 			newErr.model = v | ||||
| 		return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 	} | ||||
| 
 | ||||
| 	err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) | ||||
| 	if err != nil { | ||||
| 		newErr := GenericOpenAPIError{ | ||||
| 			body:  localVarBody, | ||||
| 			error: err.Error(), | ||||
| 		} | ||||
| 		return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 	} | ||||
| 
 | ||||
| 	return localVarReturnValue, localVarAPIResponse, nil | ||||
| } | ||||
| 
 | ||||
| type ApiRequestsStatusGetRequest struct { | ||||
| 	ctx _context.Context | ||||
| 	ApiService *RequestApiService | ||||
| 	requestId string | ||||
| 	pretty *bool | ||||
| 	depth *int32 | ||||
| 	xContractNumber *int32 | ||||
| } | ||||
| 
 | ||||
| func (r ApiRequestsStatusGetRequest) Pretty(pretty bool) ApiRequestsStatusGetRequest { | ||||
| 	r.pretty = &pretty | ||||
| 	return r | ||||
| } | ||||
| func (r ApiRequestsStatusGetRequest) Depth(depth int32) ApiRequestsStatusGetRequest { | ||||
| 	r.depth = &depth | ||||
| 	return r | ||||
| } | ||||
| func (r ApiRequestsStatusGetRequest) XContractNumber(xContractNumber int32) ApiRequestsStatusGetRequest { | ||||
| 	r.xContractNumber = &xContractNumber | ||||
| 	return r | ||||
| } | ||||
| 
 | ||||
| func (r ApiRequestsStatusGetRequest) Execute() (RequestStatus, *APIResponse, error) { | ||||
| 	return r.ApiService.RequestsStatusGetExecute(r) | ||||
| } | ||||
| 
 | ||||
| /* | ||||
|  * RequestsStatusGet Retrieve Request Status | ||||
|  * Retrieves the status of a given request. | ||||
|  * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). | ||||
|  * @param requestId | ||||
|  * @return ApiRequestsStatusGetRequest | ||||
|  */ | ||||
| func (a *RequestApiService) RequestsStatusGet(ctx _context.Context, requestId string) ApiRequestsStatusGetRequest { | ||||
| 	return ApiRequestsStatusGetRequest{ | ||||
| 		ApiService: a, | ||||
| 		ctx: ctx, | ||||
| 		requestId: requestId, | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| /* | ||||
|  * Execute executes the request | ||||
|  * @return RequestStatus | ||||
|  */ | ||||
| func (a *RequestApiService) RequestsStatusGetExecute(r ApiRequestsStatusGetRequest) (RequestStatus, *APIResponse, error) { | ||||
| 	var ( | ||||
| 		localVarHTTPMethod   = _nethttp.MethodGet | ||||
| 		localVarPostBody     interface{} | ||||
| 		localVarFormFileName string | ||||
| 		localVarFileName     string | ||||
| 		localVarFileBytes    []byte | ||||
| 		localVarReturnValue  RequestStatus | ||||
| 	) | ||||
| 
 | ||||
| 	localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RequestApiService.RequestsStatusGet") | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} | ||||
| 	} | ||||
| 
 | ||||
| 	localVarPath := localBasePath + "/requests/{requestId}/status" | ||||
| 	localVarPath = strings.Replace(localVarPath, "{"+"requestId"+"}", _neturl.PathEscape(parameterToString(r.requestId, "")), -1) | ||||
| 
 | ||||
| 	localVarHeaderParams := make(map[string]string) | ||||
| 	localVarQueryParams := _neturl.Values{} | ||||
| 	localVarFormParams := _neturl.Values{} | ||||
| 
 | ||||
| 	if r.pretty != nil { | ||||
| 		localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) | ||||
| 	} | ||||
| 	if r.depth != nil { | ||||
| 		localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) | ||||
| 	} | ||||
| 	// to determine the Content-Type header
 | ||||
| 	localVarHTTPContentTypes := []string{} | ||||
| 
 | ||||
| 	// set Content-Type header
 | ||||
| 	localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) | ||||
| 	if localVarHTTPContentType != "" { | ||||
| 		localVarHeaderParams["Content-Type"] = localVarHTTPContentType | ||||
| 	} | ||||
| 
 | ||||
| 	// to determine the Accept header
 | ||||
| 	localVarHTTPHeaderAccepts := []string{"application/json"} | ||||
| 
 | ||||
| 	// set Accept header
 | ||||
| 	localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) | ||||
| 	if localVarHTTPHeaderAccept != "" { | ||||
| 		localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept | ||||
| 	} | ||||
| 	if r.xContractNumber != nil { | ||||
| 		localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") | ||||
| 	} | ||||
| 	if r.ctx != nil { | ||||
| 		// API Key Authentication
 | ||||
| 		if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { | ||||
| 			if apiKey, ok := auth["Token Authentication"]; ok { | ||||
| 				var key string | ||||
| 				if apiKey.Prefix != "" { | ||||
| 					key = apiKey.Prefix + " " + apiKey.Key | ||||
| 				} else { | ||||
| 					key = apiKey.Key | ||||
| 				} | ||||
| 				localVarHeaderParams["Authorization"] = key | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| 	req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, nil, err | ||||
| 	} | ||||
| 
 | ||||
| 	localVarHTTPResponse, err := a.client.callAPI(req) | ||||
| 
 | ||||
| 	localVarAPIResponse := &APIResponse { | ||||
| 		Response: localVarHTTPResponse, | ||||
| 		Method: localVarHTTPMethod, | ||||
| 		RequestURL: localVarPath, | ||||
| 		Operation: "RequestsStatusGet", | ||||
| 	} | ||||
| 
 | ||||
| 	if err != nil || localVarHTTPResponse == nil { | ||||
| 		return localVarReturnValue, localVarAPIResponse, err | ||||
| 	} | ||||
| 
 | ||||
| 	localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) | ||||
| 	localVarHTTPResponse.Body.Close() | ||||
| 	localVarAPIResponse.Payload = localVarBody | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, localVarAPIResponse, err | ||||
| 	} | ||||
| 
 | ||||
| 	if localVarHTTPResponse.StatusCode >= 300 { | ||||
| 		newErr := GenericOpenAPIError{ | ||||
| 			body:  localVarBody, | ||||
| 			error: localVarHTTPResponse.Status, | ||||
| 		} | ||||
| 			var v Error | ||||
| 			err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) | ||||
| 			if err != nil { | ||||
| 				newErr.error = err.Error() | ||||
| 				return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 			} | ||||
| 			newErr.model = v | ||||
| 		return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 	} | ||||
| 
 | ||||
| 	err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) | ||||
| 	if err != nil { | ||||
| 		newErr := GenericOpenAPIError{ | ||||
| 			body:  localVarBody, | ||||
| 			error: err.Error(), | ||||
| 		} | ||||
| 		return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 	} | ||||
| 
 | ||||
| 	return localVarReturnValue, localVarAPIResponse, nil | ||||
| } | ||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							|  | @ -0,0 +1,838 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	_context "context" | ||||
| 	_ioutil "io/ioutil" | ||||
| 	_nethttp "net/http" | ||||
| 	_neturl "net/url" | ||||
| 	"strings" | ||||
| ) | ||||
| 
 | ||||
| // Linger please
 | ||||
| var ( | ||||
| 	_ _context.Context | ||||
| ) | ||||
| 
 | ||||
| // SnapshotApiService SnapshotApi service
 | ||||
| type SnapshotApiService service | ||||
| 
 | ||||
| type ApiSnapshotsDeleteRequest struct { | ||||
| 	ctx _context.Context | ||||
| 	ApiService *SnapshotApiService | ||||
| 	snapshotId string | ||||
| 	pretty *bool | ||||
| 	depth *int32 | ||||
| 	xContractNumber *int32 | ||||
| } | ||||
| 
 | ||||
| func (r ApiSnapshotsDeleteRequest) Pretty(pretty bool) ApiSnapshotsDeleteRequest { | ||||
| 	r.pretty = &pretty | ||||
| 	return r | ||||
| } | ||||
| func (r ApiSnapshotsDeleteRequest) Depth(depth int32) ApiSnapshotsDeleteRequest { | ||||
| 	r.depth = &depth | ||||
| 	return r | ||||
| } | ||||
| func (r ApiSnapshotsDeleteRequest) XContractNumber(xContractNumber int32) ApiSnapshotsDeleteRequest { | ||||
| 	r.xContractNumber = &xContractNumber | ||||
| 	return r | ||||
| } | ||||
| 
 | ||||
| func (r ApiSnapshotsDeleteRequest) Execute() (map[string]interface{}, *APIResponse, error) { | ||||
| 	return r.ApiService.SnapshotsDeleteExecute(r) | ||||
| } | ||||
| 
 | ||||
| /* | ||||
|  * SnapshotsDelete Delete a Snapshot | ||||
|  * Deletes the specified Snapshot. | ||||
|  * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). | ||||
|  * @param snapshotId The unique ID of the Snapshot | ||||
|  * @return ApiSnapshotsDeleteRequest | ||||
|  */ | ||||
| func (a *SnapshotApiService) SnapshotsDelete(ctx _context.Context, snapshotId string) ApiSnapshotsDeleteRequest { | ||||
| 	return ApiSnapshotsDeleteRequest{ | ||||
| 		ApiService: a, | ||||
| 		ctx: ctx, | ||||
| 		snapshotId: snapshotId, | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| /* | ||||
|  * Execute executes the request | ||||
|  * @return map[string]interface{} | ||||
|  */ | ||||
| func (a *SnapshotApiService) SnapshotsDeleteExecute(r ApiSnapshotsDeleteRequest) (map[string]interface{}, *APIResponse, error) { | ||||
| 	var ( | ||||
| 		localVarHTTPMethod   = _nethttp.MethodDelete | ||||
| 		localVarPostBody     interface{} | ||||
| 		localVarFormFileName string | ||||
| 		localVarFileName     string | ||||
| 		localVarFileBytes    []byte | ||||
| 		localVarReturnValue  map[string]interface{} | ||||
| 	) | ||||
| 
 | ||||
| 	localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SnapshotApiService.SnapshotsDelete") | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} | ||||
| 	} | ||||
| 
 | ||||
| 	localVarPath := localBasePath + "/snapshots/{snapshotId}" | ||||
| 	localVarPath = strings.Replace(localVarPath, "{"+"snapshotId"+"}", _neturl.PathEscape(parameterToString(r.snapshotId, "")), -1) | ||||
| 
 | ||||
| 	localVarHeaderParams := make(map[string]string) | ||||
| 	localVarQueryParams := _neturl.Values{} | ||||
| 	localVarFormParams := _neturl.Values{} | ||||
| 
 | ||||
| 	if r.pretty != nil { | ||||
| 		localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) | ||||
| 	} | ||||
| 	if r.depth != nil { | ||||
| 		localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) | ||||
| 	} | ||||
| 	// to determine the Content-Type header
 | ||||
| 	localVarHTTPContentTypes := []string{} | ||||
| 
 | ||||
| 	// set Content-Type header
 | ||||
| 	localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) | ||||
| 	if localVarHTTPContentType != "" { | ||||
| 		localVarHeaderParams["Content-Type"] = localVarHTTPContentType | ||||
| 	} | ||||
| 
 | ||||
| 	// to determine the Accept header
 | ||||
| 	localVarHTTPHeaderAccepts := []string{"application/json"} | ||||
| 
 | ||||
| 	// set Accept header
 | ||||
| 	localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) | ||||
| 	if localVarHTTPHeaderAccept != "" { | ||||
| 		localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept | ||||
| 	} | ||||
| 	if r.xContractNumber != nil { | ||||
| 		localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") | ||||
| 	} | ||||
| 	if r.ctx != nil { | ||||
| 		// API Key Authentication
 | ||||
| 		if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { | ||||
| 			if apiKey, ok := auth["Token Authentication"]; ok { | ||||
| 				var key string | ||||
| 				if apiKey.Prefix != "" { | ||||
| 					key = apiKey.Prefix + " " + apiKey.Key | ||||
| 				} else { | ||||
| 					key = apiKey.Key | ||||
| 				} | ||||
| 				localVarHeaderParams["Authorization"] = key | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| 	req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, nil, err | ||||
| 	} | ||||
| 
 | ||||
| 	localVarHTTPResponse, err := a.client.callAPI(req) | ||||
| 
 | ||||
| 	localVarAPIResponse := &APIResponse { | ||||
| 		Response: localVarHTTPResponse, | ||||
| 		Method: localVarHTTPMethod, | ||||
| 		RequestURL: localVarPath, | ||||
| 		Operation: "SnapshotsDelete", | ||||
| 	} | ||||
| 
 | ||||
| 	if err != nil || localVarHTTPResponse == nil { | ||||
| 		return localVarReturnValue, localVarAPIResponse, err | ||||
| 	} | ||||
| 
 | ||||
| 	localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) | ||||
| 	localVarHTTPResponse.Body.Close() | ||||
| 	localVarAPIResponse.Payload = localVarBody | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, localVarAPIResponse, err | ||||
| 	} | ||||
| 
 | ||||
| 	if localVarHTTPResponse.StatusCode >= 300 { | ||||
| 		newErr := GenericOpenAPIError{ | ||||
| 			body:  localVarBody, | ||||
| 			error: localVarHTTPResponse.Status, | ||||
| 		} | ||||
| 			var v Error | ||||
| 			err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) | ||||
| 			if err != nil { | ||||
| 				newErr.error = err.Error() | ||||
| 				return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 			} | ||||
| 			newErr.model = v | ||||
| 		return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 	} | ||||
| 
 | ||||
| 	err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) | ||||
| 	if err != nil { | ||||
| 		newErr := GenericOpenAPIError{ | ||||
| 			body:  localVarBody, | ||||
| 			error: err.Error(), | ||||
| 		} | ||||
| 		return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 	} | ||||
| 
 | ||||
| 	return localVarReturnValue, localVarAPIResponse, nil | ||||
| } | ||||
| 
 | ||||
| type ApiSnapshotsFindByIdRequest struct { | ||||
| 	ctx _context.Context | ||||
| 	ApiService *SnapshotApiService | ||||
| 	snapshotId string | ||||
| 	pretty *bool | ||||
| 	depth *int32 | ||||
| 	xContractNumber *int32 | ||||
| } | ||||
| 
 | ||||
| func (r ApiSnapshotsFindByIdRequest) Pretty(pretty bool) ApiSnapshotsFindByIdRequest { | ||||
| 	r.pretty = &pretty | ||||
| 	return r | ||||
| } | ||||
| func (r ApiSnapshotsFindByIdRequest) Depth(depth int32) ApiSnapshotsFindByIdRequest { | ||||
| 	r.depth = &depth | ||||
| 	return r | ||||
| } | ||||
| func (r ApiSnapshotsFindByIdRequest) XContractNumber(xContractNumber int32) ApiSnapshotsFindByIdRequest { | ||||
| 	r.xContractNumber = &xContractNumber | ||||
| 	return r | ||||
| } | ||||
| 
 | ||||
| func (r ApiSnapshotsFindByIdRequest) Execute() (Snapshot, *APIResponse, error) { | ||||
| 	return r.ApiService.SnapshotsFindByIdExecute(r) | ||||
| } | ||||
| 
 | ||||
| /* | ||||
|  * SnapshotsFindById Retrieve a Snapshot by its uuid. | ||||
|  * Retrieves the attributes of a given Snapshot. | ||||
|  * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). | ||||
|  * @param snapshotId The unique ID of the Snapshot | ||||
|  * @return ApiSnapshotsFindByIdRequest | ||||
|  */ | ||||
| func (a *SnapshotApiService) SnapshotsFindById(ctx _context.Context, snapshotId string) ApiSnapshotsFindByIdRequest { | ||||
| 	return ApiSnapshotsFindByIdRequest{ | ||||
| 		ApiService: a, | ||||
| 		ctx: ctx, | ||||
| 		snapshotId: snapshotId, | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| /* | ||||
|  * Execute executes the request | ||||
|  * @return Snapshot | ||||
|  */ | ||||
| func (a *SnapshotApiService) SnapshotsFindByIdExecute(r ApiSnapshotsFindByIdRequest) (Snapshot, *APIResponse, error) { | ||||
| 	var ( | ||||
| 		localVarHTTPMethod   = _nethttp.MethodGet | ||||
| 		localVarPostBody     interface{} | ||||
| 		localVarFormFileName string | ||||
| 		localVarFileName     string | ||||
| 		localVarFileBytes    []byte | ||||
| 		localVarReturnValue  Snapshot | ||||
| 	) | ||||
| 
 | ||||
| 	localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SnapshotApiService.SnapshotsFindById") | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} | ||||
| 	} | ||||
| 
 | ||||
| 	localVarPath := localBasePath + "/snapshots/{snapshotId}" | ||||
| 	localVarPath = strings.Replace(localVarPath, "{"+"snapshotId"+"}", _neturl.PathEscape(parameterToString(r.snapshotId, "")), -1) | ||||
| 
 | ||||
| 	localVarHeaderParams := make(map[string]string) | ||||
| 	localVarQueryParams := _neturl.Values{} | ||||
| 	localVarFormParams := _neturl.Values{} | ||||
| 
 | ||||
| 	if r.pretty != nil { | ||||
| 		localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) | ||||
| 	} | ||||
| 	if r.depth != nil { | ||||
| 		localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) | ||||
| 	} | ||||
| 	// to determine the Content-Type header
 | ||||
| 	localVarHTTPContentTypes := []string{} | ||||
| 
 | ||||
| 	// set Content-Type header
 | ||||
| 	localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) | ||||
| 	if localVarHTTPContentType != "" { | ||||
| 		localVarHeaderParams["Content-Type"] = localVarHTTPContentType | ||||
| 	} | ||||
| 
 | ||||
| 	// to determine the Accept header
 | ||||
| 	localVarHTTPHeaderAccepts := []string{"application/json"} | ||||
| 
 | ||||
| 	// set Accept header
 | ||||
| 	localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) | ||||
| 	if localVarHTTPHeaderAccept != "" { | ||||
| 		localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept | ||||
| 	} | ||||
| 	if r.xContractNumber != nil { | ||||
| 		localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") | ||||
| 	} | ||||
| 	if r.ctx != nil { | ||||
| 		// API Key Authentication
 | ||||
| 		if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { | ||||
| 			if apiKey, ok := auth["Token Authentication"]; ok { | ||||
| 				var key string | ||||
| 				if apiKey.Prefix != "" { | ||||
| 					key = apiKey.Prefix + " " + apiKey.Key | ||||
| 				} else { | ||||
| 					key = apiKey.Key | ||||
| 				} | ||||
| 				localVarHeaderParams["Authorization"] = key | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| 	req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, nil, err | ||||
| 	} | ||||
| 
 | ||||
| 	localVarHTTPResponse, err := a.client.callAPI(req) | ||||
| 
 | ||||
| 	localVarAPIResponse := &APIResponse { | ||||
| 		Response: localVarHTTPResponse, | ||||
| 		Method: localVarHTTPMethod, | ||||
| 		RequestURL: localVarPath, | ||||
| 		Operation: "SnapshotsFindById", | ||||
| 	} | ||||
| 
 | ||||
| 	if err != nil || localVarHTTPResponse == nil { | ||||
| 		return localVarReturnValue, localVarAPIResponse, err | ||||
| 	} | ||||
| 
 | ||||
| 	localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) | ||||
| 	localVarHTTPResponse.Body.Close() | ||||
| 	localVarAPIResponse.Payload = localVarBody | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, localVarAPIResponse, err | ||||
| 	} | ||||
| 
 | ||||
| 	if localVarHTTPResponse.StatusCode >= 300 { | ||||
| 		newErr := GenericOpenAPIError{ | ||||
| 			body:  localVarBody, | ||||
| 			error: localVarHTTPResponse.Status, | ||||
| 		} | ||||
| 			var v Error | ||||
| 			err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) | ||||
| 			if err != nil { | ||||
| 				newErr.error = err.Error() | ||||
| 				return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 			} | ||||
| 			newErr.model = v | ||||
| 		return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 	} | ||||
| 
 | ||||
| 	err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) | ||||
| 	if err != nil { | ||||
| 		newErr := GenericOpenAPIError{ | ||||
| 			body:  localVarBody, | ||||
| 			error: err.Error(), | ||||
| 		} | ||||
| 		return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 	} | ||||
| 
 | ||||
| 	return localVarReturnValue, localVarAPIResponse, nil | ||||
| } | ||||
| 
 | ||||
| type ApiSnapshotsGetRequest struct { | ||||
| 	ctx _context.Context | ||||
| 	ApiService *SnapshotApiService | ||||
| 	pretty *bool | ||||
| 	depth *int32 | ||||
| 	xContractNumber *int32 | ||||
| } | ||||
| 
 | ||||
| func (r ApiSnapshotsGetRequest) Pretty(pretty bool) ApiSnapshotsGetRequest { | ||||
| 	r.pretty = &pretty | ||||
| 	return r | ||||
| } | ||||
| func (r ApiSnapshotsGetRequest) Depth(depth int32) ApiSnapshotsGetRequest { | ||||
| 	r.depth = &depth | ||||
| 	return r | ||||
| } | ||||
| func (r ApiSnapshotsGetRequest) XContractNumber(xContractNumber int32) ApiSnapshotsGetRequest { | ||||
| 	r.xContractNumber = &xContractNumber | ||||
| 	return r | ||||
| } | ||||
| 
 | ||||
| func (r ApiSnapshotsGetRequest) Execute() (Snapshots, *APIResponse, error) { | ||||
| 	return r.ApiService.SnapshotsGetExecute(r) | ||||
| } | ||||
| 
 | ||||
| /* | ||||
|  * SnapshotsGet List Snapshots  | ||||
|  * Retrieve a list of available snapshots. | ||||
|  * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). | ||||
|  * @return ApiSnapshotsGetRequest | ||||
|  */ | ||||
| func (a *SnapshotApiService) SnapshotsGet(ctx _context.Context) ApiSnapshotsGetRequest { | ||||
| 	return ApiSnapshotsGetRequest{ | ||||
| 		ApiService: a, | ||||
| 		ctx: ctx, | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| /* | ||||
|  * Execute executes the request | ||||
|  * @return Snapshots | ||||
|  */ | ||||
| func (a *SnapshotApiService) SnapshotsGetExecute(r ApiSnapshotsGetRequest) (Snapshots, *APIResponse, error) { | ||||
| 	var ( | ||||
| 		localVarHTTPMethod   = _nethttp.MethodGet | ||||
| 		localVarPostBody     interface{} | ||||
| 		localVarFormFileName string | ||||
| 		localVarFileName     string | ||||
| 		localVarFileBytes    []byte | ||||
| 		localVarReturnValue  Snapshots | ||||
| 	) | ||||
| 
 | ||||
| 	localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SnapshotApiService.SnapshotsGet") | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} | ||||
| 	} | ||||
| 
 | ||||
| 	localVarPath := localBasePath + "/snapshots" | ||||
| 
 | ||||
| 	localVarHeaderParams := make(map[string]string) | ||||
| 	localVarQueryParams := _neturl.Values{} | ||||
| 	localVarFormParams := _neturl.Values{} | ||||
| 
 | ||||
| 	if r.pretty != nil { | ||||
| 		localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) | ||||
| 	} | ||||
| 	if r.depth != nil { | ||||
| 		localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) | ||||
| 	} | ||||
| 	// to determine the Content-Type header
 | ||||
| 	localVarHTTPContentTypes := []string{} | ||||
| 
 | ||||
| 	// set Content-Type header
 | ||||
| 	localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) | ||||
| 	if localVarHTTPContentType != "" { | ||||
| 		localVarHeaderParams["Content-Type"] = localVarHTTPContentType | ||||
| 	} | ||||
| 
 | ||||
| 	// to determine the Accept header
 | ||||
| 	localVarHTTPHeaderAccepts := []string{"application/json"} | ||||
| 
 | ||||
| 	// set Accept header
 | ||||
| 	localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) | ||||
| 	if localVarHTTPHeaderAccept != "" { | ||||
| 		localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept | ||||
| 	} | ||||
| 	if r.xContractNumber != nil { | ||||
| 		localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") | ||||
| 	} | ||||
| 	if r.ctx != nil { | ||||
| 		// API Key Authentication
 | ||||
| 		if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { | ||||
| 			if apiKey, ok := auth["Token Authentication"]; ok { | ||||
| 				var key string | ||||
| 				if apiKey.Prefix != "" { | ||||
| 					key = apiKey.Prefix + " " + apiKey.Key | ||||
| 				} else { | ||||
| 					key = apiKey.Key | ||||
| 				} | ||||
| 				localVarHeaderParams["Authorization"] = key | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| 	req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, nil, err | ||||
| 	} | ||||
| 
 | ||||
| 	localVarHTTPResponse, err := a.client.callAPI(req) | ||||
| 
 | ||||
| 	localVarAPIResponse := &APIResponse { | ||||
| 		Response: localVarHTTPResponse, | ||||
| 		Method: localVarHTTPMethod, | ||||
| 		RequestURL: localVarPath, | ||||
| 		Operation: "SnapshotsGet", | ||||
| 	} | ||||
| 
 | ||||
| 	if err != nil || localVarHTTPResponse == nil { | ||||
| 		return localVarReturnValue, localVarAPIResponse, err | ||||
| 	} | ||||
| 
 | ||||
| 	localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) | ||||
| 	localVarHTTPResponse.Body.Close() | ||||
| 	localVarAPIResponse.Payload = localVarBody | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, localVarAPIResponse, err | ||||
| 	} | ||||
| 
 | ||||
| 	if localVarHTTPResponse.StatusCode >= 300 { | ||||
| 		newErr := GenericOpenAPIError{ | ||||
| 			body:  localVarBody, | ||||
| 			error: localVarHTTPResponse.Status, | ||||
| 		} | ||||
| 			var v Error | ||||
| 			err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) | ||||
| 			if err != nil { | ||||
| 				newErr.error = err.Error() | ||||
| 				return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 			} | ||||
| 			newErr.model = v | ||||
| 		return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 	} | ||||
| 
 | ||||
| 	err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) | ||||
| 	if err != nil { | ||||
| 		newErr := GenericOpenAPIError{ | ||||
| 			body:  localVarBody, | ||||
| 			error: err.Error(), | ||||
| 		} | ||||
| 		return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 	} | ||||
| 
 | ||||
| 	return localVarReturnValue, localVarAPIResponse, nil | ||||
| } | ||||
| 
 | ||||
| type ApiSnapshotsPatchRequest struct { | ||||
| 	ctx _context.Context | ||||
| 	ApiService *SnapshotApiService | ||||
| 	snapshotId string | ||||
| 	snapshot *SnapshotProperties | ||||
| 	pretty *bool | ||||
| 	depth *int32 | ||||
| 	xContractNumber *int32 | ||||
| } | ||||
| 
 | ||||
| func (r ApiSnapshotsPatchRequest) Snapshot(snapshot SnapshotProperties) ApiSnapshotsPatchRequest { | ||||
| 	r.snapshot = &snapshot | ||||
| 	return r | ||||
| } | ||||
| func (r ApiSnapshotsPatchRequest) Pretty(pretty bool) ApiSnapshotsPatchRequest { | ||||
| 	r.pretty = &pretty | ||||
| 	return r | ||||
| } | ||||
| func (r ApiSnapshotsPatchRequest) Depth(depth int32) ApiSnapshotsPatchRequest { | ||||
| 	r.depth = &depth | ||||
| 	return r | ||||
| } | ||||
| func (r ApiSnapshotsPatchRequest) XContractNumber(xContractNumber int32) ApiSnapshotsPatchRequest { | ||||
| 	r.xContractNumber = &xContractNumber | ||||
| 	return r | ||||
| } | ||||
| 
 | ||||
| func (r ApiSnapshotsPatchRequest) Execute() (Snapshot, *APIResponse, error) { | ||||
| 	return r.ApiService.SnapshotsPatchExecute(r) | ||||
| } | ||||
| 
 | ||||
| /* | ||||
|  * SnapshotsPatch Partially modify a Snapshot | ||||
|  * You can use this method to update attributes of a Snapshot. | ||||
|  * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). | ||||
|  * @param snapshotId The unique ID of the Snapshot | ||||
|  * @return ApiSnapshotsPatchRequest | ||||
|  */ | ||||
| func (a *SnapshotApiService) SnapshotsPatch(ctx _context.Context, snapshotId string) ApiSnapshotsPatchRequest { | ||||
| 	return ApiSnapshotsPatchRequest{ | ||||
| 		ApiService: a, | ||||
| 		ctx: ctx, | ||||
| 		snapshotId: snapshotId, | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| /* | ||||
|  * Execute executes the request | ||||
|  * @return Snapshot | ||||
|  */ | ||||
| func (a *SnapshotApiService) SnapshotsPatchExecute(r ApiSnapshotsPatchRequest) (Snapshot, *APIResponse, error) { | ||||
| 	var ( | ||||
| 		localVarHTTPMethod   = _nethttp.MethodPatch | ||||
| 		localVarPostBody     interface{} | ||||
| 		localVarFormFileName string | ||||
| 		localVarFileName     string | ||||
| 		localVarFileBytes    []byte | ||||
| 		localVarReturnValue  Snapshot | ||||
| 	) | ||||
| 
 | ||||
| 	localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SnapshotApiService.SnapshotsPatch") | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} | ||||
| 	} | ||||
| 
 | ||||
| 	localVarPath := localBasePath + "/snapshots/{snapshotId}" | ||||
| 	localVarPath = strings.Replace(localVarPath, "{"+"snapshotId"+"}", _neturl.PathEscape(parameterToString(r.snapshotId, "")), -1) | ||||
| 
 | ||||
| 	localVarHeaderParams := make(map[string]string) | ||||
| 	localVarQueryParams := _neturl.Values{} | ||||
| 	localVarFormParams := _neturl.Values{} | ||||
| 	if r.snapshot == nil { | ||||
| 		return localVarReturnValue, nil, reportError("snapshot is required and must be specified") | ||||
| 	} | ||||
| 
 | ||||
| 	if r.pretty != nil { | ||||
| 		localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) | ||||
| 	} | ||||
| 	if r.depth != nil { | ||||
| 		localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) | ||||
| 	} | ||||
| 	// to determine the Content-Type header
 | ||||
| 	localVarHTTPContentTypes := []string{"application/json"} | ||||
| 
 | ||||
| 	// set Content-Type header
 | ||||
| 	localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) | ||||
| 	if localVarHTTPContentType != "" { | ||||
| 		localVarHeaderParams["Content-Type"] = localVarHTTPContentType | ||||
| 	} | ||||
| 
 | ||||
| 	// to determine the Accept header
 | ||||
| 	localVarHTTPHeaderAccepts := []string{"application/json"} | ||||
| 
 | ||||
| 	// set Accept header
 | ||||
| 	localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) | ||||
| 	if localVarHTTPHeaderAccept != "" { | ||||
| 		localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept | ||||
| 	} | ||||
| 	if r.xContractNumber != nil { | ||||
| 		localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") | ||||
| 	} | ||||
| 	// body params
 | ||||
| 	localVarPostBody = r.snapshot | ||||
| 	if r.ctx != nil { | ||||
| 		// API Key Authentication
 | ||||
| 		if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { | ||||
| 			if apiKey, ok := auth["Token Authentication"]; ok { | ||||
| 				var key string | ||||
| 				if apiKey.Prefix != "" { | ||||
| 					key = apiKey.Prefix + " " + apiKey.Key | ||||
| 				} else { | ||||
| 					key = apiKey.Key | ||||
| 				} | ||||
| 				localVarHeaderParams["Authorization"] = key | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| 	req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, nil, err | ||||
| 	} | ||||
| 
 | ||||
| 	localVarHTTPResponse, err := a.client.callAPI(req) | ||||
| 
 | ||||
| 	localVarAPIResponse := &APIResponse { | ||||
| 		Response: localVarHTTPResponse, | ||||
| 		Method: localVarHTTPMethod, | ||||
| 		RequestURL: localVarPath, | ||||
| 		Operation: "SnapshotsPatch", | ||||
| 	} | ||||
| 
 | ||||
| 	if err != nil || localVarHTTPResponse == nil { | ||||
| 		return localVarReturnValue, localVarAPIResponse, err | ||||
| 	} | ||||
| 
 | ||||
| 	localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) | ||||
| 	localVarHTTPResponse.Body.Close() | ||||
| 	localVarAPIResponse.Payload = localVarBody | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, localVarAPIResponse, err | ||||
| 	} | ||||
| 
 | ||||
| 	if localVarHTTPResponse.StatusCode >= 300 { | ||||
| 		newErr := GenericOpenAPIError{ | ||||
| 			body:  localVarBody, | ||||
| 			error: localVarHTTPResponse.Status, | ||||
| 		} | ||||
| 			var v Error | ||||
| 			err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) | ||||
| 			if err != nil { | ||||
| 				newErr.error = err.Error() | ||||
| 				return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 			} | ||||
| 			newErr.model = v | ||||
| 		return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 	} | ||||
| 
 | ||||
| 	err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) | ||||
| 	if err != nil { | ||||
| 		newErr := GenericOpenAPIError{ | ||||
| 			body:  localVarBody, | ||||
| 			error: err.Error(), | ||||
| 		} | ||||
| 		return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 	} | ||||
| 
 | ||||
| 	return localVarReturnValue, localVarAPIResponse, nil | ||||
| } | ||||
| 
 | ||||
| type ApiSnapshotsPutRequest struct { | ||||
| 	ctx _context.Context | ||||
| 	ApiService *SnapshotApiService | ||||
| 	snapshotId string | ||||
| 	snapshot *Snapshot | ||||
| 	pretty *bool | ||||
| 	depth *int32 | ||||
| 	xContractNumber *int32 | ||||
| } | ||||
| 
 | ||||
| func (r ApiSnapshotsPutRequest) Snapshot(snapshot Snapshot) ApiSnapshotsPutRequest { | ||||
| 	r.snapshot = &snapshot | ||||
| 	return r | ||||
| } | ||||
| func (r ApiSnapshotsPutRequest) Pretty(pretty bool) ApiSnapshotsPutRequest { | ||||
| 	r.pretty = &pretty | ||||
| 	return r | ||||
| } | ||||
| func (r ApiSnapshotsPutRequest) Depth(depth int32) ApiSnapshotsPutRequest { | ||||
| 	r.depth = &depth | ||||
| 	return r | ||||
| } | ||||
| func (r ApiSnapshotsPutRequest) XContractNumber(xContractNumber int32) ApiSnapshotsPutRequest { | ||||
| 	r.xContractNumber = &xContractNumber | ||||
| 	return r | ||||
| } | ||||
| 
 | ||||
| func (r ApiSnapshotsPutRequest) Execute() (Snapshot, *APIResponse, error) { | ||||
| 	return r.ApiService.SnapshotsPutExecute(r) | ||||
| } | ||||
| 
 | ||||
| /* | ||||
|  * SnapshotsPut Modify a Snapshot | ||||
|  * You can use update attributes of a resource | ||||
|  * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). | ||||
|  * @param snapshotId The unique ID of the Snapshot | ||||
|  * @return ApiSnapshotsPutRequest | ||||
|  */ | ||||
| func (a *SnapshotApiService) SnapshotsPut(ctx _context.Context, snapshotId string) ApiSnapshotsPutRequest { | ||||
| 	return ApiSnapshotsPutRequest{ | ||||
| 		ApiService: a, | ||||
| 		ctx: ctx, | ||||
| 		snapshotId: snapshotId, | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| /* | ||||
|  * Execute executes the request | ||||
|  * @return Snapshot | ||||
|  */ | ||||
| func (a *SnapshotApiService) SnapshotsPutExecute(r ApiSnapshotsPutRequest) (Snapshot, *APIResponse, error) { | ||||
| 	var ( | ||||
| 		localVarHTTPMethod   = _nethttp.MethodPut | ||||
| 		localVarPostBody     interface{} | ||||
| 		localVarFormFileName string | ||||
| 		localVarFileName     string | ||||
| 		localVarFileBytes    []byte | ||||
| 		localVarReturnValue  Snapshot | ||||
| 	) | ||||
| 
 | ||||
| 	localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SnapshotApiService.SnapshotsPut") | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} | ||||
| 	} | ||||
| 
 | ||||
| 	localVarPath := localBasePath + "/snapshots/{snapshotId}" | ||||
| 	localVarPath = strings.Replace(localVarPath, "{"+"snapshotId"+"}", _neturl.PathEscape(parameterToString(r.snapshotId, "")), -1) | ||||
| 
 | ||||
| 	localVarHeaderParams := make(map[string]string) | ||||
| 	localVarQueryParams := _neturl.Values{} | ||||
| 	localVarFormParams := _neturl.Values{} | ||||
| 	if r.snapshot == nil { | ||||
| 		return localVarReturnValue, nil, reportError("snapshot is required and must be specified") | ||||
| 	} | ||||
| 
 | ||||
| 	if r.pretty != nil { | ||||
| 		localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) | ||||
| 	} | ||||
| 	if r.depth != nil { | ||||
| 		localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) | ||||
| 	} | ||||
| 	// to determine the Content-Type header
 | ||||
| 	localVarHTTPContentTypes := []string{"application/json"} | ||||
| 
 | ||||
| 	// set Content-Type header
 | ||||
| 	localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) | ||||
| 	if localVarHTTPContentType != "" { | ||||
| 		localVarHeaderParams["Content-Type"] = localVarHTTPContentType | ||||
| 	} | ||||
| 
 | ||||
| 	// to determine the Accept header
 | ||||
| 	localVarHTTPHeaderAccepts := []string{"application/json"} | ||||
| 
 | ||||
| 	// set Accept header
 | ||||
| 	localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) | ||||
| 	if localVarHTTPHeaderAccept != "" { | ||||
| 		localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept | ||||
| 	} | ||||
| 	if r.xContractNumber != nil { | ||||
| 		localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") | ||||
| 	} | ||||
| 	// body params
 | ||||
| 	localVarPostBody = r.snapshot | ||||
| 	if r.ctx != nil { | ||||
| 		// API Key Authentication
 | ||||
| 		if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { | ||||
| 			if apiKey, ok := auth["Token Authentication"]; ok { | ||||
| 				var key string | ||||
| 				if apiKey.Prefix != "" { | ||||
| 					key = apiKey.Prefix + " " + apiKey.Key | ||||
| 				} else { | ||||
| 					key = apiKey.Key | ||||
| 				} | ||||
| 				localVarHeaderParams["Authorization"] = key | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| 	req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, nil, err | ||||
| 	} | ||||
| 
 | ||||
| 	localVarHTTPResponse, err := a.client.callAPI(req) | ||||
| 
 | ||||
| 	localVarAPIResponse := &APIResponse { | ||||
| 		Response: localVarHTTPResponse, | ||||
| 		Method: localVarHTTPMethod, | ||||
| 		RequestURL: localVarPath, | ||||
| 		Operation: "SnapshotsPut", | ||||
| 	} | ||||
| 
 | ||||
| 	if err != nil || localVarHTTPResponse == nil { | ||||
| 		return localVarReturnValue, localVarAPIResponse, err | ||||
| 	} | ||||
| 
 | ||||
| 	localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) | ||||
| 	localVarHTTPResponse.Body.Close() | ||||
| 	localVarAPIResponse.Payload = localVarBody | ||||
| 	if err != nil { | ||||
| 		return localVarReturnValue, localVarAPIResponse, err | ||||
| 	} | ||||
| 
 | ||||
| 	if localVarHTTPResponse.StatusCode >= 300 { | ||||
| 		newErr := GenericOpenAPIError{ | ||||
| 			body:  localVarBody, | ||||
| 			error: localVarHTTPResponse.Status, | ||||
| 		} | ||||
| 			var v Error | ||||
| 			err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) | ||||
| 			if err != nil { | ||||
| 				newErr.error = err.Error() | ||||
| 				return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 			} | ||||
| 			newErr.model = v | ||||
| 		return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 	} | ||||
| 
 | ||||
| 	err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) | ||||
| 	if err != nil { | ||||
| 		newErr := GenericOpenAPIError{ | ||||
| 			body:  localVarBody, | ||||
| 			error: err.Error(), | ||||
| 		} | ||||
| 		return localVarReturnValue, localVarAPIResponse, newErr | ||||
| 	} | ||||
| 
 | ||||
| 	return localVarReturnValue, localVarAPIResponse, nil | ||||
| } | ||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							|  | @ -0,0 +1,755 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"bytes" | ||||
| 	"context" | ||||
| 	"encoding/json" | ||||
| 	"encoding/xml" | ||||
| 	"errors" | ||||
| 	"fmt" | ||||
| 	"io" | ||||
| 	"io/ioutil" | ||||
| 	"log" | ||||
| 	"mime/multipart" | ||||
| 	"net/http" | ||||
| 	"net/http/httputil" | ||||
| 	"net/url" | ||||
| 	"os" | ||||
| 	"path/filepath" | ||||
| 	"reflect" | ||||
| 	"regexp" | ||||
| 	"strconv" | ||||
| 	"strings" | ||||
| 	"time" | ||||
| 	"unicode/utf8" | ||||
| 
 | ||||
| 	"golang.org/x/oauth2" | ||||
| ) | ||||
| 
 | ||||
| var ( | ||||
| 	jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) | ||||
| 	xmlCheck  = regexp.MustCompile(`(?i:(?:application|text)/xml)`) | ||||
| ) | ||||
| 
 | ||||
| const DepthParam = "depth" | ||||
| const DefaultDepth = "10" | ||||
| 
 | ||||
| const ( | ||||
|    RequestStatusQueued  = "QUEUED" | ||||
|    RequestStatusRunning = "RUNNING" | ||||
|    RequestStatusFailed  = "FAILED" | ||||
|    RequestStatusDone    = "DONE" | ||||
| ) | ||||
| 
 | ||||
| // APIClient manages communication with the CLOUD API API v5.0
 | ||||
| // In most cases there should be only one, shared, APIClient.
 | ||||
| type APIClient struct { | ||||
| 	cfg    *Configuration | ||||
| 	common service // Reuse a single struct instead of allocating one for each service on the heap.
 | ||||
| 
 | ||||
| 	// API Services
 | ||||
| 
 | ||||
| 	BackupUnitApi *BackupUnitApiService | ||||
| 
 | ||||
| 	ContractApi *ContractApiService | ||||
| 
 | ||||
| 	DataCenterApi *DataCenterApiService | ||||
| 
 | ||||
| 	IPBlocksApi *IPBlocksApiService | ||||
| 
 | ||||
| 	ImageApi *ImageApiService | ||||
| 
 | ||||
| 	KubernetesApi *KubernetesApiService | ||||
| 
 | ||||
| 	LabelApi *LabelApiService | ||||
| 
 | ||||
| 	LanApi *LanApiService | ||||
| 
 | ||||
| 	LoadBalancerApi *LoadBalancerApiService | ||||
| 
 | ||||
| 	LocationApi *LocationApiService | ||||
| 
 | ||||
| 	NicApi *NicApiService | ||||
| 
 | ||||
| 	PrivateCrossConnectApi *PrivateCrossConnectApiService | ||||
| 
 | ||||
| 	RequestApi *RequestApiService | ||||
| 
 | ||||
| 	ServerApi *ServerApiService | ||||
| 
 | ||||
| 	SnapshotApi *SnapshotApiService | ||||
| 
 | ||||
| 	UserManagementApi *UserManagementApiService | ||||
| 
 | ||||
| 	VolumeApi *VolumeApiService | ||||
| } | ||||
| 
 | ||||
| type service struct { | ||||
| 	client *APIClient | ||||
| } | ||||
| 
 | ||||
| // NewAPIClient creates a new API client. Requires a userAgent string describing your application.
 | ||||
| // optionally a custom http.Client to allow for advanced features such as caching.
 | ||||
| func NewAPIClient(cfg *Configuration) *APIClient { | ||||
| 	if cfg.HTTPClient == nil { | ||||
| 		cfg.HTTPClient = http.DefaultClient | ||||
| 	} | ||||
| 
 | ||||
| 	c := &APIClient{} | ||||
| 	c.cfg = cfg | ||||
| 	c.common.client = c | ||||
| 
 | ||||
| 	// API Services
 | ||||
| 	c.BackupUnitApi = (*BackupUnitApiService)(&c.common) | ||||
| 	c.ContractApi = (*ContractApiService)(&c.common) | ||||
| 	c.DataCenterApi = (*DataCenterApiService)(&c.common) | ||||
| 	c.IPBlocksApi = (*IPBlocksApiService)(&c.common) | ||||
| 	c.ImageApi = (*ImageApiService)(&c.common) | ||||
| 	c.KubernetesApi = (*KubernetesApiService)(&c.common) | ||||
| 	c.LabelApi = (*LabelApiService)(&c.common) | ||||
| 	c.LanApi = (*LanApiService)(&c.common) | ||||
| 	c.LoadBalancerApi = (*LoadBalancerApiService)(&c.common) | ||||
| 	c.LocationApi = (*LocationApiService)(&c.common) | ||||
| 	c.NicApi = (*NicApiService)(&c.common) | ||||
| 	c.PrivateCrossConnectApi = (*PrivateCrossConnectApiService)(&c.common) | ||||
| 	c.RequestApi = (*RequestApiService)(&c.common) | ||||
| 	c.ServerApi = (*ServerApiService)(&c.common) | ||||
| 	c.SnapshotApi = (*SnapshotApiService)(&c.common) | ||||
| 	c.UserManagementApi = (*UserManagementApiService)(&c.common) | ||||
| 	c.VolumeApi = (*VolumeApiService)(&c.common) | ||||
| 
 | ||||
| 	return c | ||||
| } | ||||
| 
 | ||||
| func atoi(in string) (int, error) { | ||||
| 	return strconv.Atoi(in) | ||||
| } | ||||
| 
 | ||||
| // selectHeaderContentType select a content type from the available list.
 | ||||
| func selectHeaderContentType(contentTypes []string) string { | ||||
| 	if len(contentTypes) == 0 { | ||||
| 		return "" | ||||
| 	} | ||||
| 	if contains(contentTypes, "application/json") { | ||||
| 		return "application/json" | ||||
| 	} | ||||
| 	return contentTypes[0] // use the first content type specified in 'consumes'
 | ||||
| } | ||||
| 
 | ||||
| // selectHeaderAccept join all accept types and return
 | ||||
| func selectHeaderAccept(accepts []string) string { | ||||
| 	if len(accepts) == 0 { | ||||
| 		return "" | ||||
| 	} | ||||
| 
 | ||||
| 	if contains(accepts, "application/json") { | ||||
| 		return "application/json" | ||||
| 	} | ||||
| 
 | ||||
| 	return strings.Join(accepts, ",") | ||||
| } | ||||
| 
 | ||||
| // contains is a case insenstive match, finding needle in a haystack
 | ||||
| func contains(haystack []string, needle string) bool { | ||||
| 	for _, a := range haystack { | ||||
| 		if strings.ToLower(a) == strings.ToLower(needle) { | ||||
| 			return true | ||||
| 		} | ||||
| 	} | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| // Verify optional parameters are of the correct type.
 | ||||
| func typeCheckParameter(obj interface{}, expected string, name string) error { | ||||
| 	// Make sure there is an object.
 | ||||
| 	if obj == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	// Check the type is as expected.
 | ||||
| 	if reflect.TypeOf(obj).String() != expected { | ||||
| 		return fmt.Errorf("Expected %s to be of type %s but received %s.", name, expected, reflect.TypeOf(obj).String()) | ||||
| 	} | ||||
| 	return nil | ||||
| } | ||||
| 
 | ||||
| // parameterToString convert interface{} parameters to string, using a delimiter if format is provided.
 | ||||
| func parameterToString(obj interface{}, collectionFormat string) string { | ||||
| 	var delimiter string | ||||
| 
 | ||||
| 	switch collectionFormat { | ||||
| 	case "pipes": | ||||
| 		delimiter = "|" | ||||
| 	case "ssv": | ||||
| 		delimiter = " " | ||||
| 	case "tsv": | ||||
| 		delimiter = "\t" | ||||
| 	case "csv": | ||||
| 		delimiter = "," | ||||
| 	} | ||||
| 
 | ||||
| 	if reflect.TypeOf(obj).Kind() == reflect.Slice { | ||||
| 		return strings.Trim(strings.Replace(fmt.Sprint(obj), " ", delimiter, -1), "[]") | ||||
| 	} else if t, ok := obj.(time.Time); ok { | ||||
| 		return t.Format(time.RFC3339) | ||||
| 	} | ||||
| 
 | ||||
| 	return fmt.Sprintf("%v", obj) | ||||
| } | ||||
| 
 | ||||
| // helper for converting interface{} parameters to json strings
 | ||||
| func parameterToJson(obj interface{}) (string, error) { | ||||
| 	jsonBuf, err := json.Marshal(obj) | ||||
| 	if err != nil { | ||||
| 		return "", err | ||||
| 	} | ||||
| 	return string(jsonBuf), err | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| // callAPI do the request.
 | ||||
| func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) { | ||||
| 	retryCount := 0 | ||||
| 
 | ||||
| 	var resp *http.Response | ||||
| 	var err error | ||||
| 
 | ||||
| 	for { | ||||
| 
 | ||||
| 		retryCount ++ | ||||
| 
 | ||||
| 		/* we need to clone the request with every retry time because Body closes after the request */ | ||||
| 		var clonedRequest *http.Request = request.Clone(request.Context()) | ||||
| 		if request.Body != nil { | ||||
| 			clonedRequest.Body, err = request.GetBody() | ||||
| 			if err != nil { | ||||
| 				return nil, err | ||||
| 			} | ||||
| 		} | ||||
| 
 | ||||
| 		if c.cfg.Debug { | ||||
| 			dump, err := httputil.DumpRequestOut(clonedRequest, true) | ||||
| 			if err != nil { | ||||
| 				return nil, err | ||||
| 			} | ||||
| 			log.Printf("\ntry no: %d\n", retryCount) | ||||
| 			log.Printf("%s\n", string(dump)) | ||||
| 		} | ||||
| 
 | ||||
| 		resp, err = c.cfg.HTTPClient.Do(clonedRequest) | ||||
| 		if err != nil { | ||||
| 			return resp, err | ||||
| 		} | ||||
| 
 | ||||
| 		if c.cfg.Debug { | ||||
| 			dump, err := httputil.DumpResponse(resp, true) | ||||
| 			if err != nil { | ||||
| 				return resp, err | ||||
| 			} | ||||
| 			log.Printf("\n%s\n", string(dump)) | ||||
| 		} | ||||
| 
 | ||||
| 		var backoffTime time.Duration | ||||
| 
 | ||||
| 		switch resp.StatusCode { | ||||
| 		case http.StatusServiceUnavailable, | ||||
| 			http.StatusGatewayTimeout, | ||||
| 			http.StatusBadGateway: | ||||
| 			backoffTime = c.GetConfig().WaitTime | ||||
| 
 | ||||
| 		case http.StatusTooManyRequests: | ||||
| 			if retryAfterSeconds := resp.Header.Get("Retry-After"); retryAfterSeconds != "" { | ||||
| 				waitTime, err := time.ParseDuration(retryAfterSeconds + "s") | ||||
| 				if err != nil { | ||||
| 					return resp, err | ||||
| 				} | ||||
| 				backoffTime = waitTime | ||||
| 			} else { | ||||
| 				backoffTime = c.GetConfig().WaitTime | ||||
| 			} | ||||
| 		default: | ||||
| 			return resp, err | ||||
| 
 | ||||
| 		} | ||||
| 
 | ||||
| 		if retryCount >= c.GetConfig().MaxRetries { | ||||
| 			if c.cfg.Debug { | ||||
| 				fmt.Printf("number of maximum retries exceeded (%d retries)\n", c.cfg.MaxRetries) | ||||
| 			} | ||||
| 			break | ||||
| 		} else { | ||||
| 			c.backOff(backoffTime) | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
| 	return resp, err | ||||
| } | ||||
| 
 | ||||
| func (c *APIClient) backOff(t time.Duration) { | ||||
| 	if t > c.GetConfig().MaxWaitTime { | ||||
| 		t = c.GetConfig().MaxWaitTime | ||||
| 	} | ||||
| 	if c.cfg.Debug { | ||||
| 		fmt.Printf("sleeping %s before retrying request\n", t.String()) | ||||
| 	} | ||||
| 	time.Sleep(t) | ||||
| } | ||||
| 
 | ||||
| // Allow modification of underlying config for alternate implementations and testing
 | ||||
| // Caution: modifying the configuration while live can cause data races and potentially unwanted behavior
 | ||||
| func (c *APIClient) GetConfig() *Configuration { | ||||
| 	return c.cfg | ||||
| } | ||||
| 
 | ||||
| // prepareRequest build the request
 | ||||
| func (c *APIClient) prepareRequest( | ||||
| 	ctx context.Context, | ||||
| 	path string, method string, | ||||
| 	postBody interface{}, | ||||
| 	headerParams map[string]string, | ||||
| 	queryParams url.Values, | ||||
| 	formParams url.Values, | ||||
| 	formFileName string, | ||||
| 	fileName string, | ||||
| 	fileBytes []byte) (localVarRequest *http.Request, err error) { | ||||
| 
 | ||||
| 	var body *bytes.Buffer | ||||
| 
 | ||||
| 	// Detect postBody type and post.
 | ||||
| 	if postBody != nil { | ||||
| 		contentType := headerParams["Content-Type"] | ||||
| 		if contentType == "" { | ||||
| 			contentType = detectContentType(postBody) | ||||
| 			headerParams["Content-Type"] = contentType | ||||
| 		} | ||||
| 
 | ||||
| 		body, err = setBody(postBody, contentType) | ||||
| 		if err != nil { | ||||
| 			return nil, err | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
| 	// add form parameters and file if available.
 | ||||
| 	if strings.HasPrefix(headerParams["Content-Type"], "multipart/form-data") && len(formParams) > 0 || (len(fileBytes) > 0 && fileName != "") { | ||||
| 		if body != nil { | ||||
| 			return nil, errors.New("Cannot specify postBody and multipart form at the same time.") | ||||
| 		} | ||||
| 		body = &bytes.Buffer{} | ||||
| 		w := multipart.NewWriter(body) | ||||
| 
 | ||||
| 		for k, v := range formParams { | ||||
| 			for _, iv := range v { | ||||
| 				if strings.HasPrefix(k, "@") { // file
 | ||||
| 					err = addFile(w, k[1:], iv) | ||||
| 					if err != nil { | ||||
| 						return nil, err | ||||
| 					} | ||||
| 				} else { // form value
 | ||||
| 					w.WriteField(k, iv) | ||||
| 				} | ||||
| 			} | ||||
| 		} | ||||
| 		if len(fileBytes) > 0 && fileName != "" { | ||||
| 			w.Boundary() | ||||
| 			//_, fileNm := filepath.Split(fileName)
 | ||||
| 			part, err := w.CreateFormFile(formFileName, filepath.Base(fileName)) | ||||
| 			if err != nil { | ||||
| 				return nil, err | ||||
| 			} | ||||
| 			_, err = part.Write(fileBytes) | ||||
| 			if err != nil { | ||||
| 				return nil, err | ||||
| 			} | ||||
| 		} | ||||
| 
 | ||||
| 		// Set the Boundary in the Content-Type
 | ||||
| 		headerParams["Content-Type"] = w.FormDataContentType() | ||||
| 
 | ||||
| 		// Set Content-Length
 | ||||
| 		headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) | ||||
| 		w.Close() | ||||
| 	} | ||||
| 
 | ||||
| 	if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { | ||||
| 		if body != nil { | ||||
| 			return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") | ||||
| 		} | ||||
| 		body = &bytes.Buffer{} | ||||
| 		body.WriteString(formParams.Encode()) | ||||
| 		// Set Content-Length
 | ||||
| 		headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) | ||||
| 	} | ||||
| 
 | ||||
| 	// Setup path and query parameters
 | ||||
| 	url, err := url.Parse(path) | ||||
| 	if err != nil { | ||||
| 		return nil, err | ||||
| 	} | ||||
| 
 | ||||
| 	// Override request host, if applicable
 | ||||
| 	if c.cfg.Host != "" { | ||||
| 		url.Host = c.cfg.Host | ||||
| 	} | ||||
| 
 | ||||
| 	// Override request scheme, if applicable
 | ||||
| 	if c.cfg.Scheme != "" { | ||||
| 		url.Scheme = c.cfg.Scheme | ||||
| 	} | ||||
| 
 | ||||
| 	// Adding Query Param
 | ||||
| 	query := url.Query() | ||||
| 	/* adding default query params */ | ||||
|     for k, v := range c.cfg.DefaultQueryParams { | ||||
|         if _, ok := queryParams[k]; !ok { | ||||
|             queryParams[k] = v | ||||
|         } | ||||
|     } | ||||
| 	for k, v := range queryParams { | ||||
| 		for _, iv := range v { | ||||
| 			query.Add(k, iv) | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
|     // Adding default depth if needed
 | ||||
|     if query.Get(DepthParam) == "" { | ||||
|         query.Add(DepthParam, DefaultDepth) | ||||
|     } | ||||
|   | ||||
| 
 | ||||
| 	// Encode the parameters.
 | ||||
| 	url.RawQuery = query.Encode() | ||||
| 
 | ||||
| 	// Generate a new request
 | ||||
| 	if body != nil { | ||||
| 		localVarRequest, err = http.NewRequest(method, url.String(), body) | ||||
| 	} else { | ||||
| 		localVarRequest, err = http.NewRequest(method, url.String(), nil) | ||||
| 	} | ||||
| 	if err != nil { | ||||
| 		return nil, err | ||||
| 	} | ||||
| 
 | ||||
| 	// add header parameters, if any
 | ||||
| 	if len(headerParams) > 0 { | ||||
| 		headers := http.Header{} | ||||
| 		for h, v := range headerParams { | ||||
| 			headers.Set(h, v) | ||||
| 		} | ||||
| 		localVarRequest.Header = headers | ||||
| 	} | ||||
| 
 | ||||
| 	// Add the user agent to the request.
 | ||||
| 	localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) | ||||
| 
 | ||||
|     if c.cfg.Token != "" { | ||||
|         localVarRequest.Header.Add("Authorization", "Bearer " + c.cfg.Token) | ||||
|     } else { | ||||
|         if c.cfg.Username != "" { | ||||
|             localVarRequest.SetBasicAuth(c.cfg.Username, c.cfg.Password) | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
| 	if ctx != nil { | ||||
| 		// add context to the request
 | ||||
| 		localVarRequest = localVarRequest.WithContext(ctx) | ||||
| 
 | ||||
| 		// Walk through any authentication.
 | ||||
| 
 | ||||
| 		// OAuth2 authentication
 | ||||
| 		if tok, ok := ctx.Value(ContextOAuth2).(oauth2.TokenSource); ok { | ||||
| 			// We were able to grab an oauth2 token from the context
 | ||||
| 			var latestToken *oauth2.Token | ||||
| 			if latestToken, err = tok.Token(); err != nil { | ||||
| 				return nil, err | ||||
| 			} | ||||
| 
 | ||||
| 			latestToken.SetAuthHeader(localVarRequest) | ||||
| 		} | ||||
| 
 | ||||
| 		// Basic HTTP Authentication
 | ||||
| 		if auth, ok := ctx.Value(ContextBasicAuth).(BasicAuth); ok { | ||||
| 			localVarRequest.SetBasicAuth(auth.UserName, auth.Password) | ||||
| 		} | ||||
| 
 | ||||
| 		// AccessToken Authentication
 | ||||
| 		if auth, ok := ctx.Value(ContextAccessToken).(string); ok { | ||||
| 			localVarRequest.Header.Add("Authorization", "Bearer "+auth) | ||||
| 		} | ||||
| 
 | ||||
| 	} | ||||
| 
 | ||||
| 	for header, value := range c.cfg.DefaultHeader { | ||||
| 		localVarRequest.Header.Add(header, value) | ||||
| 	} | ||||
| 	return localVarRequest, nil | ||||
| } | ||||
| 
 | ||||
| func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { | ||||
| 	if len(b) == 0 { | ||||
| 		return nil | ||||
| 	} | ||||
| 	if s, ok := v.(*string); ok { | ||||
| 		*s = string(b) | ||||
| 		return nil | ||||
| 	} | ||||
| 	if xmlCheck.MatchString(contentType) { | ||||
| 		if err = xml.Unmarshal(b, v); err != nil { | ||||
| 			return err | ||||
| 		} | ||||
| 		return nil | ||||
| 	} | ||||
| 	if jsonCheck.MatchString(contentType) { | ||||
| 		if actualObj, ok := v.(interface{GetActualInstance() interface{}}); ok { // oneOf, anyOf schemas
 | ||||
| 			if unmarshalObj, ok := actualObj.(interface{UnmarshalJSON([]byte) error}); ok { // make sure it has UnmarshalJSON defined
 | ||||
| 				if err = unmarshalObj.UnmarshalJSON(b); err!= nil { | ||||
| 					return err | ||||
| 				} | ||||
| 			} else { | ||||
| 				errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") | ||||
| 			} | ||||
| 		} else if err = json.Unmarshal(b, v); err != nil { // simple model
 | ||||
| 			return err | ||||
| 		} | ||||
| 		return nil | ||||
| 	} | ||||
| 	return errors.New("undefined response type") | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (c *APIClient) WaitForRequest(ctx context.Context, path string) (*APIResponse, error) { | ||||
| 
 | ||||
| 	var ( | ||||
| 		localVarHTTPMethod   = http.MethodGet | ||||
| 		localVarPostBody     interface{} | ||||
| 		localVarFormFileName string | ||||
| 		localVarFileName     string | ||||
| 		localVarFileBytes    []byte | ||||
| 	) | ||||
| 
 | ||||
| 	// create path and map variables
 | ||||
| 	localVarHeaderParams := make(map[string]string) | ||||
| 	localVarQueryParams := url.Values{} | ||||
| 	localVarFormParams := url.Values{} | ||||
| 
 | ||||
| 	r, err := c.prepareRequest(ctx, path, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) | ||||
| 	if err != nil { | ||||
| 		return nil, err | ||||
| 	} | ||||
| 
 | ||||
| 	ticker := time.NewTicker(1 * time.Second) | ||||
| 	defer ticker.Stop() | ||||
| 	for { | ||||
| 		resp, err := c.callAPI(r) | ||||
| 
 | ||||
| 		var localVarBody = make([]byte, 0) | ||||
| 		if resp != nil { | ||||
| 			var errRead error | ||||
| 			localVarBody, errRead = ioutil.ReadAll(resp.Body) | ||||
| 			_ = resp.Body.Close() | ||||
| 			if errRead != nil { | ||||
| 				return nil, errRead | ||||
| 			} | ||||
| 
 | ||||
| 		} | ||||
| 
 | ||||
| 		localVarAPIResponse := &APIResponse { | ||||
| 			Response: resp, | ||||
| 			Method: localVarHTTPMethod, | ||||
| 			RequestURL: path, | ||||
| 			Operation: "WaitForRequest", | ||||
| 		} | ||||
| 
 | ||||
| 		localVarAPIResponse.Payload = localVarBody | ||||
| 
 | ||||
| 		if err != nil { | ||||
| 			return localVarAPIResponse, err | ||||
| 		} | ||||
| 
 | ||||
| 		status := RequestStatus{} | ||||
| 		err = c.decode(&status, localVarBody, resp.Header.Get("Content-Type")) | ||||
| 		if status.Metadata != nil && status.Metadata.Status != nil { | ||||
| 			switch *status.Metadata.Status { | ||||
| 			case RequestStatusDone: | ||||
| 				return localVarAPIResponse, nil | ||||
| 			case RequestStatusFailed: | ||||
| 				var id = "<none>" | ||||
| 				var message = "<none>" | ||||
| 				if status.Id != nil { | ||||
| 					id = *status.Id | ||||
| 				} | ||||
| 				if status.Metadata.Message != nil { | ||||
| 					message = *status.Metadata.Message | ||||
| 				} | ||||
| 				return localVarAPIResponse, errors.New( | ||||
| 					fmt.Sprintf("Request %s failed: %s", id, message), | ||||
| 				) | ||||
| 			} | ||||
| 		} | ||||
| 		select { | ||||
| 		case <-ctx.Done(): | ||||
| 			return nil, ctx.Err() | ||||
| 		case <-ticker.C: | ||||
| 			continue | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| // Add a file to the multipart request
 | ||||
| func addFile(w *multipart.Writer, fieldName, path string) error { | ||||
| 	file, err := os.Open(path) | ||||
| 	if err != nil { | ||||
| 		return err | ||||
| 	} | ||||
| 	defer file.Close() | ||||
| 
 | ||||
| 	part, err := w.CreateFormFile(fieldName, filepath.Base(path)) | ||||
| 	if err != nil { | ||||
| 		return err | ||||
| 	} | ||||
| 	_, err = io.Copy(part, file) | ||||
| 
 | ||||
| 	return err | ||||
| } | ||||
| 
 | ||||
| // Prevent trying to import "fmt"
 | ||||
| func reportError(format string, a ...interface{}) error { | ||||
| 	return fmt.Errorf(format, a...) | ||||
| } | ||||
| 
 | ||||
| // Set request body from an interface{}
 | ||||
| func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { | ||||
| 	if bodyBuf == nil { | ||||
| 		bodyBuf = &bytes.Buffer{} | ||||
| 	} | ||||
| 
 | ||||
| 	if reader, ok := body.(io.Reader); ok { | ||||
| 		_, err = bodyBuf.ReadFrom(reader) | ||||
| 	} else if b, ok := body.([]byte); ok { | ||||
| 		_, err = bodyBuf.Write(b) | ||||
| 	} else if s, ok := body.(string); ok { | ||||
| 		_, err = bodyBuf.WriteString(s) | ||||
| 	} else if s, ok := body.(*string); ok { | ||||
| 		_, err = bodyBuf.WriteString(*s) | ||||
| 	} else if jsonCheck.MatchString(contentType) { | ||||
| 		err = json.NewEncoder(bodyBuf).Encode(body) | ||||
| 	} else if xmlCheck.MatchString(contentType) { | ||||
| 		err = xml.NewEncoder(bodyBuf).Encode(body) | ||||
| 	} | ||||
| 
 | ||||
| 	if err != nil { | ||||
| 		return nil, err | ||||
| 	} | ||||
| 
 | ||||
| 	if bodyBuf.Len() == 0 { | ||||
| 		err = fmt.Errorf("Invalid body type %s\n", contentType) | ||||
| 		return nil, err | ||||
| 	} | ||||
| 	return bodyBuf, nil | ||||
| } | ||||
| 
 | ||||
| // detectContentType method is used to figure out `Request.Body` content type for request header
 | ||||
| func detectContentType(body interface{}) string { | ||||
| 	contentType := "text/plain; charset=utf-8" | ||||
| 	kind := reflect.TypeOf(body).Kind() | ||||
| 
 | ||||
| 	switch kind { | ||||
| 	case reflect.Struct, reflect.Map, reflect.Ptr: | ||||
| 		contentType = "application/json; charset=utf-8" | ||||
| 	case reflect.String: | ||||
| 		contentType = "text/plain; charset=utf-8" | ||||
| 	default: | ||||
| 		if b, ok := body.([]byte); ok { | ||||
| 			contentType = http.DetectContentType(b) | ||||
| 		} else if kind == reflect.Slice { | ||||
| 			contentType = "application/json; charset=utf-8" | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
| 	return contentType | ||||
| } | ||||
| 
 | ||||
| // Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go
 | ||||
| type cacheControl map[string]string | ||||
| 
 | ||||
| func parseCacheControl(headers http.Header) cacheControl { | ||||
| 	cc := cacheControl{} | ||||
| 	ccHeader := headers.Get("Cache-Control") | ||||
| 	for _, part := range strings.Split(ccHeader, ",") { | ||||
| 		part = strings.Trim(part, " ") | ||||
| 		if part == "" { | ||||
| 			continue | ||||
| 		} | ||||
| 		if strings.ContainsRune(part, '=') { | ||||
| 			keyval := strings.Split(part, "=") | ||||
| 			cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") | ||||
| 		} else { | ||||
| 			cc[part] = "" | ||||
| 		} | ||||
| 	} | ||||
| 	return cc | ||||
| } | ||||
| 
 | ||||
| // CacheExpires helper function to determine remaining time before repeating a request.
 | ||||
| func CacheExpires(r *http.Response) time.Time { | ||||
| 	// Figure out when the cache expires.
 | ||||
| 	var expires time.Time | ||||
| 	now, err := time.Parse(time.RFC1123, r.Header.Get("date")) | ||||
| 	if err != nil { | ||||
| 		return time.Now() | ||||
| 	} | ||||
| 	respCacheControl := parseCacheControl(r.Header) | ||||
| 
 | ||||
| 	if maxAge, ok := respCacheControl["max-age"]; ok { | ||||
| 		lifetime, err := time.ParseDuration(maxAge + "s") | ||||
| 		if err != nil { | ||||
| 			expires = now | ||||
| 		} else { | ||||
| 			expires = now.Add(lifetime) | ||||
| 		} | ||||
| 	} else { | ||||
| 		expiresHeader := r.Header.Get("Expires") | ||||
| 		if expiresHeader != "" { | ||||
| 			expires, err = time.Parse(time.RFC1123, expiresHeader) | ||||
| 			if err != nil { | ||||
| 				expires = now | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| 	return expires | ||||
| } | ||||
| 
 | ||||
| func strlen(s string) int { | ||||
| 	return utf8.RuneCountInString(s) | ||||
| } | ||||
| 
 | ||||
| // GenericOpenAPIError Provides access to the body, error and model on returned errors.
 | ||||
| type GenericOpenAPIError struct { | ||||
| 	body  []byte | ||||
| 	error string | ||||
| 	model interface{} | ||||
| } | ||||
| 
 | ||||
| // Error returns non-empty string if there was an error.
 | ||||
| func (e GenericOpenAPIError) Error() string { | ||||
| 	return e.error | ||||
| } | ||||
| 
 | ||||
| // Body returns the raw bytes of the response
 | ||||
| func (e GenericOpenAPIError) Body() []byte { | ||||
| 	return e.body | ||||
| } | ||||
| 
 | ||||
| // Model returns the unpacked model of the error
 | ||||
| func (e GenericOpenAPIError) Model() interface{} { | ||||
| 	return e.model | ||||
| } | ||||
|  | @ -0,0 +1,268 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"context" | ||||
| 	"fmt" | ||||
| 	"net/http" | ||||
| 	"net/url" | ||||
| 	"os" | ||||
| 	"strings" | ||||
| 	"time" | ||||
| ) | ||||
| 
 | ||||
| const ( | ||||
|    IonosUsernameEnvVar = "IONOS_USERNAME" | ||||
|    IonosPasswordEnvVar = "IONOS_PASSWORD" | ||||
|    IonosTokenEnvVar    = "IONOS_TOKEN" | ||||
|    defaultMaxRetries  = 3 | ||||
|    defaultWaitTime    = time.Duration(100) * time.Millisecond | ||||
|    defaultMaxWaitTime = time.Duration(2000) * time.Millisecond | ||||
| ) | ||||
| 
 | ||||
| // contextKeys are used to identify the type of value in the context.
 | ||||
| // Since these are string, it is possible to get a short description of the
 | ||||
| // context key for logging and debugging using key.String().
 | ||||
| 
 | ||||
| type contextKey string | ||||
| 
 | ||||
| func (c contextKey) String() string { | ||||
| 	return "auth " + string(c) | ||||
| } | ||||
| 
 | ||||
| var ( | ||||
| 	// ContextOAuth2 takes an oauth2.TokenSource as authentication for the request.
 | ||||
| 	ContextOAuth2 = contextKey("token") | ||||
| 
 | ||||
| 	// ContextBasicAuth takes BasicAuth as authentication for the request.
 | ||||
| 	ContextBasicAuth = contextKey("basic") | ||||
| 
 | ||||
| 	// ContextAccessToken takes a string oauth2 access token as authentication for the request.
 | ||||
| 	ContextAccessToken = contextKey("accesstoken") | ||||
| 
 | ||||
| 	// ContextAPIKeys takes a string apikey as authentication for the request
 | ||||
| 	ContextAPIKeys = contextKey("apiKeys") | ||||
| 
 | ||||
| 	// ContextHttpSignatureAuth takes HttpSignatureAuth as authentication for the request.
 | ||||
| 	ContextHttpSignatureAuth = contextKey("httpsignature") | ||||
| 
 | ||||
| 	// ContextServerIndex uses a server configuration from the index.
 | ||||
| 	ContextServerIndex = contextKey("serverIndex") | ||||
| 
 | ||||
| 	// ContextOperationServerIndices uses a server configuration from the index mapping.
 | ||||
| 	ContextOperationServerIndices = contextKey("serverOperationIndices") | ||||
| 
 | ||||
| 	// ContextServerVariables overrides a server configuration variables.
 | ||||
| 	ContextServerVariables = contextKey("serverVariables") | ||||
| 
 | ||||
| 	// ContextOperationServerVariables overrides a server configuration variables using operation specific values.
 | ||||
| 	ContextOperationServerVariables = contextKey("serverOperationVariables") | ||||
| ) | ||||
| 
 | ||||
| // BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth
 | ||||
| type BasicAuth struct { | ||||
| 	UserName string `json:"userName,omitempty"` | ||||
| 	Password string `json:"password,omitempty"` | ||||
| } | ||||
| 
 | ||||
| // APIKey provides API key based authentication to a request passed via context using ContextAPIKey
 | ||||
| type APIKey struct { | ||||
| 	Key    string | ||||
| 	Prefix string | ||||
| } | ||||
| 
 | ||||
| // ServerVariable stores the information about a server variable
 | ||||
| type ServerVariable struct { | ||||
| 	Description  string | ||||
| 	DefaultValue string | ||||
| 	EnumValues   []string | ||||
| } | ||||
| 
 | ||||
| // ServerConfiguration stores the information about a server
 | ||||
| type ServerConfiguration struct { | ||||
| 	URL string | ||||
| 	Description string | ||||
| 	Variables map[string]ServerVariable | ||||
| } | ||||
| 
 | ||||
| // ServerConfigurations stores multiple ServerConfiguration items
 | ||||
| type ServerConfigurations []ServerConfiguration | ||||
| 
 | ||||
| // Configuration stores the configuration of the API client
 | ||||
| type Configuration struct { | ||||
| 	Host             string            	`json:"host,omitempty"` | ||||
| 	Scheme           string            	`json:"scheme,omitempty"` | ||||
| 	DefaultHeader    map[string]string 	`json:"defaultHeader,omitempty"` | ||||
| 	DefaultQueryParams url.Values  		`json:"defaultQueryParams,omitempty"` | ||||
| 	UserAgent        string            	`json:"userAgent,omitempty"` | ||||
| 	Debug            bool              	`json:"debug,omitempty"` | ||||
| 	Servers          ServerConfigurations | ||||
| 	OperationServers map[string]ServerConfigurations | ||||
| 	HTTPClient       *http.Client | ||||
|     Username      string            	`json:"username,omitempty"` | ||||
|     Password      string            	`json:"password,omitempty"` | ||||
|     Token         string            	`json:"token,omitempty"` | ||||
|     MaxRetries      int             	`json:"maxRetries,omitempty"` | ||||
|     WaitTime        time.Duration   	`json:"waitTime,omitempty"` | ||||
|     MaxWaitTime     time.Duration   	`json:"maxWaitTime,omitempty"` | ||||
| } | ||||
| 
 | ||||
| // NewConfiguration returns a new Configuration object
 | ||||
| func NewConfiguration(username string, password string, token string) *Configuration { | ||||
| 	cfg := &Configuration{ | ||||
| 		DefaultHeader:    make(map[string]string), | ||||
| 		DefaultQueryParams: url.Values{}, | ||||
| 		UserAgent:        "ionos-cloud-sdk-go/v5", | ||||
| 		Debug:            false, | ||||
| 		Username:      username, | ||||
|         Password:      password, | ||||
|         Token:         token, | ||||
|         MaxRetries:    defaultMaxRetries, | ||||
|         MaxWaitTime:   defaultMaxWaitTime, | ||||
|         WaitTime:      defaultWaitTime, | ||||
| 		Servers:          ServerConfigurations{ | ||||
| 			{ | ||||
| 				URL: "https://api.ionos.com/cloudapi/v5", | ||||
| 				Description: "No description provided", | ||||
| 			}, | ||||
| 		}, | ||||
| 		OperationServers: map[string]ServerConfigurations{ | ||||
| 		}, | ||||
| 	} | ||||
| 	return cfg | ||||
| } | ||||
| 
 | ||||
| func NewConfigurationFromEnv() *Configuration { | ||||
|    return NewConfiguration(os.Getenv(IonosUsernameEnvVar), os.Getenv(IonosPasswordEnvVar), os.Getenv(IonosTokenEnvVar)) | ||||
| } | ||||
| 
 | ||||
| // AddDefaultHeader adds a new HTTP header to the default header in the request
 | ||||
| func (c *Configuration) AddDefaultHeader(key string, value string) { | ||||
| 	c.DefaultHeader[key] = value | ||||
| } | ||||
| 
 | ||||
| func (c *Configuration) AddDefaultQueryParam(key string, value string) { | ||||
|    if _, ok := c.DefaultQueryParams[key]; ok { | ||||
|        c.DefaultQueryParams[key] = append(c.DefaultQueryParams[key], value) | ||||
|    } else { | ||||
|        c.DefaultQueryParams[key] = []string{value} | ||||
|    } | ||||
| } | ||||
| 
 | ||||
| // URL formats template on a index using given variables
 | ||||
| func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) { | ||||
| 	if index < 0 || len(sc) <= index { | ||||
| 		return "", fmt.Errorf("Index %v out of range %v", index, len(sc)-1) | ||||
| 	} | ||||
| 	server := sc[index] | ||||
| 	url := server.URL | ||||
| 
 | ||||
| 	// go through variables and replace placeholders
 | ||||
| 	for name, variable := range server.Variables { | ||||
| 		if value, ok := variables[name]; ok { | ||||
| 			found := bool(len(variable.EnumValues) == 0) | ||||
| 			for _, enumValue := range variable.EnumValues { | ||||
| 				if value == enumValue { | ||||
| 					found = true | ||||
| 				} | ||||
| 			} | ||||
| 			if !found { | ||||
| 				return "", fmt.Errorf("The variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues) | ||||
| 			} | ||||
| 			url = strings.Replace(url, "{"+name+"}", value, -1) | ||||
| 		} else { | ||||
| 			url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1) | ||||
| 		} | ||||
| 	} | ||||
| 	return url, nil | ||||
| } | ||||
| 
 | ||||
| // ServerURL returns URL based on server settings
 | ||||
| func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) { | ||||
| 	return c.Servers.URL(index, variables) | ||||
| } | ||||
| 
 | ||||
| func getServerIndex(ctx context.Context) (int, error) { | ||||
| 	si := ctx.Value(ContextServerIndex) | ||||
| 	if si != nil { | ||||
| 		if index, ok := si.(int); ok { | ||||
| 			return index, nil | ||||
| 		} | ||||
| 		return 0, reportError("Invalid type %T should be int", si) | ||||
| 	} | ||||
| 	return 0, nil | ||||
| } | ||||
| 
 | ||||
| func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) { | ||||
| 	osi := ctx.Value(ContextOperationServerIndices) | ||||
| 	if osi != nil { | ||||
| 		if operationIndices, ok := osi.(map[string]int); !ok { | ||||
| 			return 0, reportError("Invalid type %T should be map[string]int", osi) | ||||
| 		} else { | ||||
| 			index, ok := operationIndices[endpoint] | ||||
| 			if ok { | ||||
| 				return index, nil | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| 	return getServerIndex(ctx) | ||||
| } | ||||
| 
 | ||||
| func getServerVariables(ctx context.Context) (map[string]string, error) { | ||||
| 	sv := ctx.Value(ContextServerVariables) | ||||
| 	if sv != nil { | ||||
| 		if variables, ok := sv.(map[string]string); ok { | ||||
| 			return variables, nil | ||||
| 		} | ||||
| 		return nil, reportError("ctx value of ContextServerVariables has invalid type %T should be map[string]string", sv) | ||||
| 	} | ||||
| 	return nil, nil | ||||
| } | ||||
| 
 | ||||
| func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) { | ||||
| 	osv := ctx.Value(ContextOperationServerVariables) | ||||
| 	if osv != nil { | ||||
| 		if operationVariables, ok := osv.(map[string]map[string]string); !ok { | ||||
| 			return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv) | ||||
| 		} else { | ||||
| 			variables, ok := operationVariables[endpoint] | ||||
| 			if ok { | ||||
| 				return variables, nil | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| 	return getServerVariables(ctx) | ||||
| } | ||||
| 
 | ||||
| // ServerURLWithContext returns a new server URL given an endpoint
 | ||||
| func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) { | ||||
| 	sc, ok := c.OperationServers[endpoint] | ||||
| 	if !ok { | ||||
| 		sc = c.Servers | ||||
| 	} | ||||
| 
 | ||||
| 	if ctx == nil { | ||||
| 		return sc.URL(0, nil) | ||||
| 	} | ||||
| 
 | ||||
| 	index, err := getServerOperationIndex(ctx, endpoint) | ||||
| 	if err != nil { | ||||
| 		return "", err | ||||
| 	} | ||||
| 
 | ||||
| 	variables, err := getServerOperationVariables(ctx, endpoint) | ||||
| 	if err != nil { | ||||
| 		return "", err | ||||
| 	} | ||||
| 
 | ||||
| 	return sc.URL(index, variables) | ||||
| } | ||||
|  | @ -0,0 +1,235 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // AttachedVolumes struct for AttachedVolumes
 | ||||
| type AttachedVolumes struct { | ||||
| 	// The resource's unique identifier
 | ||||
| 	Id *string `json:"id,omitempty"` | ||||
| 	// The type of object that has been created
 | ||||
| 	Type *Type `json:"type,omitempty"` | ||||
| 	// URL to the object representation (absolute path)
 | ||||
| 	Href *string `json:"href,omitempty"` | ||||
| 	// Array of items in that collection
 | ||||
| 	Items *[]Volume `json:"items,omitempty"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetId returns the Id field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *AttachedVolumes) GetId() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Id | ||||
| } | ||||
| 
 | ||||
| // GetIdOk returns a tuple with the Id field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *AttachedVolumes) GetIdOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Id, true | ||||
| } | ||||
| 
 | ||||
| // SetId sets field value
 | ||||
| func (o *AttachedVolumes) SetId(v string) { | ||||
| 	o.Id = &v | ||||
| } | ||||
| 
 | ||||
| // HasId returns a boolean if a field has been set.
 | ||||
| func (o *AttachedVolumes) HasId() bool { | ||||
| 	if o != nil && o.Id != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetType returns the Type field value
 | ||||
| // If the value is explicit nil, the zero value for Type will be returned
 | ||||
| func (o *AttachedVolumes) GetType() *Type { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Type | ||||
| } | ||||
| 
 | ||||
| // GetTypeOk returns a tuple with the Type field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *AttachedVolumes) GetTypeOk() (*Type, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Type, true | ||||
| } | ||||
| 
 | ||||
| // SetType sets field value
 | ||||
| func (o *AttachedVolumes) SetType(v Type) { | ||||
| 	o.Type = &v | ||||
| } | ||||
| 
 | ||||
| // HasType returns a boolean if a field has been set.
 | ||||
| func (o *AttachedVolumes) HasType() bool { | ||||
| 	if o != nil && o.Type != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetHref returns the Href field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *AttachedVolumes) GetHref() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Href | ||||
| } | ||||
| 
 | ||||
| // GetHrefOk returns a tuple with the Href field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *AttachedVolumes) GetHrefOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Href, true | ||||
| } | ||||
| 
 | ||||
| // SetHref sets field value
 | ||||
| func (o *AttachedVolumes) SetHref(v string) { | ||||
| 	o.Href = &v | ||||
| } | ||||
| 
 | ||||
| // HasHref returns a boolean if a field has been set.
 | ||||
| func (o *AttachedVolumes) HasHref() bool { | ||||
| 	if o != nil && o.Href != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetItems returns the Items field value
 | ||||
| // If the value is explicit nil, the zero value for []Volume will be returned
 | ||||
| func (o *AttachedVolumes) GetItems() *[]Volume { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Items | ||||
| } | ||||
| 
 | ||||
| // GetItemsOk returns a tuple with the Items field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *AttachedVolumes) GetItemsOk() (*[]Volume, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Items, true | ||||
| } | ||||
| 
 | ||||
| // SetItems sets field value
 | ||||
| func (o *AttachedVolumes) SetItems(v []Volume) { | ||||
| 	o.Items = &v | ||||
| } | ||||
| 
 | ||||
| // HasItems returns a boolean if a field has been set.
 | ||||
| func (o *AttachedVolumes) HasItems() bool { | ||||
| 	if o != nil && o.Items != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o AttachedVolumes) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.Id != nil { | ||||
| 		toSerialize["id"] = o.Id | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Type != nil { | ||||
| 		toSerialize["type"] = o.Type | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Href != nil { | ||||
| 		toSerialize["href"] = o.Href | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Items != nil { | ||||
| 		toSerialize["items"] = o.Items | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableAttachedVolumes struct { | ||||
| 	value *AttachedVolumes | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableAttachedVolumes) Get() *AttachedVolumes { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableAttachedVolumes) Set(val *AttachedVolumes) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableAttachedVolumes) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableAttachedVolumes) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableAttachedVolumes(val *AttachedVolumes) *NullableAttachedVolumes { | ||||
| 	return &NullableAttachedVolumes{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableAttachedVolumes) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableAttachedVolumes) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,276 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // BackupUnit struct for BackupUnit
 | ||||
| type BackupUnit struct { | ||||
| 	// The resource's unique identifier
 | ||||
| 	Id *string `json:"id,omitempty"` | ||||
| 	// The type of object that has been created
 | ||||
| 	Type *string `json:"type,omitempty"` | ||||
| 	// URL to the object representation (absolute path)
 | ||||
| 	Href *string `json:"href,omitempty"` | ||||
| 	Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` | ||||
| 	Properties *BackupUnitProperties `json:"properties"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetId returns the Id field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *BackupUnit) GetId() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Id | ||||
| } | ||||
| 
 | ||||
| // GetIdOk returns a tuple with the Id field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *BackupUnit) GetIdOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Id, true | ||||
| } | ||||
| 
 | ||||
| // SetId sets field value
 | ||||
| func (o *BackupUnit) SetId(v string) { | ||||
| 	o.Id = &v | ||||
| } | ||||
| 
 | ||||
| // HasId returns a boolean if a field has been set.
 | ||||
| func (o *BackupUnit) HasId() bool { | ||||
| 	if o != nil && o.Id != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetType returns the Type field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *BackupUnit) GetType() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Type | ||||
| } | ||||
| 
 | ||||
| // GetTypeOk returns a tuple with the Type field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *BackupUnit) GetTypeOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Type, true | ||||
| } | ||||
| 
 | ||||
| // SetType sets field value
 | ||||
| func (o *BackupUnit) SetType(v string) { | ||||
| 	o.Type = &v | ||||
| } | ||||
| 
 | ||||
| // HasType returns a boolean if a field has been set.
 | ||||
| func (o *BackupUnit) HasType() bool { | ||||
| 	if o != nil && o.Type != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetHref returns the Href field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *BackupUnit) GetHref() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Href | ||||
| } | ||||
| 
 | ||||
| // GetHrefOk returns a tuple with the Href field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *BackupUnit) GetHrefOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Href, true | ||||
| } | ||||
| 
 | ||||
| // SetHref sets field value
 | ||||
| func (o *BackupUnit) SetHref(v string) { | ||||
| 	o.Href = &v | ||||
| } | ||||
| 
 | ||||
| // HasHref returns a boolean if a field has been set.
 | ||||
| func (o *BackupUnit) HasHref() bool { | ||||
| 	if o != nil && o.Href != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetMetadata returns the Metadata field value
 | ||||
| // If the value is explicit nil, the zero value for DatacenterElementMetadata will be returned
 | ||||
| func (o *BackupUnit) GetMetadata() *DatacenterElementMetadata { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Metadata | ||||
| } | ||||
| 
 | ||||
| // GetMetadataOk returns a tuple with the Metadata field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *BackupUnit) GetMetadataOk() (*DatacenterElementMetadata, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Metadata, true | ||||
| } | ||||
| 
 | ||||
| // SetMetadata sets field value
 | ||||
| func (o *BackupUnit) SetMetadata(v DatacenterElementMetadata) { | ||||
| 	o.Metadata = &v | ||||
| } | ||||
| 
 | ||||
| // HasMetadata returns a boolean if a field has been set.
 | ||||
| func (o *BackupUnit) HasMetadata() bool { | ||||
| 	if o != nil && o.Metadata != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetProperties returns the Properties field value
 | ||||
| // If the value is explicit nil, the zero value for BackupUnitProperties will be returned
 | ||||
| func (o *BackupUnit) GetProperties() *BackupUnitProperties { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Properties | ||||
| } | ||||
| 
 | ||||
| // GetPropertiesOk returns a tuple with the Properties field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *BackupUnit) GetPropertiesOk() (*BackupUnitProperties, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Properties, true | ||||
| } | ||||
| 
 | ||||
| // SetProperties sets field value
 | ||||
| func (o *BackupUnit) SetProperties(v BackupUnitProperties) { | ||||
| 	o.Properties = &v | ||||
| } | ||||
| 
 | ||||
| // HasProperties returns a boolean if a field has been set.
 | ||||
| func (o *BackupUnit) HasProperties() bool { | ||||
| 	if o != nil && o.Properties != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o BackupUnit) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.Id != nil { | ||||
| 		toSerialize["id"] = o.Id | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Type != nil { | ||||
| 		toSerialize["type"] = o.Type | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Href != nil { | ||||
| 		toSerialize["href"] = o.Href | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Metadata != nil { | ||||
| 		toSerialize["metadata"] = o.Metadata | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Properties != nil { | ||||
| 		toSerialize["properties"] = o.Properties | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableBackupUnit struct { | ||||
| 	value *BackupUnit | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableBackupUnit) Get() *BackupUnit { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableBackupUnit) Set(val *BackupUnit) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableBackupUnit) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableBackupUnit) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableBackupUnit(val *BackupUnit) *NullableBackupUnit { | ||||
| 	return &NullableBackupUnit{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableBackupUnit) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableBackupUnit) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,192 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // BackupUnitProperties struct for BackupUnitProperties
 | ||||
| type BackupUnitProperties struct { | ||||
| 	// A name of that resource (only alphanumeric characters are acceptable)
 | ||||
| 	Name *string `json:"name"` | ||||
| 	// the password associated to that resource
 | ||||
| 	Password *string `json:"password,omitempty"` | ||||
| 	// The email associated with the backup unit. Bear in mind that this email does not be the same email as of the user.
 | ||||
| 	Email *string `json:"email,omitempty"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetName returns the Name field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *BackupUnitProperties) GetName() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Name | ||||
| } | ||||
| 
 | ||||
| // GetNameOk returns a tuple with the Name field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *BackupUnitProperties) GetNameOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Name, true | ||||
| } | ||||
| 
 | ||||
| // SetName sets field value
 | ||||
| func (o *BackupUnitProperties) SetName(v string) { | ||||
| 	o.Name = &v | ||||
| } | ||||
| 
 | ||||
| // HasName returns a boolean if a field has been set.
 | ||||
| func (o *BackupUnitProperties) HasName() bool { | ||||
| 	if o != nil && o.Name != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetPassword returns the Password field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *BackupUnitProperties) GetPassword() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Password | ||||
| } | ||||
| 
 | ||||
| // GetPasswordOk returns a tuple with the Password field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *BackupUnitProperties) GetPasswordOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Password, true | ||||
| } | ||||
| 
 | ||||
| // SetPassword sets field value
 | ||||
| func (o *BackupUnitProperties) SetPassword(v string) { | ||||
| 	o.Password = &v | ||||
| } | ||||
| 
 | ||||
| // HasPassword returns a boolean if a field has been set.
 | ||||
| func (o *BackupUnitProperties) HasPassword() bool { | ||||
| 	if o != nil && o.Password != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetEmail returns the Email field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *BackupUnitProperties) GetEmail() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Email | ||||
| } | ||||
| 
 | ||||
| // GetEmailOk returns a tuple with the Email field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *BackupUnitProperties) GetEmailOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Email, true | ||||
| } | ||||
| 
 | ||||
| // SetEmail sets field value
 | ||||
| func (o *BackupUnitProperties) SetEmail(v string) { | ||||
| 	o.Email = &v | ||||
| } | ||||
| 
 | ||||
| // HasEmail returns a boolean if a field has been set.
 | ||||
| func (o *BackupUnitProperties) HasEmail() bool { | ||||
| 	if o != nil && o.Email != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o BackupUnitProperties) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.Name != nil { | ||||
| 		toSerialize["name"] = o.Name | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Password != nil { | ||||
| 		toSerialize["password"] = o.Password | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Email != nil { | ||||
| 		toSerialize["email"] = o.Email | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableBackupUnitProperties struct { | ||||
| 	value *BackupUnitProperties | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableBackupUnitProperties) Get() *BackupUnitProperties { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableBackupUnitProperties) Set(val *BackupUnitProperties) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableBackupUnitProperties) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableBackupUnitProperties) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableBackupUnitProperties(val *BackupUnitProperties) *NullableBackupUnitProperties { | ||||
| 	return &NullableBackupUnitProperties{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableBackupUnitProperties) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableBackupUnitProperties) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,106 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // BackupUnitSSO struct for BackupUnitSSO
 | ||||
| type BackupUnitSSO struct { | ||||
| 	// The backup unit single sign on url
 | ||||
| 	SsoUrl *string `json:"ssoUrl,omitempty"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetSsoUrl returns the SsoUrl field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *BackupUnitSSO) GetSsoUrl() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.SsoUrl | ||||
| } | ||||
| 
 | ||||
| // GetSsoUrlOk returns a tuple with the SsoUrl field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *BackupUnitSSO) GetSsoUrlOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.SsoUrl, true | ||||
| } | ||||
| 
 | ||||
| // SetSsoUrl sets field value
 | ||||
| func (o *BackupUnitSSO) SetSsoUrl(v string) { | ||||
| 	o.SsoUrl = &v | ||||
| } | ||||
| 
 | ||||
| // HasSsoUrl returns a boolean if a field has been set.
 | ||||
| func (o *BackupUnitSSO) HasSsoUrl() bool { | ||||
| 	if o != nil && o.SsoUrl != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o BackupUnitSSO) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.SsoUrl != nil { | ||||
| 		toSerialize["ssoUrl"] = o.SsoUrl | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableBackupUnitSSO struct { | ||||
| 	value *BackupUnitSSO | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableBackupUnitSSO) Get() *BackupUnitSSO { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableBackupUnitSSO) Set(val *BackupUnitSSO) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableBackupUnitSSO) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableBackupUnitSSO) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableBackupUnitSSO(val *BackupUnitSSO) *NullableBackupUnitSSO { | ||||
| 	return &NullableBackupUnitSSO{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableBackupUnitSSO) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableBackupUnitSSO) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,235 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // BackupUnits struct for BackupUnits
 | ||||
| type BackupUnits struct { | ||||
| 	// The resource's unique identifier
 | ||||
| 	Id *string `json:"id,omitempty"` | ||||
| 	// The type of object that has been created
 | ||||
| 	Type *string `json:"type,omitempty"` | ||||
| 	// URL to the object representation (absolute path)
 | ||||
| 	Href *string `json:"href,omitempty"` | ||||
| 	// Array of items in that collection
 | ||||
| 	Items *[]BackupUnit `json:"items,omitempty"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetId returns the Id field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *BackupUnits) GetId() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Id | ||||
| } | ||||
| 
 | ||||
| // GetIdOk returns a tuple with the Id field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *BackupUnits) GetIdOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Id, true | ||||
| } | ||||
| 
 | ||||
| // SetId sets field value
 | ||||
| func (o *BackupUnits) SetId(v string) { | ||||
| 	o.Id = &v | ||||
| } | ||||
| 
 | ||||
| // HasId returns a boolean if a field has been set.
 | ||||
| func (o *BackupUnits) HasId() bool { | ||||
| 	if o != nil && o.Id != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetType returns the Type field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *BackupUnits) GetType() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Type | ||||
| } | ||||
| 
 | ||||
| // GetTypeOk returns a tuple with the Type field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *BackupUnits) GetTypeOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Type, true | ||||
| } | ||||
| 
 | ||||
| // SetType sets field value
 | ||||
| func (o *BackupUnits) SetType(v string) { | ||||
| 	o.Type = &v | ||||
| } | ||||
| 
 | ||||
| // HasType returns a boolean if a field has been set.
 | ||||
| func (o *BackupUnits) HasType() bool { | ||||
| 	if o != nil && o.Type != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetHref returns the Href field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *BackupUnits) GetHref() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Href | ||||
| } | ||||
| 
 | ||||
| // GetHrefOk returns a tuple with the Href field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *BackupUnits) GetHrefOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Href, true | ||||
| } | ||||
| 
 | ||||
| // SetHref sets field value
 | ||||
| func (o *BackupUnits) SetHref(v string) { | ||||
| 	o.Href = &v | ||||
| } | ||||
| 
 | ||||
| // HasHref returns a boolean if a field has been set.
 | ||||
| func (o *BackupUnits) HasHref() bool { | ||||
| 	if o != nil && o.Href != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetItems returns the Items field value
 | ||||
| // If the value is explicit nil, the zero value for []BackupUnit will be returned
 | ||||
| func (o *BackupUnits) GetItems() *[]BackupUnit { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Items | ||||
| } | ||||
| 
 | ||||
| // GetItemsOk returns a tuple with the Items field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *BackupUnits) GetItemsOk() (*[]BackupUnit, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Items, true | ||||
| } | ||||
| 
 | ||||
| // SetItems sets field value
 | ||||
| func (o *BackupUnits) SetItems(v []BackupUnit) { | ||||
| 	o.Items = &v | ||||
| } | ||||
| 
 | ||||
| // HasItems returns a boolean if a field has been set.
 | ||||
| func (o *BackupUnits) HasItems() bool { | ||||
| 	if o != nil && o.Items != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o BackupUnits) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.Id != nil { | ||||
| 		toSerialize["id"] = o.Id | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Type != nil { | ||||
| 		toSerialize["type"] = o.Type | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Href != nil { | ||||
| 		toSerialize["href"] = o.Href | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Items != nil { | ||||
| 		toSerialize["items"] = o.Items | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableBackupUnits struct { | ||||
| 	value *BackupUnits | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableBackupUnits) Get() *BackupUnits { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableBackupUnits) Set(val *BackupUnits) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableBackupUnits) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableBackupUnits) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableBackupUnits(val *BackupUnits) *NullableBackupUnits { | ||||
| 	return &NullableBackupUnits{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableBackupUnits) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableBackupUnits) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,235 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // BalancedNics struct for BalancedNics
 | ||||
| type BalancedNics struct { | ||||
| 	// The resource's unique identifier
 | ||||
| 	Id *string `json:"id,omitempty"` | ||||
| 	// The type of object that has been created
 | ||||
| 	Type *Type `json:"type,omitempty"` | ||||
| 	// URL to the object representation (absolute path)
 | ||||
| 	Href *string `json:"href,omitempty"` | ||||
| 	// Array of items in that collection
 | ||||
| 	Items *[]Nic `json:"items,omitempty"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetId returns the Id field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *BalancedNics) GetId() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Id | ||||
| } | ||||
| 
 | ||||
| // GetIdOk returns a tuple with the Id field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *BalancedNics) GetIdOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Id, true | ||||
| } | ||||
| 
 | ||||
| // SetId sets field value
 | ||||
| func (o *BalancedNics) SetId(v string) { | ||||
| 	o.Id = &v | ||||
| } | ||||
| 
 | ||||
| // HasId returns a boolean if a field has been set.
 | ||||
| func (o *BalancedNics) HasId() bool { | ||||
| 	if o != nil && o.Id != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetType returns the Type field value
 | ||||
| // If the value is explicit nil, the zero value for Type will be returned
 | ||||
| func (o *BalancedNics) GetType() *Type { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Type | ||||
| } | ||||
| 
 | ||||
| // GetTypeOk returns a tuple with the Type field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *BalancedNics) GetTypeOk() (*Type, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Type, true | ||||
| } | ||||
| 
 | ||||
| // SetType sets field value
 | ||||
| func (o *BalancedNics) SetType(v Type) { | ||||
| 	o.Type = &v | ||||
| } | ||||
| 
 | ||||
| // HasType returns a boolean if a field has been set.
 | ||||
| func (o *BalancedNics) HasType() bool { | ||||
| 	if o != nil && o.Type != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetHref returns the Href field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *BalancedNics) GetHref() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Href | ||||
| } | ||||
| 
 | ||||
| // GetHrefOk returns a tuple with the Href field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *BalancedNics) GetHrefOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Href, true | ||||
| } | ||||
| 
 | ||||
| // SetHref sets field value
 | ||||
| func (o *BalancedNics) SetHref(v string) { | ||||
| 	o.Href = &v | ||||
| } | ||||
| 
 | ||||
| // HasHref returns a boolean if a field has been set.
 | ||||
| func (o *BalancedNics) HasHref() bool { | ||||
| 	if o != nil && o.Href != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetItems returns the Items field value
 | ||||
| // If the value is explicit nil, the zero value for []Nic will be returned
 | ||||
| func (o *BalancedNics) GetItems() *[]Nic { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Items | ||||
| } | ||||
| 
 | ||||
| // GetItemsOk returns a tuple with the Items field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *BalancedNics) GetItemsOk() (*[]Nic, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Items, true | ||||
| } | ||||
| 
 | ||||
| // SetItems sets field value
 | ||||
| func (o *BalancedNics) SetItems(v []Nic) { | ||||
| 	o.Items = &v | ||||
| } | ||||
| 
 | ||||
| // HasItems returns a boolean if a field has been set.
 | ||||
| func (o *BalancedNics) HasItems() bool { | ||||
| 	if o != nil && o.Items != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o BalancedNics) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.Id != nil { | ||||
| 		toSerialize["id"] = o.Id | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Type != nil { | ||||
| 		toSerialize["type"] = o.Type | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Href != nil { | ||||
| 		toSerialize["href"] = o.Href | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Items != nil { | ||||
| 		toSerialize["items"] = o.Items | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableBalancedNics struct { | ||||
| 	value *BalancedNics | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableBalancedNics) Get() *BalancedNics { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableBalancedNics) Set(val *BalancedNics) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableBalancedNics) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableBalancedNics) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableBalancedNics(val *BalancedNics) *NullableBalancedNics { | ||||
| 	return &NullableBalancedNics{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableBalancedNics) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableBalancedNics) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,235 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // Cdroms struct for Cdroms
 | ||||
| type Cdroms struct { | ||||
| 	// The resource's unique identifier
 | ||||
| 	Id *string `json:"id,omitempty"` | ||||
| 	// The type of object that has been created
 | ||||
| 	Type *Type `json:"type,omitempty"` | ||||
| 	// URL to the object representation (absolute path)
 | ||||
| 	Href *string `json:"href,omitempty"` | ||||
| 	// Array of items in that collection
 | ||||
| 	Items *[]Image `json:"items,omitempty"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetId returns the Id field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *Cdroms) GetId() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Id | ||||
| } | ||||
| 
 | ||||
| // GetIdOk returns a tuple with the Id field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *Cdroms) GetIdOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Id, true | ||||
| } | ||||
| 
 | ||||
| // SetId sets field value
 | ||||
| func (o *Cdroms) SetId(v string) { | ||||
| 	o.Id = &v | ||||
| } | ||||
| 
 | ||||
| // HasId returns a boolean if a field has been set.
 | ||||
| func (o *Cdroms) HasId() bool { | ||||
| 	if o != nil && o.Id != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetType returns the Type field value
 | ||||
| // If the value is explicit nil, the zero value for Type will be returned
 | ||||
| func (o *Cdroms) GetType() *Type { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Type | ||||
| } | ||||
| 
 | ||||
| // GetTypeOk returns a tuple with the Type field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *Cdroms) GetTypeOk() (*Type, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Type, true | ||||
| } | ||||
| 
 | ||||
| // SetType sets field value
 | ||||
| func (o *Cdroms) SetType(v Type) { | ||||
| 	o.Type = &v | ||||
| } | ||||
| 
 | ||||
| // HasType returns a boolean if a field has been set.
 | ||||
| func (o *Cdroms) HasType() bool { | ||||
| 	if o != nil && o.Type != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetHref returns the Href field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *Cdroms) GetHref() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Href | ||||
| } | ||||
| 
 | ||||
| // GetHrefOk returns a tuple with the Href field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *Cdroms) GetHrefOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Href, true | ||||
| } | ||||
| 
 | ||||
| // SetHref sets field value
 | ||||
| func (o *Cdroms) SetHref(v string) { | ||||
| 	o.Href = &v | ||||
| } | ||||
| 
 | ||||
| // HasHref returns a boolean if a field has been set.
 | ||||
| func (o *Cdroms) HasHref() bool { | ||||
| 	if o != nil && o.Href != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetItems returns the Items field value
 | ||||
| // If the value is explicit nil, the zero value for []Image will be returned
 | ||||
| func (o *Cdroms) GetItems() *[]Image { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Items | ||||
| } | ||||
| 
 | ||||
| // GetItemsOk returns a tuple with the Items field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *Cdroms) GetItemsOk() (*[]Image, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Items, true | ||||
| } | ||||
| 
 | ||||
| // SetItems sets field value
 | ||||
| func (o *Cdroms) SetItems(v []Image) { | ||||
| 	o.Items = &v | ||||
| } | ||||
| 
 | ||||
| // HasItems returns a boolean if a field has been set.
 | ||||
| func (o *Cdroms) HasItems() bool { | ||||
| 	if o != nil && o.Items != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o Cdroms) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.Id != nil { | ||||
| 		toSerialize["id"] = o.Id | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Type != nil { | ||||
| 		toSerialize["type"] = o.Type | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Href != nil { | ||||
| 		toSerialize["href"] = o.Href | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Items != nil { | ||||
| 		toSerialize["items"] = o.Items | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableCdroms struct { | ||||
| 	value *Cdroms | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableCdroms) Get() *Cdroms { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableCdroms) Set(val *Cdroms) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableCdroms) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableCdroms) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableCdroms(val *Cdroms) *NullableCdroms { | ||||
| 	return &NullableCdroms{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableCdroms) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableCdroms) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,189 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // ConnectableDatacenter struct for ConnectableDatacenter
 | ||||
| type ConnectableDatacenter struct { | ||||
| 	Id *string `json:"id,omitempty"` | ||||
| 	Name *string `json:"name,omitempty"` | ||||
| 	Location *string `json:"location,omitempty"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetId returns the Id field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *ConnectableDatacenter) GetId() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Id | ||||
| } | ||||
| 
 | ||||
| // GetIdOk returns a tuple with the Id field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *ConnectableDatacenter) GetIdOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Id, true | ||||
| } | ||||
| 
 | ||||
| // SetId sets field value
 | ||||
| func (o *ConnectableDatacenter) SetId(v string) { | ||||
| 	o.Id = &v | ||||
| } | ||||
| 
 | ||||
| // HasId returns a boolean if a field has been set.
 | ||||
| func (o *ConnectableDatacenter) HasId() bool { | ||||
| 	if o != nil && o.Id != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetName returns the Name field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *ConnectableDatacenter) GetName() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Name | ||||
| } | ||||
| 
 | ||||
| // GetNameOk returns a tuple with the Name field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *ConnectableDatacenter) GetNameOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Name, true | ||||
| } | ||||
| 
 | ||||
| // SetName sets field value
 | ||||
| func (o *ConnectableDatacenter) SetName(v string) { | ||||
| 	o.Name = &v | ||||
| } | ||||
| 
 | ||||
| // HasName returns a boolean if a field has been set.
 | ||||
| func (o *ConnectableDatacenter) HasName() bool { | ||||
| 	if o != nil && o.Name != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetLocation returns the Location field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *ConnectableDatacenter) GetLocation() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Location | ||||
| } | ||||
| 
 | ||||
| // GetLocationOk returns a tuple with the Location field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *ConnectableDatacenter) GetLocationOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Location, true | ||||
| } | ||||
| 
 | ||||
| // SetLocation sets field value
 | ||||
| func (o *ConnectableDatacenter) SetLocation(v string) { | ||||
| 	o.Location = &v | ||||
| } | ||||
| 
 | ||||
| // HasLocation returns a boolean if a field has been set.
 | ||||
| func (o *ConnectableDatacenter) HasLocation() bool { | ||||
| 	if o != nil && o.Location != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o ConnectableDatacenter) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.Id != nil { | ||||
| 		toSerialize["id"] = o.Id | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Name != nil { | ||||
| 		toSerialize["name"] = o.Name | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Location != nil { | ||||
| 		toSerialize["location"] = o.Location | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableConnectableDatacenter struct { | ||||
| 	value *ConnectableDatacenter | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableConnectableDatacenter) Get() *ConnectableDatacenter { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableConnectableDatacenter) Set(val *ConnectableDatacenter) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableConnectableDatacenter) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableConnectableDatacenter) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableConnectableDatacenter(val *ConnectableDatacenter) *NullableConnectableDatacenter { | ||||
| 	return &NullableConnectableDatacenter{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableConnectableDatacenter) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableConnectableDatacenter) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,148 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // Contract struct for Contract
 | ||||
| type Contract struct { | ||||
| 	// The type of the resource
 | ||||
| 	Type *Type `json:"type,omitempty"` | ||||
| 	Properties *ContractProperties `json:"properties"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetType returns the Type field value
 | ||||
| // If the value is explicit nil, the zero value for Type will be returned
 | ||||
| func (o *Contract) GetType() *Type { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Type | ||||
| } | ||||
| 
 | ||||
| // GetTypeOk returns a tuple with the Type field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *Contract) GetTypeOk() (*Type, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Type, true | ||||
| } | ||||
| 
 | ||||
| // SetType sets field value
 | ||||
| func (o *Contract) SetType(v Type) { | ||||
| 	o.Type = &v | ||||
| } | ||||
| 
 | ||||
| // HasType returns a boolean if a field has been set.
 | ||||
| func (o *Contract) HasType() bool { | ||||
| 	if o != nil && o.Type != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetProperties returns the Properties field value
 | ||||
| // If the value is explicit nil, the zero value for ContractProperties will be returned
 | ||||
| func (o *Contract) GetProperties() *ContractProperties { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Properties | ||||
| } | ||||
| 
 | ||||
| // GetPropertiesOk returns a tuple with the Properties field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *Contract) GetPropertiesOk() (*ContractProperties, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Properties, true | ||||
| } | ||||
| 
 | ||||
| // SetProperties sets field value
 | ||||
| func (o *Contract) SetProperties(v ContractProperties) { | ||||
| 	o.Properties = &v | ||||
| } | ||||
| 
 | ||||
| // HasProperties returns a boolean if a field has been set.
 | ||||
| func (o *Contract) HasProperties() bool { | ||||
| 	if o != nil && o.Properties != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o Contract) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.Type != nil { | ||||
| 		toSerialize["type"] = o.Type | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Properties != nil { | ||||
| 		toSerialize["properties"] = o.Properties | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableContract struct { | ||||
| 	value *Contract | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableContract) Get() *Contract { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableContract) Set(val *Contract) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableContract) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableContract) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableContract(val *Contract) *NullableContract { | ||||
| 	return &NullableContract{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableContract) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableContract) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,277 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // ContractProperties struct for ContractProperties
 | ||||
| type ContractProperties struct { | ||||
| 	// contract number
 | ||||
| 	ContractNumber *int64 `json:"contractNumber,omitempty"` | ||||
| 	// owner of the contract
 | ||||
| 	Owner *string `json:"owner,omitempty"` | ||||
| 	// status of the contract
 | ||||
| 	Status *string `json:"status,omitempty"` | ||||
| 	// Registration domain of the contract
 | ||||
| 	RegDomain *string `json:"regDomain,omitempty"` | ||||
| 	ResourceLimits *ResourceLimits `json:"resourceLimits,omitempty"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetContractNumber returns the ContractNumber field value
 | ||||
| // If the value is explicit nil, the zero value for int64 will be returned
 | ||||
| func (o *ContractProperties) GetContractNumber() *int64 { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.ContractNumber | ||||
| } | ||||
| 
 | ||||
| // GetContractNumberOk returns a tuple with the ContractNumber field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *ContractProperties) GetContractNumberOk() (*int64, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.ContractNumber, true | ||||
| } | ||||
| 
 | ||||
| // SetContractNumber sets field value
 | ||||
| func (o *ContractProperties) SetContractNumber(v int64) { | ||||
| 	o.ContractNumber = &v | ||||
| } | ||||
| 
 | ||||
| // HasContractNumber returns a boolean if a field has been set.
 | ||||
| func (o *ContractProperties) HasContractNumber() bool { | ||||
| 	if o != nil && o.ContractNumber != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetOwner returns the Owner field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *ContractProperties) GetOwner() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Owner | ||||
| } | ||||
| 
 | ||||
| // GetOwnerOk returns a tuple with the Owner field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *ContractProperties) GetOwnerOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Owner, true | ||||
| } | ||||
| 
 | ||||
| // SetOwner sets field value
 | ||||
| func (o *ContractProperties) SetOwner(v string) { | ||||
| 	o.Owner = &v | ||||
| } | ||||
| 
 | ||||
| // HasOwner returns a boolean if a field has been set.
 | ||||
| func (o *ContractProperties) HasOwner() bool { | ||||
| 	if o != nil && o.Owner != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetStatus returns the Status field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *ContractProperties) GetStatus() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Status | ||||
| } | ||||
| 
 | ||||
| // GetStatusOk returns a tuple with the Status field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *ContractProperties) GetStatusOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Status, true | ||||
| } | ||||
| 
 | ||||
| // SetStatus sets field value
 | ||||
| func (o *ContractProperties) SetStatus(v string) { | ||||
| 	o.Status = &v | ||||
| } | ||||
| 
 | ||||
| // HasStatus returns a boolean if a field has been set.
 | ||||
| func (o *ContractProperties) HasStatus() bool { | ||||
| 	if o != nil && o.Status != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetRegDomain returns the RegDomain field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *ContractProperties) GetRegDomain() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.RegDomain | ||||
| } | ||||
| 
 | ||||
| // GetRegDomainOk returns a tuple with the RegDomain field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *ContractProperties) GetRegDomainOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.RegDomain, true | ||||
| } | ||||
| 
 | ||||
| // SetRegDomain sets field value
 | ||||
| func (o *ContractProperties) SetRegDomain(v string) { | ||||
| 	o.RegDomain = &v | ||||
| } | ||||
| 
 | ||||
| // HasRegDomain returns a boolean if a field has been set.
 | ||||
| func (o *ContractProperties) HasRegDomain() bool { | ||||
| 	if o != nil && o.RegDomain != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetResourceLimits returns the ResourceLimits field value
 | ||||
| // If the value is explicit nil, the zero value for ResourceLimits will be returned
 | ||||
| func (o *ContractProperties) GetResourceLimits() *ResourceLimits { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.ResourceLimits | ||||
| } | ||||
| 
 | ||||
| // GetResourceLimitsOk returns a tuple with the ResourceLimits field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *ContractProperties) GetResourceLimitsOk() (*ResourceLimits, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.ResourceLimits, true | ||||
| } | ||||
| 
 | ||||
| // SetResourceLimits sets field value
 | ||||
| func (o *ContractProperties) SetResourceLimits(v ResourceLimits) { | ||||
| 	o.ResourceLimits = &v | ||||
| } | ||||
| 
 | ||||
| // HasResourceLimits returns a boolean if a field has been set.
 | ||||
| func (o *ContractProperties) HasResourceLimits() bool { | ||||
| 	if o != nil && o.ResourceLimits != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o ContractProperties) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.ContractNumber != nil { | ||||
| 		toSerialize["contractNumber"] = o.ContractNumber | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Owner != nil { | ||||
| 		toSerialize["owner"] = o.Owner | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Status != nil { | ||||
| 		toSerialize["status"] = o.Status | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.RegDomain != nil { | ||||
| 		toSerialize["regDomain"] = o.RegDomain | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.ResourceLimits != nil { | ||||
| 		toSerialize["resourceLimits"] = o.ResourceLimits | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableContractProperties struct { | ||||
| 	value *ContractProperties | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableContractProperties) Get() *ContractProperties { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableContractProperties) Set(val *ContractProperties) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableContractProperties) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableContractProperties) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableContractProperties(val *ContractProperties) *NullableContractProperties { | ||||
| 	return &NullableContractProperties{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableContractProperties) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableContractProperties) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,318 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // Datacenter struct for Datacenter
 | ||||
| type Datacenter struct { | ||||
| 	// The resource's unique identifier
 | ||||
| 	Id *string `json:"id,omitempty"` | ||||
| 	// The type of object that has been created
 | ||||
| 	Type *Type `json:"type,omitempty"` | ||||
| 	// URL to the object representation (absolute path)
 | ||||
| 	Href *string `json:"href,omitempty"` | ||||
| 	Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` | ||||
| 	Properties *DatacenterProperties `json:"properties"` | ||||
| 	Entities *DatacenterEntities `json:"entities,omitempty"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetId returns the Id field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *Datacenter) GetId() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Id | ||||
| } | ||||
| 
 | ||||
| // GetIdOk returns a tuple with the Id field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *Datacenter) GetIdOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Id, true | ||||
| } | ||||
| 
 | ||||
| // SetId sets field value
 | ||||
| func (o *Datacenter) SetId(v string) { | ||||
| 	o.Id = &v | ||||
| } | ||||
| 
 | ||||
| // HasId returns a boolean if a field has been set.
 | ||||
| func (o *Datacenter) HasId() bool { | ||||
| 	if o != nil && o.Id != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetType returns the Type field value
 | ||||
| // If the value is explicit nil, the zero value for Type will be returned
 | ||||
| func (o *Datacenter) GetType() *Type { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Type | ||||
| } | ||||
| 
 | ||||
| // GetTypeOk returns a tuple with the Type field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *Datacenter) GetTypeOk() (*Type, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Type, true | ||||
| } | ||||
| 
 | ||||
| // SetType sets field value
 | ||||
| func (o *Datacenter) SetType(v Type) { | ||||
| 	o.Type = &v | ||||
| } | ||||
| 
 | ||||
| // HasType returns a boolean if a field has been set.
 | ||||
| func (o *Datacenter) HasType() bool { | ||||
| 	if o != nil && o.Type != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetHref returns the Href field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *Datacenter) GetHref() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Href | ||||
| } | ||||
| 
 | ||||
| // GetHrefOk returns a tuple with the Href field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *Datacenter) GetHrefOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Href, true | ||||
| } | ||||
| 
 | ||||
| // SetHref sets field value
 | ||||
| func (o *Datacenter) SetHref(v string) { | ||||
| 	o.Href = &v | ||||
| } | ||||
| 
 | ||||
| // HasHref returns a boolean if a field has been set.
 | ||||
| func (o *Datacenter) HasHref() bool { | ||||
| 	if o != nil && o.Href != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetMetadata returns the Metadata field value
 | ||||
| // If the value is explicit nil, the zero value for DatacenterElementMetadata will be returned
 | ||||
| func (o *Datacenter) GetMetadata() *DatacenterElementMetadata { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Metadata | ||||
| } | ||||
| 
 | ||||
| // GetMetadataOk returns a tuple with the Metadata field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *Datacenter) GetMetadataOk() (*DatacenterElementMetadata, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Metadata, true | ||||
| } | ||||
| 
 | ||||
| // SetMetadata sets field value
 | ||||
| func (o *Datacenter) SetMetadata(v DatacenterElementMetadata) { | ||||
| 	o.Metadata = &v | ||||
| } | ||||
| 
 | ||||
| // HasMetadata returns a boolean if a field has been set.
 | ||||
| func (o *Datacenter) HasMetadata() bool { | ||||
| 	if o != nil && o.Metadata != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetProperties returns the Properties field value
 | ||||
| // If the value is explicit nil, the zero value for DatacenterProperties will be returned
 | ||||
| func (o *Datacenter) GetProperties() *DatacenterProperties { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Properties | ||||
| } | ||||
| 
 | ||||
| // GetPropertiesOk returns a tuple with the Properties field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *Datacenter) GetPropertiesOk() (*DatacenterProperties, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Properties, true | ||||
| } | ||||
| 
 | ||||
| // SetProperties sets field value
 | ||||
| func (o *Datacenter) SetProperties(v DatacenterProperties) { | ||||
| 	o.Properties = &v | ||||
| } | ||||
| 
 | ||||
| // HasProperties returns a boolean if a field has been set.
 | ||||
| func (o *Datacenter) HasProperties() bool { | ||||
| 	if o != nil && o.Properties != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetEntities returns the Entities field value
 | ||||
| // If the value is explicit nil, the zero value for DatacenterEntities will be returned
 | ||||
| func (o *Datacenter) GetEntities() *DatacenterEntities { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Entities | ||||
| } | ||||
| 
 | ||||
| // GetEntitiesOk returns a tuple with the Entities field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *Datacenter) GetEntitiesOk() (*DatacenterEntities, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Entities, true | ||||
| } | ||||
| 
 | ||||
| // SetEntities sets field value
 | ||||
| func (o *Datacenter) SetEntities(v DatacenterEntities) { | ||||
| 	o.Entities = &v | ||||
| } | ||||
| 
 | ||||
| // HasEntities returns a boolean if a field has been set.
 | ||||
| func (o *Datacenter) HasEntities() bool { | ||||
| 	if o != nil && o.Entities != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o Datacenter) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.Id != nil { | ||||
| 		toSerialize["id"] = o.Id | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Type != nil { | ||||
| 		toSerialize["type"] = o.Type | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Href != nil { | ||||
| 		toSerialize["href"] = o.Href | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Metadata != nil { | ||||
| 		toSerialize["metadata"] = o.Metadata | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Properties != nil { | ||||
| 		toSerialize["properties"] = o.Properties | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Entities != nil { | ||||
| 		toSerialize["entities"] = o.Entities | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableDatacenter struct { | ||||
| 	value *Datacenter | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableDatacenter) Get() *Datacenter { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableDatacenter) Set(val *Datacenter) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableDatacenter) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableDatacenter) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableDatacenter(val *Datacenter) *NullableDatacenter { | ||||
| 	return &NullableDatacenter{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableDatacenter) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableDatacenter) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,408 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| 	"time" | ||||
| ) | ||||
| 
 | ||||
| // DatacenterElementMetadata struct for DatacenterElementMetadata
 | ||||
| type DatacenterElementMetadata struct { | ||||
| 	// Resource's Entity Tag as defined in http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11 . Entity Tag is also added as an 'ETag response header to requests which don't use 'depth' parameter. 
 | ||||
| 	Etag *string `json:"etag,omitempty"` | ||||
| 	// The last time the resource was created
 | ||||
| 	CreatedDate *time.Time `json:"createdDate,omitempty"` | ||||
| 	// The user who created the resource.
 | ||||
| 	CreatedBy *string `json:"createdBy,omitempty"` | ||||
| 	// The user id of the user who has created the resource.
 | ||||
| 	CreatedByUserId *string `json:"createdByUserId,omitempty"` | ||||
| 	// The last time the resource has been modified
 | ||||
| 	LastModifiedDate *time.Time `json:"lastModifiedDate,omitempty"` | ||||
| 	// The user who last modified the resource.
 | ||||
| 	LastModifiedBy *string `json:"lastModifiedBy,omitempty"` | ||||
| 	// The user id of the user who has last modified the resource.
 | ||||
| 	LastModifiedByUserId *string `json:"lastModifiedByUserId,omitempty"` | ||||
| 	// State of the resource. *AVAILABLE* There are no pending modification requests for this item; *BUSY* There is at least one modification request pending and all following requests will be queued; *INACTIVE* Resource has been de-provisioned; *DEPLOYING* Resource state DEPLOYING - relevant for Kubernetes cluster/nodepool; *ACTIVE* Resource state ACTIVE - relevant for Kubernetes cluster/nodepool; *FAILED* Resource state FAILED - relevant for Kubernetes cluster/nodepool; *SUSPENDED* Resource state SUSPENDED - relevant for Kubernetes cluster/nodepool; *FAILED_SUSPENDED* Resource state FAILED_SUSPENDED - relevant for Kubernetes cluster; *UPDATING* Resource state UPDATING - relevant for Kubernetes cluster/nodepool; *FAILED_UPDATING* Resource state FAILED_UPDATING - relevant for Kubernetes cluster/nodepool; *DESTROYING* Resource state DESTROYING - relevant for Kubernetes cluster; *FAILED_DESTROYING* Resource state FAILED_DESTROYING - relevant for Kubernetes cluster/nodepool; *TERMINATED* Resource state TERMINATED - relevant for Kubernetes cluster/nodepool
 | ||||
| 	State *string `json:"state,omitempty"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetEtag returns the Etag field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *DatacenterElementMetadata) GetEtag() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Etag | ||||
| } | ||||
| 
 | ||||
| // GetEtagOk returns a tuple with the Etag field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *DatacenterElementMetadata) GetEtagOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Etag, true | ||||
| } | ||||
| 
 | ||||
| // SetEtag sets field value
 | ||||
| func (o *DatacenterElementMetadata) SetEtag(v string) { | ||||
| 	o.Etag = &v | ||||
| } | ||||
| 
 | ||||
| // HasEtag returns a boolean if a field has been set.
 | ||||
| func (o *DatacenterElementMetadata) HasEtag() bool { | ||||
| 	if o != nil && o.Etag != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetCreatedDate returns the CreatedDate field value
 | ||||
| // If the value is explicit nil, the zero value for time.Time will be returned
 | ||||
| func (o *DatacenterElementMetadata) GetCreatedDate() *time.Time { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.CreatedDate | ||||
| } | ||||
| 
 | ||||
| // GetCreatedDateOk returns a tuple with the CreatedDate field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *DatacenterElementMetadata) GetCreatedDateOk() (*time.Time, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.CreatedDate, true | ||||
| } | ||||
| 
 | ||||
| // SetCreatedDate sets field value
 | ||||
| func (o *DatacenterElementMetadata) SetCreatedDate(v time.Time) { | ||||
| 	o.CreatedDate = &v | ||||
| } | ||||
| 
 | ||||
| // HasCreatedDate returns a boolean if a field has been set.
 | ||||
| func (o *DatacenterElementMetadata) HasCreatedDate() bool { | ||||
| 	if o != nil && o.CreatedDate != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetCreatedBy returns the CreatedBy field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *DatacenterElementMetadata) GetCreatedBy() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.CreatedBy | ||||
| } | ||||
| 
 | ||||
| // GetCreatedByOk returns a tuple with the CreatedBy field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *DatacenterElementMetadata) GetCreatedByOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.CreatedBy, true | ||||
| } | ||||
| 
 | ||||
| // SetCreatedBy sets field value
 | ||||
| func (o *DatacenterElementMetadata) SetCreatedBy(v string) { | ||||
| 	o.CreatedBy = &v | ||||
| } | ||||
| 
 | ||||
| // HasCreatedBy returns a boolean if a field has been set.
 | ||||
| func (o *DatacenterElementMetadata) HasCreatedBy() bool { | ||||
| 	if o != nil && o.CreatedBy != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetCreatedByUserId returns the CreatedByUserId field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *DatacenterElementMetadata) GetCreatedByUserId() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.CreatedByUserId | ||||
| } | ||||
| 
 | ||||
| // GetCreatedByUserIdOk returns a tuple with the CreatedByUserId field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *DatacenterElementMetadata) GetCreatedByUserIdOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.CreatedByUserId, true | ||||
| } | ||||
| 
 | ||||
| // SetCreatedByUserId sets field value
 | ||||
| func (o *DatacenterElementMetadata) SetCreatedByUserId(v string) { | ||||
| 	o.CreatedByUserId = &v | ||||
| } | ||||
| 
 | ||||
| // HasCreatedByUserId returns a boolean if a field has been set.
 | ||||
| func (o *DatacenterElementMetadata) HasCreatedByUserId() bool { | ||||
| 	if o != nil && o.CreatedByUserId != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetLastModifiedDate returns the LastModifiedDate field value
 | ||||
| // If the value is explicit nil, the zero value for time.Time will be returned
 | ||||
| func (o *DatacenterElementMetadata) GetLastModifiedDate() *time.Time { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.LastModifiedDate | ||||
| } | ||||
| 
 | ||||
| // GetLastModifiedDateOk returns a tuple with the LastModifiedDate field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *DatacenterElementMetadata) GetLastModifiedDateOk() (*time.Time, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.LastModifiedDate, true | ||||
| } | ||||
| 
 | ||||
| // SetLastModifiedDate sets field value
 | ||||
| func (o *DatacenterElementMetadata) SetLastModifiedDate(v time.Time) { | ||||
| 	o.LastModifiedDate = &v | ||||
| } | ||||
| 
 | ||||
| // HasLastModifiedDate returns a boolean if a field has been set.
 | ||||
| func (o *DatacenterElementMetadata) HasLastModifiedDate() bool { | ||||
| 	if o != nil && o.LastModifiedDate != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetLastModifiedBy returns the LastModifiedBy field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *DatacenterElementMetadata) GetLastModifiedBy() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.LastModifiedBy | ||||
| } | ||||
| 
 | ||||
| // GetLastModifiedByOk returns a tuple with the LastModifiedBy field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *DatacenterElementMetadata) GetLastModifiedByOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.LastModifiedBy, true | ||||
| } | ||||
| 
 | ||||
| // SetLastModifiedBy sets field value
 | ||||
| func (o *DatacenterElementMetadata) SetLastModifiedBy(v string) { | ||||
| 	o.LastModifiedBy = &v | ||||
| } | ||||
| 
 | ||||
| // HasLastModifiedBy returns a boolean if a field has been set.
 | ||||
| func (o *DatacenterElementMetadata) HasLastModifiedBy() bool { | ||||
| 	if o != nil && o.LastModifiedBy != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetLastModifiedByUserId returns the LastModifiedByUserId field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *DatacenterElementMetadata) GetLastModifiedByUserId() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.LastModifiedByUserId | ||||
| } | ||||
| 
 | ||||
| // GetLastModifiedByUserIdOk returns a tuple with the LastModifiedByUserId field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *DatacenterElementMetadata) GetLastModifiedByUserIdOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.LastModifiedByUserId, true | ||||
| } | ||||
| 
 | ||||
| // SetLastModifiedByUserId sets field value
 | ||||
| func (o *DatacenterElementMetadata) SetLastModifiedByUserId(v string) { | ||||
| 	o.LastModifiedByUserId = &v | ||||
| } | ||||
| 
 | ||||
| // HasLastModifiedByUserId returns a boolean if a field has been set.
 | ||||
| func (o *DatacenterElementMetadata) HasLastModifiedByUserId() bool { | ||||
| 	if o != nil && o.LastModifiedByUserId != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetState returns the State field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *DatacenterElementMetadata) GetState() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.State | ||||
| } | ||||
| 
 | ||||
| // GetStateOk returns a tuple with the State field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *DatacenterElementMetadata) GetStateOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.State, true | ||||
| } | ||||
| 
 | ||||
| // SetState sets field value
 | ||||
| func (o *DatacenterElementMetadata) SetState(v string) { | ||||
| 	o.State = &v | ||||
| } | ||||
| 
 | ||||
| // HasState returns a boolean if a field has been set.
 | ||||
| func (o *DatacenterElementMetadata) HasState() bool { | ||||
| 	if o != nil && o.State != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o DatacenterElementMetadata) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.Etag != nil { | ||||
| 		toSerialize["etag"] = o.Etag | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.CreatedDate != nil { | ||||
| 		toSerialize["createdDate"] = o.CreatedDate | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.CreatedBy != nil { | ||||
| 		toSerialize["createdBy"] = o.CreatedBy | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.CreatedByUserId != nil { | ||||
| 		toSerialize["createdByUserId"] = o.CreatedByUserId | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.LastModifiedDate != nil { | ||||
| 		toSerialize["lastModifiedDate"] = o.LastModifiedDate | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.LastModifiedBy != nil { | ||||
| 		toSerialize["lastModifiedBy"] = o.LastModifiedBy | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.LastModifiedByUserId != nil { | ||||
| 		toSerialize["lastModifiedByUserId"] = o.LastModifiedByUserId | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.State != nil { | ||||
| 		toSerialize["state"] = o.State | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableDatacenterElementMetadata struct { | ||||
| 	value *DatacenterElementMetadata | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableDatacenterElementMetadata) Get() *DatacenterElementMetadata { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableDatacenterElementMetadata) Set(val *DatacenterElementMetadata) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableDatacenterElementMetadata) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableDatacenterElementMetadata) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableDatacenterElementMetadata(val *DatacenterElementMetadata) *NullableDatacenterElementMetadata { | ||||
| 	return &NullableDatacenterElementMetadata{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableDatacenterElementMetadata) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableDatacenterElementMetadata) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,231 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // DatacenterEntities struct for DatacenterEntities
 | ||||
| type DatacenterEntities struct { | ||||
| 	Servers *Servers `json:"servers,omitempty"` | ||||
| 	Volumes *Volumes `json:"volumes,omitempty"` | ||||
| 	Loadbalancers *Loadbalancers `json:"loadbalancers,omitempty"` | ||||
| 	Lans *Lans `json:"lans,omitempty"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetServers returns the Servers field value
 | ||||
| // If the value is explicit nil, the zero value for Servers will be returned
 | ||||
| func (o *DatacenterEntities) GetServers() *Servers { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Servers | ||||
| } | ||||
| 
 | ||||
| // GetServersOk returns a tuple with the Servers field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *DatacenterEntities) GetServersOk() (*Servers, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Servers, true | ||||
| } | ||||
| 
 | ||||
| // SetServers sets field value
 | ||||
| func (o *DatacenterEntities) SetServers(v Servers) { | ||||
| 	o.Servers = &v | ||||
| } | ||||
| 
 | ||||
| // HasServers returns a boolean if a field has been set.
 | ||||
| func (o *DatacenterEntities) HasServers() bool { | ||||
| 	if o != nil && o.Servers != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetVolumes returns the Volumes field value
 | ||||
| // If the value is explicit nil, the zero value for Volumes will be returned
 | ||||
| func (o *DatacenterEntities) GetVolumes() *Volumes { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Volumes | ||||
| } | ||||
| 
 | ||||
| // GetVolumesOk returns a tuple with the Volumes field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *DatacenterEntities) GetVolumesOk() (*Volumes, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Volumes, true | ||||
| } | ||||
| 
 | ||||
| // SetVolumes sets field value
 | ||||
| func (o *DatacenterEntities) SetVolumes(v Volumes) { | ||||
| 	o.Volumes = &v | ||||
| } | ||||
| 
 | ||||
| // HasVolumes returns a boolean if a field has been set.
 | ||||
| func (o *DatacenterEntities) HasVolumes() bool { | ||||
| 	if o != nil && o.Volumes != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetLoadbalancers returns the Loadbalancers field value
 | ||||
| // If the value is explicit nil, the zero value for Loadbalancers will be returned
 | ||||
| func (o *DatacenterEntities) GetLoadbalancers() *Loadbalancers { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Loadbalancers | ||||
| } | ||||
| 
 | ||||
| // GetLoadbalancersOk returns a tuple with the Loadbalancers field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *DatacenterEntities) GetLoadbalancersOk() (*Loadbalancers, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Loadbalancers, true | ||||
| } | ||||
| 
 | ||||
| // SetLoadbalancers sets field value
 | ||||
| func (o *DatacenterEntities) SetLoadbalancers(v Loadbalancers) { | ||||
| 	o.Loadbalancers = &v | ||||
| } | ||||
| 
 | ||||
| // HasLoadbalancers returns a boolean if a field has been set.
 | ||||
| func (o *DatacenterEntities) HasLoadbalancers() bool { | ||||
| 	if o != nil && o.Loadbalancers != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetLans returns the Lans field value
 | ||||
| // If the value is explicit nil, the zero value for Lans will be returned
 | ||||
| func (o *DatacenterEntities) GetLans() *Lans { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Lans | ||||
| } | ||||
| 
 | ||||
| // GetLansOk returns a tuple with the Lans field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *DatacenterEntities) GetLansOk() (*Lans, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Lans, true | ||||
| } | ||||
| 
 | ||||
| // SetLans sets field value
 | ||||
| func (o *DatacenterEntities) SetLans(v Lans) { | ||||
| 	o.Lans = &v | ||||
| } | ||||
| 
 | ||||
| // HasLans returns a boolean if a field has been set.
 | ||||
| func (o *DatacenterEntities) HasLans() bool { | ||||
| 	if o != nil && o.Lans != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o DatacenterEntities) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.Servers != nil { | ||||
| 		toSerialize["servers"] = o.Servers | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Volumes != nil { | ||||
| 		toSerialize["volumes"] = o.Volumes | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Loadbalancers != nil { | ||||
| 		toSerialize["loadbalancers"] = o.Loadbalancers | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Lans != nil { | ||||
| 		toSerialize["lans"] = o.Lans | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableDatacenterEntities struct { | ||||
| 	value *DatacenterEntities | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableDatacenterEntities) Get() *DatacenterEntities { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableDatacenterEntities) Set(val *DatacenterEntities) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableDatacenterEntities) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableDatacenterEntities) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableDatacenterEntities(val *DatacenterEntities) *NullableDatacenterEntities { | ||||
| 	return &NullableDatacenterEntities{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableDatacenterEntities) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableDatacenterEntities) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,321 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // DatacenterProperties struct for DatacenterProperties
 | ||||
| type DatacenterProperties struct { | ||||
| 	// A name of that resource
 | ||||
| 	Name *string `json:"name,omitempty"` | ||||
| 	// A description for the datacenter, e.g. staging, production
 | ||||
| 	Description *string `json:"description,omitempty"` | ||||
| 	// The physical location where the datacenter will be created. This will be where all of your servers live. Property cannot be modified after datacenter creation (disallowed in update requests)
 | ||||
| 	Location *string `json:"location"` | ||||
| 	// The version of that Data Center. Gets incremented with every change
 | ||||
| 	Version *int32 `json:"version,omitempty"` | ||||
| 	// List of features supported by the location this data center is part of
 | ||||
| 	Features *[]string `json:"features,omitempty"` | ||||
| 	// Boolean value representing if the data center requires extra protection e.g. two factor protection
 | ||||
| 	SecAuthProtection *bool `json:"secAuthProtection,omitempty"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetName returns the Name field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *DatacenterProperties) GetName() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Name | ||||
| } | ||||
| 
 | ||||
| // GetNameOk returns a tuple with the Name field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *DatacenterProperties) GetNameOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Name, true | ||||
| } | ||||
| 
 | ||||
| // SetName sets field value
 | ||||
| func (o *DatacenterProperties) SetName(v string) { | ||||
| 	o.Name = &v | ||||
| } | ||||
| 
 | ||||
| // HasName returns a boolean if a field has been set.
 | ||||
| func (o *DatacenterProperties) HasName() bool { | ||||
| 	if o != nil && o.Name != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetDescription returns the Description field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *DatacenterProperties) GetDescription() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Description | ||||
| } | ||||
| 
 | ||||
| // GetDescriptionOk returns a tuple with the Description field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *DatacenterProperties) GetDescriptionOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Description, true | ||||
| } | ||||
| 
 | ||||
| // SetDescription sets field value
 | ||||
| func (o *DatacenterProperties) SetDescription(v string) { | ||||
| 	o.Description = &v | ||||
| } | ||||
| 
 | ||||
| // HasDescription returns a boolean if a field has been set.
 | ||||
| func (o *DatacenterProperties) HasDescription() bool { | ||||
| 	if o != nil && o.Description != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetLocation returns the Location field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *DatacenterProperties) GetLocation() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Location | ||||
| } | ||||
| 
 | ||||
| // GetLocationOk returns a tuple with the Location field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *DatacenterProperties) GetLocationOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Location, true | ||||
| } | ||||
| 
 | ||||
| // SetLocation sets field value
 | ||||
| func (o *DatacenterProperties) SetLocation(v string) { | ||||
| 	o.Location = &v | ||||
| } | ||||
| 
 | ||||
| // HasLocation returns a boolean if a field has been set.
 | ||||
| func (o *DatacenterProperties) HasLocation() bool { | ||||
| 	if o != nil && o.Location != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetVersion returns the Version field value
 | ||||
| // If the value is explicit nil, the zero value for int32 will be returned
 | ||||
| func (o *DatacenterProperties) GetVersion() *int32 { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Version | ||||
| } | ||||
| 
 | ||||
| // GetVersionOk returns a tuple with the Version field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *DatacenterProperties) GetVersionOk() (*int32, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Version, true | ||||
| } | ||||
| 
 | ||||
| // SetVersion sets field value
 | ||||
| func (o *DatacenterProperties) SetVersion(v int32) { | ||||
| 	o.Version = &v | ||||
| } | ||||
| 
 | ||||
| // HasVersion returns a boolean if a field has been set.
 | ||||
| func (o *DatacenterProperties) HasVersion() bool { | ||||
| 	if o != nil && o.Version != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetFeatures returns the Features field value
 | ||||
| // If the value is explicit nil, the zero value for []string will be returned
 | ||||
| func (o *DatacenterProperties) GetFeatures() *[]string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Features | ||||
| } | ||||
| 
 | ||||
| // GetFeaturesOk returns a tuple with the Features field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *DatacenterProperties) GetFeaturesOk() (*[]string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Features, true | ||||
| } | ||||
| 
 | ||||
| // SetFeatures sets field value
 | ||||
| func (o *DatacenterProperties) SetFeatures(v []string) { | ||||
| 	o.Features = &v | ||||
| } | ||||
| 
 | ||||
| // HasFeatures returns a boolean if a field has been set.
 | ||||
| func (o *DatacenterProperties) HasFeatures() bool { | ||||
| 	if o != nil && o.Features != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetSecAuthProtection returns the SecAuthProtection field value
 | ||||
| // If the value is explicit nil, the zero value for bool will be returned
 | ||||
| func (o *DatacenterProperties) GetSecAuthProtection() *bool { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.SecAuthProtection | ||||
| } | ||||
| 
 | ||||
| // GetSecAuthProtectionOk returns a tuple with the SecAuthProtection field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *DatacenterProperties) GetSecAuthProtectionOk() (*bool, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.SecAuthProtection, true | ||||
| } | ||||
| 
 | ||||
| // SetSecAuthProtection sets field value
 | ||||
| func (o *DatacenterProperties) SetSecAuthProtection(v bool) { | ||||
| 	o.SecAuthProtection = &v | ||||
| } | ||||
| 
 | ||||
| // HasSecAuthProtection returns a boolean if a field has been set.
 | ||||
| func (o *DatacenterProperties) HasSecAuthProtection() bool { | ||||
| 	if o != nil && o.SecAuthProtection != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o DatacenterProperties) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.Name != nil { | ||||
| 		toSerialize["name"] = o.Name | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Description != nil { | ||||
| 		toSerialize["description"] = o.Description | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Location != nil { | ||||
| 		toSerialize["location"] = o.Location | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Version != nil { | ||||
| 		toSerialize["version"] = o.Version | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Features != nil { | ||||
| 		toSerialize["features"] = o.Features | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.SecAuthProtection != nil { | ||||
| 		toSerialize["secAuthProtection"] = o.SecAuthProtection | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableDatacenterProperties struct { | ||||
| 	value *DatacenterProperties | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableDatacenterProperties) Get() *DatacenterProperties { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableDatacenterProperties) Set(val *DatacenterProperties) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableDatacenterProperties) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableDatacenterProperties) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableDatacenterProperties(val *DatacenterProperties) *NullableDatacenterProperties { | ||||
| 	return &NullableDatacenterProperties{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableDatacenterProperties) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableDatacenterProperties) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,235 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // Datacenters struct for Datacenters
 | ||||
| type Datacenters struct { | ||||
| 	// The resource's unique identifier
 | ||||
| 	Id *string `json:"id,omitempty"` | ||||
| 	// The type of object that has been created
 | ||||
| 	Type *Type `json:"type,omitempty"` | ||||
| 	// URL to the object representation (absolute path)
 | ||||
| 	Href *string `json:"href,omitempty"` | ||||
| 	// Array of items in that collection
 | ||||
| 	Items *[]Datacenter `json:"items,omitempty"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetId returns the Id field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *Datacenters) GetId() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Id | ||||
| } | ||||
| 
 | ||||
| // GetIdOk returns a tuple with the Id field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *Datacenters) GetIdOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Id, true | ||||
| } | ||||
| 
 | ||||
| // SetId sets field value
 | ||||
| func (o *Datacenters) SetId(v string) { | ||||
| 	o.Id = &v | ||||
| } | ||||
| 
 | ||||
| // HasId returns a boolean if a field has been set.
 | ||||
| func (o *Datacenters) HasId() bool { | ||||
| 	if o != nil && o.Id != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetType returns the Type field value
 | ||||
| // If the value is explicit nil, the zero value for Type will be returned
 | ||||
| func (o *Datacenters) GetType() *Type { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Type | ||||
| } | ||||
| 
 | ||||
| // GetTypeOk returns a tuple with the Type field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *Datacenters) GetTypeOk() (*Type, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Type, true | ||||
| } | ||||
| 
 | ||||
| // SetType sets field value
 | ||||
| func (o *Datacenters) SetType(v Type) { | ||||
| 	o.Type = &v | ||||
| } | ||||
| 
 | ||||
| // HasType returns a boolean if a field has been set.
 | ||||
| func (o *Datacenters) HasType() bool { | ||||
| 	if o != nil && o.Type != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetHref returns the Href field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *Datacenters) GetHref() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Href | ||||
| } | ||||
| 
 | ||||
| // GetHrefOk returns a tuple with the Href field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *Datacenters) GetHrefOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Href, true | ||||
| } | ||||
| 
 | ||||
| // SetHref sets field value
 | ||||
| func (o *Datacenters) SetHref(v string) { | ||||
| 	o.Href = &v | ||||
| } | ||||
| 
 | ||||
| // HasHref returns a boolean if a field has been set.
 | ||||
| func (o *Datacenters) HasHref() bool { | ||||
| 	if o != nil && o.Href != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetItems returns the Items field value
 | ||||
| // If the value is explicit nil, the zero value for []Datacenter will be returned
 | ||||
| func (o *Datacenters) GetItems() *[]Datacenter { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Items | ||||
| } | ||||
| 
 | ||||
| // GetItemsOk returns a tuple with the Items field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *Datacenters) GetItemsOk() (*[]Datacenter, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Items, true | ||||
| } | ||||
| 
 | ||||
| // SetItems sets field value
 | ||||
| func (o *Datacenters) SetItems(v []Datacenter) { | ||||
| 	o.Items = &v | ||||
| } | ||||
| 
 | ||||
| // HasItems returns a boolean if a field has been set.
 | ||||
| func (o *Datacenters) HasItems() bool { | ||||
| 	if o != nil && o.Items != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o Datacenters) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.Id != nil { | ||||
| 		toSerialize["id"] = o.Id | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Type != nil { | ||||
| 		toSerialize["type"] = o.Type | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Href != nil { | ||||
| 		toSerialize["href"] = o.Href | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Items != nil { | ||||
| 		toSerialize["items"] = o.Items | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableDatacenters struct { | ||||
| 	value *Datacenters | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableDatacenters) Get() *Datacenters { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableDatacenters) Set(val *Datacenters) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableDatacenters) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableDatacenters) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableDatacenters(val *Datacenters) *NullableDatacenters { | ||||
| 	return &NullableDatacenters{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableDatacenters) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableDatacenters) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,148 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // Error struct for Error
 | ||||
| type Error struct { | ||||
| 	// HTTP status code of the operation
 | ||||
| 	HttpStatus *int32 `json:"httpStatus,omitempty"` | ||||
| 	Messages *[]ErrorMessage `json:"messages,omitempty"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetHttpStatus returns the HttpStatus field value
 | ||||
| // If the value is explicit nil, the zero value for int32 will be returned
 | ||||
| func (o *Error) GetHttpStatus() *int32 { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.HttpStatus | ||||
| } | ||||
| 
 | ||||
| // GetHttpStatusOk returns a tuple with the HttpStatus field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *Error) GetHttpStatusOk() (*int32, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.HttpStatus, true | ||||
| } | ||||
| 
 | ||||
| // SetHttpStatus sets field value
 | ||||
| func (o *Error) SetHttpStatus(v int32) { | ||||
| 	o.HttpStatus = &v | ||||
| } | ||||
| 
 | ||||
| // HasHttpStatus returns a boolean if a field has been set.
 | ||||
| func (o *Error) HasHttpStatus() bool { | ||||
| 	if o != nil && o.HttpStatus != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetMessages returns the Messages field value
 | ||||
| // If the value is explicit nil, the zero value for []ErrorMessage will be returned
 | ||||
| func (o *Error) GetMessages() *[]ErrorMessage { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Messages | ||||
| } | ||||
| 
 | ||||
| // GetMessagesOk returns a tuple with the Messages field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *Error) GetMessagesOk() (*[]ErrorMessage, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Messages, true | ||||
| } | ||||
| 
 | ||||
| // SetMessages sets field value
 | ||||
| func (o *Error) SetMessages(v []ErrorMessage) { | ||||
| 	o.Messages = &v | ||||
| } | ||||
| 
 | ||||
| // HasMessages returns a boolean if a field has been set.
 | ||||
| func (o *Error) HasMessages() bool { | ||||
| 	if o != nil && o.Messages != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o Error) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.HttpStatus != nil { | ||||
| 		toSerialize["httpStatus"] = o.HttpStatus | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Messages != nil { | ||||
| 		toSerialize["messages"] = o.Messages | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableError struct { | ||||
| 	value *Error | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableError) Get() *Error { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableError) Set(val *Error) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableError) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableError) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableError(val *Error) *NullableError { | ||||
| 	return &NullableError{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableError) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableError) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,149 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // ErrorMessage struct for ErrorMessage
 | ||||
| type ErrorMessage struct { | ||||
| 	// Application internal error code
 | ||||
| 	ErrorCode *string `json:"errorCode,omitempty"` | ||||
| 	// Human readable message
 | ||||
| 	Message *string `json:"message,omitempty"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetErrorCode returns the ErrorCode field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *ErrorMessage) GetErrorCode() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.ErrorCode | ||||
| } | ||||
| 
 | ||||
| // GetErrorCodeOk returns a tuple with the ErrorCode field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *ErrorMessage) GetErrorCodeOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.ErrorCode, true | ||||
| } | ||||
| 
 | ||||
| // SetErrorCode sets field value
 | ||||
| func (o *ErrorMessage) SetErrorCode(v string) { | ||||
| 	o.ErrorCode = &v | ||||
| } | ||||
| 
 | ||||
| // HasErrorCode returns a boolean if a field has been set.
 | ||||
| func (o *ErrorMessage) HasErrorCode() bool { | ||||
| 	if o != nil && o.ErrorCode != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetMessage returns the Message field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *ErrorMessage) GetMessage() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Message | ||||
| } | ||||
| 
 | ||||
| // GetMessageOk returns a tuple with the Message field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *ErrorMessage) GetMessageOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Message, true | ||||
| } | ||||
| 
 | ||||
| // SetMessage sets field value
 | ||||
| func (o *ErrorMessage) SetMessage(v string) { | ||||
| 	o.Message = &v | ||||
| } | ||||
| 
 | ||||
| // HasMessage returns a boolean if a field has been set.
 | ||||
| func (o *ErrorMessage) HasMessage() bool { | ||||
| 	if o != nil && o.Message != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o ErrorMessage) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.ErrorCode != nil { | ||||
| 		toSerialize["errorCode"] = o.ErrorCode | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Message != nil { | ||||
| 		toSerialize["message"] = o.Message | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableErrorMessage struct { | ||||
| 	value *ErrorMessage | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableErrorMessage) Get() *ErrorMessage { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableErrorMessage) Set(val *ErrorMessage) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableErrorMessage) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableErrorMessage) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableErrorMessage(val *ErrorMessage) *NullableErrorMessage { | ||||
| 	return &NullableErrorMessage{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableErrorMessage) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableErrorMessage) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,276 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // FirewallRule struct for FirewallRule
 | ||||
| type FirewallRule struct { | ||||
| 	// The resource's unique identifier
 | ||||
| 	Id *string `json:"id,omitempty"` | ||||
| 	// The type of object that has been created
 | ||||
| 	Type *Type `json:"type,omitempty"` | ||||
| 	// URL to the object representation (absolute path)
 | ||||
| 	Href *string `json:"href,omitempty"` | ||||
| 	Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` | ||||
| 	Properties *FirewallruleProperties `json:"properties"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetId returns the Id field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *FirewallRule) GetId() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Id | ||||
| } | ||||
| 
 | ||||
| // GetIdOk returns a tuple with the Id field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *FirewallRule) GetIdOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Id, true | ||||
| } | ||||
| 
 | ||||
| // SetId sets field value
 | ||||
| func (o *FirewallRule) SetId(v string) { | ||||
| 	o.Id = &v | ||||
| } | ||||
| 
 | ||||
| // HasId returns a boolean if a field has been set.
 | ||||
| func (o *FirewallRule) HasId() bool { | ||||
| 	if o != nil && o.Id != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetType returns the Type field value
 | ||||
| // If the value is explicit nil, the zero value for Type will be returned
 | ||||
| func (o *FirewallRule) GetType() *Type { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Type | ||||
| } | ||||
| 
 | ||||
| // GetTypeOk returns a tuple with the Type field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *FirewallRule) GetTypeOk() (*Type, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Type, true | ||||
| } | ||||
| 
 | ||||
| // SetType sets field value
 | ||||
| func (o *FirewallRule) SetType(v Type) { | ||||
| 	o.Type = &v | ||||
| } | ||||
| 
 | ||||
| // HasType returns a boolean if a field has been set.
 | ||||
| func (o *FirewallRule) HasType() bool { | ||||
| 	if o != nil && o.Type != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetHref returns the Href field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *FirewallRule) GetHref() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Href | ||||
| } | ||||
| 
 | ||||
| // GetHrefOk returns a tuple with the Href field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *FirewallRule) GetHrefOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Href, true | ||||
| } | ||||
| 
 | ||||
| // SetHref sets field value
 | ||||
| func (o *FirewallRule) SetHref(v string) { | ||||
| 	o.Href = &v | ||||
| } | ||||
| 
 | ||||
| // HasHref returns a boolean if a field has been set.
 | ||||
| func (o *FirewallRule) HasHref() bool { | ||||
| 	if o != nil && o.Href != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetMetadata returns the Metadata field value
 | ||||
| // If the value is explicit nil, the zero value for DatacenterElementMetadata will be returned
 | ||||
| func (o *FirewallRule) GetMetadata() *DatacenterElementMetadata { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Metadata | ||||
| } | ||||
| 
 | ||||
| // GetMetadataOk returns a tuple with the Metadata field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *FirewallRule) GetMetadataOk() (*DatacenterElementMetadata, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Metadata, true | ||||
| } | ||||
| 
 | ||||
| // SetMetadata sets field value
 | ||||
| func (o *FirewallRule) SetMetadata(v DatacenterElementMetadata) { | ||||
| 	o.Metadata = &v | ||||
| } | ||||
| 
 | ||||
| // HasMetadata returns a boolean if a field has been set.
 | ||||
| func (o *FirewallRule) HasMetadata() bool { | ||||
| 	if o != nil && o.Metadata != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetProperties returns the Properties field value
 | ||||
| // If the value is explicit nil, the zero value for FirewallruleProperties will be returned
 | ||||
| func (o *FirewallRule) GetProperties() *FirewallruleProperties { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Properties | ||||
| } | ||||
| 
 | ||||
| // GetPropertiesOk returns a tuple with the Properties field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *FirewallRule) GetPropertiesOk() (*FirewallruleProperties, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Properties, true | ||||
| } | ||||
| 
 | ||||
| // SetProperties sets field value
 | ||||
| func (o *FirewallRule) SetProperties(v FirewallruleProperties) { | ||||
| 	o.Properties = &v | ||||
| } | ||||
| 
 | ||||
| // HasProperties returns a boolean if a field has been set.
 | ||||
| func (o *FirewallRule) HasProperties() bool { | ||||
| 	if o != nil && o.Properties != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o FirewallRule) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.Id != nil { | ||||
| 		toSerialize["id"] = o.Id | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Type != nil { | ||||
| 		toSerialize["type"] = o.Type | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Href != nil { | ||||
| 		toSerialize["href"] = o.Href | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Metadata != nil { | ||||
| 		toSerialize["metadata"] = o.Metadata | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Properties != nil { | ||||
| 		toSerialize["properties"] = o.Properties | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableFirewallRule struct { | ||||
| 	value *FirewallRule | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableFirewallRule) Get() *FirewallRule { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableFirewallRule) Set(val *FirewallRule) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableFirewallRule) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableFirewallRule) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableFirewallRule(val *FirewallRule) *NullableFirewallRule { | ||||
| 	return &NullableFirewallRule{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableFirewallRule) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableFirewallRule) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,235 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // FirewallRules struct for FirewallRules
 | ||||
| type FirewallRules struct { | ||||
| 	// The resource's unique identifier
 | ||||
| 	Id *string `json:"id,omitempty"` | ||||
| 	// The type of object that has been created
 | ||||
| 	Type *Type `json:"type,omitempty"` | ||||
| 	// URL to the object representation (absolute path)
 | ||||
| 	Href *string `json:"href,omitempty"` | ||||
| 	// Array of items in that collection
 | ||||
| 	Items *[]FirewallRule `json:"items,omitempty"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetId returns the Id field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *FirewallRules) GetId() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Id | ||||
| } | ||||
| 
 | ||||
| // GetIdOk returns a tuple with the Id field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *FirewallRules) GetIdOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Id, true | ||||
| } | ||||
| 
 | ||||
| // SetId sets field value
 | ||||
| func (o *FirewallRules) SetId(v string) { | ||||
| 	o.Id = &v | ||||
| } | ||||
| 
 | ||||
| // HasId returns a boolean if a field has been set.
 | ||||
| func (o *FirewallRules) HasId() bool { | ||||
| 	if o != nil && o.Id != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetType returns the Type field value
 | ||||
| // If the value is explicit nil, the zero value for Type will be returned
 | ||||
| func (o *FirewallRules) GetType() *Type { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Type | ||||
| } | ||||
| 
 | ||||
| // GetTypeOk returns a tuple with the Type field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *FirewallRules) GetTypeOk() (*Type, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Type, true | ||||
| } | ||||
| 
 | ||||
| // SetType sets field value
 | ||||
| func (o *FirewallRules) SetType(v Type) { | ||||
| 	o.Type = &v | ||||
| } | ||||
| 
 | ||||
| // HasType returns a boolean if a field has been set.
 | ||||
| func (o *FirewallRules) HasType() bool { | ||||
| 	if o != nil && o.Type != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetHref returns the Href field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *FirewallRules) GetHref() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Href | ||||
| } | ||||
| 
 | ||||
| // GetHrefOk returns a tuple with the Href field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *FirewallRules) GetHrefOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Href, true | ||||
| } | ||||
| 
 | ||||
| // SetHref sets field value
 | ||||
| func (o *FirewallRules) SetHref(v string) { | ||||
| 	o.Href = &v | ||||
| } | ||||
| 
 | ||||
| // HasHref returns a boolean if a field has been set.
 | ||||
| func (o *FirewallRules) HasHref() bool { | ||||
| 	if o != nil && o.Href != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetItems returns the Items field value
 | ||||
| // If the value is explicit nil, the zero value for []FirewallRule will be returned
 | ||||
| func (o *FirewallRules) GetItems() *[]FirewallRule { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Items | ||||
| } | ||||
| 
 | ||||
| // GetItemsOk returns a tuple with the Items field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *FirewallRules) GetItemsOk() (*[]FirewallRule, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Items, true | ||||
| } | ||||
| 
 | ||||
| // SetItems sets field value
 | ||||
| func (o *FirewallRules) SetItems(v []FirewallRule) { | ||||
| 	o.Items = &v | ||||
| } | ||||
| 
 | ||||
| // HasItems returns a boolean if a field has been set.
 | ||||
| func (o *FirewallRules) HasItems() bool { | ||||
| 	if o != nil && o.Items != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o FirewallRules) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.Id != nil { | ||||
| 		toSerialize["id"] = o.Id | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Type != nil { | ||||
| 		toSerialize["type"] = o.Type | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Href != nil { | ||||
| 		toSerialize["href"] = o.Href | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Items != nil { | ||||
| 		toSerialize["items"] = o.Items | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableFirewallRules struct { | ||||
| 	value *FirewallRules | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableFirewallRules) Get() *FirewallRules { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableFirewallRules) Set(val *FirewallRules) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableFirewallRules) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableFirewallRules) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableFirewallRules(val *FirewallRules) *NullableFirewallRules { | ||||
| 	return &NullableFirewallRules{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableFirewallRules) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableFirewallRules) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,450 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // FirewallruleProperties struct for FirewallruleProperties
 | ||||
| type FirewallruleProperties struct { | ||||
| 	// A name of that resource
 | ||||
| 	Name *string `json:"name,omitempty"` | ||||
| 	// The protocol for the rule. Property cannot be modified after creation (disallowed in update requests)
 | ||||
| 	Protocol *string `json:"protocol"` | ||||
| 	// Only traffic originating from the respective MAC address is allowed. Valid format: aa:bb:cc:dd:ee:ff. Value null allows all source MAC address
 | ||||
| 	SourceMac *string `json:"sourceMac,omitempty"` | ||||
| 	// Only traffic originating from the respective IPv4 address is allowed. Value null allows all source IPs
 | ||||
| 	SourceIp *string `json:"sourceIp,omitempty"` | ||||
| 	// In case the target NIC has multiple IP addresses, only traffic directed to the respective IP address of the NIC is allowed. Value null allows all target IPs
 | ||||
| 	TargetIp *string `json:"targetIp,omitempty"` | ||||
| 	// Defines the allowed code (from 0 to 254) if protocol ICMP is chosen. Value null allows all codes
 | ||||
| 	IcmpCode *int32 `json:"icmpCode,omitempty"` | ||||
| 	// Defines the allowed type (from 0 to 254) if the protocol ICMP is chosen. Value null allows all types
 | ||||
| 	IcmpType *int32 `json:"icmpType,omitempty"` | ||||
| 	// Defines the start range of the allowed port (from 1 to 65534) if protocol TCP or UDP is chosen. Leave portRangeStart and portRangeEnd value null to allow all ports
 | ||||
| 	PortRangeStart *int32 `json:"portRangeStart,omitempty"` | ||||
| 	// Defines the end range of the allowed port (from 1 to 65534) if the protocol TCP or UDP is chosen. Leave portRangeStart and portRangeEnd null to allow all ports
 | ||||
| 	PortRangeEnd *int32 `json:"portRangeEnd,omitempty"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetName returns the Name field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *FirewallruleProperties) GetName() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Name | ||||
| } | ||||
| 
 | ||||
| // GetNameOk returns a tuple with the Name field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *FirewallruleProperties) GetNameOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Name, true | ||||
| } | ||||
| 
 | ||||
| // SetName sets field value
 | ||||
| func (o *FirewallruleProperties) SetName(v string) { | ||||
| 	o.Name = &v | ||||
| } | ||||
| 
 | ||||
| // HasName returns a boolean if a field has been set.
 | ||||
| func (o *FirewallruleProperties) HasName() bool { | ||||
| 	if o != nil && o.Name != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetProtocol returns the Protocol field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *FirewallruleProperties) GetProtocol() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Protocol | ||||
| } | ||||
| 
 | ||||
| // GetProtocolOk returns a tuple with the Protocol field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *FirewallruleProperties) GetProtocolOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Protocol, true | ||||
| } | ||||
| 
 | ||||
| // SetProtocol sets field value
 | ||||
| func (o *FirewallruleProperties) SetProtocol(v string) { | ||||
| 	o.Protocol = &v | ||||
| } | ||||
| 
 | ||||
| // HasProtocol returns a boolean if a field has been set.
 | ||||
| func (o *FirewallruleProperties) HasProtocol() bool { | ||||
| 	if o != nil && o.Protocol != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetSourceMac returns the SourceMac field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *FirewallruleProperties) GetSourceMac() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.SourceMac | ||||
| } | ||||
| 
 | ||||
| // GetSourceMacOk returns a tuple with the SourceMac field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *FirewallruleProperties) GetSourceMacOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.SourceMac, true | ||||
| } | ||||
| 
 | ||||
| // SetSourceMac sets field value
 | ||||
| func (o *FirewallruleProperties) SetSourceMac(v string) { | ||||
| 	o.SourceMac = &v | ||||
| } | ||||
| 
 | ||||
| // HasSourceMac returns a boolean if a field has been set.
 | ||||
| func (o *FirewallruleProperties) HasSourceMac() bool { | ||||
| 	if o != nil && o.SourceMac != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetSourceIp returns the SourceIp field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *FirewallruleProperties) GetSourceIp() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.SourceIp | ||||
| } | ||||
| 
 | ||||
| // GetSourceIpOk returns a tuple with the SourceIp field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *FirewallruleProperties) GetSourceIpOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.SourceIp, true | ||||
| } | ||||
| 
 | ||||
| // SetSourceIp sets field value
 | ||||
| func (o *FirewallruleProperties) SetSourceIp(v string) { | ||||
| 	o.SourceIp = &v | ||||
| } | ||||
| 
 | ||||
| // HasSourceIp returns a boolean if a field has been set.
 | ||||
| func (o *FirewallruleProperties) HasSourceIp() bool { | ||||
| 	if o != nil && o.SourceIp != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetTargetIp returns the TargetIp field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *FirewallruleProperties) GetTargetIp() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.TargetIp | ||||
| } | ||||
| 
 | ||||
| // GetTargetIpOk returns a tuple with the TargetIp field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *FirewallruleProperties) GetTargetIpOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.TargetIp, true | ||||
| } | ||||
| 
 | ||||
| // SetTargetIp sets field value
 | ||||
| func (o *FirewallruleProperties) SetTargetIp(v string) { | ||||
| 	o.TargetIp = &v | ||||
| } | ||||
| 
 | ||||
| // HasTargetIp returns a boolean if a field has been set.
 | ||||
| func (o *FirewallruleProperties) HasTargetIp() bool { | ||||
| 	if o != nil && o.TargetIp != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetIcmpCode returns the IcmpCode field value
 | ||||
| // If the value is explicit nil, the zero value for int32 will be returned
 | ||||
| func (o *FirewallruleProperties) GetIcmpCode() *int32 { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.IcmpCode | ||||
| } | ||||
| 
 | ||||
| // GetIcmpCodeOk returns a tuple with the IcmpCode field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *FirewallruleProperties) GetIcmpCodeOk() (*int32, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.IcmpCode, true | ||||
| } | ||||
| 
 | ||||
| // SetIcmpCode sets field value
 | ||||
| func (o *FirewallruleProperties) SetIcmpCode(v int32) { | ||||
| 	o.IcmpCode = &v | ||||
| } | ||||
| 
 | ||||
| // HasIcmpCode returns a boolean if a field has been set.
 | ||||
| func (o *FirewallruleProperties) HasIcmpCode() bool { | ||||
| 	if o != nil && o.IcmpCode != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetIcmpType returns the IcmpType field value
 | ||||
| // If the value is explicit nil, the zero value for int32 will be returned
 | ||||
| func (o *FirewallruleProperties) GetIcmpType() *int32 { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.IcmpType | ||||
| } | ||||
| 
 | ||||
| // GetIcmpTypeOk returns a tuple with the IcmpType field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *FirewallruleProperties) GetIcmpTypeOk() (*int32, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.IcmpType, true | ||||
| } | ||||
| 
 | ||||
| // SetIcmpType sets field value
 | ||||
| func (o *FirewallruleProperties) SetIcmpType(v int32) { | ||||
| 	o.IcmpType = &v | ||||
| } | ||||
| 
 | ||||
| // HasIcmpType returns a boolean if a field has been set.
 | ||||
| func (o *FirewallruleProperties) HasIcmpType() bool { | ||||
| 	if o != nil && o.IcmpType != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetPortRangeStart returns the PortRangeStart field value
 | ||||
| // If the value is explicit nil, the zero value for int32 will be returned
 | ||||
| func (o *FirewallruleProperties) GetPortRangeStart() *int32 { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.PortRangeStart | ||||
| } | ||||
| 
 | ||||
| // GetPortRangeStartOk returns a tuple with the PortRangeStart field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *FirewallruleProperties) GetPortRangeStartOk() (*int32, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.PortRangeStart, true | ||||
| } | ||||
| 
 | ||||
| // SetPortRangeStart sets field value
 | ||||
| func (o *FirewallruleProperties) SetPortRangeStart(v int32) { | ||||
| 	o.PortRangeStart = &v | ||||
| } | ||||
| 
 | ||||
| // HasPortRangeStart returns a boolean if a field has been set.
 | ||||
| func (o *FirewallruleProperties) HasPortRangeStart() bool { | ||||
| 	if o != nil && o.PortRangeStart != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetPortRangeEnd returns the PortRangeEnd field value
 | ||||
| // If the value is explicit nil, the zero value for int32 will be returned
 | ||||
| func (o *FirewallruleProperties) GetPortRangeEnd() *int32 { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.PortRangeEnd | ||||
| } | ||||
| 
 | ||||
| // GetPortRangeEndOk returns a tuple with the PortRangeEnd field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *FirewallruleProperties) GetPortRangeEndOk() (*int32, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.PortRangeEnd, true | ||||
| } | ||||
| 
 | ||||
| // SetPortRangeEnd sets field value
 | ||||
| func (o *FirewallruleProperties) SetPortRangeEnd(v int32) { | ||||
| 	o.PortRangeEnd = &v | ||||
| } | ||||
| 
 | ||||
| // HasPortRangeEnd returns a boolean if a field has been set.
 | ||||
| func (o *FirewallruleProperties) HasPortRangeEnd() bool { | ||||
| 	if o != nil && o.PortRangeEnd != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o FirewallruleProperties) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.Name != nil { | ||||
| 		toSerialize["name"] = o.Name | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Protocol != nil { | ||||
| 		toSerialize["protocol"] = o.Protocol | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.SourceMac != nil { | ||||
| 		toSerialize["sourceMac"] = o.SourceMac | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.SourceIp != nil { | ||||
| 		toSerialize["sourceIp"] = o.SourceIp | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.TargetIp != nil { | ||||
| 		toSerialize["targetIp"] = o.TargetIp | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.IcmpCode != nil { | ||||
| 		toSerialize["icmpCode"] = o.IcmpCode | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.IcmpType != nil { | ||||
| 		toSerialize["icmpType"] = o.IcmpType | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.PortRangeStart != nil { | ||||
| 		toSerialize["portRangeStart"] = o.PortRangeStart | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.PortRangeEnd != nil { | ||||
| 		toSerialize["portRangeEnd"] = o.PortRangeEnd | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableFirewallruleProperties struct { | ||||
| 	value *FirewallruleProperties | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableFirewallruleProperties) Get() *FirewallruleProperties { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableFirewallruleProperties) Set(val *FirewallruleProperties) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableFirewallruleProperties) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableFirewallruleProperties) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableFirewallruleProperties(val *FirewallruleProperties) *NullableFirewallruleProperties { | ||||
| 	return &NullableFirewallruleProperties{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableFirewallruleProperties) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableFirewallruleProperties) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,276 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // Group struct for Group
 | ||||
| type Group struct { | ||||
| 	// The resource's unique identifier
 | ||||
| 	Id *string `json:"id,omitempty"` | ||||
| 	// The type of the resource
 | ||||
| 	Type *Type `json:"type,omitempty"` | ||||
| 	// URL to the object representation (absolute path)
 | ||||
| 	Href *string `json:"href,omitempty"` | ||||
| 	Properties *GroupProperties `json:"properties"` | ||||
| 	Entities *GroupEntities `json:"entities,omitempty"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetId returns the Id field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *Group) GetId() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Id | ||||
| } | ||||
| 
 | ||||
| // GetIdOk returns a tuple with the Id field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *Group) GetIdOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Id, true | ||||
| } | ||||
| 
 | ||||
| // SetId sets field value
 | ||||
| func (o *Group) SetId(v string) { | ||||
| 	o.Id = &v | ||||
| } | ||||
| 
 | ||||
| // HasId returns a boolean if a field has been set.
 | ||||
| func (o *Group) HasId() bool { | ||||
| 	if o != nil && o.Id != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetType returns the Type field value
 | ||||
| // If the value is explicit nil, the zero value for Type will be returned
 | ||||
| func (o *Group) GetType() *Type { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Type | ||||
| } | ||||
| 
 | ||||
| // GetTypeOk returns a tuple with the Type field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *Group) GetTypeOk() (*Type, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Type, true | ||||
| } | ||||
| 
 | ||||
| // SetType sets field value
 | ||||
| func (o *Group) SetType(v Type) { | ||||
| 	o.Type = &v | ||||
| } | ||||
| 
 | ||||
| // HasType returns a boolean if a field has been set.
 | ||||
| func (o *Group) HasType() bool { | ||||
| 	if o != nil && o.Type != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetHref returns the Href field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *Group) GetHref() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Href | ||||
| } | ||||
| 
 | ||||
| // GetHrefOk returns a tuple with the Href field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *Group) GetHrefOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Href, true | ||||
| } | ||||
| 
 | ||||
| // SetHref sets field value
 | ||||
| func (o *Group) SetHref(v string) { | ||||
| 	o.Href = &v | ||||
| } | ||||
| 
 | ||||
| // HasHref returns a boolean if a field has been set.
 | ||||
| func (o *Group) HasHref() bool { | ||||
| 	if o != nil && o.Href != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetProperties returns the Properties field value
 | ||||
| // If the value is explicit nil, the zero value for GroupProperties will be returned
 | ||||
| func (o *Group) GetProperties() *GroupProperties { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Properties | ||||
| } | ||||
| 
 | ||||
| // GetPropertiesOk returns a tuple with the Properties field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *Group) GetPropertiesOk() (*GroupProperties, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Properties, true | ||||
| } | ||||
| 
 | ||||
| // SetProperties sets field value
 | ||||
| func (o *Group) SetProperties(v GroupProperties) { | ||||
| 	o.Properties = &v | ||||
| } | ||||
| 
 | ||||
| // HasProperties returns a boolean if a field has been set.
 | ||||
| func (o *Group) HasProperties() bool { | ||||
| 	if o != nil && o.Properties != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetEntities returns the Entities field value
 | ||||
| // If the value is explicit nil, the zero value for GroupEntities will be returned
 | ||||
| func (o *Group) GetEntities() *GroupEntities { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Entities | ||||
| } | ||||
| 
 | ||||
| // GetEntitiesOk returns a tuple with the Entities field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *Group) GetEntitiesOk() (*GroupEntities, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Entities, true | ||||
| } | ||||
| 
 | ||||
| // SetEntities sets field value
 | ||||
| func (o *Group) SetEntities(v GroupEntities) { | ||||
| 	o.Entities = &v | ||||
| } | ||||
| 
 | ||||
| // HasEntities returns a boolean if a field has been set.
 | ||||
| func (o *Group) HasEntities() bool { | ||||
| 	if o != nil && o.Entities != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o Group) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.Id != nil { | ||||
| 		toSerialize["id"] = o.Id | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Type != nil { | ||||
| 		toSerialize["type"] = o.Type | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Href != nil { | ||||
| 		toSerialize["href"] = o.Href | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Properties != nil { | ||||
| 		toSerialize["properties"] = o.Properties | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Entities != nil { | ||||
| 		toSerialize["entities"] = o.Entities | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableGroup struct { | ||||
| 	value *Group | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableGroup) Get() *Group { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableGroup) Set(val *Group) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableGroup) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableGroup) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableGroup(val *Group) *NullableGroup { | ||||
| 	return &NullableGroup{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableGroup) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableGroup) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,147 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // GroupEntities struct for GroupEntities
 | ||||
| type GroupEntities struct { | ||||
| 	Users *GroupMembers `json:"users,omitempty"` | ||||
| 	Resources *ResourceGroups `json:"resources,omitempty"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetUsers returns the Users field value
 | ||||
| // If the value is explicit nil, the zero value for GroupMembers will be returned
 | ||||
| func (o *GroupEntities) GetUsers() *GroupMembers { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Users | ||||
| } | ||||
| 
 | ||||
| // GetUsersOk returns a tuple with the Users field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *GroupEntities) GetUsersOk() (*GroupMembers, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Users, true | ||||
| } | ||||
| 
 | ||||
| // SetUsers sets field value
 | ||||
| func (o *GroupEntities) SetUsers(v GroupMembers) { | ||||
| 	o.Users = &v | ||||
| } | ||||
| 
 | ||||
| // HasUsers returns a boolean if a field has been set.
 | ||||
| func (o *GroupEntities) HasUsers() bool { | ||||
| 	if o != nil && o.Users != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetResources returns the Resources field value
 | ||||
| // If the value is explicit nil, the zero value for ResourceGroups will be returned
 | ||||
| func (o *GroupEntities) GetResources() *ResourceGroups { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Resources | ||||
| } | ||||
| 
 | ||||
| // GetResourcesOk returns a tuple with the Resources field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *GroupEntities) GetResourcesOk() (*ResourceGroups, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Resources, true | ||||
| } | ||||
| 
 | ||||
| // SetResources sets field value
 | ||||
| func (o *GroupEntities) SetResources(v ResourceGroups) { | ||||
| 	o.Resources = &v | ||||
| } | ||||
| 
 | ||||
| // HasResources returns a boolean if a field has been set.
 | ||||
| func (o *GroupEntities) HasResources() bool { | ||||
| 	if o != nil && o.Resources != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o GroupEntities) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.Users != nil { | ||||
| 		toSerialize["users"] = o.Users | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Resources != nil { | ||||
| 		toSerialize["resources"] = o.Resources | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableGroupEntities struct { | ||||
| 	value *GroupEntities | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableGroupEntities) Get() *GroupEntities { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableGroupEntities) Set(val *GroupEntities) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableGroupEntities) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableGroupEntities) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableGroupEntities(val *GroupEntities) *NullableGroupEntities { | ||||
| 	return &NullableGroupEntities{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableGroupEntities) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableGroupEntities) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,235 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // GroupMembers struct for GroupMembers
 | ||||
| type GroupMembers struct { | ||||
| 	// The resource's unique identifier
 | ||||
| 	Id *string `json:"id,omitempty"` | ||||
| 	// The type of object that has been created
 | ||||
| 	Type *Type `json:"type,omitempty"` | ||||
| 	// URL to the object representation (absolute path)
 | ||||
| 	Href *string `json:"href,omitempty"` | ||||
| 	// Array of items in that collection
 | ||||
| 	Items *[]User `json:"items,omitempty"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetId returns the Id field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *GroupMembers) GetId() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Id | ||||
| } | ||||
| 
 | ||||
| // GetIdOk returns a tuple with the Id field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *GroupMembers) GetIdOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Id, true | ||||
| } | ||||
| 
 | ||||
| // SetId sets field value
 | ||||
| func (o *GroupMembers) SetId(v string) { | ||||
| 	o.Id = &v | ||||
| } | ||||
| 
 | ||||
| // HasId returns a boolean if a field has been set.
 | ||||
| func (o *GroupMembers) HasId() bool { | ||||
| 	if o != nil && o.Id != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetType returns the Type field value
 | ||||
| // If the value is explicit nil, the zero value for Type will be returned
 | ||||
| func (o *GroupMembers) GetType() *Type { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Type | ||||
| } | ||||
| 
 | ||||
| // GetTypeOk returns a tuple with the Type field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *GroupMembers) GetTypeOk() (*Type, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Type, true | ||||
| } | ||||
| 
 | ||||
| // SetType sets field value
 | ||||
| func (o *GroupMembers) SetType(v Type) { | ||||
| 	o.Type = &v | ||||
| } | ||||
| 
 | ||||
| // HasType returns a boolean if a field has been set.
 | ||||
| func (o *GroupMembers) HasType() bool { | ||||
| 	if o != nil && o.Type != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetHref returns the Href field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *GroupMembers) GetHref() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Href | ||||
| } | ||||
| 
 | ||||
| // GetHrefOk returns a tuple with the Href field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *GroupMembers) GetHrefOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Href, true | ||||
| } | ||||
| 
 | ||||
| // SetHref sets field value
 | ||||
| func (o *GroupMembers) SetHref(v string) { | ||||
| 	o.Href = &v | ||||
| } | ||||
| 
 | ||||
| // HasHref returns a boolean if a field has been set.
 | ||||
| func (o *GroupMembers) HasHref() bool { | ||||
| 	if o != nil && o.Href != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetItems returns the Items field value
 | ||||
| // If the value is explicit nil, the zero value for []User will be returned
 | ||||
| func (o *GroupMembers) GetItems() *[]User { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Items | ||||
| } | ||||
| 
 | ||||
| // GetItemsOk returns a tuple with the Items field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *GroupMembers) GetItemsOk() (*[]User, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Items, true | ||||
| } | ||||
| 
 | ||||
| // SetItems sets field value
 | ||||
| func (o *GroupMembers) SetItems(v []User) { | ||||
| 	o.Items = &v | ||||
| } | ||||
| 
 | ||||
| // HasItems returns a boolean if a field has been set.
 | ||||
| func (o *GroupMembers) HasItems() bool { | ||||
| 	if o != nil && o.Items != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o GroupMembers) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.Id != nil { | ||||
| 		toSerialize["id"] = o.Id | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Type != nil { | ||||
| 		toSerialize["type"] = o.Type | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Href != nil { | ||||
| 		toSerialize["href"] = o.Href | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Items != nil { | ||||
| 		toSerialize["items"] = o.Items | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableGroupMembers struct { | ||||
| 	value *GroupMembers | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableGroupMembers) Get() *GroupMembers { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableGroupMembers) Set(val *GroupMembers) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableGroupMembers) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableGroupMembers) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableGroupMembers(val *GroupMembers) *NullableGroupMembers { | ||||
| 	return &NullableGroupMembers{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableGroupMembers) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableGroupMembers) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,493 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // GroupProperties struct for GroupProperties
 | ||||
| type GroupProperties struct { | ||||
| 	// A name of that resource
 | ||||
| 	Name *string `json:"name,omitempty"` | ||||
| 	// create data center privilege
 | ||||
| 	CreateDataCenter *bool `json:"createDataCenter,omitempty"` | ||||
| 	// create snapshot privilege
 | ||||
| 	CreateSnapshot *bool `json:"createSnapshot,omitempty"` | ||||
| 	// reserve ip block privilege
 | ||||
| 	ReserveIp *bool `json:"reserveIp,omitempty"` | ||||
| 	// activity log access privilege
 | ||||
| 	AccessActivityLog *bool `json:"accessActivityLog,omitempty"` | ||||
| 	// create pcc privilege
 | ||||
| 	CreatePcc *bool `json:"createPcc,omitempty"` | ||||
| 	// S3 privilege
 | ||||
| 	S3Privilege *bool `json:"s3Privilege,omitempty"` | ||||
| 	// create backup unit privilege
 | ||||
| 	CreateBackupUnit *bool `json:"createBackupUnit,omitempty"` | ||||
| 	// create internet access privilege
 | ||||
| 	CreateInternetAccess *bool `json:"createInternetAccess,omitempty"` | ||||
| 	// create kubernetes cluster privilege
 | ||||
| 	CreateK8sCluster *bool `json:"createK8sCluster,omitempty"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetName returns the Name field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *GroupProperties) GetName() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Name | ||||
| } | ||||
| 
 | ||||
| // GetNameOk returns a tuple with the Name field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *GroupProperties) GetNameOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Name, true | ||||
| } | ||||
| 
 | ||||
| // SetName sets field value
 | ||||
| func (o *GroupProperties) SetName(v string) { | ||||
| 	o.Name = &v | ||||
| } | ||||
| 
 | ||||
| // HasName returns a boolean if a field has been set.
 | ||||
| func (o *GroupProperties) HasName() bool { | ||||
| 	if o != nil && o.Name != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetCreateDataCenter returns the CreateDataCenter field value
 | ||||
| // If the value is explicit nil, the zero value for bool will be returned
 | ||||
| func (o *GroupProperties) GetCreateDataCenter() *bool { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.CreateDataCenter | ||||
| } | ||||
| 
 | ||||
| // GetCreateDataCenterOk returns a tuple with the CreateDataCenter field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *GroupProperties) GetCreateDataCenterOk() (*bool, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.CreateDataCenter, true | ||||
| } | ||||
| 
 | ||||
| // SetCreateDataCenter sets field value
 | ||||
| func (o *GroupProperties) SetCreateDataCenter(v bool) { | ||||
| 	o.CreateDataCenter = &v | ||||
| } | ||||
| 
 | ||||
| // HasCreateDataCenter returns a boolean if a field has been set.
 | ||||
| func (o *GroupProperties) HasCreateDataCenter() bool { | ||||
| 	if o != nil && o.CreateDataCenter != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetCreateSnapshot returns the CreateSnapshot field value
 | ||||
| // If the value is explicit nil, the zero value for bool will be returned
 | ||||
| func (o *GroupProperties) GetCreateSnapshot() *bool { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.CreateSnapshot | ||||
| } | ||||
| 
 | ||||
| // GetCreateSnapshotOk returns a tuple with the CreateSnapshot field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *GroupProperties) GetCreateSnapshotOk() (*bool, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.CreateSnapshot, true | ||||
| } | ||||
| 
 | ||||
| // SetCreateSnapshot sets field value
 | ||||
| func (o *GroupProperties) SetCreateSnapshot(v bool) { | ||||
| 	o.CreateSnapshot = &v | ||||
| } | ||||
| 
 | ||||
| // HasCreateSnapshot returns a boolean if a field has been set.
 | ||||
| func (o *GroupProperties) HasCreateSnapshot() bool { | ||||
| 	if o != nil && o.CreateSnapshot != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetReserveIp returns the ReserveIp field value
 | ||||
| // If the value is explicit nil, the zero value for bool will be returned
 | ||||
| func (o *GroupProperties) GetReserveIp() *bool { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.ReserveIp | ||||
| } | ||||
| 
 | ||||
| // GetReserveIpOk returns a tuple with the ReserveIp field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *GroupProperties) GetReserveIpOk() (*bool, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.ReserveIp, true | ||||
| } | ||||
| 
 | ||||
| // SetReserveIp sets field value
 | ||||
| func (o *GroupProperties) SetReserveIp(v bool) { | ||||
| 	o.ReserveIp = &v | ||||
| } | ||||
| 
 | ||||
| // HasReserveIp returns a boolean if a field has been set.
 | ||||
| func (o *GroupProperties) HasReserveIp() bool { | ||||
| 	if o != nil && o.ReserveIp != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetAccessActivityLog returns the AccessActivityLog field value
 | ||||
| // If the value is explicit nil, the zero value for bool will be returned
 | ||||
| func (o *GroupProperties) GetAccessActivityLog() *bool { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.AccessActivityLog | ||||
| } | ||||
| 
 | ||||
| // GetAccessActivityLogOk returns a tuple with the AccessActivityLog field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *GroupProperties) GetAccessActivityLogOk() (*bool, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.AccessActivityLog, true | ||||
| } | ||||
| 
 | ||||
| // SetAccessActivityLog sets field value
 | ||||
| func (o *GroupProperties) SetAccessActivityLog(v bool) { | ||||
| 	o.AccessActivityLog = &v | ||||
| } | ||||
| 
 | ||||
| // HasAccessActivityLog returns a boolean if a field has been set.
 | ||||
| func (o *GroupProperties) HasAccessActivityLog() bool { | ||||
| 	if o != nil && o.AccessActivityLog != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetCreatePcc returns the CreatePcc field value
 | ||||
| // If the value is explicit nil, the zero value for bool will be returned
 | ||||
| func (o *GroupProperties) GetCreatePcc() *bool { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.CreatePcc | ||||
| } | ||||
| 
 | ||||
| // GetCreatePccOk returns a tuple with the CreatePcc field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *GroupProperties) GetCreatePccOk() (*bool, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.CreatePcc, true | ||||
| } | ||||
| 
 | ||||
| // SetCreatePcc sets field value
 | ||||
| func (o *GroupProperties) SetCreatePcc(v bool) { | ||||
| 	o.CreatePcc = &v | ||||
| } | ||||
| 
 | ||||
| // HasCreatePcc returns a boolean if a field has been set.
 | ||||
| func (o *GroupProperties) HasCreatePcc() bool { | ||||
| 	if o != nil && o.CreatePcc != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetS3Privilege returns the S3Privilege field value
 | ||||
| // If the value is explicit nil, the zero value for bool will be returned
 | ||||
| func (o *GroupProperties) GetS3Privilege() *bool { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.S3Privilege | ||||
| } | ||||
| 
 | ||||
| // GetS3PrivilegeOk returns a tuple with the S3Privilege field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *GroupProperties) GetS3PrivilegeOk() (*bool, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.S3Privilege, true | ||||
| } | ||||
| 
 | ||||
| // SetS3Privilege sets field value
 | ||||
| func (o *GroupProperties) SetS3Privilege(v bool) { | ||||
| 	o.S3Privilege = &v | ||||
| } | ||||
| 
 | ||||
| // HasS3Privilege returns a boolean if a field has been set.
 | ||||
| func (o *GroupProperties) HasS3Privilege() bool { | ||||
| 	if o != nil && o.S3Privilege != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetCreateBackupUnit returns the CreateBackupUnit field value
 | ||||
| // If the value is explicit nil, the zero value for bool will be returned
 | ||||
| func (o *GroupProperties) GetCreateBackupUnit() *bool { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.CreateBackupUnit | ||||
| } | ||||
| 
 | ||||
| // GetCreateBackupUnitOk returns a tuple with the CreateBackupUnit field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *GroupProperties) GetCreateBackupUnitOk() (*bool, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.CreateBackupUnit, true | ||||
| } | ||||
| 
 | ||||
| // SetCreateBackupUnit sets field value
 | ||||
| func (o *GroupProperties) SetCreateBackupUnit(v bool) { | ||||
| 	o.CreateBackupUnit = &v | ||||
| } | ||||
| 
 | ||||
| // HasCreateBackupUnit returns a boolean if a field has been set.
 | ||||
| func (o *GroupProperties) HasCreateBackupUnit() bool { | ||||
| 	if o != nil && o.CreateBackupUnit != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetCreateInternetAccess returns the CreateInternetAccess field value
 | ||||
| // If the value is explicit nil, the zero value for bool will be returned
 | ||||
| func (o *GroupProperties) GetCreateInternetAccess() *bool { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.CreateInternetAccess | ||||
| } | ||||
| 
 | ||||
| // GetCreateInternetAccessOk returns a tuple with the CreateInternetAccess field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *GroupProperties) GetCreateInternetAccessOk() (*bool, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.CreateInternetAccess, true | ||||
| } | ||||
| 
 | ||||
| // SetCreateInternetAccess sets field value
 | ||||
| func (o *GroupProperties) SetCreateInternetAccess(v bool) { | ||||
| 	o.CreateInternetAccess = &v | ||||
| } | ||||
| 
 | ||||
| // HasCreateInternetAccess returns a boolean if a field has been set.
 | ||||
| func (o *GroupProperties) HasCreateInternetAccess() bool { | ||||
| 	if o != nil && o.CreateInternetAccess != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetCreateK8sCluster returns the CreateK8sCluster field value
 | ||||
| // If the value is explicit nil, the zero value for bool will be returned
 | ||||
| func (o *GroupProperties) GetCreateK8sCluster() *bool { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.CreateK8sCluster | ||||
| } | ||||
| 
 | ||||
| // GetCreateK8sClusterOk returns a tuple with the CreateK8sCluster field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *GroupProperties) GetCreateK8sClusterOk() (*bool, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.CreateK8sCluster, true | ||||
| } | ||||
| 
 | ||||
| // SetCreateK8sCluster sets field value
 | ||||
| func (o *GroupProperties) SetCreateK8sCluster(v bool) { | ||||
| 	o.CreateK8sCluster = &v | ||||
| } | ||||
| 
 | ||||
| // HasCreateK8sCluster returns a boolean if a field has been set.
 | ||||
| func (o *GroupProperties) HasCreateK8sCluster() bool { | ||||
| 	if o != nil && o.CreateK8sCluster != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o GroupProperties) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.Name != nil { | ||||
| 		toSerialize["name"] = o.Name | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.CreateDataCenter != nil { | ||||
| 		toSerialize["createDataCenter"] = o.CreateDataCenter | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.CreateSnapshot != nil { | ||||
| 		toSerialize["createSnapshot"] = o.CreateSnapshot | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.ReserveIp != nil { | ||||
| 		toSerialize["reserveIp"] = o.ReserveIp | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.AccessActivityLog != nil { | ||||
| 		toSerialize["accessActivityLog"] = o.AccessActivityLog | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.CreatePcc != nil { | ||||
| 		toSerialize["createPcc"] = o.CreatePcc | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.S3Privilege != nil { | ||||
| 		toSerialize["s3Privilege"] = o.S3Privilege | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.CreateBackupUnit != nil { | ||||
| 		toSerialize["createBackupUnit"] = o.CreateBackupUnit | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.CreateInternetAccess != nil { | ||||
| 		toSerialize["createInternetAccess"] = o.CreateInternetAccess | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.CreateK8sCluster != nil { | ||||
| 		toSerialize["createK8sCluster"] = o.CreateK8sCluster | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableGroupProperties struct { | ||||
| 	value *GroupProperties | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableGroupProperties) Get() *GroupProperties { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableGroupProperties) Set(val *GroupProperties) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableGroupProperties) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableGroupProperties) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableGroupProperties(val *GroupProperties) *NullableGroupProperties { | ||||
| 	return &NullableGroupProperties{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableGroupProperties) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableGroupProperties) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,234 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // GroupShare struct for GroupShare
 | ||||
| type GroupShare struct { | ||||
| 	// The resource's unique identifier
 | ||||
| 	Id *string `json:"id,omitempty"` | ||||
| 	// resource as generic type
 | ||||
| 	Type *Type `json:"type,omitempty"` | ||||
| 	// URL to the object representation (absolute path)
 | ||||
| 	Href *string `json:"href,omitempty"` | ||||
| 	Properties *GroupShareProperties `json:"properties"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetId returns the Id field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *GroupShare) GetId() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Id | ||||
| } | ||||
| 
 | ||||
| // GetIdOk returns a tuple with the Id field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *GroupShare) GetIdOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Id, true | ||||
| } | ||||
| 
 | ||||
| // SetId sets field value
 | ||||
| func (o *GroupShare) SetId(v string) { | ||||
| 	o.Id = &v | ||||
| } | ||||
| 
 | ||||
| // HasId returns a boolean if a field has been set.
 | ||||
| func (o *GroupShare) HasId() bool { | ||||
| 	if o != nil && o.Id != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetType returns the Type field value
 | ||||
| // If the value is explicit nil, the zero value for Type will be returned
 | ||||
| func (o *GroupShare) GetType() *Type { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Type | ||||
| } | ||||
| 
 | ||||
| // GetTypeOk returns a tuple with the Type field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *GroupShare) GetTypeOk() (*Type, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Type, true | ||||
| } | ||||
| 
 | ||||
| // SetType sets field value
 | ||||
| func (o *GroupShare) SetType(v Type) { | ||||
| 	o.Type = &v | ||||
| } | ||||
| 
 | ||||
| // HasType returns a boolean if a field has been set.
 | ||||
| func (o *GroupShare) HasType() bool { | ||||
| 	if o != nil && o.Type != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetHref returns the Href field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *GroupShare) GetHref() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Href | ||||
| } | ||||
| 
 | ||||
| // GetHrefOk returns a tuple with the Href field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *GroupShare) GetHrefOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Href, true | ||||
| } | ||||
| 
 | ||||
| // SetHref sets field value
 | ||||
| func (o *GroupShare) SetHref(v string) { | ||||
| 	o.Href = &v | ||||
| } | ||||
| 
 | ||||
| // HasHref returns a boolean if a field has been set.
 | ||||
| func (o *GroupShare) HasHref() bool { | ||||
| 	if o != nil && o.Href != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetProperties returns the Properties field value
 | ||||
| // If the value is explicit nil, the zero value for GroupShareProperties will be returned
 | ||||
| func (o *GroupShare) GetProperties() *GroupShareProperties { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Properties | ||||
| } | ||||
| 
 | ||||
| // GetPropertiesOk returns a tuple with the Properties field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *GroupShare) GetPropertiesOk() (*GroupShareProperties, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Properties, true | ||||
| } | ||||
| 
 | ||||
| // SetProperties sets field value
 | ||||
| func (o *GroupShare) SetProperties(v GroupShareProperties) { | ||||
| 	o.Properties = &v | ||||
| } | ||||
| 
 | ||||
| // HasProperties returns a boolean if a field has been set.
 | ||||
| func (o *GroupShare) HasProperties() bool { | ||||
| 	if o != nil && o.Properties != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o GroupShare) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.Id != nil { | ||||
| 		toSerialize["id"] = o.Id | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Type != nil { | ||||
| 		toSerialize["type"] = o.Type | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Href != nil { | ||||
| 		toSerialize["href"] = o.Href | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Properties != nil { | ||||
| 		toSerialize["properties"] = o.Properties | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableGroupShare struct { | ||||
| 	value *GroupShare | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableGroupShare) Get() *GroupShare { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableGroupShare) Set(val *GroupShare) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableGroupShare) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableGroupShare) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableGroupShare(val *GroupShare) *NullableGroupShare { | ||||
| 	return &NullableGroupShare{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableGroupShare) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableGroupShare) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,149 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // GroupShareProperties struct for GroupShareProperties
 | ||||
| type GroupShareProperties struct { | ||||
| 	// edit privilege on a resource
 | ||||
| 	EditPrivilege *bool `json:"editPrivilege,omitempty"` | ||||
| 	// share privilege on a resource
 | ||||
| 	SharePrivilege *bool `json:"sharePrivilege,omitempty"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetEditPrivilege returns the EditPrivilege field value
 | ||||
| // If the value is explicit nil, the zero value for bool will be returned
 | ||||
| func (o *GroupShareProperties) GetEditPrivilege() *bool { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.EditPrivilege | ||||
| } | ||||
| 
 | ||||
| // GetEditPrivilegeOk returns a tuple with the EditPrivilege field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *GroupShareProperties) GetEditPrivilegeOk() (*bool, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.EditPrivilege, true | ||||
| } | ||||
| 
 | ||||
| // SetEditPrivilege sets field value
 | ||||
| func (o *GroupShareProperties) SetEditPrivilege(v bool) { | ||||
| 	o.EditPrivilege = &v | ||||
| } | ||||
| 
 | ||||
| // HasEditPrivilege returns a boolean if a field has been set.
 | ||||
| func (o *GroupShareProperties) HasEditPrivilege() bool { | ||||
| 	if o != nil && o.EditPrivilege != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetSharePrivilege returns the SharePrivilege field value
 | ||||
| // If the value is explicit nil, the zero value for bool will be returned
 | ||||
| func (o *GroupShareProperties) GetSharePrivilege() *bool { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.SharePrivilege | ||||
| } | ||||
| 
 | ||||
| // GetSharePrivilegeOk returns a tuple with the SharePrivilege field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *GroupShareProperties) GetSharePrivilegeOk() (*bool, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.SharePrivilege, true | ||||
| } | ||||
| 
 | ||||
| // SetSharePrivilege sets field value
 | ||||
| func (o *GroupShareProperties) SetSharePrivilege(v bool) { | ||||
| 	o.SharePrivilege = &v | ||||
| } | ||||
| 
 | ||||
| // HasSharePrivilege returns a boolean if a field has been set.
 | ||||
| func (o *GroupShareProperties) HasSharePrivilege() bool { | ||||
| 	if o != nil && o.SharePrivilege != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o GroupShareProperties) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.EditPrivilege != nil { | ||||
| 		toSerialize["editPrivilege"] = o.EditPrivilege | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.SharePrivilege != nil { | ||||
| 		toSerialize["sharePrivilege"] = o.SharePrivilege | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableGroupShareProperties struct { | ||||
| 	value *GroupShareProperties | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableGroupShareProperties) Get() *GroupShareProperties { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableGroupShareProperties) Set(val *GroupShareProperties) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableGroupShareProperties) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableGroupShareProperties) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableGroupShareProperties(val *GroupShareProperties) *NullableGroupShareProperties { | ||||
| 	return &NullableGroupShareProperties{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableGroupShareProperties) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableGroupShareProperties) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,235 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // GroupShares struct for GroupShares
 | ||||
| type GroupShares struct { | ||||
| 	// The resource's unique identifier
 | ||||
| 	Id *string `json:"id,omitempty"` | ||||
| 	// Share representing groups and resource relationship
 | ||||
| 	Type *Type `json:"type,omitempty"` | ||||
| 	// URL to the object representation (absolute path)
 | ||||
| 	Href *string `json:"href,omitempty"` | ||||
| 	// Array of items in that collection
 | ||||
| 	Items *[]GroupShare `json:"items,omitempty"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetId returns the Id field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *GroupShares) GetId() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Id | ||||
| } | ||||
| 
 | ||||
| // GetIdOk returns a tuple with the Id field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *GroupShares) GetIdOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Id, true | ||||
| } | ||||
| 
 | ||||
| // SetId sets field value
 | ||||
| func (o *GroupShares) SetId(v string) { | ||||
| 	o.Id = &v | ||||
| } | ||||
| 
 | ||||
| // HasId returns a boolean if a field has been set.
 | ||||
| func (o *GroupShares) HasId() bool { | ||||
| 	if o != nil && o.Id != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetType returns the Type field value
 | ||||
| // If the value is explicit nil, the zero value for Type will be returned
 | ||||
| func (o *GroupShares) GetType() *Type { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Type | ||||
| } | ||||
| 
 | ||||
| // GetTypeOk returns a tuple with the Type field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *GroupShares) GetTypeOk() (*Type, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Type, true | ||||
| } | ||||
| 
 | ||||
| // SetType sets field value
 | ||||
| func (o *GroupShares) SetType(v Type) { | ||||
| 	o.Type = &v | ||||
| } | ||||
| 
 | ||||
| // HasType returns a boolean if a field has been set.
 | ||||
| func (o *GroupShares) HasType() bool { | ||||
| 	if o != nil && o.Type != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetHref returns the Href field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *GroupShares) GetHref() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Href | ||||
| } | ||||
| 
 | ||||
| // GetHrefOk returns a tuple with the Href field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *GroupShares) GetHrefOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Href, true | ||||
| } | ||||
| 
 | ||||
| // SetHref sets field value
 | ||||
| func (o *GroupShares) SetHref(v string) { | ||||
| 	o.Href = &v | ||||
| } | ||||
| 
 | ||||
| // HasHref returns a boolean if a field has been set.
 | ||||
| func (o *GroupShares) HasHref() bool { | ||||
| 	if o != nil && o.Href != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetItems returns the Items field value
 | ||||
| // If the value is explicit nil, the zero value for []GroupShare will be returned
 | ||||
| func (o *GroupShares) GetItems() *[]GroupShare { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Items | ||||
| } | ||||
| 
 | ||||
| // GetItemsOk returns a tuple with the Items field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *GroupShares) GetItemsOk() (*[]GroupShare, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Items, true | ||||
| } | ||||
| 
 | ||||
| // SetItems sets field value
 | ||||
| func (o *GroupShares) SetItems(v []GroupShare) { | ||||
| 	o.Items = &v | ||||
| } | ||||
| 
 | ||||
| // HasItems returns a boolean if a field has been set.
 | ||||
| func (o *GroupShares) HasItems() bool { | ||||
| 	if o != nil && o.Items != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o GroupShares) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.Id != nil { | ||||
| 		toSerialize["id"] = o.Id | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Type != nil { | ||||
| 		toSerialize["type"] = o.Type | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Href != nil { | ||||
| 		toSerialize["href"] = o.Href | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Items != nil { | ||||
| 		toSerialize["items"] = o.Items | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableGroupShares struct { | ||||
| 	value *GroupShares | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableGroupShares) Get() *GroupShares { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableGroupShares) Set(val *GroupShares) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableGroupShares) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableGroupShares) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableGroupShares(val *GroupShares) *NullableGroupShares { | ||||
| 	return &NullableGroupShares{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableGroupShares) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableGroupShares) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,235 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // GroupUsers collection of groups a user is member of
 | ||||
| type GroupUsers struct { | ||||
| 	// The resource's unique identifier
 | ||||
| 	Id *string `json:"id,omitempty"` | ||||
| 	// The type of the resource
 | ||||
| 	Type *Type `json:"type,omitempty"` | ||||
| 	// URL to the object representation (absolute path)
 | ||||
| 	Href *string `json:"href,omitempty"` | ||||
| 	// Array of items in that collection
 | ||||
| 	Items *[]Group `json:"items,omitempty"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetId returns the Id field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *GroupUsers) GetId() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Id | ||||
| } | ||||
| 
 | ||||
| // GetIdOk returns a tuple with the Id field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *GroupUsers) GetIdOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Id, true | ||||
| } | ||||
| 
 | ||||
| // SetId sets field value
 | ||||
| func (o *GroupUsers) SetId(v string) { | ||||
| 	o.Id = &v | ||||
| } | ||||
| 
 | ||||
| // HasId returns a boolean if a field has been set.
 | ||||
| func (o *GroupUsers) HasId() bool { | ||||
| 	if o != nil && o.Id != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetType returns the Type field value
 | ||||
| // If the value is explicit nil, the zero value for Type will be returned
 | ||||
| func (o *GroupUsers) GetType() *Type { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Type | ||||
| } | ||||
| 
 | ||||
| // GetTypeOk returns a tuple with the Type field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *GroupUsers) GetTypeOk() (*Type, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Type, true | ||||
| } | ||||
| 
 | ||||
| // SetType sets field value
 | ||||
| func (o *GroupUsers) SetType(v Type) { | ||||
| 	o.Type = &v | ||||
| } | ||||
| 
 | ||||
| // HasType returns a boolean if a field has been set.
 | ||||
| func (o *GroupUsers) HasType() bool { | ||||
| 	if o != nil && o.Type != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetHref returns the Href field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *GroupUsers) GetHref() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Href | ||||
| } | ||||
| 
 | ||||
| // GetHrefOk returns a tuple with the Href field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *GroupUsers) GetHrefOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Href, true | ||||
| } | ||||
| 
 | ||||
| // SetHref sets field value
 | ||||
| func (o *GroupUsers) SetHref(v string) { | ||||
| 	o.Href = &v | ||||
| } | ||||
| 
 | ||||
| // HasHref returns a boolean if a field has been set.
 | ||||
| func (o *GroupUsers) HasHref() bool { | ||||
| 	if o != nil && o.Href != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetItems returns the Items field value
 | ||||
| // If the value is explicit nil, the zero value for []Group will be returned
 | ||||
| func (o *GroupUsers) GetItems() *[]Group { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Items | ||||
| } | ||||
| 
 | ||||
| // GetItemsOk returns a tuple with the Items field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *GroupUsers) GetItemsOk() (*[]Group, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Items, true | ||||
| } | ||||
| 
 | ||||
| // SetItems sets field value
 | ||||
| func (o *GroupUsers) SetItems(v []Group) { | ||||
| 	o.Items = &v | ||||
| } | ||||
| 
 | ||||
| // HasItems returns a boolean if a field has been set.
 | ||||
| func (o *GroupUsers) HasItems() bool { | ||||
| 	if o != nil && o.Items != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o GroupUsers) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.Id != nil { | ||||
| 		toSerialize["id"] = o.Id | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Type != nil { | ||||
| 		toSerialize["type"] = o.Type | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Href != nil { | ||||
| 		toSerialize["href"] = o.Href | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Items != nil { | ||||
| 		toSerialize["items"] = o.Items | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableGroupUsers struct { | ||||
| 	value *GroupUsers | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableGroupUsers) Get() *GroupUsers { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableGroupUsers) Set(val *GroupUsers) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableGroupUsers) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableGroupUsers) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableGroupUsers(val *GroupUsers) *NullableGroupUsers { | ||||
| 	return &NullableGroupUsers{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableGroupUsers) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableGroupUsers) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,235 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // Groups struct for Groups
 | ||||
| type Groups struct { | ||||
| 	// The resource's unique identifier
 | ||||
| 	Id *string `json:"id,omitempty"` | ||||
| 	// The type of the resource
 | ||||
| 	Type *Type `json:"type,omitempty"` | ||||
| 	// URL to the object representation (absolute path)
 | ||||
| 	Href *string `json:"href,omitempty"` | ||||
| 	// Array of items in that collection
 | ||||
| 	Items *[]Group `json:"items,omitempty"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetId returns the Id field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *Groups) GetId() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Id | ||||
| } | ||||
| 
 | ||||
| // GetIdOk returns a tuple with the Id field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *Groups) GetIdOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Id, true | ||||
| } | ||||
| 
 | ||||
| // SetId sets field value
 | ||||
| func (o *Groups) SetId(v string) { | ||||
| 	o.Id = &v | ||||
| } | ||||
| 
 | ||||
| // HasId returns a boolean if a field has been set.
 | ||||
| func (o *Groups) HasId() bool { | ||||
| 	if o != nil && o.Id != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetType returns the Type field value
 | ||||
| // If the value is explicit nil, the zero value for Type will be returned
 | ||||
| func (o *Groups) GetType() *Type { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Type | ||||
| } | ||||
| 
 | ||||
| // GetTypeOk returns a tuple with the Type field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *Groups) GetTypeOk() (*Type, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Type, true | ||||
| } | ||||
| 
 | ||||
| // SetType sets field value
 | ||||
| func (o *Groups) SetType(v Type) { | ||||
| 	o.Type = &v | ||||
| } | ||||
| 
 | ||||
| // HasType returns a boolean if a field has been set.
 | ||||
| func (o *Groups) HasType() bool { | ||||
| 	if o != nil && o.Type != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetHref returns the Href field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *Groups) GetHref() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Href | ||||
| } | ||||
| 
 | ||||
| // GetHrefOk returns a tuple with the Href field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *Groups) GetHrefOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Href, true | ||||
| } | ||||
| 
 | ||||
| // SetHref sets field value
 | ||||
| func (o *Groups) SetHref(v string) { | ||||
| 	o.Href = &v | ||||
| } | ||||
| 
 | ||||
| // HasHref returns a boolean if a field has been set.
 | ||||
| func (o *Groups) HasHref() bool { | ||||
| 	if o != nil && o.Href != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetItems returns the Items field value
 | ||||
| // If the value is explicit nil, the zero value for []Group will be returned
 | ||||
| func (o *Groups) GetItems() *[]Group { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Items | ||||
| } | ||||
| 
 | ||||
| // GetItemsOk returns a tuple with the Items field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *Groups) GetItemsOk() (*[]Group, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Items, true | ||||
| } | ||||
| 
 | ||||
| // SetItems sets field value
 | ||||
| func (o *Groups) SetItems(v []Group) { | ||||
| 	o.Items = &v | ||||
| } | ||||
| 
 | ||||
| // HasItems returns a boolean if a field has been set.
 | ||||
| func (o *Groups) HasItems() bool { | ||||
| 	if o != nil && o.Items != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o Groups) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.Id != nil { | ||||
| 		toSerialize["id"] = o.Id | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Type != nil { | ||||
| 		toSerialize["type"] = o.Type | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Href != nil { | ||||
| 		toSerialize["href"] = o.Href | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Items != nil { | ||||
| 		toSerialize["items"] = o.Items | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableGroups struct { | ||||
| 	value *Groups | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableGroups) Get() *Groups { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableGroups) Set(val *Groups) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableGroups) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableGroups) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableGroups(val *Groups) *NullableGroups { | ||||
| 	return &NullableGroups{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableGroups) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableGroups) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,276 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // Image struct for Image
 | ||||
| type Image struct { | ||||
| 	// The resource's unique identifier
 | ||||
| 	Id *string `json:"id,omitempty"` | ||||
| 	// The type of object that has been created
 | ||||
| 	Type *Type `json:"type,omitempty"` | ||||
| 	// URL to the object representation (absolute path)
 | ||||
| 	Href *string `json:"href,omitempty"` | ||||
| 	Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` | ||||
| 	Properties *ImageProperties `json:"properties"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetId returns the Id field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *Image) GetId() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Id | ||||
| } | ||||
| 
 | ||||
| // GetIdOk returns a tuple with the Id field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *Image) GetIdOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Id, true | ||||
| } | ||||
| 
 | ||||
| // SetId sets field value
 | ||||
| func (o *Image) SetId(v string) { | ||||
| 	o.Id = &v | ||||
| } | ||||
| 
 | ||||
| // HasId returns a boolean if a field has been set.
 | ||||
| func (o *Image) HasId() bool { | ||||
| 	if o != nil && o.Id != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetType returns the Type field value
 | ||||
| // If the value is explicit nil, the zero value for Type will be returned
 | ||||
| func (o *Image) GetType() *Type { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Type | ||||
| } | ||||
| 
 | ||||
| // GetTypeOk returns a tuple with the Type field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *Image) GetTypeOk() (*Type, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Type, true | ||||
| } | ||||
| 
 | ||||
| // SetType sets field value
 | ||||
| func (o *Image) SetType(v Type) { | ||||
| 	o.Type = &v | ||||
| } | ||||
| 
 | ||||
| // HasType returns a boolean if a field has been set.
 | ||||
| func (o *Image) HasType() bool { | ||||
| 	if o != nil && o.Type != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetHref returns the Href field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *Image) GetHref() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Href | ||||
| } | ||||
| 
 | ||||
| // GetHrefOk returns a tuple with the Href field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *Image) GetHrefOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Href, true | ||||
| } | ||||
| 
 | ||||
| // SetHref sets field value
 | ||||
| func (o *Image) SetHref(v string) { | ||||
| 	o.Href = &v | ||||
| } | ||||
| 
 | ||||
| // HasHref returns a boolean if a field has been set.
 | ||||
| func (o *Image) HasHref() bool { | ||||
| 	if o != nil && o.Href != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetMetadata returns the Metadata field value
 | ||||
| // If the value is explicit nil, the zero value for DatacenterElementMetadata will be returned
 | ||||
| func (o *Image) GetMetadata() *DatacenterElementMetadata { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Metadata | ||||
| } | ||||
| 
 | ||||
| // GetMetadataOk returns a tuple with the Metadata field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *Image) GetMetadataOk() (*DatacenterElementMetadata, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Metadata, true | ||||
| } | ||||
| 
 | ||||
| // SetMetadata sets field value
 | ||||
| func (o *Image) SetMetadata(v DatacenterElementMetadata) { | ||||
| 	o.Metadata = &v | ||||
| } | ||||
| 
 | ||||
| // HasMetadata returns a boolean if a field has been set.
 | ||||
| func (o *Image) HasMetadata() bool { | ||||
| 	if o != nil && o.Metadata != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetProperties returns the Properties field value
 | ||||
| // If the value is explicit nil, the zero value for ImageProperties will be returned
 | ||||
| func (o *Image) GetProperties() *ImageProperties { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Properties | ||||
| } | ||||
| 
 | ||||
| // GetPropertiesOk returns a tuple with the Properties field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *Image) GetPropertiesOk() (*ImageProperties, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Properties, true | ||||
| } | ||||
| 
 | ||||
| // SetProperties sets field value
 | ||||
| func (o *Image) SetProperties(v ImageProperties) { | ||||
| 	o.Properties = &v | ||||
| } | ||||
| 
 | ||||
| // HasProperties returns a boolean if a field has been set.
 | ||||
| func (o *Image) HasProperties() bool { | ||||
| 	if o != nil && o.Properties != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o Image) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.Id != nil { | ||||
| 		toSerialize["id"] = o.Id | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Type != nil { | ||||
| 		toSerialize["type"] = o.Type | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Href != nil { | ||||
| 		toSerialize["href"] = o.Href | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Metadata != nil { | ||||
| 		toSerialize["metadata"] = o.Metadata | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Properties != nil { | ||||
| 		toSerialize["properties"] = o.Properties | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableImage struct { | ||||
| 	value *Image | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableImage) Get() *Image { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableImage) Set(val *Image) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableImage) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableImage) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableImage(val *Image) *NullableImage { | ||||
| 	return &NullableImage{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableImage) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableImage) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,794 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // ImageProperties struct for ImageProperties
 | ||||
| type ImageProperties struct { | ||||
| 	// A name of that resource
 | ||||
| 	Name *string `json:"name,omitempty"` | ||||
| 	// Human readable description
 | ||||
| 	Description *string `json:"description,omitempty"` | ||||
| 	// Location of that image/snapshot. 
 | ||||
| 	Location *string `json:"location,omitempty"` | ||||
| 	// The size of the image in GB
 | ||||
| 	Size *float32 `json:"size,omitempty"` | ||||
| 	// Is capable of CPU hot plug (no reboot required)
 | ||||
| 	CpuHotPlug *bool `json:"cpuHotPlug,omitempty"` | ||||
| 	// Is capable of CPU hot unplug (no reboot required)
 | ||||
| 	CpuHotUnplug *bool `json:"cpuHotUnplug,omitempty"` | ||||
| 	// Is capable of memory hot plug (no reboot required)
 | ||||
| 	RamHotPlug *bool `json:"ramHotPlug,omitempty"` | ||||
| 	// Is capable of memory hot unplug (no reboot required)
 | ||||
| 	RamHotUnplug *bool `json:"ramHotUnplug,omitempty"` | ||||
| 	// Is capable of nic hot plug (no reboot required)
 | ||||
| 	NicHotPlug *bool `json:"nicHotPlug,omitempty"` | ||||
| 	// Is capable of nic hot unplug (no reboot required)
 | ||||
| 	NicHotUnplug *bool `json:"nicHotUnplug,omitempty"` | ||||
| 	// Is capable of Virt-IO drive hot plug (no reboot required)
 | ||||
| 	DiscVirtioHotPlug *bool `json:"discVirtioHotPlug,omitempty"` | ||||
| 	// Is capable of Virt-IO drive hot unplug (no reboot required). This works only for non-Windows virtual Machines.
 | ||||
| 	DiscVirtioHotUnplug *bool `json:"discVirtioHotUnplug,omitempty"` | ||||
| 	// Is capable of SCSI drive hot plug (no reboot required)
 | ||||
| 	DiscScsiHotPlug *bool `json:"discScsiHotPlug,omitempty"` | ||||
| 	// Is capable of SCSI drive hot unplug (no reboot required). This works only for non-Windows virtual Machines.
 | ||||
| 	DiscScsiHotUnplug *bool `json:"discScsiHotUnplug,omitempty"` | ||||
| 	// OS type of this Image
 | ||||
| 	LicenceType *string `json:"licenceType"` | ||||
| 	// This indicates the type of image
 | ||||
| 	ImageType *string `json:"imageType,omitempty"` | ||||
| 	// Indicates if the image is part of the public repository or not
 | ||||
| 	Public *bool `json:"public,omitempty"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetName returns the Name field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *ImageProperties) GetName() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Name | ||||
| } | ||||
| 
 | ||||
| // GetNameOk returns a tuple with the Name field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *ImageProperties) GetNameOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Name, true | ||||
| } | ||||
| 
 | ||||
| // SetName sets field value
 | ||||
| func (o *ImageProperties) SetName(v string) { | ||||
| 	o.Name = &v | ||||
| } | ||||
| 
 | ||||
| // HasName returns a boolean if a field has been set.
 | ||||
| func (o *ImageProperties) HasName() bool { | ||||
| 	if o != nil && o.Name != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetDescription returns the Description field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *ImageProperties) GetDescription() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Description | ||||
| } | ||||
| 
 | ||||
| // GetDescriptionOk returns a tuple with the Description field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *ImageProperties) GetDescriptionOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Description, true | ||||
| } | ||||
| 
 | ||||
| // SetDescription sets field value
 | ||||
| func (o *ImageProperties) SetDescription(v string) { | ||||
| 	o.Description = &v | ||||
| } | ||||
| 
 | ||||
| // HasDescription returns a boolean if a field has been set.
 | ||||
| func (o *ImageProperties) HasDescription() bool { | ||||
| 	if o != nil && o.Description != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetLocation returns the Location field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *ImageProperties) GetLocation() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Location | ||||
| } | ||||
| 
 | ||||
| // GetLocationOk returns a tuple with the Location field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *ImageProperties) GetLocationOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Location, true | ||||
| } | ||||
| 
 | ||||
| // SetLocation sets field value
 | ||||
| func (o *ImageProperties) SetLocation(v string) { | ||||
| 	o.Location = &v | ||||
| } | ||||
| 
 | ||||
| // HasLocation returns a boolean if a field has been set.
 | ||||
| func (o *ImageProperties) HasLocation() bool { | ||||
| 	if o != nil && o.Location != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetSize returns the Size field value
 | ||||
| // If the value is explicit nil, the zero value for float32 will be returned
 | ||||
| func (o *ImageProperties) GetSize() *float32 { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Size | ||||
| } | ||||
| 
 | ||||
| // GetSizeOk returns a tuple with the Size field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *ImageProperties) GetSizeOk() (*float32, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Size, true | ||||
| } | ||||
| 
 | ||||
| // SetSize sets field value
 | ||||
| func (o *ImageProperties) SetSize(v float32) { | ||||
| 	o.Size = &v | ||||
| } | ||||
| 
 | ||||
| // HasSize returns a boolean if a field has been set.
 | ||||
| func (o *ImageProperties) HasSize() bool { | ||||
| 	if o != nil && o.Size != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetCpuHotPlug returns the CpuHotPlug field value
 | ||||
| // If the value is explicit nil, the zero value for bool will be returned
 | ||||
| func (o *ImageProperties) GetCpuHotPlug() *bool { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.CpuHotPlug | ||||
| } | ||||
| 
 | ||||
| // GetCpuHotPlugOk returns a tuple with the CpuHotPlug field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *ImageProperties) GetCpuHotPlugOk() (*bool, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.CpuHotPlug, true | ||||
| } | ||||
| 
 | ||||
| // SetCpuHotPlug sets field value
 | ||||
| func (o *ImageProperties) SetCpuHotPlug(v bool) { | ||||
| 	o.CpuHotPlug = &v | ||||
| } | ||||
| 
 | ||||
| // HasCpuHotPlug returns a boolean if a field has been set.
 | ||||
| func (o *ImageProperties) HasCpuHotPlug() bool { | ||||
| 	if o != nil && o.CpuHotPlug != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetCpuHotUnplug returns the CpuHotUnplug field value
 | ||||
| // If the value is explicit nil, the zero value for bool will be returned
 | ||||
| func (o *ImageProperties) GetCpuHotUnplug() *bool { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.CpuHotUnplug | ||||
| } | ||||
| 
 | ||||
| // GetCpuHotUnplugOk returns a tuple with the CpuHotUnplug field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *ImageProperties) GetCpuHotUnplugOk() (*bool, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.CpuHotUnplug, true | ||||
| } | ||||
| 
 | ||||
| // SetCpuHotUnplug sets field value
 | ||||
| func (o *ImageProperties) SetCpuHotUnplug(v bool) { | ||||
| 	o.CpuHotUnplug = &v | ||||
| } | ||||
| 
 | ||||
| // HasCpuHotUnplug returns a boolean if a field has been set.
 | ||||
| func (o *ImageProperties) HasCpuHotUnplug() bool { | ||||
| 	if o != nil && o.CpuHotUnplug != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetRamHotPlug returns the RamHotPlug field value
 | ||||
| // If the value is explicit nil, the zero value for bool will be returned
 | ||||
| func (o *ImageProperties) GetRamHotPlug() *bool { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.RamHotPlug | ||||
| } | ||||
| 
 | ||||
| // GetRamHotPlugOk returns a tuple with the RamHotPlug field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *ImageProperties) GetRamHotPlugOk() (*bool, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.RamHotPlug, true | ||||
| } | ||||
| 
 | ||||
| // SetRamHotPlug sets field value
 | ||||
| func (o *ImageProperties) SetRamHotPlug(v bool) { | ||||
| 	o.RamHotPlug = &v | ||||
| } | ||||
| 
 | ||||
| // HasRamHotPlug returns a boolean if a field has been set.
 | ||||
| func (o *ImageProperties) HasRamHotPlug() bool { | ||||
| 	if o != nil && o.RamHotPlug != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetRamHotUnplug returns the RamHotUnplug field value
 | ||||
| // If the value is explicit nil, the zero value for bool will be returned
 | ||||
| func (o *ImageProperties) GetRamHotUnplug() *bool { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.RamHotUnplug | ||||
| } | ||||
| 
 | ||||
| // GetRamHotUnplugOk returns a tuple with the RamHotUnplug field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *ImageProperties) GetRamHotUnplugOk() (*bool, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.RamHotUnplug, true | ||||
| } | ||||
| 
 | ||||
| // SetRamHotUnplug sets field value
 | ||||
| func (o *ImageProperties) SetRamHotUnplug(v bool) { | ||||
| 	o.RamHotUnplug = &v | ||||
| } | ||||
| 
 | ||||
| // HasRamHotUnplug returns a boolean if a field has been set.
 | ||||
| func (o *ImageProperties) HasRamHotUnplug() bool { | ||||
| 	if o != nil && o.RamHotUnplug != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetNicHotPlug returns the NicHotPlug field value
 | ||||
| // If the value is explicit nil, the zero value for bool will be returned
 | ||||
| func (o *ImageProperties) GetNicHotPlug() *bool { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.NicHotPlug | ||||
| } | ||||
| 
 | ||||
| // GetNicHotPlugOk returns a tuple with the NicHotPlug field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *ImageProperties) GetNicHotPlugOk() (*bool, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.NicHotPlug, true | ||||
| } | ||||
| 
 | ||||
| // SetNicHotPlug sets field value
 | ||||
| func (o *ImageProperties) SetNicHotPlug(v bool) { | ||||
| 	o.NicHotPlug = &v | ||||
| } | ||||
| 
 | ||||
| // HasNicHotPlug returns a boolean if a field has been set.
 | ||||
| func (o *ImageProperties) HasNicHotPlug() bool { | ||||
| 	if o != nil && o.NicHotPlug != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetNicHotUnplug returns the NicHotUnplug field value
 | ||||
| // If the value is explicit nil, the zero value for bool will be returned
 | ||||
| func (o *ImageProperties) GetNicHotUnplug() *bool { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.NicHotUnplug | ||||
| } | ||||
| 
 | ||||
| // GetNicHotUnplugOk returns a tuple with the NicHotUnplug field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *ImageProperties) GetNicHotUnplugOk() (*bool, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.NicHotUnplug, true | ||||
| } | ||||
| 
 | ||||
| // SetNicHotUnplug sets field value
 | ||||
| func (o *ImageProperties) SetNicHotUnplug(v bool) { | ||||
| 	o.NicHotUnplug = &v | ||||
| } | ||||
| 
 | ||||
| // HasNicHotUnplug returns a boolean if a field has been set.
 | ||||
| func (o *ImageProperties) HasNicHotUnplug() bool { | ||||
| 	if o != nil && o.NicHotUnplug != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetDiscVirtioHotPlug returns the DiscVirtioHotPlug field value
 | ||||
| // If the value is explicit nil, the zero value for bool will be returned
 | ||||
| func (o *ImageProperties) GetDiscVirtioHotPlug() *bool { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.DiscVirtioHotPlug | ||||
| } | ||||
| 
 | ||||
| // GetDiscVirtioHotPlugOk returns a tuple with the DiscVirtioHotPlug field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *ImageProperties) GetDiscVirtioHotPlugOk() (*bool, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.DiscVirtioHotPlug, true | ||||
| } | ||||
| 
 | ||||
| // SetDiscVirtioHotPlug sets field value
 | ||||
| func (o *ImageProperties) SetDiscVirtioHotPlug(v bool) { | ||||
| 	o.DiscVirtioHotPlug = &v | ||||
| } | ||||
| 
 | ||||
| // HasDiscVirtioHotPlug returns a boolean if a field has been set.
 | ||||
| func (o *ImageProperties) HasDiscVirtioHotPlug() bool { | ||||
| 	if o != nil && o.DiscVirtioHotPlug != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetDiscVirtioHotUnplug returns the DiscVirtioHotUnplug field value
 | ||||
| // If the value is explicit nil, the zero value for bool will be returned
 | ||||
| func (o *ImageProperties) GetDiscVirtioHotUnplug() *bool { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.DiscVirtioHotUnplug | ||||
| } | ||||
| 
 | ||||
| // GetDiscVirtioHotUnplugOk returns a tuple with the DiscVirtioHotUnplug field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *ImageProperties) GetDiscVirtioHotUnplugOk() (*bool, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.DiscVirtioHotUnplug, true | ||||
| } | ||||
| 
 | ||||
| // SetDiscVirtioHotUnplug sets field value
 | ||||
| func (o *ImageProperties) SetDiscVirtioHotUnplug(v bool) { | ||||
| 	o.DiscVirtioHotUnplug = &v | ||||
| } | ||||
| 
 | ||||
| // HasDiscVirtioHotUnplug returns a boolean if a field has been set.
 | ||||
| func (o *ImageProperties) HasDiscVirtioHotUnplug() bool { | ||||
| 	if o != nil && o.DiscVirtioHotUnplug != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetDiscScsiHotPlug returns the DiscScsiHotPlug field value
 | ||||
| // If the value is explicit nil, the zero value for bool will be returned
 | ||||
| func (o *ImageProperties) GetDiscScsiHotPlug() *bool { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.DiscScsiHotPlug | ||||
| } | ||||
| 
 | ||||
| // GetDiscScsiHotPlugOk returns a tuple with the DiscScsiHotPlug field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *ImageProperties) GetDiscScsiHotPlugOk() (*bool, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.DiscScsiHotPlug, true | ||||
| } | ||||
| 
 | ||||
| // SetDiscScsiHotPlug sets field value
 | ||||
| func (o *ImageProperties) SetDiscScsiHotPlug(v bool) { | ||||
| 	o.DiscScsiHotPlug = &v | ||||
| } | ||||
| 
 | ||||
| // HasDiscScsiHotPlug returns a boolean if a field has been set.
 | ||||
| func (o *ImageProperties) HasDiscScsiHotPlug() bool { | ||||
| 	if o != nil && o.DiscScsiHotPlug != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetDiscScsiHotUnplug returns the DiscScsiHotUnplug field value
 | ||||
| // If the value is explicit nil, the zero value for bool will be returned
 | ||||
| func (o *ImageProperties) GetDiscScsiHotUnplug() *bool { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.DiscScsiHotUnplug | ||||
| } | ||||
| 
 | ||||
| // GetDiscScsiHotUnplugOk returns a tuple with the DiscScsiHotUnplug field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *ImageProperties) GetDiscScsiHotUnplugOk() (*bool, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.DiscScsiHotUnplug, true | ||||
| } | ||||
| 
 | ||||
| // SetDiscScsiHotUnplug sets field value
 | ||||
| func (o *ImageProperties) SetDiscScsiHotUnplug(v bool) { | ||||
| 	o.DiscScsiHotUnplug = &v | ||||
| } | ||||
| 
 | ||||
| // HasDiscScsiHotUnplug returns a boolean if a field has been set.
 | ||||
| func (o *ImageProperties) HasDiscScsiHotUnplug() bool { | ||||
| 	if o != nil && o.DiscScsiHotUnplug != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetLicenceType returns the LicenceType field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *ImageProperties) GetLicenceType() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.LicenceType | ||||
| } | ||||
| 
 | ||||
| // GetLicenceTypeOk returns a tuple with the LicenceType field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *ImageProperties) GetLicenceTypeOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.LicenceType, true | ||||
| } | ||||
| 
 | ||||
| // SetLicenceType sets field value
 | ||||
| func (o *ImageProperties) SetLicenceType(v string) { | ||||
| 	o.LicenceType = &v | ||||
| } | ||||
| 
 | ||||
| // HasLicenceType returns a boolean if a field has been set.
 | ||||
| func (o *ImageProperties) HasLicenceType() bool { | ||||
| 	if o != nil && o.LicenceType != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetImageType returns the ImageType field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *ImageProperties) GetImageType() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.ImageType | ||||
| } | ||||
| 
 | ||||
| // GetImageTypeOk returns a tuple with the ImageType field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *ImageProperties) GetImageTypeOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.ImageType, true | ||||
| } | ||||
| 
 | ||||
| // SetImageType sets field value
 | ||||
| func (o *ImageProperties) SetImageType(v string) { | ||||
| 	o.ImageType = &v | ||||
| } | ||||
| 
 | ||||
| // HasImageType returns a boolean if a field has been set.
 | ||||
| func (o *ImageProperties) HasImageType() bool { | ||||
| 	if o != nil && o.ImageType != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetPublic returns the Public field value
 | ||||
| // If the value is explicit nil, the zero value for bool will be returned
 | ||||
| func (o *ImageProperties) GetPublic() *bool { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Public | ||||
| } | ||||
| 
 | ||||
| // GetPublicOk returns a tuple with the Public field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *ImageProperties) GetPublicOk() (*bool, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Public, true | ||||
| } | ||||
| 
 | ||||
| // SetPublic sets field value
 | ||||
| func (o *ImageProperties) SetPublic(v bool) { | ||||
| 	o.Public = &v | ||||
| } | ||||
| 
 | ||||
| // HasPublic returns a boolean if a field has been set.
 | ||||
| func (o *ImageProperties) HasPublic() bool { | ||||
| 	if o != nil && o.Public != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o ImageProperties) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.Name != nil { | ||||
| 		toSerialize["name"] = o.Name | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Description != nil { | ||||
| 		toSerialize["description"] = o.Description | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Location != nil { | ||||
| 		toSerialize["location"] = o.Location | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Size != nil { | ||||
| 		toSerialize["size"] = o.Size | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.CpuHotPlug != nil { | ||||
| 		toSerialize["cpuHotPlug"] = o.CpuHotPlug | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.CpuHotUnplug != nil { | ||||
| 		toSerialize["cpuHotUnplug"] = o.CpuHotUnplug | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.RamHotPlug != nil { | ||||
| 		toSerialize["ramHotPlug"] = o.RamHotPlug | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.RamHotUnplug != nil { | ||||
| 		toSerialize["ramHotUnplug"] = o.RamHotUnplug | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.NicHotPlug != nil { | ||||
| 		toSerialize["nicHotPlug"] = o.NicHotPlug | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.NicHotUnplug != nil { | ||||
| 		toSerialize["nicHotUnplug"] = o.NicHotUnplug | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.DiscVirtioHotPlug != nil { | ||||
| 		toSerialize["discVirtioHotPlug"] = o.DiscVirtioHotPlug | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.DiscVirtioHotUnplug != nil { | ||||
| 		toSerialize["discVirtioHotUnplug"] = o.DiscVirtioHotUnplug | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.DiscScsiHotPlug != nil { | ||||
| 		toSerialize["discScsiHotPlug"] = o.DiscScsiHotPlug | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.DiscScsiHotUnplug != nil { | ||||
| 		toSerialize["discScsiHotUnplug"] = o.DiscScsiHotUnplug | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.LicenceType != nil { | ||||
| 		toSerialize["licenceType"] = o.LicenceType | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.ImageType != nil { | ||||
| 		toSerialize["imageType"] = o.ImageType | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Public != nil { | ||||
| 		toSerialize["public"] = o.Public | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableImageProperties struct { | ||||
| 	value *ImageProperties | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableImageProperties) Get() *ImageProperties { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableImageProperties) Set(val *ImageProperties) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableImageProperties) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableImageProperties) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableImageProperties(val *ImageProperties) *NullableImageProperties { | ||||
| 	return &NullableImageProperties{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableImageProperties) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableImageProperties) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,235 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // Images struct for Images
 | ||||
| type Images struct { | ||||
| 	// The resource's unique identifier
 | ||||
| 	Id *string `json:"id,omitempty"` | ||||
| 	// The type of object that has been created
 | ||||
| 	Type *Type `json:"type,omitempty"` | ||||
| 	// URL to the object representation (absolute path)
 | ||||
| 	Href *string `json:"href,omitempty"` | ||||
| 	// Array of items in that collection
 | ||||
| 	Items *[]Image `json:"items,omitempty"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetId returns the Id field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *Images) GetId() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Id | ||||
| } | ||||
| 
 | ||||
| // GetIdOk returns a tuple with the Id field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *Images) GetIdOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Id, true | ||||
| } | ||||
| 
 | ||||
| // SetId sets field value
 | ||||
| func (o *Images) SetId(v string) { | ||||
| 	o.Id = &v | ||||
| } | ||||
| 
 | ||||
| // HasId returns a boolean if a field has been set.
 | ||||
| func (o *Images) HasId() bool { | ||||
| 	if o != nil && o.Id != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetType returns the Type field value
 | ||||
| // If the value is explicit nil, the zero value for Type will be returned
 | ||||
| func (o *Images) GetType() *Type { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Type | ||||
| } | ||||
| 
 | ||||
| // GetTypeOk returns a tuple with the Type field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *Images) GetTypeOk() (*Type, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Type, true | ||||
| } | ||||
| 
 | ||||
| // SetType sets field value
 | ||||
| func (o *Images) SetType(v Type) { | ||||
| 	o.Type = &v | ||||
| } | ||||
| 
 | ||||
| // HasType returns a boolean if a field has been set.
 | ||||
| func (o *Images) HasType() bool { | ||||
| 	if o != nil && o.Type != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetHref returns the Href field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *Images) GetHref() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Href | ||||
| } | ||||
| 
 | ||||
| // GetHrefOk returns a tuple with the Href field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *Images) GetHrefOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Href, true | ||||
| } | ||||
| 
 | ||||
| // SetHref sets field value
 | ||||
| func (o *Images) SetHref(v string) { | ||||
| 	o.Href = &v | ||||
| } | ||||
| 
 | ||||
| // HasHref returns a boolean if a field has been set.
 | ||||
| func (o *Images) HasHref() bool { | ||||
| 	if o != nil && o.Href != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetItems returns the Items field value
 | ||||
| // If the value is explicit nil, the zero value for []Image will be returned
 | ||||
| func (o *Images) GetItems() *[]Image { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Items | ||||
| } | ||||
| 
 | ||||
| // GetItemsOk returns a tuple with the Items field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *Images) GetItemsOk() (*[]Image, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Items, true | ||||
| } | ||||
| 
 | ||||
| // SetItems sets field value
 | ||||
| func (o *Images) SetItems(v []Image) { | ||||
| 	o.Items = &v | ||||
| } | ||||
| 
 | ||||
| // HasItems returns a boolean if a field has been set.
 | ||||
| func (o *Images) HasItems() bool { | ||||
| 	if o != nil && o.Items != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o Images) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.Id != nil { | ||||
| 		toSerialize["id"] = o.Id | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Type != nil { | ||||
| 		toSerialize["type"] = o.Type | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Href != nil { | ||||
| 		toSerialize["href"] = o.Href | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Items != nil { | ||||
| 		toSerialize["items"] = o.Items | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableImages struct { | ||||
| 	value *Images | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableImages) Get() *Images { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableImages) Set(val *Images) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableImages) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableImages) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableImages(val *Images) *NullableImages { | ||||
| 	return &NullableImages{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableImages) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableImages) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,192 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // Info struct for Info
 | ||||
| type Info struct { | ||||
| 	// API entry point
 | ||||
| 	Href *string `json:"href,omitempty"` | ||||
| 	// Name of the API
 | ||||
| 	Name *string `json:"name,omitempty"` | ||||
| 	// Version of the API
 | ||||
| 	Version *string `json:"version,omitempty"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetHref returns the Href field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *Info) GetHref() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Href | ||||
| } | ||||
| 
 | ||||
| // GetHrefOk returns a tuple with the Href field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *Info) GetHrefOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Href, true | ||||
| } | ||||
| 
 | ||||
| // SetHref sets field value
 | ||||
| func (o *Info) SetHref(v string) { | ||||
| 	o.Href = &v | ||||
| } | ||||
| 
 | ||||
| // HasHref returns a boolean if a field has been set.
 | ||||
| func (o *Info) HasHref() bool { | ||||
| 	if o != nil && o.Href != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetName returns the Name field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *Info) GetName() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Name | ||||
| } | ||||
| 
 | ||||
| // GetNameOk returns a tuple with the Name field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *Info) GetNameOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Name, true | ||||
| } | ||||
| 
 | ||||
| // SetName sets field value
 | ||||
| func (o *Info) SetName(v string) { | ||||
| 	o.Name = &v | ||||
| } | ||||
| 
 | ||||
| // HasName returns a boolean if a field has been set.
 | ||||
| func (o *Info) HasName() bool { | ||||
| 	if o != nil && o.Name != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetVersion returns the Version field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *Info) GetVersion() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Version | ||||
| } | ||||
| 
 | ||||
| // GetVersionOk returns a tuple with the Version field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *Info) GetVersionOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Version, true | ||||
| } | ||||
| 
 | ||||
| // SetVersion sets field value
 | ||||
| func (o *Info) SetVersion(v string) { | ||||
| 	o.Version = &v | ||||
| } | ||||
| 
 | ||||
| // HasVersion returns a boolean if a field has been set.
 | ||||
| func (o *Info) HasVersion() bool { | ||||
| 	if o != nil && o.Version != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o Info) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.Href != nil { | ||||
| 		toSerialize["href"] = o.Href | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Name != nil { | ||||
| 		toSerialize["name"] = o.Name | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Version != nil { | ||||
| 		toSerialize["version"] = o.Version | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableInfo struct { | ||||
| 	value *Info | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableInfo) Get() *Info { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableInfo) Set(val *Info) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableInfo) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableInfo) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableInfo(val *Info) *NullableInfo { | ||||
| 	return &NullableInfo{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableInfo) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableInfo) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,276 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // IpBlock struct for IpBlock
 | ||||
| type IpBlock struct { | ||||
| 	// The resource's unique identifier
 | ||||
| 	Id *string `json:"id,omitempty"` | ||||
| 	// The type of object that has been created
 | ||||
| 	Type *Type `json:"type,omitempty"` | ||||
| 	// URL to the object representation (absolute path)
 | ||||
| 	Href *string `json:"href,omitempty"` | ||||
| 	Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` | ||||
| 	Properties *IpBlockProperties `json:"properties"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetId returns the Id field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *IpBlock) GetId() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Id | ||||
| } | ||||
| 
 | ||||
| // GetIdOk returns a tuple with the Id field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *IpBlock) GetIdOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Id, true | ||||
| } | ||||
| 
 | ||||
| // SetId sets field value
 | ||||
| func (o *IpBlock) SetId(v string) { | ||||
| 	o.Id = &v | ||||
| } | ||||
| 
 | ||||
| // HasId returns a boolean if a field has been set.
 | ||||
| func (o *IpBlock) HasId() bool { | ||||
| 	if o != nil && o.Id != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetType returns the Type field value
 | ||||
| // If the value is explicit nil, the zero value for Type will be returned
 | ||||
| func (o *IpBlock) GetType() *Type { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Type | ||||
| } | ||||
| 
 | ||||
| // GetTypeOk returns a tuple with the Type field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *IpBlock) GetTypeOk() (*Type, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Type, true | ||||
| } | ||||
| 
 | ||||
| // SetType sets field value
 | ||||
| func (o *IpBlock) SetType(v Type) { | ||||
| 	o.Type = &v | ||||
| } | ||||
| 
 | ||||
| // HasType returns a boolean if a field has been set.
 | ||||
| func (o *IpBlock) HasType() bool { | ||||
| 	if o != nil && o.Type != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetHref returns the Href field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *IpBlock) GetHref() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Href | ||||
| } | ||||
| 
 | ||||
| // GetHrefOk returns a tuple with the Href field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *IpBlock) GetHrefOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Href, true | ||||
| } | ||||
| 
 | ||||
| // SetHref sets field value
 | ||||
| func (o *IpBlock) SetHref(v string) { | ||||
| 	o.Href = &v | ||||
| } | ||||
| 
 | ||||
| // HasHref returns a boolean if a field has been set.
 | ||||
| func (o *IpBlock) HasHref() bool { | ||||
| 	if o != nil && o.Href != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetMetadata returns the Metadata field value
 | ||||
| // If the value is explicit nil, the zero value for DatacenterElementMetadata will be returned
 | ||||
| func (o *IpBlock) GetMetadata() *DatacenterElementMetadata { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Metadata | ||||
| } | ||||
| 
 | ||||
| // GetMetadataOk returns a tuple with the Metadata field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *IpBlock) GetMetadataOk() (*DatacenterElementMetadata, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Metadata, true | ||||
| } | ||||
| 
 | ||||
| // SetMetadata sets field value
 | ||||
| func (o *IpBlock) SetMetadata(v DatacenterElementMetadata) { | ||||
| 	o.Metadata = &v | ||||
| } | ||||
| 
 | ||||
| // HasMetadata returns a boolean if a field has been set.
 | ||||
| func (o *IpBlock) HasMetadata() bool { | ||||
| 	if o != nil && o.Metadata != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetProperties returns the Properties field value
 | ||||
| // If the value is explicit nil, the zero value for IpBlockProperties will be returned
 | ||||
| func (o *IpBlock) GetProperties() *IpBlockProperties { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Properties | ||||
| } | ||||
| 
 | ||||
| // GetPropertiesOk returns a tuple with the Properties field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *IpBlock) GetPropertiesOk() (*IpBlockProperties, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Properties, true | ||||
| } | ||||
| 
 | ||||
| // SetProperties sets field value
 | ||||
| func (o *IpBlock) SetProperties(v IpBlockProperties) { | ||||
| 	o.Properties = &v | ||||
| } | ||||
| 
 | ||||
| // HasProperties returns a boolean if a field has been set.
 | ||||
| func (o *IpBlock) HasProperties() bool { | ||||
| 	if o != nil && o.Properties != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o IpBlock) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.Id != nil { | ||||
| 		toSerialize["id"] = o.Id | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Type != nil { | ||||
| 		toSerialize["type"] = o.Type | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Href != nil { | ||||
| 		toSerialize["href"] = o.Href | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Metadata != nil { | ||||
| 		toSerialize["metadata"] = o.Metadata | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Properties != nil { | ||||
| 		toSerialize["properties"] = o.Properties | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableIpBlock struct { | ||||
| 	value *IpBlock | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableIpBlock) Get() *IpBlock { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableIpBlock) Set(val *IpBlock) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableIpBlock) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableIpBlock) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableIpBlock(val *IpBlock) *NullableIpBlock { | ||||
| 	return &NullableIpBlock{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableIpBlock) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableIpBlock) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,278 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // IpBlockProperties struct for IpBlockProperties
 | ||||
| type IpBlockProperties struct { | ||||
| 	// A collection of IPs associated with the IP Block
 | ||||
| 	Ips *[]string `json:"ips,omitempty"` | ||||
| 	// Location of that IP Block. Property cannot be modified after creation (disallowed in update requests)
 | ||||
| 	Location *string `json:"location"` | ||||
| 	// The size of the IP block
 | ||||
| 	Size *int32 `json:"size"` | ||||
| 	// A name of that resource
 | ||||
| 	Name *string `json:"name,omitempty"` | ||||
| 	// Read-Only attribute. Lists consumption detail of an individual ip
 | ||||
| 	IpConsumers *[]IpConsumer `json:"ipConsumers,omitempty"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetIps returns the Ips field value
 | ||||
| // If the value is explicit nil, the zero value for []string will be returned
 | ||||
| func (o *IpBlockProperties) GetIps() *[]string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Ips | ||||
| } | ||||
| 
 | ||||
| // GetIpsOk returns a tuple with the Ips field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *IpBlockProperties) GetIpsOk() (*[]string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Ips, true | ||||
| } | ||||
| 
 | ||||
| // SetIps sets field value
 | ||||
| func (o *IpBlockProperties) SetIps(v []string) { | ||||
| 	o.Ips = &v | ||||
| } | ||||
| 
 | ||||
| // HasIps returns a boolean if a field has been set.
 | ||||
| func (o *IpBlockProperties) HasIps() bool { | ||||
| 	if o != nil && o.Ips != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetLocation returns the Location field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *IpBlockProperties) GetLocation() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Location | ||||
| } | ||||
| 
 | ||||
| // GetLocationOk returns a tuple with the Location field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *IpBlockProperties) GetLocationOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Location, true | ||||
| } | ||||
| 
 | ||||
| // SetLocation sets field value
 | ||||
| func (o *IpBlockProperties) SetLocation(v string) { | ||||
| 	o.Location = &v | ||||
| } | ||||
| 
 | ||||
| // HasLocation returns a boolean if a field has been set.
 | ||||
| func (o *IpBlockProperties) HasLocation() bool { | ||||
| 	if o != nil && o.Location != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetSize returns the Size field value
 | ||||
| // If the value is explicit nil, the zero value for int32 will be returned
 | ||||
| func (o *IpBlockProperties) GetSize() *int32 { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Size | ||||
| } | ||||
| 
 | ||||
| // GetSizeOk returns a tuple with the Size field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *IpBlockProperties) GetSizeOk() (*int32, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Size, true | ||||
| } | ||||
| 
 | ||||
| // SetSize sets field value
 | ||||
| func (o *IpBlockProperties) SetSize(v int32) { | ||||
| 	o.Size = &v | ||||
| } | ||||
| 
 | ||||
| // HasSize returns a boolean if a field has been set.
 | ||||
| func (o *IpBlockProperties) HasSize() bool { | ||||
| 	if o != nil && o.Size != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetName returns the Name field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *IpBlockProperties) GetName() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Name | ||||
| } | ||||
| 
 | ||||
| // GetNameOk returns a tuple with the Name field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *IpBlockProperties) GetNameOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Name, true | ||||
| } | ||||
| 
 | ||||
| // SetName sets field value
 | ||||
| func (o *IpBlockProperties) SetName(v string) { | ||||
| 	o.Name = &v | ||||
| } | ||||
| 
 | ||||
| // HasName returns a boolean if a field has been set.
 | ||||
| func (o *IpBlockProperties) HasName() bool { | ||||
| 	if o != nil && o.Name != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetIpConsumers returns the IpConsumers field value
 | ||||
| // If the value is explicit nil, the zero value for []IpConsumer will be returned
 | ||||
| func (o *IpBlockProperties) GetIpConsumers() *[]IpConsumer { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.IpConsumers | ||||
| } | ||||
| 
 | ||||
| // GetIpConsumersOk returns a tuple with the IpConsumers field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *IpBlockProperties) GetIpConsumersOk() (*[]IpConsumer, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.IpConsumers, true | ||||
| } | ||||
| 
 | ||||
| // SetIpConsumers sets field value
 | ||||
| func (o *IpBlockProperties) SetIpConsumers(v []IpConsumer) { | ||||
| 	o.IpConsumers = &v | ||||
| } | ||||
| 
 | ||||
| // HasIpConsumers returns a boolean if a field has been set.
 | ||||
| func (o *IpBlockProperties) HasIpConsumers() bool { | ||||
| 	if o != nil && o.IpConsumers != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o IpBlockProperties) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.Ips != nil { | ||||
| 		toSerialize["ips"] = o.Ips | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Location != nil { | ||||
| 		toSerialize["location"] = o.Location | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Size != nil { | ||||
| 		toSerialize["size"] = o.Size | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Name != nil { | ||||
| 		toSerialize["name"] = o.Name | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.IpConsumers != nil { | ||||
| 		toSerialize["ipConsumers"] = o.IpConsumers | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableIpBlockProperties struct { | ||||
| 	value *IpBlockProperties | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableIpBlockProperties) Get() *IpBlockProperties { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableIpBlockProperties) Set(val *IpBlockProperties) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableIpBlockProperties) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableIpBlockProperties) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableIpBlockProperties(val *IpBlockProperties) *NullableIpBlockProperties { | ||||
| 	return &NullableIpBlockProperties{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableIpBlockProperties) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableIpBlockProperties) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,235 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // IpBlocks struct for IpBlocks
 | ||||
| type IpBlocks struct { | ||||
| 	// The resource's unique identifier
 | ||||
| 	Id *string `json:"id,omitempty"` | ||||
| 	// The type of object that has been created
 | ||||
| 	Type *Type `json:"type,omitempty"` | ||||
| 	// URL to the object representation (absolute path)
 | ||||
| 	Href *string `json:"href,omitempty"` | ||||
| 	// Array of items in that collection
 | ||||
| 	Items *[]IpBlock `json:"items,omitempty"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetId returns the Id field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *IpBlocks) GetId() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Id | ||||
| } | ||||
| 
 | ||||
| // GetIdOk returns a tuple with the Id field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *IpBlocks) GetIdOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Id, true | ||||
| } | ||||
| 
 | ||||
| // SetId sets field value
 | ||||
| func (o *IpBlocks) SetId(v string) { | ||||
| 	o.Id = &v | ||||
| } | ||||
| 
 | ||||
| // HasId returns a boolean if a field has been set.
 | ||||
| func (o *IpBlocks) HasId() bool { | ||||
| 	if o != nil && o.Id != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetType returns the Type field value
 | ||||
| // If the value is explicit nil, the zero value for Type will be returned
 | ||||
| func (o *IpBlocks) GetType() *Type { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Type | ||||
| } | ||||
| 
 | ||||
| // GetTypeOk returns a tuple with the Type field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *IpBlocks) GetTypeOk() (*Type, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Type, true | ||||
| } | ||||
| 
 | ||||
| // SetType sets field value
 | ||||
| func (o *IpBlocks) SetType(v Type) { | ||||
| 	o.Type = &v | ||||
| } | ||||
| 
 | ||||
| // HasType returns a boolean if a field has been set.
 | ||||
| func (o *IpBlocks) HasType() bool { | ||||
| 	if o != nil && o.Type != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetHref returns the Href field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *IpBlocks) GetHref() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Href | ||||
| } | ||||
| 
 | ||||
| // GetHrefOk returns a tuple with the Href field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *IpBlocks) GetHrefOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Href, true | ||||
| } | ||||
| 
 | ||||
| // SetHref sets field value
 | ||||
| func (o *IpBlocks) SetHref(v string) { | ||||
| 	o.Href = &v | ||||
| } | ||||
| 
 | ||||
| // HasHref returns a boolean if a field has been set.
 | ||||
| func (o *IpBlocks) HasHref() bool { | ||||
| 	if o != nil && o.Href != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetItems returns the Items field value
 | ||||
| // If the value is explicit nil, the zero value for []IpBlock will be returned
 | ||||
| func (o *IpBlocks) GetItems() *[]IpBlock { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Items | ||||
| } | ||||
| 
 | ||||
| // GetItemsOk returns a tuple with the Items field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *IpBlocks) GetItemsOk() (*[]IpBlock, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Items, true | ||||
| } | ||||
| 
 | ||||
| // SetItems sets field value
 | ||||
| func (o *IpBlocks) SetItems(v []IpBlock) { | ||||
| 	o.Items = &v | ||||
| } | ||||
| 
 | ||||
| // HasItems returns a boolean if a field has been set.
 | ||||
| func (o *IpBlocks) HasItems() bool { | ||||
| 	if o != nil && o.Items != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o IpBlocks) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.Id != nil { | ||||
| 		toSerialize["id"] = o.Id | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Type != nil { | ||||
| 		toSerialize["type"] = o.Type | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Href != nil { | ||||
| 		toSerialize["href"] = o.Href | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Items != nil { | ||||
| 		toSerialize["items"] = o.Items | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableIpBlocks struct { | ||||
| 	value *IpBlocks | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableIpBlocks) Get() *IpBlocks { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableIpBlocks) Set(val *IpBlocks) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableIpBlocks) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableIpBlocks) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableIpBlocks(val *IpBlocks) *NullableIpBlocks { | ||||
| 	return &NullableIpBlocks{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableIpBlocks) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableIpBlocks) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,357 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // IpConsumer struct for IpConsumer
 | ||||
| type IpConsumer struct { | ||||
| 	Ip *string `json:"ip,omitempty"` | ||||
| 	Mac *string `json:"mac,omitempty"` | ||||
| 	NicId *string `json:"nicId,omitempty"` | ||||
| 	ServerId *string `json:"serverId,omitempty"` | ||||
| 	ServerName *string `json:"serverName,omitempty"` | ||||
| 	DatacenterId *string `json:"datacenterId,omitempty"` | ||||
| 	DatacenterName *string `json:"datacenterName,omitempty"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetIp returns the Ip field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *IpConsumer) GetIp() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Ip | ||||
| } | ||||
| 
 | ||||
| // GetIpOk returns a tuple with the Ip field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *IpConsumer) GetIpOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Ip, true | ||||
| } | ||||
| 
 | ||||
| // SetIp sets field value
 | ||||
| func (o *IpConsumer) SetIp(v string) { | ||||
| 	o.Ip = &v | ||||
| } | ||||
| 
 | ||||
| // HasIp returns a boolean if a field has been set.
 | ||||
| func (o *IpConsumer) HasIp() bool { | ||||
| 	if o != nil && o.Ip != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetMac returns the Mac field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *IpConsumer) GetMac() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Mac | ||||
| } | ||||
| 
 | ||||
| // GetMacOk returns a tuple with the Mac field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *IpConsumer) GetMacOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Mac, true | ||||
| } | ||||
| 
 | ||||
| // SetMac sets field value
 | ||||
| func (o *IpConsumer) SetMac(v string) { | ||||
| 	o.Mac = &v | ||||
| } | ||||
| 
 | ||||
| // HasMac returns a boolean if a field has been set.
 | ||||
| func (o *IpConsumer) HasMac() bool { | ||||
| 	if o != nil && o.Mac != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetNicId returns the NicId field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *IpConsumer) GetNicId() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.NicId | ||||
| } | ||||
| 
 | ||||
| // GetNicIdOk returns a tuple with the NicId field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *IpConsumer) GetNicIdOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.NicId, true | ||||
| } | ||||
| 
 | ||||
| // SetNicId sets field value
 | ||||
| func (o *IpConsumer) SetNicId(v string) { | ||||
| 	o.NicId = &v | ||||
| } | ||||
| 
 | ||||
| // HasNicId returns a boolean if a field has been set.
 | ||||
| func (o *IpConsumer) HasNicId() bool { | ||||
| 	if o != nil && o.NicId != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetServerId returns the ServerId field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *IpConsumer) GetServerId() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.ServerId | ||||
| } | ||||
| 
 | ||||
| // GetServerIdOk returns a tuple with the ServerId field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *IpConsumer) GetServerIdOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.ServerId, true | ||||
| } | ||||
| 
 | ||||
| // SetServerId sets field value
 | ||||
| func (o *IpConsumer) SetServerId(v string) { | ||||
| 	o.ServerId = &v | ||||
| } | ||||
| 
 | ||||
| // HasServerId returns a boolean if a field has been set.
 | ||||
| func (o *IpConsumer) HasServerId() bool { | ||||
| 	if o != nil && o.ServerId != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetServerName returns the ServerName field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *IpConsumer) GetServerName() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.ServerName | ||||
| } | ||||
| 
 | ||||
| // GetServerNameOk returns a tuple with the ServerName field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *IpConsumer) GetServerNameOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.ServerName, true | ||||
| } | ||||
| 
 | ||||
| // SetServerName sets field value
 | ||||
| func (o *IpConsumer) SetServerName(v string) { | ||||
| 	o.ServerName = &v | ||||
| } | ||||
| 
 | ||||
| // HasServerName returns a boolean if a field has been set.
 | ||||
| func (o *IpConsumer) HasServerName() bool { | ||||
| 	if o != nil && o.ServerName != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetDatacenterId returns the DatacenterId field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *IpConsumer) GetDatacenterId() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.DatacenterId | ||||
| } | ||||
| 
 | ||||
| // GetDatacenterIdOk returns a tuple with the DatacenterId field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *IpConsumer) GetDatacenterIdOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.DatacenterId, true | ||||
| } | ||||
| 
 | ||||
| // SetDatacenterId sets field value
 | ||||
| func (o *IpConsumer) SetDatacenterId(v string) { | ||||
| 	o.DatacenterId = &v | ||||
| } | ||||
| 
 | ||||
| // HasDatacenterId returns a boolean if a field has been set.
 | ||||
| func (o *IpConsumer) HasDatacenterId() bool { | ||||
| 	if o != nil && o.DatacenterId != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetDatacenterName returns the DatacenterName field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *IpConsumer) GetDatacenterName() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.DatacenterName | ||||
| } | ||||
| 
 | ||||
| // GetDatacenterNameOk returns a tuple with the DatacenterName field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *IpConsumer) GetDatacenterNameOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.DatacenterName, true | ||||
| } | ||||
| 
 | ||||
| // SetDatacenterName sets field value
 | ||||
| func (o *IpConsumer) SetDatacenterName(v string) { | ||||
| 	o.DatacenterName = &v | ||||
| } | ||||
| 
 | ||||
| // HasDatacenterName returns a boolean if a field has been set.
 | ||||
| func (o *IpConsumer) HasDatacenterName() bool { | ||||
| 	if o != nil && o.DatacenterName != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o IpConsumer) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.Ip != nil { | ||||
| 		toSerialize["ip"] = o.Ip | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Mac != nil { | ||||
| 		toSerialize["mac"] = o.Mac | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.NicId != nil { | ||||
| 		toSerialize["nicId"] = o.NicId | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.ServerId != nil { | ||||
| 		toSerialize["serverId"] = o.ServerId | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.ServerName != nil { | ||||
| 		toSerialize["serverName"] = o.ServerName | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.DatacenterId != nil { | ||||
| 		toSerialize["datacenterId"] = o.DatacenterId | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.DatacenterName != nil { | ||||
| 		toSerialize["datacenterName"] = o.DatacenterName | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableIpConsumer struct { | ||||
| 	value *IpConsumer | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableIpConsumer) Get() *IpConsumer { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableIpConsumer) Set(val *IpConsumer) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableIpConsumer) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableIpConsumer) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableIpConsumer(val *IpConsumer) *NullableIpConsumer { | ||||
| 	return &NullableIpConsumer{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableIpConsumer) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableIpConsumer) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,147 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // IPFailover struct for IPFailover
 | ||||
| type IPFailover struct { | ||||
| 	Ip *string `json:"ip,omitempty"` | ||||
| 	NicUuid *string `json:"nicUuid,omitempty"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetIp returns the Ip field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *IPFailover) GetIp() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Ip | ||||
| } | ||||
| 
 | ||||
| // GetIpOk returns a tuple with the Ip field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *IPFailover) GetIpOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Ip, true | ||||
| } | ||||
| 
 | ||||
| // SetIp sets field value
 | ||||
| func (o *IPFailover) SetIp(v string) { | ||||
| 	o.Ip = &v | ||||
| } | ||||
| 
 | ||||
| // HasIp returns a boolean if a field has been set.
 | ||||
| func (o *IPFailover) HasIp() bool { | ||||
| 	if o != nil && o.Ip != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetNicUuid returns the NicUuid field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *IPFailover) GetNicUuid() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.NicUuid | ||||
| } | ||||
| 
 | ||||
| // GetNicUuidOk returns a tuple with the NicUuid field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *IPFailover) GetNicUuidOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.NicUuid, true | ||||
| } | ||||
| 
 | ||||
| // SetNicUuid sets field value
 | ||||
| func (o *IPFailover) SetNicUuid(v string) { | ||||
| 	o.NicUuid = &v | ||||
| } | ||||
| 
 | ||||
| // HasNicUuid returns a boolean if a field has been set.
 | ||||
| func (o *IPFailover) HasNicUuid() bool { | ||||
| 	if o != nil && o.NicUuid != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o IPFailover) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.Ip != nil { | ||||
| 		toSerialize["ip"] = o.Ip | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.NicUuid != nil { | ||||
| 		toSerialize["nicUuid"] = o.NicUuid | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableIPFailover struct { | ||||
| 	value *IPFailover | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableIPFailover) Get() *IPFailover { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableIPFailover) Set(val *IPFailover) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableIPFailover) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableIPFailover) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableIPFailover(val *IPFailover) *NullableIPFailover { | ||||
| 	return &NullableIPFailover{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableIPFailover) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableIPFailover) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,149 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // KubernetesAutoScaling struct for KubernetesAutoScaling
 | ||||
| type KubernetesAutoScaling struct { | ||||
| 	// The minimum number of worker nodes that the managed node group can scale in. Should be set together with 'maxNodeCount'. Value for this attribute must be greater than equal to 1 and less than equal to maxNodeCount.
 | ||||
| 	MinNodeCount *int32 `json:"minNodeCount,omitempty"` | ||||
| 	// The maximum number of worker nodes that the managed node pool can scale-out. Should be set together with 'minNodeCount'. Value for this attribute must be greater than equal to 1 and minNodeCount.
 | ||||
| 	MaxNodeCount *int32 `json:"maxNodeCount,omitempty"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetMinNodeCount returns the MinNodeCount field value
 | ||||
| // If the value is explicit nil, the zero value for int32 will be returned
 | ||||
| func (o *KubernetesAutoScaling) GetMinNodeCount() *int32 { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.MinNodeCount | ||||
| } | ||||
| 
 | ||||
| // GetMinNodeCountOk returns a tuple with the MinNodeCount field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesAutoScaling) GetMinNodeCountOk() (*int32, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.MinNodeCount, true | ||||
| } | ||||
| 
 | ||||
| // SetMinNodeCount sets field value
 | ||||
| func (o *KubernetesAutoScaling) SetMinNodeCount(v int32) { | ||||
| 	o.MinNodeCount = &v | ||||
| } | ||||
| 
 | ||||
| // HasMinNodeCount returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesAutoScaling) HasMinNodeCount() bool { | ||||
| 	if o != nil && o.MinNodeCount != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetMaxNodeCount returns the MaxNodeCount field value
 | ||||
| // If the value is explicit nil, the zero value for int32 will be returned
 | ||||
| func (o *KubernetesAutoScaling) GetMaxNodeCount() *int32 { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.MaxNodeCount | ||||
| } | ||||
| 
 | ||||
| // GetMaxNodeCountOk returns a tuple with the MaxNodeCount field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesAutoScaling) GetMaxNodeCountOk() (*int32, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.MaxNodeCount, true | ||||
| } | ||||
| 
 | ||||
| // SetMaxNodeCount sets field value
 | ||||
| func (o *KubernetesAutoScaling) SetMaxNodeCount(v int32) { | ||||
| 	o.MaxNodeCount = &v | ||||
| } | ||||
| 
 | ||||
| // HasMaxNodeCount returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesAutoScaling) HasMaxNodeCount() bool { | ||||
| 	if o != nil && o.MaxNodeCount != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o KubernetesAutoScaling) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.MinNodeCount != nil { | ||||
| 		toSerialize["minNodeCount"] = o.MinNodeCount | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.MaxNodeCount != nil { | ||||
| 		toSerialize["maxNodeCount"] = o.MaxNodeCount | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableKubernetesAutoScaling struct { | ||||
| 	value *KubernetesAutoScaling | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableKubernetesAutoScaling) Get() *KubernetesAutoScaling { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableKubernetesAutoScaling) Set(val *KubernetesAutoScaling) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableKubernetesAutoScaling) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableKubernetesAutoScaling) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableKubernetesAutoScaling(val *KubernetesAutoScaling) *NullableKubernetesAutoScaling { | ||||
| 	return &NullableKubernetesAutoScaling{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableKubernetesAutoScaling) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableKubernetesAutoScaling) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,318 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // KubernetesCluster struct for KubernetesCluster
 | ||||
| type KubernetesCluster struct { | ||||
| 	// The resource's unique identifier.
 | ||||
| 	Id *string `json:"id,omitempty"` | ||||
| 	// The type of object
 | ||||
| 	Type *string `json:"type,omitempty"` | ||||
| 	// URL to the object representation (absolute path)
 | ||||
| 	Href *string `json:"href,omitempty"` | ||||
| 	Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` | ||||
| 	Properties *KubernetesClusterProperties `json:"properties"` | ||||
| 	Entities *KubernetesClusterEntities `json:"entities,omitempty"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetId returns the Id field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *KubernetesCluster) GetId() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Id | ||||
| } | ||||
| 
 | ||||
| // GetIdOk returns a tuple with the Id field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesCluster) GetIdOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Id, true | ||||
| } | ||||
| 
 | ||||
| // SetId sets field value
 | ||||
| func (o *KubernetesCluster) SetId(v string) { | ||||
| 	o.Id = &v | ||||
| } | ||||
| 
 | ||||
| // HasId returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesCluster) HasId() bool { | ||||
| 	if o != nil && o.Id != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetType returns the Type field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *KubernetesCluster) GetType() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Type | ||||
| } | ||||
| 
 | ||||
| // GetTypeOk returns a tuple with the Type field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesCluster) GetTypeOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Type, true | ||||
| } | ||||
| 
 | ||||
| // SetType sets field value
 | ||||
| func (o *KubernetesCluster) SetType(v string) { | ||||
| 	o.Type = &v | ||||
| } | ||||
| 
 | ||||
| // HasType returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesCluster) HasType() bool { | ||||
| 	if o != nil && o.Type != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetHref returns the Href field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *KubernetesCluster) GetHref() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Href | ||||
| } | ||||
| 
 | ||||
| // GetHrefOk returns a tuple with the Href field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesCluster) GetHrefOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Href, true | ||||
| } | ||||
| 
 | ||||
| // SetHref sets field value
 | ||||
| func (o *KubernetesCluster) SetHref(v string) { | ||||
| 	o.Href = &v | ||||
| } | ||||
| 
 | ||||
| // HasHref returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesCluster) HasHref() bool { | ||||
| 	if o != nil && o.Href != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetMetadata returns the Metadata field value
 | ||||
| // If the value is explicit nil, the zero value for DatacenterElementMetadata will be returned
 | ||||
| func (o *KubernetesCluster) GetMetadata() *DatacenterElementMetadata { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Metadata | ||||
| } | ||||
| 
 | ||||
| // GetMetadataOk returns a tuple with the Metadata field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesCluster) GetMetadataOk() (*DatacenterElementMetadata, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Metadata, true | ||||
| } | ||||
| 
 | ||||
| // SetMetadata sets field value
 | ||||
| func (o *KubernetesCluster) SetMetadata(v DatacenterElementMetadata) { | ||||
| 	o.Metadata = &v | ||||
| } | ||||
| 
 | ||||
| // HasMetadata returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesCluster) HasMetadata() bool { | ||||
| 	if o != nil && o.Metadata != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetProperties returns the Properties field value
 | ||||
| // If the value is explicit nil, the zero value for KubernetesClusterProperties will be returned
 | ||||
| func (o *KubernetesCluster) GetProperties() *KubernetesClusterProperties { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Properties | ||||
| } | ||||
| 
 | ||||
| // GetPropertiesOk returns a tuple with the Properties field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesCluster) GetPropertiesOk() (*KubernetesClusterProperties, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Properties, true | ||||
| } | ||||
| 
 | ||||
| // SetProperties sets field value
 | ||||
| func (o *KubernetesCluster) SetProperties(v KubernetesClusterProperties) { | ||||
| 	o.Properties = &v | ||||
| } | ||||
| 
 | ||||
| // HasProperties returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesCluster) HasProperties() bool { | ||||
| 	if o != nil && o.Properties != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetEntities returns the Entities field value
 | ||||
| // If the value is explicit nil, the zero value for KubernetesClusterEntities will be returned
 | ||||
| func (o *KubernetesCluster) GetEntities() *KubernetesClusterEntities { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Entities | ||||
| } | ||||
| 
 | ||||
| // GetEntitiesOk returns a tuple with the Entities field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesCluster) GetEntitiesOk() (*KubernetesClusterEntities, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Entities, true | ||||
| } | ||||
| 
 | ||||
| // SetEntities sets field value
 | ||||
| func (o *KubernetesCluster) SetEntities(v KubernetesClusterEntities) { | ||||
| 	o.Entities = &v | ||||
| } | ||||
| 
 | ||||
| // HasEntities returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesCluster) HasEntities() bool { | ||||
| 	if o != nil && o.Entities != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o KubernetesCluster) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.Id != nil { | ||||
| 		toSerialize["id"] = o.Id | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Type != nil { | ||||
| 		toSerialize["type"] = o.Type | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Href != nil { | ||||
| 		toSerialize["href"] = o.Href | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Metadata != nil { | ||||
| 		toSerialize["metadata"] = o.Metadata | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Properties != nil { | ||||
| 		toSerialize["properties"] = o.Properties | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Entities != nil { | ||||
| 		toSerialize["entities"] = o.Entities | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableKubernetesCluster struct { | ||||
| 	value *KubernetesCluster | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableKubernetesCluster) Get() *KubernetesCluster { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableKubernetesCluster) Set(val *KubernetesCluster) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableKubernetesCluster) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableKubernetesCluster) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableKubernetesCluster(val *KubernetesCluster) *NullableKubernetesCluster { | ||||
| 	return &NullableKubernetesCluster{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableKubernetesCluster) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableKubernetesCluster) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,105 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // KubernetesClusterEntities struct for KubernetesClusterEntities
 | ||||
| type KubernetesClusterEntities struct { | ||||
| 	Nodepools *KubernetesNodePools `json:"nodepools,omitempty"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetNodepools returns the Nodepools field value
 | ||||
| // If the value is explicit nil, the zero value for KubernetesNodePools will be returned
 | ||||
| func (o *KubernetesClusterEntities) GetNodepools() *KubernetesNodePools { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Nodepools | ||||
| } | ||||
| 
 | ||||
| // GetNodepoolsOk returns a tuple with the Nodepools field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesClusterEntities) GetNodepoolsOk() (*KubernetesNodePools, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Nodepools, true | ||||
| } | ||||
| 
 | ||||
| // SetNodepools sets field value
 | ||||
| func (o *KubernetesClusterEntities) SetNodepools(v KubernetesNodePools) { | ||||
| 	o.Nodepools = &v | ||||
| } | ||||
| 
 | ||||
| // HasNodepools returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesClusterEntities) HasNodepools() bool { | ||||
| 	if o != nil && o.Nodepools != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o KubernetesClusterEntities) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.Nodepools != nil { | ||||
| 		toSerialize["nodepools"] = o.Nodepools | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableKubernetesClusterEntities struct { | ||||
| 	value *KubernetesClusterEntities | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableKubernetesClusterEntities) Get() *KubernetesClusterEntities { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableKubernetesClusterEntities) Set(val *KubernetesClusterEntities) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableKubernetesClusterEntities) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableKubernetesClusterEntities) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableKubernetesClusterEntities(val *KubernetesClusterEntities) *NullableKubernetesClusterEntities { | ||||
| 	return &NullableKubernetesClusterEntities{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableKubernetesClusterEntities) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableKubernetesClusterEntities) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,191 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // KubernetesClusterProperties struct for KubernetesClusterProperties
 | ||||
| type KubernetesClusterProperties struct { | ||||
| 	// A Kubernetes Cluster Name. Valid Kubernetes Cluster name must be 63 characters or less and must be empty or begin and end with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between.
 | ||||
| 	Name *string `json:"name"` | ||||
| 	// The kubernetes version in which a cluster is running. This imposes restrictions on what kubernetes versions can be run in a cluster's nodepools. Additionally, not all kubernetes versions are viable upgrade targets for all prior versions.
 | ||||
| 	K8sVersion *string `json:"k8sVersion,omitempty"` | ||||
| 	MaintenanceWindow *KubernetesMaintenanceWindow `json:"maintenanceWindow,omitempty"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetName returns the Name field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *KubernetesClusterProperties) GetName() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Name | ||||
| } | ||||
| 
 | ||||
| // GetNameOk returns a tuple with the Name field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesClusterProperties) GetNameOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Name, true | ||||
| } | ||||
| 
 | ||||
| // SetName sets field value
 | ||||
| func (o *KubernetesClusterProperties) SetName(v string) { | ||||
| 	o.Name = &v | ||||
| } | ||||
| 
 | ||||
| // HasName returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesClusterProperties) HasName() bool { | ||||
| 	if o != nil && o.Name != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetK8sVersion returns the K8sVersion field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *KubernetesClusterProperties) GetK8sVersion() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.K8sVersion | ||||
| } | ||||
| 
 | ||||
| // GetK8sVersionOk returns a tuple with the K8sVersion field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesClusterProperties) GetK8sVersionOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.K8sVersion, true | ||||
| } | ||||
| 
 | ||||
| // SetK8sVersion sets field value
 | ||||
| func (o *KubernetesClusterProperties) SetK8sVersion(v string) { | ||||
| 	o.K8sVersion = &v | ||||
| } | ||||
| 
 | ||||
| // HasK8sVersion returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesClusterProperties) HasK8sVersion() bool { | ||||
| 	if o != nil && o.K8sVersion != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetMaintenanceWindow returns the MaintenanceWindow field value
 | ||||
| // If the value is explicit nil, the zero value for KubernetesMaintenanceWindow will be returned
 | ||||
| func (o *KubernetesClusterProperties) GetMaintenanceWindow() *KubernetesMaintenanceWindow { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.MaintenanceWindow | ||||
| } | ||||
| 
 | ||||
| // GetMaintenanceWindowOk returns a tuple with the MaintenanceWindow field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesClusterProperties) GetMaintenanceWindowOk() (*KubernetesMaintenanceWindow, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.MaintenanceWindow, true | ||||
| } | ||||
| 
 | ||||
| // SetMaintenanceWindow sets field value
 | ||||
| func (o *KubernetesClusterProperties) SetMaintenanceWindow(v KubernetesMaintenanceWindow) { | ||||
| 	o.MaintenanceWindow = &v | ||||
| } | ||||
| 
 | ||||
| // HasMaintenanceWindow returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesClusterProperties) HasMaintenanceWindow() bool { | ||||
| 	if o != nil && o.MaintenanceWindow != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o KubernetesClusterProperties) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.Name != nil { | ||||
| 		toSerialize["name"] = o.Name | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.K8sVersion != nil { | ||||
| 		toSerialize["k8sVersion"] = o.K8sVersion | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.MaintenanceWindow != nil { | ||||
| 		toSerialize["maintenanceWindow"] = o.MaintenanceWindow | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableKubernetesClusterProperties struct { | ||||
| 	value *KubernetesClusterProperties | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableKubernetesClusterProperties) Get() *KubernetesClusterProperties { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableKubernetesClusterProperties) Set(val *KubernetesClusterProperties) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableKubernetesClusterProperties) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableKubernetesClusterProperties) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableKubernetesClusterProperties(val *KubernetesClusterProperties) *NullableKubernetesClusterProperties { | ||||
| 	return &NullableKubernetesClusterProperties{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableKubernetesClusterProperties) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableKubernetesClusterProperties) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,235 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // KubernetesClusters struct for KubernetesClusters
 | ||||
| type KubernetesClusters struct { | ||||
| 	// Unique representation for Kubernetes Cluster as a collection on a resource.
 | ||||
| 	Id *string `json:"id,omitempty"` | ||||
| 	// The type of resource within a collection
 | ||||
| 	Type *string `json:"type,omitempty"` | ||||
| 	// URL to the collection representation (absolute path)
 | ||||
| 	Href *string `json:"href,omitempty"` | ||||
| 	// Array of items in that collection
 | ||||
| 	Items *[]KubernetesCluster `json:"items,omitempty"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetId returns the Id field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *KubernetesClusters) GetId() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Id | ||||
| } | ||||
| 
 | ||||
| // GetIdOk returns a tuple with the Id field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesClusters) GetIdOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Id, true | ||||
| } | ||||
| 
 | ||||
| // SetId sets field value
 | ||||
| func (o *KubernetesClusters) SetId(v string) { | ||||
| 	o.Id = &v | ||||
| } | ||||
| 
 | ||||
| // HasId returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesClusters) HasId() bool { | ||||
| 	if o != nil && o.Id != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetType returns the Type field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *KubernetesClusters) GetType() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Type | ||||
| } | ||||
| 
 | ||||
| // GetTypeOk returns a tuple with the Type field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesClusters) GetTypeOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Type, true | ||||
| } | ||||
| 
 | ||||
| // SetType sets field value
 | ||||
| func (o *KubernetesClusters) SetType(v string) { | ||||
| 	o.Type = &v | ||||
| } | ||||
| 
 | ||||
| // HasType returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesClusters) HasType() bool { | ||||
| 	if o != nil && o.Type != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetHref returns the Href field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *KubernetesClusters) GetHref() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Href | ||||
| } | ||||
| 
 | ||||
| // GetHrefOk returns a tuple with the Href field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesClusters) GetHrefOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Href, true | ||||
| } | ||||
| 
 | ||||
| // SetHref sets field value
 | ||||
| func (o *KubernetesClusters) SetHref(v string) { | ||||
| 	o.Href = &v | ||||
| } | ||||
| 
 | ||||
| // HasHref returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesClusters) HasHref() bool { | ||||
| 	if o != nil && o.Href != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetItems returns the Items field value
 | ||||
| // If the value is explicit nil, the zero value for []KubernetesCluster will be returned
 | ||||
| func (o *KubernetesClusters) GetItems() *[]KubernetesCluster { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Items | ||||
| } | ||||
| 
 | ||||
| // GetItemsOk returns a tuple with the Items field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesClusters) GetItemsOk() (*[]KubernetesCluster, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Items, true | ||||
| } | ||||
| 
 | ||||
| // SetItems sets field value
 | ||||
| func (o *KubernetesClusters) SetItems(v []KubernetesCluster) { | ||||
| 	o.Items = &v | ||||
| } | ||||
| 
 | ||||
| // HasItems returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesClusters) HasItems() bool { | ||||
| 	if o != nil && o.Items != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o KubernetesClusters) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.Id != nil { | ||||
| 		toSerialize["id"] = o.Id | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Type != nil { | ||||
| 		toSerialize["type"] = o.Type | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Href != nil { | ||||
| 		toSerialize["href"] = o.Href | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Items != nil { | ||||
| 		toSerialize["items"] = o.Items | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableKubernetesClusters struct { | ||||
| 	value *KubernetesClusters | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableKubernetesClusters) Get() *KubernetesClusters { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableKubernetesClusters) Set(val *KubernetesClusters) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableKubernetesClusters) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableKubernetesClusters) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableKubernetesClusters(val *KubernetesClusters) *NullableKubernetesClusters { | ||||
| 	return &NullableKubernetesClusters{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableKubernetesClusters) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableKubernetesClusters) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,234 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // KubernetesConfig struct for KubernetesConfig
 | ||||
| type KubernetesConfig struct { | ||||
| 	// The resource's unique identifier.
 | ||||
| 	Id *string `json:"id,omitempty"` | ||||
| 	// The type of object
 | ||||
| 	Type *string `json:"type,omitempty"` | ||||
| 	// URL to the object representation (absolute path)
 | ||||
| 	Href *string `json:"href,omitempty"` | ||||
| 	Properties *KubernetesConfigProperties `json:"properties"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetId returns the Id field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *KubernetesConfig) GetId() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Id | ||||
| } | ||||
| 
 | ||||
| // GetIdOk returns a tuple with the Id field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesConfig) GetIdOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Id, true | ||||
| } | ||||
| 
 | ||||
| // SetId sets field value
 | ||||
| func (o *KubernetesConfig) SetId(v string) { | ||||
| 	o.Id = &v | ||||
| } | ||||
| 
 | ||||
| // HasId returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesConfig) HasId() bool { | ||||
| 	if o != nil && o.Id != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetType returns the Type field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *KubernetesConfig) GetType() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Type | ||||
| } | ||||
| 
 | ||||
| // GetTypeOk returns a tuple with the Type field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesConfig) GetTypeOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Type, true | ||||
| } | ||||
| 
 | ||||
| // SetType sets field value
 | ||||
| func (o *KubernetesConfig) SetType(v string) { | ||||
| 	o.Type = &v | ||||
| } | ||||
| 
 | ||||
| // HasType returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesConfig) HasType() bool { | ||||
| 	if o != nil && o.Type != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetHref returns the Href field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *KubernetesConfig) GetHref() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Href | ||||
| } | ||||
| 
 | ||||
| // GetHrefOk returns a tuple with the Href field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesConfig) GetHrefOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Href, true | ||||
| } | ||||
| 
 | ||||
| // SetHref sets field value
 | ||||
| func (o *KubernetesConfig) SetHref(v string) { | ||||
| 	o.Href = &v | ||||
| } | ||||
| 
 | ||||
| // HasHref returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesConfig) HasHref() bool { | ||||
| 	if o != nil && o.Href != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetProperties returns the Properties field value
 | ||||
| // If the value is explicit nil, the zero value for KubernetesConfigProperties will be returned
 | ||||
| func (o *KubernetesConfig) GetProperties() *KubernetesConfigProperties { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Properties | ||||
| } | ||||
| 
 | ||||
| // GetPropertiesOk returns a tuple with the Properties field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesConfig) GetPropertiesOk() (*KubernetesConfigProperties, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Properties, true | ||||
| } | ||||
| 
 | ||||
| // SetProperties sets field value
 | ||||
| func (o *KubernetesConfig) SetProperties(v KubernetesConfigProperties) { | ||||
| 	o.Properties = &v | ||||
| } | ||||
| 
 | ||||
| // HasProperties returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesConfig) HasProperties() bool { | ||||
| 	if o != nil && o.Properties != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o KubernetesConfig) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.Id != nil { | ||||
| 		toSerialize["id"] = o.Id | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Type != nil { | ||||
| 		toSerialize["type"] = o.Type | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Href != nil { | ||||
| 		toSerialize["href"] = o.Href | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Properties != nil { | ||||
| 		toSerialize["properties"] = o.Properties | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableKubernetesConfig struct { | ||||
| 	value *KubernetesConfig | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableKubernetesConfig) Get() *KubernetesConfig { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableKubernetesConfig) Set(val *KubernetesConfig) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableKubernetesConfig) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableKubernetesConfig) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableKubernetesConfig(val *KubernetesConfig) *NullableKubernetesConfig { | ||||
| 	return &NullableKubernetesConfig{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableKubernetesConfig) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableKubernetesConfig) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,106 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // KubernetesConfigProperties struct for KubernetesConfigProperties
 | ||||
| type KubernetesConfigProperties struct { | ||||
| 	// A Kubernetes Config file data
 | ||||
| 	Kubeconfig *string `json:"kubeconfig,omitempty"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetKubeconfig returns the Kubeconfig field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *KubernetesConfigProperties) GetKubeconfig() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Kubeconfig | ||||
| } | ||||
| 
 | ||||
| // GetKubeconfigOk returns a tuple with the Kubeconfig field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesConfigProperties) GetKubeconfigOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Kubeconfig, true | ||||
| } | ||||
| 
 | ||||
| // SetKubeconfig sets field value
 | ||||
| func (o *KubernetesConfigProperties) SetKubeconfig(v string) { | ||||
| 	o.Kubeconfig = &v | ||||
| } | ||||
| 
 | ||||
| // HasKubeconfig returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesConfigProperties) HasKubeconfig() bool { | ||||
| 	if o != nil && o.Kubeconfig != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o KubernetesConfigProperties) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.Kubeconfig != nil { | ||||
| 		toSerialize["kubeconfig"] = o.Kubeconfig | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableKubernetesConfigProperties struct { | ||||
| 	value *KubernetesConfigProperties | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableKubernetesConfigProperties) Get() *KubernetesConfigProperties { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableKubernetesConfigProperties) Set(val *KubernetesConfigProperties) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableKubernetesConfigProperties) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableKubernetesConfigProperties) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableKubernetesConfigProperties(val *KubernetesConfigProperties) *NullableKubernetesConfigProperties { | ||||
| 	return &NullableKubernetesConfigProperties{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableKubernetesConfigProperties) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableKubernetesConfigProperties) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,149 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // KubernetesMaintenanceWindow struct for KubernetesMaintenanceWindow
 | ||||
| type KubernetesMaintenanceWindow struct { | ||||
| 	// The day of the week for a maintenance window.
 | ||||
| 	DayOfTheWeek *string `json:"dayOfTheWeek,omitempty"` | ||||
| 	// The time to use for a maintenance window. Accepted formats are: HH:mm:ss; HH:mm:ss\"Z\"; HH:mm:ssZ. This time may varies by 15 minutes.
 | ||||
| 	Time *string `json:"time,omitempty"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetDayOfTheWeek returns the DayOfTheWeek field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *KubernetesMaintenanceWindow) GetDayOfTheWeek() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.DayOfTheWeek | ||||
| } | ||||
| 
 | ||||
| // GetDayOfTheWeekOk returns a tuple with the DayOfTheWeek field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesMaintenanceWindow) GetDayOfTheWeekOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.DayOfTheWeek, true | ||||
| } | ||||
| 
 | ||||
| // SetDayOfTheWeek sets field value
 | ||||
| func (o *KubernetesMaintenanceWindow) SetDayOfTheWeek(v string) { | ||||
| 	o.DayOfTheWeek = &v | ||||
| } | ||||
| 
 | ||||
| // HasDayOfTheWeek returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesMaintenanceWindow) HasDayOfTheWeek() bool { | ||||
| 	if o != nil && o.DayOfTheWeek != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetTime returns the Time field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *KubernetesMaintenanceWindow) GetTime() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Time | ||||
| } | ||||
| 
 | ||||
| // GetTimeOk returns a tuple with the Time field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesMaintenanceWindow) GetTimeOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Time, true | ||||
| } | ||||
| 
 | ||||
| // SetTime sets field value
 | ||||
| func (o *KubernetesMaintenanceWindow) SetTime(v string) { | ||||
| 	o.Time = &v | ||||
| } | ||||
| 
 | ||||
| // HasTime returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesMaintenanceWindow) HasTime() bool { | ||||
| 	if o != nil && o.Time != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o KubernetesMaintenanceWindow) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.DayOfTheWeek != nil { | ||||
| 		toSerialize["dayOfTheWeek"] = o.DayOfTheWeek | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Time != nil { | ||||
| 		toSerialize["time"] = o.Time | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableKubernetesMaintenanceWindow struct { | ||||
| 	value *KubernetesMaintenanceWindow | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableKubernetesMaintenanceWindow) Get() *KubernetesMaintenanceWindow { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableKubernetesMaintenanceWindow) Set(val *KubernetesMaintenanceWindow) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableKubernetesMaintenanceWindow) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableKubernetesMaintenanceWindow) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableKubernetesMaintenanceWindow(val *KubernetesMaintenanceWindow) *NullableKubernetesMaintenanceWindow { | ||||
| 	return &NullableKubernetesMaintenanceWindow{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableKubernetesMaintenanceWindow) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableKubernetesMaintenanceWindow) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,276 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // KubernetesNode struct for KubernetesNode
 | ||||
| type KubernetesNode struct { | ||||
| 	// The resource's unique identifier.
 | ||||
| 	Id *string `json:"id,omitempty"` | ||||
| 	// The type of object
 | ||||
| 	Type *string `json:"type,omitempty"` | ||||
| 	// URL to the object representation (absolute path)
 | ||||
| 	Href *string `json:"href,omitempty"` | ||||
| 	Metadata *KubernetesNodeMetadata `json:"metadata,omitempty"` | ||||
| 	Properties *KubernetesNodeProperties `json:"properties"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetId returns the Id field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *KubernetesNode) GetId() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Id | ||||
| } | ||||
| 
 | ||||
| // GetIdOk returns a tuple with the Id field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNode) GetIdOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Id, true | ||||
| } | ||||
| 
 | ||||
| // SetId sets field value
 | ||||
| func (o *KubernetesNode) SetId(v string) { | ||||
| 	o.Id = &v | ||||
| } | ||||
| 
 | ||||
| // HasId returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNode) HasId() bool { | ||||
| 	if o != nil && o.Id != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetType returns the Type field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *KubernetesNode) GetType() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Type | ||||
| } | ||||
| 
 | ||||
| // GetTypeOk returns a tuple with the Type field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNode) GetTypeOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Type, true | ||||
| } | ||||
| 
 | ||||
| // SetType sets field value
 | ||||
| func (o *KubernetesNode) SetType(v string) { | ||||
| 	o.Type = &v | ||||
| } | ||||
| 
 | ||||
| // HasType returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNode) HasType() bool { | ||||
| 	if o != nil && o.Type != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetHref returns the Href field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *KubernetesNode) GetHref() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Href | ||||
| } | ||||
| 
 | ||||
| // GetHrefOk returns a tuple with the Href field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNode) GetHrefOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Href, true | ||||
| } | ||||
| 
 | ||||
| // SetHref sets field value
 | ||||
| func (o *KubernetesNode) SetHref(v string) { | ||||
| 	o.Href = &v | ||||
| } | ||||
| 
 | ||||
| // HasHref returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNode) HasHref() bool { | ||||
| 	if o != nil && o.Href != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetMetadata returns the Metadata field value
 | ||||
| // If the value is explicit nil, the zero value for KubernetesNodeMetadata will be returned
 | ||||
| func (o *KubernetesNode) GetMetadata() *KubernetesNodeMetadata { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Metadata | ||||
| } | ||||
| 
 | ||||
| // GetMetadataOk returns a tuple with the Metadata field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNode) GetMetadataOk() (*KubernetesNodeMetadata, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Metadata, true | ||||
| } | ||||
| 
 | ||||
| // SetMetadata sets field value
 | ||||
| func (o *KubernetesNode) SetMetadata(v KubernetesNodeMetadata) { | ||||
| 	o.Metadata = &v | ||||
| } | ||||
| 
 | ||||
| // HasMetadata returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNode) HasMetadata() bool { | ||||
| 	if o != nil && o.Metadata != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetProperties returns the Properties field value
 | ||||
| // If the value is explicit nil, the zero value for KubernetesNodeProperties will be returned
 | ||||
| func (o *KubernetesNode) GetProperties() *KubernetesNodeProperties { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Properties | ||||
| } | ||||
| 
 | ||||
| // GetPropertiesOk returns a tuple with the Properties field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNode) GetPropertiesOk() (*KubernetesNodeProperties, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Properties, true | ||||
| } | ||||
| 
 | ||||
| // SetProperties sets field value
 | ||||
| func (o *KubernetesNode) SetProperties(v KubernetesNodeProperties) { | ||||
| 	o.Properties = &v | ||||
| } | ||||
| 
 | ||||
| // HasProperties returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNode) HasProperties() bool { | ||||
| 	if o != nil && o.Properties != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o KubernetesNode) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.Id != nil { | ||||
| 		toSerialize["id"] = o.Id | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Type != nil { | ||||
| 		toSerialize["type"] = o.Type | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Href != nil { | ||||
| 		toSerialize["href"] = o.Href | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Metadata != nil { | ||||
| 		toSerialize["metadata"] = o.Metadata | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Properties != nil { | ||||
| 		toSerialize["properties"] = o.Properties | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableKubernetesNode struct { | ||||
| 	value *KubernetesNode | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableKubernetesNode) Get() *KubernetesNode { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableKubernetesNode) Set(val *KubernetesNode) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableKubernetesNode) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableKubernetesNode) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableKubernetesNode(val *KubernetesNode) *NullableKubernetesNode { | ||||
| 	return &NullableKubernetesNode{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableKubernetesNode) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableKubernetesNode) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,279 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| 	"time" | ||||
| ) | ||||
| 
 | ||||
| // KubernetesNodeMetadata struct for KubernetesNodeMetadata
 | ||||
| type KubernetesNodeMetadata struct { | ||||
| 	// Resource's Entity Tag as defined in http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11 . Entity Tag is also added as an 'ETag response header to requests which don't use 'depth' parameter. 
 | ||||
| 	Etag *string `json:"etag,omitempty"` | ||||
| 	// The last time the resource was created
 | ||||
| 	CreatedDate *time.Time `json:"createdDate,omitempty"` | ||||
| 	// The last time the resource has been modified
 | ||||
| 	LastModifiedDate *time.Time `json:"lastModifiedDate,omitempty"` | ||||
| 	// State of the resource.
 | ||||
| 	State *string `json:"state,omitempty"` | ||||
| 	// The last time the software updated on node.
 | ||||
| 	LastSoftwareUpdatedDate *time.Time `json:"lastSoftwareUpdatedDate,omitempty"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetEtag returns the Etag field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *KubernetesNodeMetadata) GetEtag() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Etag | ||||
| } | ||||
| 
 | ||||
| // GetEtagOk returns a tuple with the Etag field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNodeMetadata) GetEtagOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Etag, true | ||||
| } | ||||
| 
 | ||||
| // SetEtag sets field value
 | ||||
| func (o *KubernetesNodeMetadata) SetEtag(v string) { | ||||
| 	o.Etag = &v | ||||
| } | ||||
| 
 | ||||
| // HasEtag returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNodeMetadata) HasEtag() bool { | ||||
| 	if o != nil && o.Etag != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetCreatedDate returns the CreatedDate field value
 | ||||
| // If the value is explicit nil, the zero value for time.Time will be returned
 | ||||
| func (o *KubernetesNodeMetadata) GetCreatedDate() *time.Time { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.CreatedDate | ||||
| } | ||||
| 
 | ||||
| // GetCreatedDateOk returns a tuple with the CreatedDate field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNodeMetadata) GetCreatedDateOk() (*time.Time, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.CreatedDate, true | ||||
| } | ||||
| 
 | ||||
| // SetCreatedDate sets field value
 | ||||
| func (o *KubernetesNodeMetadata) SetCreatedDate(v time.Time) { | ||||
| 	o.CreatedDate = &v | ||||
| } | ||||
| 
 | ||||
| // HasCreatedDate returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNodeMetadata) HasCreatedDate() bool { | ||||
| 	if o != nil && o.CreatedDate != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetLastModifiedDate returns the LastModifiedDate field value
 | ||||
| // If the value is explicit nil, the zero value for time.Time will be returned
 | ||||
| func (o *KubernetesNodeMetadata) GetLastModifiedDate() *time.Time { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.LastModifiedDate | ||||
| } | ||||
| 
 | ||||
| // GetLastModifiedDateOk returns a tuple with the LastModifiedDate field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNodeMetadata) GetLastModifiedDateOk() (*time.Time, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.LastModifiedDate, true | ||||
| } | ||||
| 
 | ||||
| // SetLastModifiedDate sets field value
 | ||||
| func (o *KubernetesNodeMetadata) SetLastModifiedDate(v time.Time) { | ||||
| 	o.LastModifiedDate = &v | ||||
| } | ||||
| 
 | ||||
| // HasLastModifiedDate returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNodeMetadata) HasLastModifiedDate() bool { | ||||
| 	if o != nil && o.LastModifiedDate != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetState returns the State field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *KubernetesNodeMetadata) GetState() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.State | ||||
| } | ||||
| 
 | ||||
| // GetStateOk returns a tuple with the State field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNodeMetadata) GetStateOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.State, true | ||||
| } | ||||
| 
 | ||||
| // SetState sets field value
 | ||||
| func (o *KubernetesNodeMetadata) SetState(v string) { | ||||
| 	o.State = &v | ||||
| } | ||||
| 
 | ||||
| // HasState returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNodeMetadata) HasState() bool { | ||||
| 	if o != nil && o.State != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetLastSoftwareUpdatedDate returns the LastSoftwareUpdatedDate field value
 | ||||
| // If the value is explicit nil, the zero value for time.Time will be returned
 | ||||
| func (o *KubernetesNodeMetadata) GetLastSoftwareUpdatedDate() *time.Time { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.LastSoftwareUpdatedDate | ||||
| } | ||||
| 
 | ||||
| // GetLastSoftwareUpdatedDateOk returns a tuple with the LastSoftwareUpdatedDate field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNodeMetadata) GetLastSoftwareUpdatedDateOk() (*time.Time, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.LastSoftwareUpdatedDate, true | ||||
| } | ||||
| 
 | ||||
| // SetLastSoftwareUpdatedDate sets field value
 | ||||
| func (o *KubernetesNodeMetadata) SetLastSoftwareUpdatedDate(v time.Time) { | ||||
| 	o.LastSoftwareUpdatedDate = &v | ||||
| } | ||||
| 
 | ||||
| // HasLastSoftwareUpdatedDate returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNodeMetadata) HasLastSoftwareUpdatedDate() bool { | ||||
| 	if o != nil && o.LastSoftwareUpdatedDate != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o KubernetesNodeMetadata) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.Etag != nil { | ||||
| 		toSerialize["etag"] = o.Etag | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.CreatedDate != nil { | ||||
| 		toSerialize["createdDate"] = o.CreatedDate | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.LastModifiedDate != nil { | ||||
| 		toSerialize["lastModifiedDate"] = o.LastModifiedDate | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.State != nil { | ||||
| 		toSerialize["state"] = o.State | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.LastSoftwareUpdatedDate != nil { | ||||
| 		toSerialize["lastSoftwareUpdatedDate"] = o.LastSoftwareUpdatedDate | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableKubernetesNodeMetadata struct { | ||||
| 	value *KubernetesNodeMetadata | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableKubernetesNodeMetadata) Get() *KubernetesNodeMetadata { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableKubernetesNodeMetadata) Set(val *KubernetesNodeMetadata) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableKubernetesNodeMetadata) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableKubernetesNodeMetadata) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableKubernetesNodeMetadata(val *KubernetesNodeMetadata) *NullableKubernetesNodeMetadata { | ||||
| 	return &NullableKubernetesNodeMetadata{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableKubernetesNodeMetadata) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableKubernetesNodeMetadata) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,276 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // KubernetesNodePool struct for KubernetesNodePool
 | ||||
| type KubernetesNodePool struct { | ||||
| 	// The resource's unique identifier.
 | ||||
| 	Id *string `json:"id,omitempty"` | ||||
| 	// The type of object
 | ||||
| 	Type *string `json:"type,omitempty"` | ||||
| 	// URL to the object representation (absolute path)
 | ||||
| 	Href *string `json:"href,omitempty"` | ||||
| 	Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` | ||||
| 	Properties *KubernetesNodePoolProperties `json:"properties"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetId returns the Id field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *KubernetesNodePool) GetId() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Id | ||||
| } | ||||
| 
 | ||||
| // GetIdOk returns a tuple with the Id field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNodePool) GetIdOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Id, true | ||||
| } | ||||
| 
 | ||||
| // SetId sets field value
 | ||||
| func (o *KubernetesNodePool) SetId(v string) { | ||||
| 	o.Id = &v | ||||
| } | ||||
| 
 | ||||
| // HasId returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNodePool) HasId() bool { | ||||
| 	if o != nil && o.Id != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetType returns the Type field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *KubernetesNodePool) GetType() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Type | ||||
| } | ||||
| 
 | ||||
| // GetTypeOk returns a tuple with the Type field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNodePool) GetTypeOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Type, true | ||||
| } | ||||
| 
 | ||||
| // SetType sets field value
 | ||||
| func (o *KubernetesNodePool) SetType(v string) { | ||||
| 	o.Type = &v | ||||
| } | ||||
| 
 | ||||
| // HasType returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNodePool) HasType() bool { | ||||
| 	if o != nil && o.Type != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetHref returns the Href field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *KubernetesNodePool) GetHref() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Href | ||||
| } | ||||
| 
 | ||||
| // GetHrefOk returns a tuple with the Href field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNodePool) GetHrefOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Href, true | ||||
| } | ||||
| 
 | ||||
| // SetHref sets field value
 | ||||
| func (o *KubernetesNodePool) SetHref(v string) { | ||||
| 	o.Href = &v | ||||
| } | ||||
| 
 | ||||
| // HasHref returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNodePool) HasHref() bool { | ||||
| 	if o != nil && o.Href != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetMetadata returns the Metadata field value
 | ||||
| // If the value is explicit nil, the zero value for DatacenterElementMetadata will be returned
 | ||||
| func (o *KubernetesNodePool) GetMetadata() *DatacenterElementMetadata { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Metadata | ||||
| } | ||||
| 
 | ||||
| // GetMetadataOk returns a tuple with the Metadata field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNodePool) GetMetadataOk() (*DatacenterElementMetadata, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Metadata, true | ||||
| } | ||||
| 
 | ||||
| // SetMetadata sets field value
 | ||||
| func (o *KubernetesNodePool) SetMetadata(v DatacenterElementMetadata) { | ||||
| 	o.Metadata = &v | ||||
| } | ||||
| 
 | ||||
| // HasMetadata returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNodePool) HasMetadata() bool { | ||||
| 	if o != nil && o.Metadata != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetProperties returns the Properties field value
 | ||||
| // If the value is explicit nil, the zero value for KubernetesNodePoolProperties will be returned
 | ||||
| func (o *KubernetesNodePool) GetProperties() *KubernetesNodePoolProperties { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Properties | ||||
| } | ||||
| 
 | ||||
| // GetPropertiesOk returns a tuple with the Properties field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNodePool) GetPropertiesOk() (*KubernetesNodePoolProperties, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Properties, true | ||||
| } | ||||
| 
 | ||||
| // SetProperties sets field value
 | ||||
| func (o *KubernetesNodePool) SetProperties(v KubernetesNodePoolProperties) { | ||||
| 	o.Properties = &v | ||||
| } | ||||
| 
 | ||||
| // HasProperties returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNodePool) HasProperties() bool { | ||||
| 	if o != nil && o.Properties != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o KubernetesNodePool) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.Id != nil { | ||||
| 		toSerialize["id"] = o.Id | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Type != nil { | ||||
| 		toSerialize["type"] = o.Type | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Href != nil { | ||||
| 		toSerialize["href"] = o.Href | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Metadata != nil { | ||||
| 		toSerialize["metadata"] = o.Metadata | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Properties != nil { | ||||
| 		toSerialize["properties"] = o.Properties | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableKubernetesNodePool struct { | ||||
| 	value *KubernetesNodePool | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableKubernetesNodePool) Get() *KubernetesNodePool { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableKubernetesNodePool) Set(val *KubernetesNodePool) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableKubernetesNodePool) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableKubernetesNodePool) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableKubernetesNodePool(val *KubernetesNodePool) *NullableKubernetesNodePool { | ||||
| 	return &NullableKubernetesNodePool{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableKubernetesNodePool) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableKubernetesNodePool) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,149 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // KubernetesNodePoolAnnotation map of annotations attached to node pool
 | ||||
| type KubernetesNodePoolAnnotation struct { | ||||
| 	// Key of the annotation. String part must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character.
 | ||||
| 	Key *string `json:"key,omitempty"` | ||||
| 	// Value of the annotation.
 | ||||
| 	Value *string `json:"value,omitempty"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetKey returns the Key field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *KubernetesNodePoolAnnotation) GetKey() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Key | ||||
| } | ||||
| 
 | ||||
| // GetKeyOk returns a tuple with the Key field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNodePoolAnnotation) GetKeyOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Key, true | ||||
| } | ||||
| 
 | ||||
| // SetKey sets field value
 | ||||
| func (o *KubernetesNodePoolAnnotation) SetKey(v string) { | ||||
| 	o.Key = &v | ||||
| } | ||||
| 
 | ||||
| // HasKey returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNodePoolAnnotation) HasKey() bool { | ||||
| 	if o != nil && o.Key != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetValue returns the Value field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *KubernetesNodePoolAnnotation) GetValue() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Value | ||||
| } | ||||
| 
 | ||||
| // GetValueOk returns a tuple with the Value field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNodePoolAnnotation) GetValueOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Value, true | ||||
| } | ||||
| 
 | ||||
| // SetValue sets field value
 | ||||
| func (o *KubernetesNodePoolAnnotation) SetValue(v string) { | ||||
| 	o.Value = &v | ||||
| } | ||||
| 
 | ||||
| // HasValue returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNodePoolAnnotation) HasValue() bool { | ||||
| 	if o != nil && o.Value != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o KubernetesNodePoolAnnotation) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.Key != nil { | ||||
| 		toSerialize["key"] = o.Key | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Value != nil { | ||||
| 		toSerialize["value"] = o.Value | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableKubernetesNodePoolAnnotation struct { | ||||
| 	value *KubernetesNodePoolAnnotation | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableKubernetesNodePoolAnnotation) Get() *KubernetesNodePoolAnnotation { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableKubernetesNodePoolAnnotation) Set(val *KubernetesNodePoolAnnotation) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableKubernetesNodePoolAnnotation) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableKubernetesNodePoolAnnotation) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableKubernetesNodePoolAnnotation(val *KubernetesNodePoolAnnotation) *NullableKubernetesNodePoolAnnotation { | ||||
| 	return &NullableKubernetesNodePoolAnnotation{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableKubernetesNodePoolAnnotation) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableKubernetesNodePoolAnnotation) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,276 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // KubernetesNodePoolForPut struct for KubernetesNodePoolForPut
 | ||||
| type KubernetesNodePoolForPut struct { | ||||
| 	// The resource's unique identifier.
 | ||||
| 	Id *string `json:"id,omitempty"` | ||||
| 	// The type of object
 | ||||
| 	Type *string `json:"type,omitempty"` | ||||
| 	// URL to the object representation (absolute path)
 | ||||
| 	Href *string `json:"href,omitempty"` | ||||
| 	Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` | ||||
| 	Properties *KubernetesNodePoolPropertiesForPut `json:"properties"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetId returns the Id field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *KubernetesNodePoolForPut) GetId() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Id | ||||
| } | ||||
| 
 | ||||
| // GetIdOk returns a tuple with the Id field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNodePoolForPut) GetIdOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Id, true | ||||
| } | ||||
| 
 | ||||
| // SetId sets field value
 | ||||
| func (o *KubernetesNodePoolForPut) SetId(v string) { | ||||
| 	o.Id = &v | ||||
| } | ||||
| 
 | ||||
| // HasId returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNodePoolForPut) HasId() bool { | ||||
| 	if o != nil && o.Id != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetType returns the Type field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *KubernetesNodePoolForPut) GetType() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Type | ||||
| } | ||||
| 
 | ||||
| // GetTypeOk returns a tuple with the Type field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNodePoolForPut) GetTypeOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Type, true | ||||
| } | ||||
| 
 | ||||
| // SetType sets field value
 | ||||
| func (o *KubernetesNodePoolForPut) SetType(v string) { | ||||
| 	o.Type = &v | ||||
| } | ||||
| 
 | ||||
| // HasType returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNodePoolForPut) HasType() bool { | ||||
| 	if o != nil && o.Type != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetHref returns the Href field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *KubernetesNodePoolForPut) GetHref() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Href | ||||
| } | ||||
| 
 | ||||
| // GetHrefOk returns a tuple with the Href field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNodePoolForPut) GetHrefOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Href, true | ||||
| } | ||||
| 
 | ||||
| // SetHref sets field value
 | ||||
| func (o *KubernetesNodePoolForPut) SetHref(v string) { | ||||
| 	o.Href = &v | ||||
| } | ||||
| 
 | ||||
| // HasHref returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNodePoolForPut) HasHref() bool { | ||||
| 	if o != nil && o.Href != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetMetadata returns the Metadata field value
 | ||||
| // If the value is explicit nil, the zero value for DatacenterElementMetadata will be returned
 | ||||
| func (o *KubernetesNodePoolForPut) GetMetadata() *DatacenterElementMetadata { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Metadata | ||||
| } | ||||
| 
 | ||||
| // GetMetadataOk returns a tuple with the Metadata field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNodePoolForPut) GetMetadataOk() (*DatacenterElementMetadata, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Metadata, true | ||||
| } | ||||
| 
 | ||||
| // SetMetadata sets field value
 | ||||
| func (o *KubernetesNodePoolForPut) SetMetadata(v DatacenterElementMetadata) { | ||||
| 	o.Metadata = &v | ||||
| } | ||||
| 
 | ||||
| // HasMetadata returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNodePoolForPut) HasMetadata() bool { | ||||
| 	if o != nil && o.Metadata != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetProperties returns the Properties field value
 | ||||
| // If the value is explicit nil, the zero value for KubernetesNodePoolPropertiesForPut will be returned
 | ||||
| func (o *KubernetesNodePoolForPut) GetProperties() *KubernetesNodePoolPropertiesForPut { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Properties | ||||
| } | ||||
| 
 | ||||
| // GetPropertiesOk returns a tuple with the Properties field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNodePoolForPut) GetPropertiesOk() (*KubernetesNodePoolPropertiesForPut, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Properties, true | ||||
| } | ||||
| 
 | ||||
| // SetProperties sets field value
 | ||||
| func (o *KubernetesNodePoolForPut) SetProperties(v KubernetesNodePoolPropertiesForPut) { | ||||
| 	o.Properties = &v | ||||
| } | ||||
| 
 | ||||
| // HasProperties returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNodePoolForPut) HasProperties() bool { | ||||
| 	if o != nil && o.Properties != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o KubernetesNodePoolForPut) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.Id != nil { | ||||
| 		toSerialize["id"] = o.Id | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Type != nil { | ||||
| 		toSerialize["type"] = o.Type | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Href != nil { | ||||
| 		toSerialize["href"] = o.Href | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Metadata != nil { | ||||
| 		toSerialize["metadata"] = o.Metadata | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Properties != nil { | ||||
| 		toSerialize["properties"] = o.Properties | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableKubernetesNodePoolForPut struct { | ||||
| 	value *KubernetesNodePoolForPut | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableKubernetesNodePoolForPut) Get() *KubernetesNodePoolForPut { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableKubernetesNodePoolForPut) Set(val *KubernetesNodePoolForPut) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableKubernetesNodePoolForPut) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableKubernetesNodePoolForPut) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableKubernetesNodePoolForPut(val *KubernetesNodePoolForPut) *NullableKubernetesNodePoolForPut { | ||||
| 	return &NullableKubernetesNodePoolForPut{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableKubernetesNodePoolForPut) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableKubernetesNodePoolForPut) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,149 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // KubernetesNodePoolLabel map of labels attached to node pool
 | ||||
| type KubernetesNodePoolLabel struct { | ||||
| 	// Key of the label. String part must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character.
 | ||||
| 	Key *string `json:"key,omitempty"` | ||||
| 	// Value of the label. String part must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character.
 | ||||
| 	Value *string `json:"value,omitempty"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetKey returns the Key field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *KubernetesNodePoolLabel) GetKey() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Key | ||||
| } | ||||
| 
 | ||||
| // GetKeyOk returns a tuple with the Key field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNodePoolLabel) GetKeyOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Key, true | ||||
| } | ||||
| 
 | ||||
| // SetKey sets field value
 | ||||
| func (o *KubernetesNodePoolLabel) SetKey(v string) { | ||||
| 	o.Key = &v | ||||
| } | ||||
| 
 | ||||
| // HasKey returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNodePoolLabel) HasKey() bool { | ||||
| 	if o != nil && o.Key != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetValue returns the Value field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *KubernetesNodePoolLabel) GetValue() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Value | ||||
| } | ||||
| 
 | ||||
| // GetValueOk returns a tuple with the Value field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNodePoolLabel) GetValueOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Value, true | ||||
| } | ||||
| 
 | ||||
| // SetValue sets field value
 | ||||
| func (o *KubernetesNodePoolLabel) SetValue(v string) { | ||||
| 	o.Value = &v | ||||
| } | ||||
| 
 | ||||
| // HasValue returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNodePoolLabel) HasValue() bool { | ||||
| 	if o != nil && o.Value != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o KubernetesNodePoolLabel) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.Key != nil { | ||||
| 		toSerialize["key"] = o.Key | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Value != nil { | ||||
| 		toSerialize["value"] = o.Value | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableKubernetesNodePoolLabel struct { | ||||
| 	value *KubernetesNodePoolLabel | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableKubernetesNodePoolLabel) Get() *KubernetesNodePoolLabel { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableKubernetesNodePoolLabel) Set(val *KubernetesNodePoolLabel) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableKubernetesNodePoolLabel) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableKubernetesNodePoolLabel) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableKubernetesNodePoolLabel(val *KubernetesNodePoolLabel) *NullableKubernetesNodePoolLabel { | ||||
| 	return &NullableKubernetesNodePoolLabel{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableKubernetesNodePoolLabel) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableKubernetesNodePoolLabel) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,106 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // KubernetesNodePoolLan struct for KubernetesNodePoolLan
 | ||||
| type KubernetesNodePoolLan struct { | ||||
| 	// The LAN ID of an existing LAN at the related datacenter
 | ||||
| 	Id *int32 `json:"id,omitempty"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetId returns the Id field value
 | ||||
| // If the value is explicit nil, the zero value for int32 will be returned
 | ||||
| func (o *KubernetesNodePoolLan) GetId() *int32 { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Id | ||||
| } | ||||
| 
 | ||||
| // GetIdOk returns a tuple with the Id field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNodePoolLan) GetIdOk() (*int32, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Id, true | ||||
| } | ||||
| 
 | ||||
| // SetId sets field value
 | ||||
| func (o *KubernetesNodePoolLan) SetId(v int32) { | ||||
| 	o.Id = &v | ||||
| } | ||||
| 
 | ||||
| // HasId returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNodePoolLan) HasId() bool { | ||||
| 	if o != nil && o.Id != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o KubernetesNodePoolLan) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.Id != nil { | ||||
| 		toSerialize["id"] = o.Id | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableKubernetesNodePoolLan struct { | ||||
| 	value *KubernetesNodePoolLan | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableKubernetesNodePoolLan) Get() *KubernetesNodePoolLan { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableKubernetesNodePoolLan) Set(val *KubernetesNodePoolLan) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableKubernetesNodePoolLan) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableKubernetesNodePoolLan) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableKubernetesNodePoolLan(val *KubernetesNodePoolLan) *NullableKubernetesNodePoolLan { | ||||
| 	return &NullableKubernetesNodePoolLan{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableKubernetesNodePoolLan) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableKubernetesNodePoolLan) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,704 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // KubernetesNodePoolProperties struct for KubernetesNodePoolProperties
 | ||||
| type KubernetesNodePoolProperties struct { | ||||
| 	// A Kubernetes Node Pool Name. Valid Kubernetes Node Pool name must be 63 characters or less and must be empty or begin and end with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between.
 | ||||
| 	Name *string `json:"name"` | ||||
| 	// A valid uuid of the datacenter on which user has access
 | ||||
| 	DatacenterId *string `json:"datacenterId"` | ||||
| 	// Number of nodes part of the Node Pool
 | ||||
| 	NodeCount *int32 `json:"nodeCount"` | ||||
| 	// A valid cpu family name
 | ||||
| 	CpuFamily *string `json:"cpuFamily"` | ||||
| 	// Number of cores for node
 | ||||
| 	CoresCount *int32 `json:"coresCount"` | ||||
| 	// RAM size for node, minimum size 2048MB is recommended. Ram size must be set to multiple of 1024MB.
 | ||||
| 	RamSize *int32 `json:"ramSize"` | ||||
| 	// The availability zone in which the server should exist
 | ||||
| 	AvailabilityZone *string `json:"availabilityZone"` | ||||
| 	// Hardware type of the volume
 | ||||
| 	StorageType *string `json:"storageType"` | ||||
| 	// The size of the volume in GB. The size should be greater than 10GB.
 | ||||
| 	StorageSize *int32 `json:"storageSize"` | ||||
| 	// The kubernetes version in which a nodepool is running. This imposes restrictions on what kubernetes versions can be run in a cluster's nodepools. Additionally, not all kubernetes versions are viable upgrade targets for all prior versions.
 | ||||
| 	K8sVersion *string `json:"k8sVersion,omitempty"` | ||||
| 	MaintenanceWindow *KubernetesMaintenanceWindow `json:"maintenanceWindow,omitempty"` | ||||
| 	AutoScaling *KubernetesAutoScaling `json:"autoScaling,omitempty"` | ||||
| 	// array of additional LANs attached to worker nodes
 | ||||
| 	Lans *[]KubernetesNodePoolLan `json:"lans,omitempty"` | ||||
| 	Labels *KubernetesNodePoolLabel `json:"labels,omitempty"` | ||||
| 	Annotations *KubernetesNodePoolAnnotation `json:"annotations,omitempty"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetName returns the Name field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *KubernetesNodePoolProperties) GetName() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Name | ||||
| } | ||||
| 
 | ||||
| // GetNameOk returns a tuple with the Name field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNodePoolProperties) GetNameOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Name, true | ||||
| } | ||||
| 
 | ||||
| // SetName sets field value
 | ||||
| func (o *KubernetesNodePoolProperties) SetName(v string) { | ||||
| 	o.Name = &v | ||||
| } | ||||
| 
 | ||||
| // HasName returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNodePoolProperties) HasName() bool { | ||||
| 	if o != nil && o.Name != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetDatacenterId returns the DatacenterId field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *KubernetesNodePoolProperties) GetDatacenterId() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.DatacenterId | ||||
| } | ||||
| 
 | ||||
| // GetDatacenterIdOk returns a tuple with the DatacenterId field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNodePoolProperties) GetDatacenterIdOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.DatacenterId, true | ||||
| } | ||||
| 
 | ||||
| // SetDatacenterId sets field value
 | ||||
| func (o *KubernetesNodePoolProperties) SetDatacenterId(v string) { | ||||
| 	o.DatacenterId = &v | ||||
| } | ||||
| 
 | ||||
| // HasDatacenterId returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNodePoolProperties) HasDatacenterId() bool { | ||||
| 	if o != nil && o.DatacenterId != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetNodeCount returns the NodeCount field value
 | ||||
| // If the value is explicit nil, the zero value for int32 will be returned
 | ||||
| func (o *KubernetesNodePoolProperties) GetNodeCount() *int32 { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.NodeCount | ||||
| } | ||||
| 
 | ||||
| // GetNodeCountOk returns a tuple with the NodeCount field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNodePoolProperties) GetNodeCountOk() (*int32, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.NodeCount, true | ||||
| } | ||||
| 
 | ||||
| // SetNodeCount sets field value
 | ||||
| func (o *KubernetesNodePoolProperties) SetNodeCount(v int32) { | ||||
| 	o.NodeCount = &v | ||||
| } | ||||
| 
 | ||||
| // HasNodeCount returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNodePoolProperties) HasNodeCount() bool { | ||||
| 	if o != nil && o.NodeCount != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetCpuFamily returns the CpuFamily field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *KubernetesNodePoolProperties) GetCpuFamily() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.CpuFamily | ||||
| } | ||||
| 
 | ||||
| // GetCpuFamilyOk returns a tuple with the CpuFamily field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNodePoolProperties) GetCpuFamilyOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.CpuFamily, true | ||||
| } | ||||
| 
 | ||||
| // SetCpuFamily sets field value
 | ||||
| func (o *KubernetesNodePoolProperties) SetCpuFamily(v string) { | ||||
| 	o.CpuFamily = &v | ||||
| } | ||||
| 
 | ||||
| // HasCpuFamily returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNodePoolProperties) HasCpuFamily() bool { | ||||
| 	if o != nil && o.CpuFamily != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetCoresCount returns the CoresCount field value
 | ||||
| // If the value is explicit nil, the zero value for int32 will be returned
 | ||||
| func (o *KubernetesNodePoolProperties) GetCoresCount() *int32 { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.CoresCount | ||||
| } | ||||
| 
 | ||||
| // GetCoresCountOk returns a tuple with the CoresCount field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNodePoolProperties) GetCoresCountOk() (*int32, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.CoresCount, true | ||||
| } | ||||
| 
 | ||||
| // SetCoresCount sets field value
 | ||||
| func (o *KubernetesNodePoolProperties) SetCoresCount(v int32) { | ||||
| 	o.CoresCount = &v | ||||
| } | ||||
| 
 | ||||
| // HasCoresCount returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNodePoolProperties) HasCoresCount() bool { | ||||
| 	if o != nil && o.CoresCount != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetRamSize returns the RamSize field value
 | ||||
| // If the value is explicit nil, the zero value for int32 will be returned
 | ||||
| func (o *KubernetesNodePoolProperties) GetRamSize() *int32 { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.RamSize | ||||
| } | ||||
| 
 | ||||
| // GetRamSizeOk returns a tuple with the RamSize field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNodePoolProperties) GetRamSizeOk() (*int32, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.RamSize, true | ||||
| } | ||||
| 
 | ||||
| // SetRamSize sets field value
 | ||||
| func (o *KubernetesNodePoolProperties) SetRamSize(v int32) { | ||||
| 	o.RamSize = &v | ||||
| } | ||||
| 
 | ||||
| // HasRamSize returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNodePoolProperties) HasRamSize() bool { | ||||
| 	if o != nil && o.RamSize != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetAvailabilityZone returns the AvailabilityZone field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *KubernetesNodePoolProperties) GetAvailabilityZone() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.AvailabilityZone | ||||
| } | ||||
| 
 | ||||
| // GetAvailabilityZoneOk returns a tuple with the AvailabilityZone field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNodePoolProperties) GetAvailabilityZoneOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.AvailabilityZone, true | ||||
| } | ||||
| 
 | ||||
| // SetAvailabilityZone sets field value
 | ||||
| func (o *KubernetesNodePoolProperties) SetAvailabilityZone(v string) { | ||||
| 	o.AvailabilityZone = &v | ||||
| } | ||||
| 
 | ||||
| // HasAvailabilityZone returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNodePoolProperties) HasAvailabilityZone() bool { | ||||
| 	if o != nil && o.AvailabilityZone != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetStorageType returns the StorageType field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *KubernetesNodePoolProperties) GetStorageType() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.StorageType | ||||
| } | ||||
| 
 | ||||
| // GetStorageTypeOk returns a tuple with the StorageType field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNodePoolProperties) GetStorageTypeOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.StorageType, true | ||||
| } | ||||
| 
 | ||||
| // SetStorageType sets field value
 | ||||
| func (o *KubernetesNodePoolProperties) SetStorageType(v string) { | ||||
| 	o.StorageType = &v | ||||
| } | ||||
| 
 | ||||
| // HasStorageType returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNodePoolProperties) HasStorageType() bool { | ||||
| 	if o != nil && o.StorageType != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetStorageSize returns the StorageSize field value
 | ||||
| // If the value is explicit nil, the zero value for int32 will be returned
 | ||||
| func (o *KubernetesNodePoolProperties) GetStorageSize() *int32 { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.StorageSize | ||||
| } | ||||
| 
 | ||||
| // GetStorageSizeOk returns a tuple with the StorageSize field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNodePoolProperties) GetStorageSizeOk() (*int32, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.StorageSize, true | ||||
| } | ||||
| 
 | ||||
| // SetStorageSize sets field value
 | ||||
| func (o *KubernetesNodePoolProperties) SetStorageSize(v int32) { | ||||
| 	o.StorageSize = &v | ||||
| } | ||||
| 
 | ||||
| // HasStorageSize returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNodePoolProperties) HasStorageSize() bool { | ||||
| 	if o != nil && o.StorageSize != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetK8sVersion returns the K8sVersion field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *KubernetesNodePoolProperties) GetK8sVersion() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.K8sVersion | ||||
| } | ||||
| 
 | ||||
| // GetK8sVersionOk returns a tuple with the K8sVersion field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNodePoolProperties) GetK8sVersionOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.K8sVersion, true | ||||
| } | ||||
| 
 | ||||
| // SetK8sVersion sets field value
 | ||||
| func (o *KubernetesNodePoolProperties) SetK8sVersion(v string) { | ||||
| 	o.K8sVersion = &v | ||||
| } | ||||
| 
 | ||||
| // HasK8sVersion returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNodePoolProperties) HasK8sVersion() bool { | ||||
| 	if o != nil && o.K8sVersion != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetMaintenanceWindow returns the MaintenanceWindow field value
 | ||||
| // If the value is explicit nil, the zero value for KubernetesMaintenanceWindow will be returned
 | ||||
| func (o *KubernetesNodePoolProperties) GetMaintenanceWindow() *KubernetesMaintenanceWindow { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.MaintenanceWindow | ||||
| } | ||||
| 
 | ||||
| // GetMaintenanceWindowOk returns a tuple with the MaintenanceWindow field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNodePoolProperties) GetMaintenanceWindowOk() (*KubernetesMaintenanceWindow, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.MaintenanceWindow, true | ||||
| } | ||||
| 
 | ||||
| // SetMaintenanceWindow sets field value
 | ||||
| func (o *KubernetesNodePoolProperties) SetMaintenanceWindow(v KubernetesMaintenanceWindow) { | ||||
| 	o.MaintenanceWindow = &v | ||||
| } | ||||
| 
 | ||||
| // HasMaintenanceWindow returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNodePoolProperties) HasMaintenanceWindow() bool { | ||||
| 	if o != nil && o.MaintenanceWindow != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetAutoScaling returns the AutoScaling field value
 | ||||
| // If the value is explicit nil, the zero value for KubernetesAutoScaling will be returned
 | ||||
| func (o *KubernetesNodePoolProperties) GetAutoScaling() *KubernetesAutoScaling { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.AutoScaling | ||||
| } | ||||
| 
 | ||||
| // GetAutoScalingOk returns a tuple with the AutoScaling field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNodePoolProperties) GetAutoScalingOk() (*KubernetesAutoScaling, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.AutoScaling, true | ||||
| } | ||||
| 
 | ||||
| // SetAutoScaling sets field value
 | ||||
| func (o *KubernetesNodePoolProperties) SetAutoScaling(v KubernetesAutoScaling) { | ||||
| 	o.AutoScaling = &v | ||||
| } | ||||
| 
 | ||||
| // HasAutoScaling returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNodePoolProperties) HasAutoScaling() bool { | ||||
| 	if o != nil && o.AutoScaling != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetLans returns the Lans field value
 | ||||
| // If the value is explicit nil, the zero value for []KubernetesNodePoolLan will be returned
 | ||||
| func (o *KubernetesNodePoolProperties) GetLans() *[]KubernetesNodePoolLan { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Lans | ||||
| } | ||||
| 
 | ||||
| // GetLansOk returns a tuple with the Lans field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNodePoolProperties) GetLansOk() (*[]KubernetesNodePoolLan, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Lans, true | ||||
| } | ||||
| 
 | ||||
| // SetLans sets field value
 | ||||
| func (o *KubernetesNodePoolProperties) SetLans(v []KubernetesNodePoolLan) { | ||||
| 	o.Lans = &v | ||||
| } | ||||
| 
 | ||||
| // HasLans returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNodePoolProperties) HasLans() bool { | ||||
| 	if o != nil && o.Lans != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetLabels returns the Labels field value
 | ||||
| // If the value is explicit nil, the zero value for KubernetesNodePoolLabel will be returned
 | ||||
| func (o *KubernetesNodePoolProperties) GetLabels() *KubernetesNodePoolLabel { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Labels | ||||
| } | ||||
| 
 | ||||
| // GetLabelsOk returns a tuple with the Labels field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNodePoolProperties) GetLabelsOk() (*KubernetesNodePoolLabel, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Labels, true | ||||
| } | ||||
| 
 | ||||
| // SetLabels sets field value
 | ||||
| func (o *KubernetesNodePoolProperties) SetLabels(v KubernetesNodePoolLabel) { | ||||
| 	o.Labels = &v | ||||
| } | ||||
| 
 | ||||
| // HasLabels returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNodePoolProperties) HasLabels() bool { | ||||
| 	if o != nil && o.Labels != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetAnnotations returns the Annotations field value
 | ||||
| // If the value is explicit nil, the zero value for KubernetesNodePoolAnnotation will be returned
 | ||||
| func (o *KubernetesNodePoolProperties) GetAnnotations() *KubernetesNodePoolAnnotation { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Annotations | ||||
| } | ||||
| 
 | ||||
| // GetAnnotationsOk returns a tuple with the Annotations field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNodePoolProperties) GetAnnotationsOk() (*KubernetesNodePoolAnnotation, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Annotations, true | ||||
| } | ||||
| 
 | ||||
| // SetAnnotations sets field value
 | ||||
| func (o *KubernetesNodePoolProperties) SetAnnotations(v KubernetesNodePoolAnnotation) { | ||||
| 	o.Annotations = &v | ||||
| } | ||||
| 
 | ||||
| // HasAnnotations returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNodePoolProperties) HasAnnotations() bool { | ||||
| 	if o != nil && o.Annotations != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o KubernetesNodePoolProperties) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.Name != nil { | ||||
| 		toSerialize["name"] = o.Name | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.DatacenterId != nil { | ||||
| 		toSerialize["datacenterId"] = o.DatacenterId | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.NodeCount != nil { | ||||
| 		toSerialize["nodeCount"] = o.NodeCount | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.CpuFamily != nil { | ||||
| 		toSerialize["cpuFamily"] = o.CpuFamily | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.CoresCount != nil { | ||||
| 		toSerialize["coresCount"] = o.CoresCount | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.RamSize != nil { | ||||
| 		toSerialize["ramSize"] = o.RamSize | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.AvailabilityZone != nil { | ||||
| 		toSerialize["availabilityZone"] = o.AvailabilityZone | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.StorageType != nil { | ||||
| 		toSerialize["storageType"] = o.StorageType | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.StorageSize != nil { | ||||
| 		toSerialize["storageSize"] = o.StorageSize | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.K8sVersion != nil { | ||||
| 		toSerialize["k8sVersion"] = o.K8sVersion | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.MaintenanceWindow != nil { | ||||
| 		toSerialize["maintenanceWindow"] = o.MaintenanceWindow | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.AutoScaling != nil { | ||||
| 		toSerialize["autoScaling"] = o.AutoScaling | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Lans != nil { | ||||
| 		toSerialize["lans"] = o.Lans | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Labels != nil { | ||||
| 		toSerialize["labels"] = o.Labels | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Annotations != nil { | ||||
| 		toSerialize["annotations"] = o.Annotations | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableKubernetesNodePoolProperties struct { | ||||
| 	value *KubernetesNodePoolProperties | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableKubernetesNodePoolProperties) Get() *KubernetesNodePoolProperties { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableKubernetesNodePoolProperties) Set(val *KubernetesNodePoolProperties) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableKubernetesNodePoolProperties) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableKubernetesNodePoolProperties) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableKubernetesNodePoolProperties(val *KubernetesNodePoolProperties) *NullableKubernetesNodePoolProperties { | ||||
| 	return &NullableKubernetesNodePoolProperties{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableKubernetesNodePoolProperties) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableKubernetesNodePoolProperties) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,620 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // KubernetesNodePoolPropertiesForPut struct for KubernetesNodePoolPropertiesForPut
 | ||||
| type KubernetesNodePoolPropertiesForPut struct { | ||||
| 	// A Kubernetes Node Pool Name. Valid Kubernetes Node Pool name must be 63 characters or less and must be empty or begin and end with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between.
 | ||||
| 	Name *string `json:"name"` | ||||
| 	// A valid uuid of the datacenter on which user has access
 | ||||
| 	DatacenterId *string `json:"datacenterId"` | ||||
| 	// Number of nodes part of the Node Pool
 | ||||
| 	NodeCount *int32 `json:"nodeCount"` | ||||
| 	// A valid cpu family name
 | ||||
| 	CpuFamily *string `json:"cpuFamily"` | ||||
| 	// Number of cores for node
 | ||||
| 	CoresCount *int32 `json:"coresCount"` | ||||
| 	// RAM size for node, minimum size 2048MB is recommended. Ram size must be set to multiple of 1024MB.
 | ||||
| 	RamSize *int32 `json:"ramSize"` | ||||
| 	// The availability zone in which the server should exist
 | ||||
| 	AvailabilityZone *string `json:"availabilityZone"` | ||||
| 	// Hardware type of the volume
 | ||||
| 	StorageType *string `json:"storageType"` | ||||
| 	// The size of the volume in GB. The size should be greater than 10GB.
 | ||||
| 	StorageSize *int32 `json:"storageSize"` | ||||
| 	// The kubernetes version in which a nodepool is running. This imposes restrictions on what kubernetes versions can be run in a cluster's nodepools. Additionally, not all kubernetes versions are viable upgrade targets for all prior versions.
 | ||||
| 	K8sVersion *string `json:"k8sVersion,omitempty"` | ||||
| 	MaintenanceWindow *KubernetesMaintenanceWindow `json:"maintenanceWindow,omitempty"` | ||||
| 	AutoScaling *KubernetesAutoScaling `json:"autoScaling,omitempty"` | ||||
| 	// array of additional LANs attached to worker nodes
 | ||||
| 	Lans *[]KubernetesNodePoolLan `json:"lans,omitempty"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetName returns the Name field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *KubernetesNodePoolPropertiesForPut) GetName() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Name | ||||
| } | ||||
| 
 | ||||
| // GetNameOk returns a tuple with the Name field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNodePoolPropertiesForPut) GetNameOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Name, true | ||||
| } | ||||
| 
 | ||||
| // SetName sets field value
 | ||||
| func (o *KubernetesNodePoolPropertiesForPut) SetName(v string) { | ||||
| 	o.Name = &v | ||||
| } | ||||
| 
 | ||||
| // HasName returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNodePoolPropertiesForPut) HasName() bool { | ||||
| 	if o != nil && o.Name != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetDatacenterId returns the DatacenterId field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *KubernetesNodePoolPropertiesForPut) GetDatacenterId() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.DatacenterId | ||||
| } | ||||
| 
 | ||||
| // GetDatacenterIdOk returns a tuple with the DatacenterId field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNodePoolPropertiesForPut) GetDatacenterIdOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.DatacenterId, true | ||||
| } | ||||
| 
 | ||||
| // SetDatacenterId sets field value
 | ||||
| func (o *KubernetesNodePoolPropertiesForPut) SetDatacenterId(v string) { | ||||
| 	o.DatacenterId = &v | ||||
| } | ||||
| 
 | ||||
| // HasDatacenterId returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNodePoolPropertiesForPut) HasDatacenterId() bool { | ||||
| 	if o != nil && o.DatacenterId != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetNodeCount returns the NodeCount field value
 | ||||
| // If the value is explicit nil, the zero value for int32 will be returned
 | ||||
| func (o *KubernetesNodePoolPropertiesForPut) GetNodeCount() *int32 { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.NodeCount | ||||
| } | ||||
| 
 | ||||
| // GetNodeCountOk returns a tuple with the NodeCount field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNodePoolPropertiesForPut) GetNodeCountOk() (*int32, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.NodeCount, true | ||||
| } | ||||
| 
 | ||||
| // SetNodeCount sets field value
 | ||||
| func (o *KubernetesNodePoolPropertiesForPut) SetNodeCount(v int32) { | ||||
| 	o.NodeCount = &v | ||||
| } | ||||
| 
 | ||||
| // HasNodeCount returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNodePoolPropertiesForPut) HasNodeCount() bool { | ||||
| 	if o != nil && o.NodeCount != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetCpuFamily returns the CpuFamily field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *KubernetesNodePoolPropertiesForPut) GetCpuFamily() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.CpuFamily | ||||
| } | ||||
| 
 | ||||
| // GetCpuFamilyOk returns a tuple with the CpuFamily field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNodePoolPropertiesForPut) GetCpuFamilyOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.CpuFamily, true | ||||
| } | ||||
| 
 | ||||
| // SetCpuFamily sets field value
 | ||||
| func (o *KubernetesNodePoolPropertiesForPut) SetCpuFamily(v string) { | ||||
| 	o.CpuFamily = &v | ||||
| } | ||||
| 
 | ||||
| // HasCpuFamily returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNodePoolPropertiesForPut) HasCpuFamily() bool { | ||||
| 	if o != nil && o.CpuFamily != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetCoresCount returns the CoresCount field value
 | ||||
| // If the value is explicit nil, the zero value for int32 will be returned
 | ||||
| func (o *KubernetesNodePoolPropertiesForPut) GetCoresCount() *int32 { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.CoresCount | ||||
| } | ||||
| 
 | ||||
| // GetCoresCountOk returns a tuple with the CoresCount field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNodePoolPropertiesForPut) GetCoresCountOk() (*int32, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.CoresCount, true | ||||
| } | ||||
| 
 | ||||
| // SetCoresCount sets field value
 | ||||
| func (o *KubernetesNodePoolPropertiesForPut) SetCoresCount(v int32) { | ||||
| 	o.CoresCount = &v | ||||
| } | ||||
| 
 | ||||
| // HasCoresCount returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNodePoolPropertiesForPut) HasCoresCount() bool { | ||||
| 	if o != nil && o.CoresCount != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetRamSize returns the RamSize field value
 | ||||
| // If the value is explicit nil, the zero value for int32 will be returned
 | ||||
| func (o *KubernetesNodePoolPropertiesForPut) GetRamSize() *int32 { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.RamSize | ||||
| } | ||||
| 
 | ||||
| // GetRamSizeOk returns a tuple with the RamSize field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNodePoolPropertiesForPut) GetRamSizeOk() (*int32, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.RamSize, true | ||||
| } | ||||
| 
 | ||||
| // SetRamSize sets field value
 | ||||
| func (o *KubernetesNodePoolPropertiesForPut) SetRamSize(v int32) { | ||||
| 	o.RamSize = &v | ||||
| } | ||||
| 
 | ||||
| // HasRamSize returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNodePoolPropertiesForPut) HasRamSize() bool { | ||||
| 	if o != nil && o.RamSize != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetAvailabilityZone returns the AvailabilityZone field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *KubernetesNodePoolPropertiesForPut) GetAvailabilityZone() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.AvailabilityZone | ||||
| } | ||||
| 
 | ||||
| // GetAvailabilityZoneOk returns a tuple with the AvailabilityZone field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNodePoolPropertiesForPut) GetAvailabilityZoneOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.AvailabilityZone, true | ||||
| } | ||||
| 
 | ||||
| // SetAvailabilityZone sets field value
 | ||||
| func (o *KubernetesNodePoolPropertiesForPut) SetAvailabilityZone(v string) { | ||||
| 	o.AvailabilityZone = &v | ||||
| } | ||||
| 
 | ||||
| // HasAvailabilityZone returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNodePoolPropertiesForPut) HasAvailabilityZone() bool { | ||||
| 	if o != nil && o.AvailabilityZone != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetStorageType returns the StorageType field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *KubernetesNodePoolPropertiesForPut) GetStorageType() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.StorageType | ||||
| } | ||||
| 
 | ||||
| // GetStorageTypeOk returns a tuple with the StorageType field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNodePoolPropertiesForPut) GetStorageTypeOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.StorageType, true | ||||
| } | ||||
| 
 | ||||
| // SetStorageType sets field value
 | ||||
| func (o *KubernetesNodePoolPropertiesForPut) SetStorageType(v string) { | ||||
| 	o.StorageType = &v | ||||
| } | ||||
| 
 | ||||
| // HasStorageType returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNodePoolPropertiesForPut) HasStorageType() bool { | ||||
| 	if o != nil && o.StorageType != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetStorageSize returns the StorageSize field value
 | ||||
| // If the value is explicit nil, the zero value for int32 will be returned
 | ||||
| func (o *KubernetesNodePoolPropertiesForPut) GetStorageSize() *int32 { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.StorageSize | ||||
| } | ||||
| 
 | ||||
| // GetStorageSizeOk returns a tuple with the StorageSize field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNodePoolPropertiesForPut) GetStorageSizeOk() (*int32, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.StorageSize, true | ||||
| } | ||||
| 
 | ||||
| // SetStorageSize sets field value
 | ||||
| func (o *KubernetesNodePoolPropertiesForPut) SetStorageSize(v int32) { | ||||
| 	o.StorageSize = &v | ||||
| } | ||||
| 
 | ||||
| // HasStorageSize returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNodePoolPropertiesForPut) HasStorageSize() bool { | ||||
| 	if o != nil && o.StorageSize != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetK8sVersion returns the K8sVersion field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *KubernetesNodePoolPropertiesForPut) GetK8sVersion() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.K8sVersion | ||||
| } | ||||
| 
 | ||||
| // GetK8sVersionOk returns a tuple with the K8sVersion field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNodePoolPropertiesForPut) GetK8sVersionOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.K8sVersion, true | ||||
| } | ||||
| 
 | ||||
| // SetK8sVersion sets field value
 | ||||
| func (o *KubernetesNodePoolPropertiesForPut) SetK8sVersion(v string) { | ||||
| 	o.K8sVersion = &v | ||||
| } | ||||
| 
 | ||||
| // HasK8sVersion returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNodePoolPropertiesForPut) HasK8sVersion() bool { | ||||
| 	if o != nil && o.K8sVersion != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetMaintenanceWindow returns the MaintenanceWindow field value
 | ||||
| // If the value is explicit nil, the zero value for KubernetesMaintenanceWindow will be returned
 | ||||
| func (o *KubernetesNodePoolPropertiesForPut) GetMaintenanceWindow() *KubernetesMaintenanceWindow { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.MaintenanceWindow | ||||
| } | ||||
| 
 | ||||
| // GetMaintenanceWindowOk returns a tuple with the MaintenanceWindow field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNodePoolPropertiesForPut) GetMaintenanceWindowOk() (*KubernetesMaintenanceWindow, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.MaintenanceWindow, true | ||||
| } | ||||
| 
 | ||||
| // SetMaintenanceWindow sets field value
 | ||||
| func (o *KubernetesNodePoolPropertiesForPut) SetMaintenanceWindow(v KubernetesMaintenanceWindow) { | ||||
| 	o.MaintenanceWindow = &v | ||||
| } | ||||
| 
 | ||||
| // HasMaintenanceWindow returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNodePoolPropertiesForPut) HasMaintenanceWindow() bool { | ||||
| 	if o != nil && o.MaintenanceWindow != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetAutoScaling returns the AutoScaling field value
 | ||||
| // If the value is explicit nil, the zero value for KubernetesAutoScaling will be returned
 | ||||
| func (o *KubernetesNodePoolPropertiesForPut) GetAutoScaling() *KubernetesAutoScaling { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.AutoScaling | ||||
| } | ||||
| 
 | ||||
| // GetAutoScalingOk returns a tuple with the AutoScaling field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNodePoolPropertiesForPut) GetAutoScalingOk() (*KubernetesAutoScaling, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.AutoScaling, true | ||||
| } | ||||
| 
 | ||||
| // SetAutoScaling sets field value
 | ||||
| func (o *KubernetesNodePoolPropertiesForPut) SetAutoScaling(v KubernetesAutoScaling) { | ||||
| 	o.AutoScaling = &v | ||||
| } | ||||
| 
 | ||||
| // HasAutoScaling returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNodePoolPropertiesForPut) HasAutoScaling() bool { | ||||
| 	if o != nil && o.AutoScaling != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetLans returns the Lans field value
 | ||||
| // If the value is explicit nil, the zero value for []KubernetesNodePoolLan will be returned
 | ||||
| func (o *KubernetesNodePoolPropertiesForPut) GetLans() *[]KubernetesNodePoolLan { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Lans | ||||
| } | ||||
| 
 | ||||
| // GetLansOk returns a tuple with the Lans field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNodePoolPropertiesForPut) GetLansOk() (*[]KubernetesNodePoolLan, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Lans, true | ||||
| } | ||||
| 
 | ||||
| // SetLans sets field value
 | ||||
| func (o *KubernetesNodePoolPropertiesForPut) SetLans(v []KubernetesNodePoolLan) { | ||||
| 	o.Lans = &v | ||||
| } | ||||
| 
 | ||||
| // HasLans returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNodePoolPropertiesForPut) HasLans() bool { | ||||
| 	if o != nil && o.Lans != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o KubernetesNodePoolPropertiesForPut) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.Name != nil { | ||||
| 		toSerialize["name"] = o.Name | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.DatacenterId != nil { | ||||
| 		toSerialize["datacenterId"] = o.DatacenterId | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.NodeCount != nil { | ||||
| 		toSerialize["nodeCount"] = o.NodeCount | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.CpuFamily != nil { | ||||
| 		toSerialize["cpuFamily"] = o.CpuFamily | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.CoresCount != nil { | ||||
| 		toSerialize["coresCount"] = o.CoresCount | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.RamSize != nil { | ||||
| 		toSerialize["ramSize"] = o.RamSize | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.AvailabilityZone != nil { | ||||
| 		toSerialize["availabilityZone"] = o.AvailabilityZone | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.StorageType != nil { | ||||
| 		toSerialize["storageType"] = o.StorageType | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.StorageSize != nil { | ||||
| 		toSerialize["storageSize"] = o.StorageSize | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.K8sVersion != nil { | ||||
| 		toSerialize["k8sVersion"] = o.K8sVersion | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.MaintenanceWindow != nil { | ||||
| 		toSerialize["maintenanceWindow"] = o.MaintenanceWindow | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.AutoScaling != nil { | ||||
| 		toSerialize["autoScaling"] = o.AutoScaling | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Lans != nil { | ||||
| 		toSerialize["lans"] = o.Lans | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableKubernetesNodePoolPropertiesForPut struct { | ||||
| 	value *KubernetesNodePoolPropertiesForPut | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableKubernetesNodePoolPropertiesForPut) Get() *KubernetesNodePoolPropertiesForPut { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableKubernetesNodePoolPropertiesForPut) Set(val *KubernetesNodePoolPropertiesForPut) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableKubernetesNodePoolPropertiesForPut) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableKubernetesNodePoolPropertiesForPut) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableKubernetesNodePoolPropertiesForPut(val *KubernetesNodePoolPropertiesForPut) *NullableKubernetesNodePoolPropertiesForPut { | ||||
| 	return &NullableKubernetesNodePoolPropertiesForPut{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableKubernetesNodePoolPropertiesForPut) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableKubernetesNodePoolPropertiesForPut) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,235 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // KubernetesNodePools struct for KubernetesNodePools
 | ||||
| type KubernetesNodePools struct { | ||||
| 	// Unique representation for Kubernetes Node Pool as a collection on a resource.
 | ||||
| 	Id *string `json:"id,omitempty"` | ||||
| 	// The type of resource within a collection
 | ||||
| 	Type *string `json:"type,omitempty"` | ||||
| 	// URL to the collection representation (absolute path)
 | ||||
| 	Href *string `json:"href,omitempty"` | ||||
| 	// Array of items in that collection
 | ||||
| 	Items *[]KubernetesNodePool `json:"items,omitempty"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetId returns the Id field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *KubernetesNodePools) GetId() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Id | ||||
| } | ||||
| 
 | ||||
| // GetIdOk returns a tuple with the Id field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNodePools) GetIdOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Id, true | ||||
| } | ||||
| 
 | ||||
| // SetId sets field value
 | ||||
| func (o *KubernetesNodePools) SetId(v string) { | ||||
| 	o.Id = &v | ||||
| } | ||||
| 
 | ||||
| // HasId returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNodePools) HasId() bool { | ||||
| 	if o != nil && o.Id != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetType returns the Type field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *KubernetesNodePools) GetType() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Type | ||||
| } | ||||
| 
 | ||||
| // GetTypeOk returns a tuple with the Type field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNodePools) GetTypeOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Type, true | ||||
| } | ||||
| 
 | ||||
| // SetType sets field value
 | ||||
| func (o *KubernetesNodePools) SetType(v string) { | ||||
| 	o.Type = &v | ||||
| } | ||||
| 
 | ||||
| // HasType returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNodePools) HasType() bool { | ||||
| 	if o != nil && o.Type != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetHref returns the Href field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *KubernetesNodePools) GetHref() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Href | ||||
| } | ||||
| 
 | ||||
| // GetHrefOk returns a tuple with the Href field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNodePools) GetHrefOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Href, true | ||||
| } | ||||
| 
 | ||||
| // SetHref sets field value
 | ||||
| func (o *KubernetesNodePools) SetHref(v string) { | ||||
| 	o.Href = &v | ||||
| } | ||||
| 
 | ||||
| // HasHref returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNodePools) HasHref() bool { | ||||
| 	if o != nil && o.Href != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetItems returns the Items field value
 | ||||
| // If the value is explicit nil, the zero value for []KubernetesNodePool will be returned
 | ||||
| func (o *KubernetesNodePools) GetItems() *[]KubernetesNodePool { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Items | ||||
| } | ||||
| 
 | ||||
| // GetItemsOk returns a tuple with the Items field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNodePools) GetItemsOk() (*[]KubernetesNodePool, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Items, true | ||||
| } | ||||
| 
 | ||||
| // SetItems sets field value
 | ||||
| func (o *KubernetesNodePools) SetItems(v []KubernetesNodePool) { | ||||
| 	o.Items = &v | ||||
| } | ||||
| 
 | ||||
| // HasItems returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNodePools) HasItems() bool { | ||||
| 	if o != nil && o.Items != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o KubernetesNodePools) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.Id != nil { | ||||
| 		toSerialize["id"] = o.Id | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Type != nil { | ||||
| 		toSerialize["type"] = o.Type | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Href != nil { | ||||
| 		toSerialize["href"] = o.Href | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Items != nil { | ||||
| 		toSerialize["items"] = o.Items | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableKubernetesNodePools struct { | ||||
| 	value *KubernetesNodePools | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableKubernetesNodePools) Get() *KubernetesNodePools { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableKubernetesNodePools) Set(val *KubernetesNodePools) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableKubernetesNodePools) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableKubernetesNodePools) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableKubernetesNodePools(val *KubernetesNodePools) *NullableKubernetesNodePools { | ||||
| 	return &NullableKubernetesNodePools{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableKubernetesNodePools) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableKubernetesNodePools) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,192 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // KubernetesNodeProperties struct for KubernetesNodeProperties
 | ||||
| type KubernetesNodeProperties struct { | ||||
| 	// A Kubernetes Node Name.
 | ||||
| 	Name *string `json:"name"` | ||||
| 	// A valid public IP.
 | ||||
| 	PublicIP *string `json:"publicIP"` | ||||
| 	// The kubernetes version in which a nodepool is running. This imposes restrictions on what kubernetes versions can be run in a cluster's nodepools. Additionally, not all kubernetes versions are viable upgrade targets for all prior versions.
 | ||||
| 	K8sVersion *string `json:"k8sVersion"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetName returns the Name field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *KubernetesNodeProperties) GetName() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Name | ||||
| } | ||||
| 
 | ||||
| // GetNameOk returns a tuple with the Name field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNodeProperties) GetNameOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Name, true | ||||
| } | ||||
| 
 | ||||
| // SetName sets field value
 | ||||
| func (o *KubernetesNodeProperties) SetName(v string) { | ||||
| 	o.Name = &v | ||||
| } | ||||
| 
 | ||||
| // HasName returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNodeProperties) HasName() bool { | ||||
| 	if o != nil && o.Name != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetPublicIP returns the PublicIP field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *KubernetesNodeProperties) GetPublicIP() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.PublicIP | ||||
| } | ||||
| 
 | ||||
| // GetPublicIPOk returns a tuple with the PublicIP field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNodeProperties) GetPublicIPOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.PublicIP, true | ||||
| } | ||||
| 
 | ||||
| // SetPublicIP sets field value
 | ||||
| func (o *KubernetesNodeProperties) SetPublicIP(v string) { | ||||
| 	o.PublicIP = &v | ||||
| } | ||||
| 
 | ||||
| // HasPublicIP returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNodeProperties) HasPublicIP() bool { | ||||
| 	if o != nil && o.PublicIP != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetK8sVersion returns the K8sVersion field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *KubernetesNodeProperties) GetK8sVersion() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.K8sVersion | ||||
| } | ||||
| 
 | ||||
| // GetK8sVersionOk returns a tuple with the K8sVersion field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNodeProperties) GetK8sVersionOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.K8sVersion, true | ||||
| } | ||||
| 
 | ||||
| // SetK8sVersion sets field value
 | ||||
| func (o *KubernetesNodeProperties) SetK8sVersion(v string) { | ||||
| 	o.K8sVersion = &v | ||||
| } | ||||
| 
 | ||||
| // HasK8sVersion returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNodeProperties) HasK8sVersion() bool { | ||||
| 	if o != nil && o.K8sVersion != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o KubernetesNodeProperties) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.Name != nil { | ||||
| 		toSerialize["name"] = o.Name | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.PublicIP != nil { | ||||
| 		toSerialize["publicIP"] = o.PublicIP | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.K8sVersion != nil { | ||||
| 		toSerialize["k8sVersion"] = o.K8sVersion | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableKubernetesNodeProperties struct { | ||||
| 	value *KubernetesNodeProperties | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableKubernetesNodeProperties) Get() *KubernetesNodeProperties { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableKubernetesNodeProperties) Set(val *KubernetesNodeProperties) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableKubernetesNodeProperties) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableKubernetesNodeProperties) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableKubernetesNodeProperties(val *KubernetesNodeProperties) *NullableKubernetesNodeProperties { | ||||
| 	return &NullableKubernetesNodeProperties{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableKubernetesNodeProperties) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableKubernetesNodeProperties) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,235 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // KubernetesNodes struct for KubernetesNodes
 | ||||
| type KubernetesNodes struct { | ||||
| 	// Unique representation for Kubernetes Node Pool as a collection on a resource.
 | ||||
| 	Id *string `json:"id,omitempty"` | ||||
| 	// The type of resource within a collection
 | ||||
| 	Type *string `json:"type,omitempty"` | ||||
| 	// URL to the collection representation (absolute path)
 | ||||
| 	Href *string `json:"href,omitempty"` | ||||
| 	// Array of items in that collection
 | ||||
| 	Items *[]KubernetesNode `json:"items,omitempty"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetId returns the Id field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *KubernetesNodes) GetId() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Id | ||||
| } | ||||
| 
 | ||||
| // GetIdOk returns a tuple with the Id field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNodes) GetIdOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Id, true | ||||
| } | ||||
| 
 | ||||
| // SetId sets field value
 | ||||
| func (o *KubernetesNodes) SetId(v string) { | ||||
| 	o.Id = &v | ||||
| } | ||||
| 
 | ||||
| // HasId returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNodes) HasId() bool { | ||||
| 	if o != nil && o.Id != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetType returns the Type field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *KubernetesNodes) GetType() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Type | ||||
| } | ||||
| 
 | ||||
| // GetTypeOk returns a tuple with the Type field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNodes) GetTypeOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Type, true | ||||
| } | ||||
| 
 | ||||
| // SetType sets field value
 | ||||
| func (o *KubernetesNodes) SetType(v string) { | ||||
| 	o.Type = &v | ||||
| } | ||||
| 
 | ||||
| // HasType returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNodes) HasType() bool { | ||||
| 	if o != nil && o.Type != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetHref returns the Href field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *KubernetesNodes) GetHref() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Href | ||||
| } | ||||
| 
 | ||||
| // GetHrefOk returns a tuple with the Href field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNodes) GetHrefOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Href, true | ||||
| } | ||||
| 
 | ||||
| // SetHref sets field value
 | ||||
| func (o *KubernetesNodes) SetHref(v string) { | ||||
| 	o.Href = &v | ||||
| } | ||||
| 
 | ||||
| // HasHref returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNodes) HasHref() bool { | ||||
| 	if o != nil && o.Href != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetItems returns the Items field value
 | ||||
| // If the value is explicit nil, the zero value for []KubernetesNode will be returned
 | ||||
| func (o *KubernetesNodes) GetItems() *[]KubernetesNode { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Items | ||||
| } | ||||
| 
 | ||||
| // GetItemsOk returns a tuple with the Items field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *KubernetesNodes) GetItemsOk() (*[]KubernetesNode, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Items, true | ||||
| } | ||||
| 
 | ||||
| // SetItems sets field value
 | ||||
| func (o *KubernetesNodes) SetItems(v []KubernetesNode) { | ||||
| 	o.Items = &v | ||||
| } | ||||
| 
 | ||||
| // HasItems returns a boolean if a field has been set.
 | ||||
| func (o *KubernetesNodes) HasItems() bool { | ||||
| 	if o != nil && o.Items != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o KubernetesNodes) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.Id != nil { | ||||
| 		toSerialize["id"] = o.Id | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Type != nil { | ||||
| 		toSerialize["type"] = o.Type | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Href != nil { | ||||
| 		toSerialize["href"] = o.Href | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Items != nil { | ||||
| 		toSerialize["items"] = o.Items | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableKubernetesNodes struct { | ||||
| 	value *KubernetesNodes | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableKubernetesNodes) Get() *KubernetesNodes { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableKubernetesNodes) Set(val *KubernetesNodes) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableKubernetesNodes) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableKubernetesNodes) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableKubernetesNodes(val *KubernetesNodes) *NullableKubernetesNodes { | ||||
| 	return &NullableKubernetesNodes{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableKubernetesNodes) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableKubernetesNodes) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,276 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // Label struct for Label
 | ||||
| type Label struct { | ||||
| 	// Label is identified using standard URN.
 | ||||
| 	Id *string `json:"id,omitempty"` | ||||
| 	// The type of object that has been created
 | ||||
| 	Type *string `json:"type,omitempty"` | ||||
| 	// URL to the object representation (absolute path)
 | ||||
| 	Href *string `json:"href,omitempty"` | ||||
| 	Metadata *NoStateMetaData `json:"metadata,omitempty"` | ||||
| 	Properties *LabelProperties `json:"properties"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetId returns the Id field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *Label) GetId() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Id | ||||
| } | ||||
| 
 | ||||
| // GetIdOk returns a tuple with the Id field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *Label) GetIdOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Id, true | ||||
| } | ||||
| 
 | ||||
| // SetId sets field value
 | ||||
| func (o *Label) SetId(v string) { | ||||
| 	o.Id = &v | ||||
| } | ||||
| 
 | ||||
| // HasId returns a boolean if a field has been set.
 | ||||
| func (o *Label) HasId() bool { | ||||
| 	if o != nil && o.Id != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetType returns the Type field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *Label) GetType() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Type | ||||
| } | ||||
| 
 | ||||
| // GetTypeOk returns a tuple with the Type field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *Label) GetTypeOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Type, true | ||||
| } | ||||
| 
 | ||||
| // SetType sets field value
 | ||||
| func (o *Label) SetType(v string) { | ||||
| 	o.Type = &v | ||||
| } | ||||
| 
 | ||||
| // HasType returns a boolean if a field has been set.
 | ||||
| func (o *Label) HasType() bool { | ||||
| 	if o != nil && o.Type != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetHref returns the Href field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *Label) GetHref() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Href | ||||
| } | ||||
| 
 | ||||
| // GetHrefOk returns a tuple with the Href field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *Label) GetHrefOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Href, true | ||||
| } | ||||
| 
 | ||||
| // SetHref sets field value
 | ||||
| func (o *Label) SetHref(v string) { | ||||
| 	o.Href = &v | ||||
| } | ||||
| 
 | ||||
| // HasHref returns a boolean if a field has been set.
 | ||||
| func (o *Label) HasHref() bool { | ||||
| 	if o != nil && o.Href != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetMetadata returns the Metadata field value
 | ||||
| // If the value is explicit nil, the zero value for NoStateMetaData will be returned
 | ||||
| func (o *Label) GetMetadata() *NoStateMetaData { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Metadata | ||||
| } | ||||
| 
 | ||||
| // GetMetadataOk returns a tuple with the Metadata field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *Label) GetMetadataOk() (*NoStateMetaData, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Metadata, true | ||||
| } | ||||
| 
 | ||||
| // SetMetadata sets field value
 | ||||
| func (o *Label) SetMetadata(v NoStateMetaData) { | ||||
| 	o.Metadata = &v | ||||
| } | ||||
| 
 | ||||
| // HasMetadata returns a boolean if a field has been set.
 | ||||
| func (o *Label) HasMetadata() bool { | ||||
| 	if o != nil && o.Metadata != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetProperties returns the Properties field value
 | ||||
| // If the value is explicit nil, the zero value for LabelProperties will be returned
 | ||||
| func (o *Label) GetProperties() *LabelProperties { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Properties | ||||
| } | ||||
| 
 | ||||
| // GetPropertiesOk returns a tuple with the Properties field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *Label) GetPropertiesOk() (*LabelProperties, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Properties, true | ||||
| } | ||||
| 
 | ||||
| // SetProperties sets field value
 | ||||
| func (o *Label) SetProperties(v LabelProperties) { | ||||
| 	o.Properties = &v | ||||
| } | ||||
| 
 | ||||
| // HasProperties returns a boolean if a field has been set.
 | ||||
| func (o *Label) HasProperties() bool { | ||||
| 	if o != nil && o.Properties != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o Label) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.Id != nil { | ||||
| 		toSerialize["id"] = o.Id | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Type != nil { | ||||
| 		toSerialize["type"] = o.Type | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Href != nil { | ||||
| 		toSerialize["href"] = o.Href | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Metadata != nil { | ||||
| 		toSerialize["metadata"] = o.Metadata | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Properties != nil { | ||||
| 		toSerialize["properties"] = o.Properties | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableLabel struct { | ||||
| 	value *Label | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableLabel) Get() *Label { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableLabel) Set(val *Label) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableLabel) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableLabel) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableLabel(val *Label) *NullableLabel { | ||||
| 	return &NullableLabel{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableLabel) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableLabel) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,278 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // LabelProperties struct for LabelProperties
 | ||||
| type LabelProperties struct { | ||||
| 	// A Label Key
 | ||||
| 	Key *string `json:"key,omitempty"` | ||||
| 	// A Label Value
 | ||||
| 	Value *string `json:"value,omitempty"` | ||||
| 	// The id of the resource
 | ||||
| 	ResourceId *string `json:"resourceId,omitempty"` | ||||
| 	// The type of the resource on which the label is applied.
 | ||||
| 	ResourceType *string `json:"resourceType,omitempty"` | ||||
| 	// URL to the Resource (absolute path) on which the label is applied.
 | ||||
| 	ResourceHref *string `json:"resourceHref,omitempty"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetKey returns the Key field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *LabelProperties) GetKey() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Key | ||||
| } | ||||
| 
 | ||||
| // GetKeyOk returns a tuple with the Key field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *LabelProperties) GetKeyOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Key, true | ||||
| } | ||||
| 
 | ||||
| // SetKey sets field value
 | ||||
| func (o *LabelProperties) SetKey(v string) { | ||||
| 	o.Key = &v | ||||
| } | ||||
| 
 | ||||
| // HasKey returns a boolean if a field has been set.
 | ||||
| func (o *LabelProperties) HasKey() bool { | ||||
| 	if o != nil && o.Key != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetValue returns the Value field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *LabelProperties) GetValue() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Value | ||||
| } | ||||
| 
 | ||||
| // GetValueOk returns a tuple with the Value field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *LabelProperties) GetValueOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Value, true | ||||
| } | ||||
| 
 | ||||
| // SetValue sets field value
 | ||||
| func (o *LabelProperties) SetValue(v string) { | ||||
| 	o.Value = &v | ||||
| } | ||||
| 
 | ||||
| // HasValue returns a boolean if a field has been set.
 | ||||
| func (o *LabelProperties) HasValue() bool { | ||||
| 	if o != nil && o.Value != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetResourceId returns the ResourceId field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *LabelProperties) GetResourceId() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.ResourceId | ||||
| } | ||||
| 
 | ||||
| // GetResourceIdOk returns a tuple with the ResourceId field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *LabelProperties) GetResourceIdOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.ResourceId, true | ||||
| } | ||||
| 
 | ||||
| // SetResourceId sets field value
 | ||||
| func (o *LabelProperties) SetResourceId(v string) { | ||||
| 	o.ResourceId = &v | ||||
| } | ||||
| 
 | ||||
| // HasResourceId returns a boolean if a field has been set.
 | ||||
| func (o *LabelProperties) HasResourceId() bool { | ||||
| 	if o != nil && o.ResourceId != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetResourceType returns the ResourceType field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *LabelProperties) GetResourceType() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.ResourceType | ||||
| } | ||||
| 
 | ||||
| // GetResourceTypeOk returns a tuple with the ResourceType field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *LabelProperties) GetResourceTypeOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.ResourceType, true | ||||
| } | ||||
| 
 | ||||
| // SetResourceType sets field value
 | ||||
| func (o *LabelProperties) SetResourceType(v string) { | ||||
| 	o.ResourceType = &v | ||||
| } | ||||
| 
 | ||||
| // HasResourceType returns a boolean if a field has been set.
 | ||||
| func (o *LabelProperties) HasResourceType() bool { | ||||
| 	if o != nil && o.ResourceType != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetResourceHref returns the ResourceHref field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *LabelProperties) GetResourceHref() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.ResourceHref | ||||
| } | ||||
| 
 | ||||
| // GetResourceHrefOk returns a tuple with the ResourceHref field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *LabelProperties) GetResourceHrefOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.ResourceHref, true | ||||
| } | ||||
| 
 | ||||
| // SetResourceHref sets field value
 | ||||
| func (o *LabelProperties) SetResourceHref(v string) { | ||||
| 	o.ResourceHref = &v | ||||
| } | ||||
| 
 | ||||
| // HasResourceHref returns a boolean if a field has been set.
 | ||||
| func (o *LabelProperties) HasResourceHref() bool { | ||||
| 	if o != nil && o.ResourceHref != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o LabelProperties) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.Key != nil { | ||||
| 		toSerialize["key"] = o.Key | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Value != nil { | ||||
| 		toSerialize["value"] = o.Value | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.ResourceId != nil { | ||||
| 		toSerialize["resourceId"] = o.ResourceId | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.ResourceType != nil { | ||||
| 		toSerialize["resourceType"] = o.ResourceType | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.ResourceHref != nil { | ||||
| 		toSerialize["resourceHref"] = o.ResourceHref | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableLabelProperties struct { | ||||
| 	value *LabelProperties | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableLabelProperties) Get() *LabelProperties { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableLabelProperties) Set(val *LabelProperties) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableLabelProperties) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableLabelProperties) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableLabelProperties(val *LabelProperties) *NullableLabelProperties { | ||||
| 	return &NullableLabelProperties{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableLabelProperties) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableLabelProperties) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,276 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // LabelResource struct for LabelResource
 | ||||
| type LabelResource struct { | ||||
| 	// Label on a resource is identified using label key.
 | ||||
| 	Id *string `json:"id,omitempty"` | ||||
| 	// The type of object that has been created
 | ||||
| 	Type *string `json:"type,omitempty"` | ||||
| 	// URL to the object representation (absolute path)
 | ||||
| 	Href *string `json:"href,omitempty"` | ||||
| 	Metadata *NoStateMetaData `json:"metadata,omitempty"` | ||||
| 	Properties *LabelResourceProperties `json:"properties"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetId returns the Id field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *LabelResource) GetId() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Id | ||||
| } | ||||
| 
 | ||||
| // GetIdOk returns a tuple with the Id field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *LabelResource) GetIdOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Id, true | ||||
| } | ||||
| 
 | ||||
| // SetId sets field value
 | ||||
| func (o *LabelResource) SetId(v string) { | ||||
| 	o.Id = &v | ||||
| } | ||||
| 
 | ||||
| // HasId returns a boolean if a field has been set.
 | ||||
| func (o *LabelResource) HasId() bool { | ||||
| 	if o != nil && o.Id != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetType returns the Type field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *LabelResource) GetType() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Type | ||||
| } | ||||
| 
 | ||||
| // GetTypeOk returns a tuple with the Type field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *LabelResource) GetTypeOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Type, true | ||||
| } | ||||
| 
 | ||||
| // SetType sets field value
 | ||||
| func (o *LabelResource) SetType(v string) { | ||||
| 	o.Type = &v | ||||
| } | ||||
| 
 | ||||
| // HasType returns a boolean if a field has been set.
 | ||||
| func (o *LabelResource) HasType() bool { | ||||
| 	if o != nil && o.Type != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetHref returns the Href field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *LabelResource) GetHref() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Href | ||||
| } | ||||
| 
 | ||||
| // GetHrefOk returns a tuple with the Href field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *LabelResource) GetHrefOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Href, true | ||||
| } | ||||
| 
 | ||||
| // SetHref sets field value
 | ||||
| func (o *LabelResource) SetHref(v string) { | ||||
| 	o.Href = &v | ||||
| } | ||||
| 
 | ||||
| // HasHref returns a boolean if a field has been set.
 | ||||
| func (o *LabelResource) HasHref() bool { | ||||
| 	if o != nil && o.Href != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetMetadata returns the Metadata field value
 | ||||
| // If the value is explicit nil, the zero value for NoStateMetaData will be returned
 | ||||
| func (o *LabelResource) GetMetadata() *NoStateMetaData { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Metadata | ||||
| } | ||||
| 
 | ||||
| // GetMetadataOk returns a tuple with the Metadata field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *LabelResource) GetMetadataOk() (*NoStateMetaData, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Metadata, true | ||||
| } | ||||
| 
 | ||||
| // SetMetadata sets field value
 | ||||
| func (o *LabelResource) SetMetadata(v NoStateMetaData) { | ||||
| 	o.Metadata = &v | ||||
| } | ||||
| 
 | ||||
| // HasMetadata returns a boolean if a field has been set.
 | ||||
| func (o *LabelResource) HasMetadata() bool { | ||||
| 	if o != nil && o.Metadata != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetProperties returns the Properties field value
 | ||||
| // If the value is explicit nil, the zero value for LabelResourceProperties will be returned
 | ||||
| func (o *LabelResource) GetProperties() *LabelResourceProperties { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Properties | ||||
| } | ||||
| 
 | ||||
| // GetPropertiesOk returns a tuple with the Properties field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *LabelResource) GetPropertiesOk() (*LabelResourceProperties, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Properties, true | ||||
| } | ||||
| 
 | ||||
| // SetProperties sets field value
 | ||||
| func (o *LabelResource) SetProperties(v LabelResourceProperties) { | ||||
| 	o.Properties = &v | ||||
| } | ||||
| 
 | ||||
| // HasProperties returns a boolean if a field has been set.
 | ||||
| func (o *LabelResource) HasProperties() bool { | ||||
| 	if o != nil && o.Properties != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o LabelResource) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.Id != nil { | ||||
| 		toSerialize["id"] = o.Id | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Type != nil { | ||||
| 		toSerialize["type"] = o.Type | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Href != nil { | ||||
| 		toSerialize["href"] = o.Href | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Metadata != nil { | ||||
| 		toSerialize["metadata"] = o.Metadata | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Properties != nil { | ||||
| 		toSerialize["properties"] = o.Properties | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableLabelResource struct { | ||||
| 	value *LabelResource | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableLabelResource) Get() *LabelResource { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableLabelResource) Set(val *LabelResource) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableLabelResource) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableLabelResource) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableLabelResource(val *LabelResource) *NullableLabelResource { | ||||
| 	return &NullableLabelResource{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableLabelResource) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableLabelResource) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,149 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // LabelResourceProperties struct for LabelResourceProperties
 | ||||
| type LabelResourceProperties struct { | ||||
| 	// A Label Key
 | ||||
| 	Key *string `json:"key,omitempty"` | ||||
| 	// A Label Value
 | ||||
| 	Value *string `json:"value,omitempty"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetKey returns the Key field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *LabelResourceProperties) GetKey() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Key | ||||
| } | ||||
| 
 | ||||
| // GetKeyOk returns a tuple with the Key field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *LabelResourceProperties) GetKeyOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Key, true | ||||
| } | ||||
| 
 | ||||
| // SetKey sets field value
 | ||||
| func (o *LabelResourceProperties) SetKey(v string) { | ||||
| 	o.Key = &v | ||||
| } | ||||
| 
 | ||||
| // HasKey returns a boolean if a field has been set.
 | ||||
| func (o *LabelResourceProperties) HasKey() bool { | ||||
| 	if o != nil && o.Key != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetValue returns the Value field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *LabelResourceProperties) GetValue() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Value | ||||
| } | ||||
| 
 | ||||
| // GetValueOk returns a tuple with the Value field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *LabelResourceProperties) GetValueOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Value, true | ||||
| } | ||||
| 
 | ||||
| // SetValue sets field value
 | ||||
| func (o *LabelResourceProperties) SetValue(v string) { | ||||
| 	o.Value = &v | ||||
| } | ||||
| 
 | ||||
| // HasValue returns a boolean if a field has been set.
 | ||||
| func (o *LabelResourceProperties) HasValue() bool { | ||||
| 	if o != nil && o.Value != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o LabelResourceProperties) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.Key != nil { | ||||
| 		toSerialize["key"] = o.Key | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Value != nil { | ||||
| 		toSerialize["value"] = o.Value | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableLabelResourceProperties struct { | ||||
| 	value *LabelResourceProperties | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableLabelResourceProperties) Get() *LabelResourceProperties { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableLabelResourceProperties) Set(val *LabelResourceProperties) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableLabelResourceProperties) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableLabelResourceProperties) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableLabelResourceProperties(val *LabelResourceProperties) *NullableLabelResourceProperties { | ||||
| 	return &NullableLabelResourceProperties{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableLabelResourceProperties) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableLabelResourceProperties) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,235 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // LabelResources struct for LabelResources
 | ||||
| type LabelResources struct { | ||||
| 	// Unique representation for Label as a collection on a resource.
 | ||||
| 	Id *string `json:"id,omitempty"` | ||||
| 	// The type of resource within a collection
 | ||||
| 	Type *string `json:"type,omitempty"` | ||||
| 	// URL to the collection representation (absolute path)
 | ||||
| 	Href *string `json:"href,omitempty"` | ||||
| 	// Array of items in that collection
 | ||||
| 	Items *[]LabelResource `json:"items,omitempty"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetId returns the Id field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *LabelResources) GetId() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Id | ||||
| } | ||||
| 
 | ||||
| // GetIdOk returns a tuple with the Id field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *LabelResources) GetIdOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Id, true | ||||
| } | ||||
| 
 | ||||
| // SetId sets field value
 | ||||
| func (o *LabelResources) SetId(v string) { | ||||
| 	o.Id = &v | ||||
| } | ||||
| 
 | ||||
| // HasId returns a boolean if a field has been set.
 | ||||
| func (o *LabelResources) HasId() bool { | ||||
| 	if o != nil && o.Id != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetType returns the Type field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *LabelResources) GetType() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Type | ||||
| } | ||||
| 
 | ||||
| // GetTypeOk returns a tuple with the Type field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *LabelResources) GetTypeOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Type, true | ||||
| } | ||||
| 
 | ||||
| // SetType sets field value
 | ||||
| func (o *LabelResources) SetType(v string) { | ||||
| 	o.Type = &v | ||||
| } | ||||
| 
 | ||||
| // HasType returns a boolean if a field has been set.
 | ||||
| func (o *LabelResources) HasType() bool { | ||||
| 	if o != nil && o.Type != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetHref returns the Href field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *LabelResources) GetHref() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Href | ||||
| } | ||||
| 
 | ||||
| // GetHrefOk returns a tuple with the Href field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *LabelResources) GetHrefOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Href, true | ||||
| } | ||||
| 
 | ||||
| // SetHref sets field value
 | ||||
| func (o *LabelResources) SetHref(v string) { | ||||
| 	o.Href = &v | ||||
| } | ||||
| 
 | ||||
| // HasHref returns a boolean if a field has been set.
 | ||||
| func (o *LabelResources) HasHref() bool { | ||||
| 	if o != nil && o.Href != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetItems returns the Items field value
 | ||||
| // If the value is explicit nil, the zero value for []LabelResource will be returned
 | ||||
| func (o *LabelResources) GetItems() *[]LabelResource { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Items | ||||
| } | ||||
| 
 | ||||
| // GetItemsOk returns a tuple with the Items field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *LabelResources) GetItemsOk() (*[]LabelResource, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Items, true | ||||
| } | ||||
| 
 | ||||
| // SetItems sets field value
 | ||||
| func (o *LabelResources) SetItems(v []LabelResource) { | ||||
| 	o.Items = &v | ||||
| } | ||||
| 
 | ||||
| // HasItems returns a boolean if a field has been set.
 | ||||
| func (o *LabelResources) HasItems() bool { | ||||
| 	if o != nil && o.Items != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o LabelResources) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.Id != nil { | ||||
| 		toSerialize["id"] = o.Id | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Type != nil { | ||||
| 		toSerialize["type"] = o.Type | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Href != nil { | ||||
| 		toSerialize["href"] = o.Href | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Items != nil { | ||||
| 		toSerialize["items"] = o.Items | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableLabelResources struct { | ||||
| 	value *LabelResources | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableLabelResources) Get() *LabelResources { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableLabelResources) Set(val *LabelResources) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableLabelResources) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableLabelResources) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableLabelResources(val *LabelResources) *NullableLabelResources { | ||||
| 	return &NullableLabelResources{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableLabelResources) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableLabelResources) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,235 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // Labels struct for Labels
 | ||||
| type Labels struct { | ||||
| 	// Unique representation for Label as a collection of resource.
 | ||||
| 	Id *string `json:"id,omitempty"` | ||||
| 	// The type of resource within a collection
 | ||||
| 	Type *string `json:"type,omitempty"` | ||||
| 	// URL to the collection representation (absolute path)
 | ||||
| 	Href *string `json:"href,omitempty"` | ||||
| 	// Array of items in that collection
 | ||||
| 	Items *[]Label `json:"items,omitempty"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetId returns the Id field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *Labels) GetId() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Id | ||||
| } | ||||
| 
 | ||||
| // GetIdOk returns a tuple with the Id field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *Labels) GetIdOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Id, true | ||||
| } | ||||
| 
 | ||||
| // SetId sets field value
 | ||||
| func (o *Labels) SetId(v string) { | ||||
| 	o.Id = &v | ||||
| } | ||||
| 
 | ||||
| // HasId returns a boolean if a field has been set.
 | ||||
| func (o *Labels) HasId() bool { | ||||
| 	if o != nil && o.Id != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetType returns the Type field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *Labels) GetType() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Type | ||||
| } | ||||
| 
 | ||||
| // GetTypeOk returns a tuple with the Type field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *Labels) GetTypeOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Type, true | ||||
| } | ||||
| 
 | ||||
| // SetType sets field value
 | ||||
| func (o *Labels) SetType(v string) { | ||||
| 	o.Type = &v | ||||
| } | ||||
| 
 | ||||
| // HasType returns a boolean if a field has been set.
 | ||||
| func (o *Labels) HasType() bool { | ||||
| 	if o != nil && o.Type != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetHref returns the Href field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *Labels) GetHref() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Href | ||||
| } | ||||
| 
 | ||||
| // GetHrefOk returns a tuple with the Href field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *Labels) GetHrefOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Href, true | ||||
| } | ||||
| 
 | ||||
| // SetHref sets field value
 | ||||
| func (o *Labels) SetHref(v string) { | ||||
| 	o.Href = &v | ||||
| } | ||||
| 
 | ||||
| // HasHref returns a boolean if a field has been set.
 | ||||
| func (o *Labels) HasHref() bool { | ||||
| 	if o != nil && o.Href != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetItems returns the Items field value
 | ||||
| // If the value is explicit nil, the zero value for []Label will be returned
 | ||||
| func (o *Labels) GetItems() *[]Label { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Items | ||||
| } | ||||
| 
 | ||||
| // GetItemsOk returns a tuple with the Items field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *Labels) GetItemsOk() (*[]Label, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Items, true | ||||
| } | ||||
| 
 | ||||
| // SetItems sets field value
 | ||||
| func (o *Labels) SetItems(v []Label) { | ||||
| 	o.Items = &v | ||||
| } | ||||
| 
 | ||||
| // HasItems returns a boolean if a field has been set.
 | ||||
| func (o *Labels) HasItems() bool { | ||||
| 	if o != nil && o.Items != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o Labels) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.Id != nil { | ||||
| 		toSerialize["id"] = o.Id | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Type != nil { | ||||
| 		toSerialize["type"] = o.Type | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Href != nil { | ||||
| 		toSerialize["href"] = o.Href | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Items != nil { | ||||
| 		toSerialize["items"] = o.Items | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableLabels struct { | ||||
| 	value *Labels | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableLabels) Get() *Labels { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableLabels) Set(val *Labels) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableLabels) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableLabels) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableLabels(val *Labels) *NullableLabels { | ||||
| 	return &NullableLabels{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableLabels) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableLabels) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,318 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // Lan struct for Lan
 | ||||
| type Lan struct { | ||||
| 	// The resource's unique identifier
 | ||||
| 	Id *string `json:"id,omitempty"` | ||||
| 	// The type of object that has been created
 | ||||
| 	Type *Type `json:"type,omitempty"` | ||||
| 	// URL to the object representation (absolute path)
 | ||||
| 	Href *string `json:"href,omitempty"` | ||||
| 	Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` | ||||
| 	Properties *LanProperties `json:"properties"` | ||||
| 	Entities *LanEntities `json:"entities,omitempty"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetId returns the Id field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *Lan) GetId() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Id | ||||
| } | ||||
| 
 | ||||
| // GetIdOk returns a tuple with the Id field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *Lan) GetIdOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Id, true | ||||
| } | ||||
| 
 | ||||
| // SetId sets field value
 | ||||
| func (o *Lan) SetId(v string) { | ||||
| 	o.Id = &v | ||||
| } | ||||
| 
 | ||||
| // HasId returns a boolean if a field has been set.
 | ||||
| func (o *Lan) HasId() bool { | ||||
| 	if o != nil && o.Id != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetType returns the Type field value
 | ||||
| // If the value is explicit nil, the zero value for Type will be returned
 | ||||
| func (o *Lan) GetType() *Type { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Type | ||||
| } | ||||
| 
 | ||||
| // GetTypeOk returns a tuple with the Type field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *Lan) GetTypeOk() (*Type, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Type, true | ||||
| } | ||||
| 
 | ||||
| // SetType sets field value
 | ||||
| func (o *Lan) SetType(v Type) { | ||||
| 	o.Type = &v | ||||
| } | ||||
| 
 | ||||
| // HasType returns a boolean if a field has been set.
 | ||||
| func (o *Lan) HasType() bool { | ||||
| 	if o != nil && o.Type != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetHref returns the Href field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *Lan) GetHref() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Href | ||||
| } | ||||
| 
 | ||||
| // GetHrefOk returns a tuple with the Href field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *Lan) GetHrefOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Href, true | ||||
| } | ||||
| 
 | ||||
| // SetHref sets field value
 | ||||
| func (o *Lan) SetHref(v string) { | ||||
| 	o.Href = &v | ||||
| } | ||||
| 
 | ||||
| // HasHref returns a boolean if a field has been set.
 | ||||
| func (o *Lan) HasHref() bool { | ||||
| 	if o != nil && o.Href != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetMetadata returns the Metadata field value
 | ||||
| // If the value is explicit nil, the zero value for DatacenterElementMetadata will be returned
 | ||||
| func (o *Lan) GetMetadata() *DatacenterElementMetadata { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Metadata | ||||
| } | ||||
| 
 | ||||
| // GetMetadataOk returns a tuple with the Metadata field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *Lan) GetMetadataOk() (*DatacenterElementMetadata, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Metadata, true | ||||
| } | ||||
| 
 | ||||
| // SetMetadata sets field value
 | ||||
| func (o *Lan) SetMetadata(v DatacenterElementMetadata) { | ||||
| 	o.Metadata = &v | ||||
| } | ||||
| 
 | ||||
| // HasMetadata returns a boolean if a field has been set.
 | ||||
| func (o *Lan) HasMetadata() bool { | ||||
| 	if o != nil && o.Metadata != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetProperties returns the Properties field value
 | ||||
| // If the value is explicit nil, the zero value for LanProperties will be returned
 | ||||
| func (o *Lan) GetProperties() *LanProperties { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Properties | ||||
| } | ||||
| 
 | ||||
| // GetPropertiesOk returns a tuple with the Properties field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *Lan) GetPropertiesOk() (*LanProperties, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Properties, true | ||||
| } | ||||
| 
 | ||||
| // SetProperties sets field value
 | ||||
| func (o *Lan) SetProperties(v LanProperties) { | ||||
| 	o.Properties = &v | ||||
| } | ||||
| 
 | ||||
| // HasProperties returns a boolean if a field has been set.
 | ||||
| func (o *Lan) HasProperties() bool { | ||||
| 	if o != nil && o.Properties != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetEntities returns the Entities field value
 | ||||
| // If the value is explicit nil, the zero value for LanEntities will be returned
 | ||||
| func (o *Lan) GetEntities() *LanEntities { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Entities | ||||
| } | ||||
| 
 | ||||
| // GetEntitiesOk returns a tuple with the Entities field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *Lan) GetEntitiesOk() (*LanEntities, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Entities, true | ||||
| } | ||||
| 
 | ||||
| // SetEntities sets field value
 | ||||
| func (o *Lan) SetEntities(v LanEntities) { | ||||
| 	o.Entities = &v | ||||
| } | ||||
| 
 | ||||
| // HasEntities returns a boolean if a field has been set.
 | ||||
| func (o *Lan) HasEntities() bool { | ||||
| 	if o != nil && o.Entities != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o Lan) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.Id != nil { | ||||
| 		toSerialize["id"] = o.Id | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Type != nil { | ||||
| 		toSerialize["type"] = o.Type | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Href != nil { | ||||
| 		toSerialize["href"] = o.Href | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Metadata != nil { | ||||
| 		toSerialize["metadata"] = o.Metadata | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Properties != nil { | ||||
| 		toSerialize["properties"] = o.Properties | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Entities != nil { | ||||
| 		toSerialize["entities"] = o.Entities | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableLan struct { | ||||
| 	value *Lan | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableLan) Get() *Lan { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableLan) Set(val *Lan) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableLan) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableLan) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableLan(val *Lan) *NullableLan { | ||||
| 	return &NullableLan{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableLan) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableLan) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,105 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // LanEntities struct for LanEntities
 | ||||
| type LanEntities struct { | ||||
| 	Nics *LanNics `json:"nics,omitempty"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetNics returns the Nics field value
 | ||||
| // If the value is explicit nil, the zero value for LanNics will be returned
 | ||||
| func (o *LanEntities) GetNics() *LanNics { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Nics | ||||
| } | ||||
| 
 | ||||
| // GetNicsOk returns a tuple with the Nics field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *LanEntities) GetNicsOk() (*LanNics, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Nics, true | ||||
| } | ||||
| 
 | ||||
| // SetNics sets field value
 | ||||
| func (o *LanEntities) SetNics(v LanNics) { | ||||
| 	o.Nics = &v | ||||
| } | ||||
| 
 | ||||
| // HasNics returns a boolean if a field has been set.
 | ||||
| func (o *LanEntities) HasNics() bool { | ||||
| 	if o != nil && o.Nics != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o LanEntities) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.Nics != nil { | ||||
| 		toSerialize["nics"] = o.Nics | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableLanEntities struct { | ||||
| 	value *LanEntities | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableLanEntities) Get() *LanEntities { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableLanEntities) Set(val *LanEntities) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableLanEntities) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableLanEntities) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableLanEntities(val *LanEntities) *NullableLanEntities { | ||||
| 	return &NullableLanEntities{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableLanEntities) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableLanEntities) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,235 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // LanNics struct for LanNics
 | ||||
| type LanNics struct { | ||||
| 	// The resource's unique identifier
 | ||||
| 	Id *string `json:"id,omitempty"` | ||||
| 	// The type of object that has been created
 | ||||
| 	Type *Type `json:"type,omitempty"` | ||||
| 	// URL to the object representation (absolute path)
 | ||||
| 	Href *string `json:"href,omitempty"` | ||||
| 	// Array of items in that collection
 | ||||
| 	Items *[]Nic `json:"items,omitempty"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetId returns the Id field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *LanNics) GetId() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Id | ||||
| } | ||||
| 
 | ||||
| // GetIdOk returns a tuple with the Id field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *LanNics) GetIdOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Id, true | ||||
| } | ||||
| 
 | ||||
| // SetId sets field value
 | ||||
| func (o *LanNics) SetId(v string) { | ||||
| 	o.Id = &v | ||||
| } | ||||
| 
 | ||||
| // HasId returns a boolean if a field has been set.
 | ||||
| func (o *LanNics) HasId() bool { | ||||
| 	if o != nil && o.Id != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetType returns the Type field value
 | ||||
| // If the value is explicit nil, the zero value for Type will be returned
 | ||||
| func (o *LanNics) GetType() *Type { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Type | ||||
| } | ||||
| 
 | ||||
| // GetTypeOk returns a tuple with the Type field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *LanNics) GetTypeOk() (*Type, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Type, true | ||||
| } | ||||
| 
 | ||||
| // SetType sets field value
 | ||||
| func (o *LanNics) SetType(v Type) { | ||||
| 	o.Type = &v | ||||
| } | ||||
| 
 | ||||
| // HasType returns a boolean if a field has been set.
 | ||||
| func (o *LanNics) HasType() bool { | ||||
| 	if o != nil && o.Type != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetHref returns the Href field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *LanNics) GetHref() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Href | ||||
| } | ||||
| 
 | ||||
| // GetHrefOk returns a tuple with the Href field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *LanNics) GetHrefOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Href, true | ||||
| } | ||||
| 
 | ||||
| // SetHref sets field value
 | ||||
| func (o *LanNics) SetHref(v string) { | ||||
| 	o.Href = &v | ||||
| } | ||||
| 
 | ||||
| // HasHref returns a boolean if a field has been set.
 | ||||
| func (o *LanNics) HasHref() bool { | ||||
| 	if o != nil && o.Href != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetItems returns the Items field value
 | ||||
| // If the value is explicit nil, the zero value for []Nic will be returned
 | ||||
| func (o *LanNics) GetItems() *[]Nic { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Items | ||||
| } | ||||
| 
 | ||||
| // GetItemsOk returns a tuple with the Items field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *LanNics) GetItemsOk() (*[]Nic, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Items, true | ||||
| } | ||||
| 
 | ||||
| // SetItems sets field value
 | ||||
| func (o *LanNics) SetItems(v []Nic) { | ||||
| 	o.Items = &v | ||||
| } | ||||
| 
 | ||||
| // HasItems returns a boolean if a field has been set.
 | ||||
| func (o *LanNics) HasItems() bool { | ||||
| 	if o != nil && o.Items != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o LanNics) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.Id != nil { | ||||
| 		toSerialize["id"] = o.Id | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Type != nil { | ||||
| 		toSerialize["type"] = o.Type | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Href != nil { | ||||
| 		toSerialize["href"] = o.Href | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Items != nil { | ||||
| 		toSerialize["items"] = o.Items | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableLanNics struct { | ||||
| 	value *LanNics | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableLanNics) Get() *LanNics { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableLanNics) Set(val *LanNics) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableLanNics) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableLanNics) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableLanNics(val *LanNics) *NullableLanNics { | ||||
| 	return &NullableLanNics{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableLanNics) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableLanNics) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,318 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // LanPost struct for LanPost
 | ||||
| type LanPost struct { | ||||
| 	// The resource's unique identifier
 | ||||
| 	Id *string `json:"id,omitempty"` | ||||
| 	// The type of object that has been created
 | ||||
| 	Type *Type `json:"type,omitempty"` | ||||
| 	// URL to the object representation (absolute path)
 | ||||
| 	Href *string `json:"href,omitempty"` | ||||
| 	Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` | ||||
| 	Entities *LanEntities `json:"entities,omitempty"` | ||||
| 	Properties *LanPropertiesPost `json:"properties"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetId returns the Id field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *LanPost) GetId() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Id | ||||
| } | ||||
| 
 | ||||
| // GetIdOk returns a tuple with the Id field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *LanPost) GetIdOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Id, true | ||||
| } | ||||
| 
 | ||||
| // SetId sets field value
 | ||||
| func (o *LanPost) SetId(v string) { | ||||
| 	o.Id = &v | ||||
| } | ||||
| 
 | ||||
| // HasId returns a boolean if a field has been set.
 | ||||
| func (o *LanPost) HasId() bool { | ||||
| 	if o != nil && o.Id != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetType returns the Type field value
 | ||||
| // If the value is explicit nil, the zero value for Type will be returned
 | ||||
| func (o *LanPost) GetType() *Type { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Type | ||||
| } | ||||
| 
 | ||||
| // GetTypeOk returns a tuple with the Type field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *LanPost) GetTypeOk() (*Type, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Type, true | ||||
| } | ||||
| 
 | ||||
| // SetType sets field value
 | ||||
| func (o *LanPost) SetType(v Type) { | ||||
| 	o.Type = &v | ||||
| } | ||||
| 
 | ||||
| // HasType returns a boolean if a field has been set.
 | ||||
| func (o *LanPost) HasType() bool { | ||||
| 	if o != nil && o.Type != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetHref returns the Href field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *LanPost) GetHref() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Href | ||||
| } | ||||
| 
 | ||||
| // GetHrefOk returns a tuple with the Href field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *LanPost) GetHrefOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Href, true | ||||
| } | ||||
| 
 | ||||
| // SetHref sets field value
 | ||||
| func (o *LanPost) SetHref(v string) { | ||||
| 	o.Href = &v | ||||
| } | ||||
| 
 | ||||
| // HasHref returns a boolean if a field has been set.
 | ||||
| func (o *LanPost) HasHref() bool { | ||||
| 	if o != nil && o.Href != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetMetadata returns the Metadata field value
 | ||||
| // If the value is explicit nil, the zero value for DatacenterElementMetadata will be returned
 | ||||
| func (o *LanPost) GetMetadata() *DatacenterElementMetadata { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Metadata | ||||
| } | ||||
| 
 | ||||
| // GetMetadataOk returns a tuple with the Metadata field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *LanPost) GetMetadataOk() (*DatacenterElementMetadata, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Metadata, true | ||||
| } | ||||
| 
 | ||||
| // SetMetadata sets field value
 | ||||
| func (o *LanPost) SetMetadata(v DatacenterElementMetadata) { | ||||
| 	o.Metadata = &v | ||||
| } | ||||
| 
 | ||||
| // HasMetadata returns a boolean if a field has been set.
 | ||||
| func (o *LanPost) HasMetadata() bool { | ||||
| 	if o != nil && o.Metadata != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetEntities returns the Entities field value
 | ||||
| // If the value is explicit nil, the zero value for LanEntities will be returned
 | ||||
| func (o *LanPost) GetEntities() *LanEntities { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Entities | ||||
| } | ||||
| 
 | ||||
| // GetEntitiesOk returns a tuple with the Entities field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *LanPost) GetEntitiesOk() (*LanEntities, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Entities, true | ||||
| } | ||||
| 
 | ||||
| // SetEntities sets field value
 | ||||
| func (o *LanPost) SetEntities(v LanEntities) { | ||||
| 	o.Entities = &v | ||||
| } | ||||
| 
 | ||||
| // HasEntities returns a boolean if a field has been set.
 | ||||
| func (o *LanPost) HasEntities() bool { | ||||
| 	if o != nil && o.Entities != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetProperties returns the Properties field value
 | ||||
| // If the value is explicit nil, the zero value for LanPropertiesPost will be returned
 | ||||
| func (o *LanPost) GetProperties() *LanPropertiesPost { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Properties | ||||
| } | ||||
| 
 | ||||
| // GetPropertiesOk returns a tuple with the Properties field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *LanPost) GetPropertiesOk() (*LanPropertiesPost, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Properties, true | ||||
| } | ||||
| 
 | ||||
| // SetProperties sets field value
 | ||||
| func (o *LanPost) SetProperties(v LanPropertiesPost) { | ||||
| 	o.Properties = &v | ||||
| } | ||||
| 
 | ||||
| // HasProperties returns a boolean if a field has been set.
 | ||||
| func (o *LanPost) HasProperties() bool { | ||||
| 	if o != nil && o.Properties != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o LanPost) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.Id != nil { | ||||
| 		toSerialize["id"] = o.Id | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Type != nil { | ||||
| 		toSerialize["type"] = o.Type | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Href != nil { | ||||
| 		toSerialize["href"] = o.Href | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Metadata != nil { | ||||
| 		toSerialize["metadata"] = o.Metadata | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Entities != nil { | ||||
| 		toSerialize["entities"] = o.Entities | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Properties != nil { | ||||
| 		toSerialize["properties"] = o.Properties | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableLanPost struct { | ||||
| 	value *LanPost | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableLanPost) Get() *LanPost { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableLanPost) Set(val *LanPost) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableLanPost) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableLanPost) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableLanPost(val *LanPost) *NullableLanPost { | ||||
| 	return &NullableLanPost{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableLanPost) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableLanPost) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -0,0 +1,235 @@ | |||
| /* | ||||
|  * CLOUD API | ||||
|  * | ||||
|  * An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.   The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. | ||||
|  * | ||||
|  * API version: 5.0 | ||||
|  */ | ||||
| 
 | ||||
| // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
 | ||||
| 
 | ||||
| package ionossdk | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // LanProperties struct for LanProperties
 | ||||
| type LanProperties struct { | ||||
| 	// A name of that resource
 | ||||
| 	Name *string `json:"name,omitempty"` | ||||
| 	// IP failover configurations for lan
 | ||||
| 	IpFailover *[]IPFailover `json:"ipFailover,omitempty"` | ||||
| 	// Unique identifier of the private cross connect the given LAN is connected to if any
 | ||||
| 	Pcc *string `json:"pcc,omitempty"` | ||||
| 	// Does this LAN faces the public Internet or not
 | ||||
| 	Public *bool `json:"public,omitempty"` | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetName returns the Name field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *LanProperties) GetName() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Name | ||||
| } | ||||
| 
 | ||||
| // GetNameOk returns a tuple with the Name field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *LanProperties) GetNameOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Name, true | ||||
| } | ||||
| 
 | ||||
| // SetName sets field value
 | ||||
| func (o *LanProperties) SetName(v string) { | ||||
| 	o.Name = &v | ||||
| } | ||||
| 
 | ||||
| // HasName returns a boolean if a field has been set.
 | ||||
| func (o *LanProperties) HasName() bool { | ||||
| 	if o != nil && o.Name != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetIpFailover returns the IpFailover field value
 | ||||
| // If the value is explicit nil, the zero value for []IPFailover will be returned
 | ||||
| func (o *LanProperties) GetIpFailover() *[]IPFailover { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.IpFailover | ||||
| } | ||||
| 
 | ||||
| // GetIpFailoverOk returns a tuple with the IpFailover field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *LanProperties) GetIpFailoverOk() (*[]IPFailover, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.IpFailover, true | ||||
| } | ||||
| 
 | ||||
| // SetIpFailover sets field value
 | ||||
| func (o *LanProperties) SetIpFailover(v []IPFailover) { | ||||
| 	o.IpFailover = &v | ||||
| } | ||||
| 
 | ||||
| // HasIpFailover returns a boolean if a field has been set.
 | ||||
| func (o *LanProperties) HasIpFailover() bool { | ||||
| 	if o != nil && o.IpFailover != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetPcc returns the Pcc field value
 | ||||
| // If the value is explicit nil, the zero value for string will be returned
 | ||||
| func (o *LanProperties) GetPcc() *string { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Pcc | ||||
| } | ||||
| 
 | ||||
| // GetPccOk returns a tuple with the Pcc field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *LanProperties) GetPccOk() (*string, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Pcc, true | ||||
| } | ||||
| 
 | ||||
| // SetPcc sets field value
 | ||||
| func (o *LanProperties) SetPcc(v string) { | ||||
| 	o.Pcc = &v | ||||
| } | ||||
| 
 | ||||
| // HasPcc returns a boolean if a field has been set.
 | ||||
| func (o *LanProperties) HasPcc() bool { | ||||
| 	if o != nil && o.Pcc != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // GetPublic returns the Public field value
 | ||||
| // If the value is explicit nil, the zero value for bool will be returned
 | ||||
| func (o *LanProperties) GetPublic() *bool { | ||||
| 	if o == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return o.Public | ||||
| } | ||||
| 
 | ||||
| // GetPublicOk returns a tuple with the Public field value
 | ||||
| // and a boolean to check if the value has been set.
 | ||||
| // NOTE: If the value is an explicit nil, `nil, true` will be returned
 | ||||
| func (o *LanProperties) GetPublicOk() (*bool, bool) { | ||||
| 	if o == nil { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	return o.Public, true | ||||
| } | ||||
| 
 | ||||
| // SetPublic sets field value
 | ||||
| func (o *LanProperties) SetPublic(v bool) { | ||||
| 	o.Public = &v | ||||
| } | ||||
| 
 | ||||
| // HasPublic returns a boolean if a field has been set.
 | ||||
| func (o *LanProperties) HasPublic() bool { | ||||
| 	if o != nil && o.Public != nil { | ||||
| 		return true | ||||
| 	} | ||||
| 
 | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| func (o LanProperties) MarshalJSON() ([]byte, error) { | ||||
| 	toSerialize := map[string]interface{}{} | ||||
| 
 | ||||
| 	if o.Name != nil { | ||||
| 		toSerialize["name"] = o.Name | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.IpFailover != nil { | ||||
| 		toSerialize["ipFailover"] = o.IpFailover | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Pcc != nil { | ||||
| 		toSerialize["pcc"] = o.Pcc | ||||
| 	} | ||||
| 	 | ||||
| 
 | ||||
| 	if o.Public != nil { | ||||
| 		toSerialize["public"] = o.Public | ||||
| 	} | ||||
| 	 | ||||
| 	return json.Marshal(toSerialize) | ||||
| } | ||||
| 
 | ||||
| type NullableLanProperties struct { | ||||
| 	value *LanProperties | ||||
| 	isSet bool | ||||
| } | ||||
| 
 | ||||
| func (v NullableLanProperties) Get() *LanProperties { | ||||
| 	return v.value | ||||
| } | ||||
| 
 | ||||
| func (v *NullableLanProperties) Set(val *LanProperties) { | ||||
| 	v.value = val | ||||
| 	v.isSet = true | ||||
| } | ||||
| 
 | ||||
| func (v NullableLanProperties) IsSet() bool { | ||||
| 	return v.isSet | ||||
| } | ||||
| 
 | ||||
| func (v *NullableLanProperties) Unset() { | ||||
| 	v.value = nil | ||||
| 	v.isSet = false | ||||
| } | ||||
| 
 | ||||
| func NewNullableLanProperties(val *LanProperties) *NullableLanProperties { | ||||
| 	return &NullableLanProperties{value: val, isSet: true} | ||||
| } | ||||
| 
 | ||||
| func (v NullableLanProperties) MarshalJSON() ([]byte, error) { | ||||
| 	return json.Marshal(v.value) | ||||
| } | ||||
| 
 | ||||
| func (v *NullableLanProperties) UnmarshalJSON(src []byte) error { | ||||
| 	v.isSet = true | ||||
| 	return json.Unmarshal(src, &v.value) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
Some files were not shown because too many files have changed in this diff Show More
		Loading…
	
		Reference in New Issue